theorem equicontinuousWithinAt_iInf_dom {t : κ → TopologicalSpace X'} {F : ι → X' → α}
    {S : Set X'} {x₀ : X'} {k : κ} (hk : EquicontinuousWithinAt (tX := t k) F S x₀) :
    EquicontinuousWithinAt (tX := ⨅ k, t k) F S x₀

{ι : Type u_1}
{κ : Type u_2}
{X' : Type u_4}
{α : Type u_7}
[uα : UniformSpace α]
{t : κ → TopologicalSpace X'}
{F : ι → X' → α}
{S : Set X'}
{x₀ : X'}
{k : κ}
(hk : EquicontinuousWithinAt F S x₀)


@[reassoc (attr := simp)]
theorem map_lift_piComparison [HasProduct f] [HasProduct fun b => G.obj (f b)] (P : C)
    (g : ∀ j, P ⟶ f j) : G.map (Pi.lift g) ≫ piComparison G f = Pi.lift fun j => G.map (g j)

[CategoryTheory.Limits.HasProduct fun b => G.obj (f b)]

G.map (CategoryTheory.Limits.Pi.lift g) ≫ CategoryTheory.Limits.piComparison G f =
  CategoryTheory.Limits.Pi.lift fun j => G.map (g j)


theorem M.dest_eq_dest' {α : TypeVec n} {x : P.last.M} {a : P.A}
    {f : P.last.B a → P.last.M} (h : PFunctor.M.dest x = ⟨a, f⟩) (f' : M.Path P x ⟹ α) :
    M.dest P ⟨x, f'⟩ = M.dest' P h f'

{n : ℕ}
(P : MvPFunctor.{u} (n + 1))
{α : TypeVec.{u} n}
{x : P.last.M}
{a : P.A}
{f : P.last.B a → P.last.M}
(h : x.dest = ⟨a, f⟩)
(f' : MvPFunctor.M.Path P x ⟹ α)

MvPFunctor.M.dest P ⟨x, f'⟩ = MvPFunctor.M.dest' P h f'


theorem disjSum_mono_right (s : Finset α) : Monotone (s.disjSum : Finset β → Finset (α ⊕ β))

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


@[to_additive]
theorem isComplement_univ_left : IsComplement univ S ↔ ∃ g : G, S = {g}

AddSubgroup.IsComplement Set.univ S ↔ ∃ g, S = {g}


@[simp]
theorem limitRecOn_limit {C} (o H₁ H₂ H₃ h) :
    @limitRecOn C o H₁ H₂ H₃ = H₃ o h fun x _h => @limitRecOn C x H₁ H₂ H₃

(H₂ : (o : Ordinal.{u_4}) → C o → C (Order.succ o))

(H₃ : (o : Ordinal.{u_4}) → o.IsLimit → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o)

o.limitRecOn H₁ H₂ H₃ = H₃ o h fun x _h => x.limitRecOn H₁ H₂ H₃


protected theorem ContinuousOn.inversion (hc : ContinuousOn c s) (hR : ContinuousOn R s)
    (hx : ContinuousOn x s) (hne : ∀ a ∈ s, x a ≠ c a) :
    ContinuousOn (fun a ↦ inversion (c a) (R a) (x a)) s

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{X : Type u_3}
[TopologicalSpace X]
{c x : X → P}
{R : X → ℝ}
{s : Set X}
(hc : ContinuousOn c s)
(hR : ContinuousOn R s)
(hx : ContinuousOn x s)
(hne : ∀ a ∈ s, x a ≠ c a)

ContinuousOn (fun a => EuclideanGeometry.inversion (c a) (R a) (x a)) s


theorem finiteDimensional_iff_of_rank_eq_nsmul {W} [AddCommGroup W] [Module K W] {n : ℕ}
    (hn : n ≠ 0) (hVW : Module.rank K V = n • Module.rank K W) :
    FiniteDimensional K V ↔ FiniteDimensional K W


@[to_additive]
theorem _root_.Submonoid.pow_exponent_eq_one {S : Submonoid G} {g : G} (g_in_s : g ∈ S) :
    g ^ (Monoid.exponent S) = 1

{G : Type u}
[AddMonoid G]
{S : AddSubmonoid G}
{g : G}
(g_in_s : g ∈ S)


/-- The functor `F.mapTriangle` commutes with the shift. -/
@[simps!]
noncomputable def mapTriangleCommShiftIso (n : ℤ) :
    Triangle.shiftFunctor C n ⋙ F.mapTriangle ≅ F.mapTriangle ⋙ Triangle.shiftFunctor D n

(X : CategoryTheory.Pretriangulated.Triangle C)

((F.mapTriangleCommShiftIso n).hom.app X).hom₃ = (F.commShiftIso n).hom.app X.obj₃


@[reassoc]
lemma naturality_φ₂ (f : S₁ ⟶ S₂) : S₁.φ₂ ≫ f.f₂.τ₂ = functorP.map f ≫ S₂.φ₂

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

CategoryTheory.CategoryStruct.comp S₁.φ₂ f.f₂.τ₂ =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.SnakeInput.functorP.map f) S₂.φ₂


theorem primeFactorsList_chain {n : ℕ} :
    ∀ {a}, (∀ p, Prime p → p ∣ n → a ≤ p) → List.Chain (· ≤ ·) a (primeFactorsList n)

(∀ (p : ℕ), Nat.Prime p → p ∣ n → a ≤ p) → List.Chain (fun x x_1 => x ≤ x_1) a n.primeFactorsList


theorem MonotoneOn.integral_le_sum_Ico (hab : a ≤ b) (hf : MonotoneOn f (Set.Icc a b)) :
    (∫ x in a..b, f x) ≤ ∑ i ∈ Finset.Ico a b, f (i + 1 : ℕ)

{a b : ℕ}
{f : ℝ → ℝ}
(hab : a ≤ b)
(hf : MonotoneOn f (Set.Icc ↑a ↑b))

∫ (x : ℝ) in ↑a..↑b, f x ≤ ∑ i ∈ Finset.Ico a b, f ↑(i + 1)


protected theorem lt_add_of_neg_add_lt_left {a b c : Int} (h : -b + a < c) : a < b + c


theorem coprodᵢ_eq_bot_iff' : Filter.coprodᵢ f = ⊥ ↔ (∃ i, IsEmpty (α i)) ∨ f = ⊥

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


theorem norm_values_discrete (a : PadicSeq p) (ha : ¬a ≈ 0) : ∃ z : ℤ, a.norm = (p : ℚ) ^ (-z)

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(a : PadicSeq p)
(ha : ¬a ≈ 0)


theorem modEq_dioph {h : (α → ℕ) → ℕ} (dh : DiophFn h) : Dioph fun v => f v ≡ g v [MOD h v]

{α : Type}
{f g : (α → ℕ) → ℕ}
(df : Dioph.DiophFn f)
(dg : Dioph.DiophFn g)
{h : (α → ℕ) → ℕ}
(dh : Dioph.DiophFn h)


theorem mem_sphere {p : P} {s : Sphere P} : p ∈ s ↔ dist p s.center = s.radius

{P : Type u_2}
[MetricSpace P]
{p : P}
{s : EuclideanGeometry.Sphere P}


theorem mono_of_epi_of_epi_of_mono (hR₁ : R₁.Exact) (hR₂ : R₂.Exact)
    (hR₁' : Epi (R₁.map' 1 2)) (h₀ : Epi (app' φ 0)) (h₁ : Mono (app' φ 1)) :
    Mono (app' φ 2)

{R₁ R₂ : CategoryTheory.ComposableArrows C 2}

(hR₁' : CategoryTheory.Epi (R₁.map' 1 2 ⋯ ⋯))

(h₀ : CategoryTheory.Epi (CategoryTheory.ComposableArrows.app' φ 0 ⋯))

(h₁ : CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 1 ⋯))

CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 2 ⋯)


@[to_additive (attr := simp)]
theorem coe_copy (f : α →*o β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[AddZeroClass α]
[AddZeroClass β]
(f : α →+o β)
(f' : α → β)
(h : f' = ⇑f)


theorem Sbtw.left_mem_image_Ioi {x y z : P} (h : Sbtw R x y z) :
    x ∈ lineMap z y '' Set.Ioi (1 : R)

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

x ∈ ⇑(AffineMap.lineMap z y) '' Set.Ioi 1


@[fun_prop]
protected nonrec theorem HasFDerivAt.fst (h : HasFDerivAt f₂ f₂' x) :
    HasFDerivAt (fun x => (f₂ x).1) ((fst 𝕜 F G).comp f₂') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{f₂ : E → F × G}
{f₂' : E →L[𝕜] F × G}
(h : HasFDerivAt f₂ f₂' x)

HasFDerivAt (fun x => (f₂ x).1) ((ContinuousLinearMap.fst 𝕜 F G).comp f₂') x


@[reassoc]
theorem leftUnitor_tensor_inv' (X Y : C) :
    (λ_ (X ⊗ Y)).inv = ((λ_ X).inv ⊗ 𝟙 Y) ≫ (α_ (𝟙_ C) X Y).hom

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

(CategoryTheory.MonoidalCategory.leftUnitor (CategoryTheory.MonoidalCategory.tensorObj X Y)).inv =
  CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.MonoidalCategory.leftUnitor X).inv (𝟙 Y) ≫
    (CategoryTheory.MonoidalCategory.associator (𝟙_ C) X Y).hom


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

(D : AlgebraicGeometry.Scheme.GlueData)
(x : ↑↑D.glued.toPresheafedSpace)


theorem inter_cylinder_same (s : Finset ι) (S₁ : Set (∀ i : s, α i)) (S₂ : Set (∀ i : s, α i)) :
    cylinder s S₁ ∩ cylinder s S₂ = cylinder s (S₁ ∩ S₂)

(S₁ S₂ : Set ((i : { x // x ∈ s }) → α ↑i))

MeasureTheory.cylinder s S₁ ∩ MeasureTheory.cylinder s S₂ = MeasureTheory.cylinder s (S₁ ∩ S₂)


/-- Alias of `Nat.cast_pos'`, specialized to `Ordinal` --/
theorem natCast_pos {n : ℕ} : (0 : Ordinal) < n ↔ 0 < n


@[simp]
theorem bernoulli'_zero : bernoulli' 0 = 1


theorem hasFDerivAt_finset_prod [DecidableEq ι] [Fintype ι] {x : ι → 𝔸'} :
    HasFDerivAt (𝕜 := 𝕜) (∏ i ∈ u, · i) (∑ i ∈ u, (∏ j ∈ u.erase i, x j) • proj i) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{ι : Type u_6}
{𝔸' : Type u_8}
[NormedCommRing 𝔸']
[NormedAlgebra 𝕜 𝔸']
{u : Finset ι}
[DecidableEq ι]
[Fintype ι]
{x : ι → 𝔸'}

HasFDerivAt (fun x => ∏ i ∈ u, x i) (∑ i ∈ u, (∏ j ∈ u.erase i, x j) • ContinuousLinearMap.proj i) x


lemma isClopen_iInter₂ {f : ∀ i, κ i → Set α} (hf : ∀ i j, IsClopen (f i j)) :
    IsClopen (⋂ i, ⋂ j, f i j)

(hf : ∀ (i : ι) (j : κ i), IsClopen (f i j))


theorem ae_empty_or_univ_of_ae_le_preimage (hf : Ergodic f μ) (hs : MeasurableSet s)
    (hs' : s ≤ᵐ[μ] f ⁻¹' s) : s =ᵐ[μ] (∅ : Set α) ∨ s =ᵐ[μ] univ

{α : Type u_1}
{m : MeasurableSpace α}
{f : α → α}
{s : Set α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure μ]
(hf : Ergodic f μ)
(hs : MeasurableSet s)
(hs' : s ≤ᵐ[μ] f ⁻¹' s)


protected theorem smul_zero (r : R') : r • (0 : M ⊗[R] N) = 0

{R : Type u_1}
[CommSemiring R]
{R' : Type u_2}
[Monoid R']
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
[DistribMulAction R' M]
[SMulCommClass R R' M]
(r : R')


theorem mk_mem_sym2 {xs : List α} {a b : α} (ha : a ∈ xs) (hb : b ∈ xs) :
    s(a, b) ∈ xs.sym2

{α : Type u_1}
{xs : List α}
{a b : α}
(ha : a ∈ xs)
(hb : b ∈ xs)


theorem mem_carrier {s : Subring R} {x : R} : x ∈ s.carrier ↔ x ∈ s

{R : Type u}
[Ring R]
{s : Subring R}
{x : R}


theorem BinaryCofan.isColimit_iff_isIso_inl {X Y : C} (h : IsInitial Y) (c : BinaryCofan X Y) :
    Nonempty (IsColimit c) ↔ IsIso c.inl

(c : CategoryTheory.Limits.BinaryCofan X Y)

Nonempty (CategoryTheory.Limits.IsColimit c) ↔ CategoryTheory.IsIso c.inl


theorem Equiv.iInf_comp {g : ι' → α} (e : ι ≃ ι') : ⨅ x, g (e x) = ⨅ y, g y

{α : Type u_1}
{ι : Sort u_5}
{ι' : Sort u_6}
[InfSet α]
{g : ι' → α}
(e : ι ≃ ι')


@[simp] theorem getLsb_zero : (0#w).getLsb i = false


theorem exists_seq_strictAnti_tendsto' [DenselyOrdered α] [FirstCountableTopology α] {x y : α}
    (hy : x < y) : ∃ u : ℕ → α, StrictAnti u ∧ (∀ n, u n ∈ Ioo x y) ∧ Tendsto u atTop (𝓝 x)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[FirstCountableTopology α]
{x y : α}
(hy : x < y)

∃ u, StrictAnti u ∧ (∀ (n : ℕ), u n ∈ Set.Ioo x y) ∧ Filter.Tendsto u Filter.atTop (𝓝 x)


/-- The homology functor `ShortComplex C ⥤ C` for a category `C` with homology. -/
@[simps]
noncomputable def homologyFunctor [CategoryWithHomology C] :
    ShortComplex C ⥤ C

∀ {X Y : CategoryTheory.ShortComplex C} (f : X ⟶ Y),
  (CategoryTheory.ShortComplex.homologyFunctor C).map f = CategoryTheory.ShortComplex.homologyMap f


@[simp] theorem disjoint_cons_right : Disjoint l₁ (a :: l₂) ↔ (a ∉ l₁) ∧ Disjoint l₁ l₂

∀ {α : Type u_1} {l₁ : List α} {a : α} {l₂ : List α}, l₁.Disjoint (a :: l₂) ↔ ¬a ∈ l₁ ∧ l₁.Disjoint l₂


/--If a function `T` is uniformly continuous in a uniform space `β`,
then its `n`-th iterate `T^[n]` is also uniformly continuous.-/
theorem UniformContinuous.iterate [UniformSpace β] (T : β → β) (n : ℕ) (h : UniformContinuous T) :
    UniformContinuous T^[n]

{β : Type ub}
[UniformSpace β]
(T : β → β)
(n : ℕ)
(h : UniformContinuous T)


theorem smul_apply (t : R) (f : M →ₗ⁅R,L⁆ N) (m : M) : (t • f) m = t • f m

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


theorem div_lt_iff_lt_mul (Hk : 0 < k) : x / k < y ↔ x < y * k


@[simp]
theorem smul_closure (a : α) (s : Set A) : a • closure s = closure (a • s)

{α : Type u_1}
{A : Type u_5}
[AddMonoid A]
[Monoid α]
[DistribMulAction α A]
(a : α)
(s : Set A)

a • AddSubmonoid.closure s = AddSubmonoid.closure (a • s)


theorem norm_iteratedFDeriv_mul_le {f : E → A} {g : E → A} {N : ℕ∞} (hf : ContDiff 𝕜 N f)
    (hg : ContDiff 𝕜 N g) (x : E) {n : ℕ} (hn : (n : ℕ∞) ≤ N) :
    ‖iteratedFDeriv 𝕜 n (fun y => f y * g y) x‖ ≤ ∑ i ∈ Finset.range (n + 1),
      (n.choose i : ℝ) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{A : Type u_3}
[NormedRing A]
[NormedAlgebra 𝕜 A]
{f g : E → A}
{N : ℕ∞}
(hf : ContDiff 𝕜 N f)
(hg : ContDiff 𝕜 N g)
(x : E)
{n : ℕ}
(hn : ↑n ≤ N)

‖iteratedFDeriv 𝕜 n (fun y => f y * g y) x‖ ≤
  ∑ i ∈ Finset.range (n + 1), ↑(n.choose i) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖


theorem Subsingleton.injOn (hs : s.Subsingleton) (f : α → β) : InjOn f s

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


@[simp]
lemma NatTrans.naturality_apply {C D : Type*} [Category C] [Category D] [ConcreteCategory D]
    {F G : C ⥤ D} (φ : F ⟶ G) {X Y : C} (f : X ⟶ Y) (x : F.obj X) :
    φ.app Y (F.map f x) = G.map f (φ.app X x)

(x : (CategoryTheory.forget D).obj (F.obj X))

(φ.app Y) ((F.map f) x) = (G.map f) ((φ.app X) x)


@[simp] theorem ofIso_refl : ofIso (IsometryEquiv.refl Q₁) = .refl _

{R : Type u}
[CommRing R]
{X : Type v}
[AddCommGroup X]
[Module R X]
{Q₁ : QuadraticForm R X}

QuadraticModuleCat.ofIso (QuadraticMap.IsometryEquiv.refl Q₁) = CategoryTheory.Iso.refl (QuadraticModuleCat.of Q₁)


@[simp] lemma snd_map_swap : (ρ.map Prod.swap).snd = ρ.fst

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{ρ : MeasureTheory.Measure (α × β)}

(MeasureTheory.Measure.map Prod.swap ρ).snd = ρ.fst


@[simp]
theorem isoApp_symm {X Y : ∀ i, C i} (f : X ≅ Y) (i : I) : isoApp f.symm i = (isoApp f i).symm

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

CategoryTheory.Pi.isoApp f.symm i = (CategoryTheory.Pi.isoApp f i).symm


/-- This lemma works in the case in which `a ≠ 0`.  The version where
 `ZMod n` is not infinite, i.e. `n ≠ 0`, is `addOrderOf_coe`. -/
@[simp]
theorem addOrderOf_coe' {a : ℕ} (n : ℕ) (a0 : a ≠ 0) : addOrderOf (a : ZMod n) = n / n.gcd a


theorem exists_eq_spanSingleton_mul (I : FractionalIdeal R₁⁰ K) :
    ∃ (a : R₁) (aI : Ideal R₁), a ≠ 0 ∧ I = spanSingleton R₁⁰ (algebraMap R₁ K a)⁻¹ * aI

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

∃ a aI, a ≠ 0 ∧ I = FractionalIdeal.spanSingleton R₁⁰ ((algebraMap R₁ K) a)⁻¹ * ↑aI


@[simp]
theorem not_sbtw_self_left (x y : P) : ¬Sbtw R x x y

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


theorem rpow_le_rpow_of_exponent_ge (hx0 : 0 < x) (hx1 : x ≤ 1) (hyz : z ≤ y) : x ^ y ≤ x ^ z

{x y z : ℝ}
(hx0 : 0 < x)
(hx1 : x ≤ 1)
(hyz : z ≤ y)


theorem div_def (a) {b : Ordinal} (h : b ≠ 0) : a / b = sInf { o | a < b * succ o }

(a : Ordinal.{u_4})
{b : Ordinal.{u_4}}
(h : b ≠ 0)


/-- The fractional ideals of a Noetherian ring are finitely generated. -/
lemma fg_of_isNoetherianRing [hR : IsNoetherianRing R] (hS : S ≤ R⁰) (I : FractionalIdeal S P) :
    FG I.coeToSubmodule

{R : Type u_3}
[CommRing R]
[Nontrivial R]
{S : Submonoid R}
{P : Type u_4}
[Nontrivial P]
[CommRing P]
[Algebra R P]
[NoZeroSMulDivisors R P]
[hR : IsNoetherianRing R]
(hS : S ≤ R⁰)
(I : FractionalIdeal S P)


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

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

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


/-- (An auxiliary definition for `functorCategoryMonoidal`.)
Tensor product of functors `C ⥤ D`, when `D` is monoidal.
 -/
@[simps]
def tensorObj : C ⥤ D

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

(CategoryTheory.Monoidal.FunctorCategory.tensorObj F G).obj X = F.obj X ⊗ G.obj X


theorem cond_inter_self (hms : MeasurableSet s) (t : Set Ω) : μ[s ∩ t|s] = μ[t|s]

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

(ProbabilityTheory.cond μ s) (s ∩ t) = (ProbabilityTheory.cond μ s) t


theorem extChartAt_source_mem_nhdsWithin' {x x' : M} (h : x' ∈ (extChartAt I x).source) :
    (extChartAt I x).source ∈ 𝓝[s] x'

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
{s : Set M}
[ChartedSpace H M]
{x x' : M}
(h : x' ∈ (extChartAt I x).source)


@[to_additive]
theorem inseparable_one_iff_norm {a : E} : Inseparable a 1 ↔ ‖a‖ = 0

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


@[simp]
theorem coe_curry : ⇑(LinearEquiv.curry R V V₂) = curry

(R : Type u_1)
[Semiring R]
(V : Type u_18)
(V₂ : Type u_17)

⇑(LinearEquiv.curry R V V₂) = Function.curry


theorem eventuallyEq_one (x : M) (hx : x ∈ s) : fs (fs.ind x hx) =ᶠ[𝓝 x] 1

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


theorem uniformity_basis_dist_inv_nat_succ :
    (𝓤 α).HasBasis (fun _ => True) fun n : ℕ => { p : α × α | dist p.1 p.2 < 1 / (↑n + 1) }

(𝓤 α).HasBasis (fun x => True) fun n => {p | dist p.1 p.2 < 1 / (↑n + 1)}


/-- The `NoZeroSMulDivisors` makes sure that the result holds even when the support of `f` is
infinite. For a more usual version assuming `(support f).Finite` instead, see `finsum_smul'`. -/
theorem finsum_smul {R M : Type*} [Ring R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M]
    (f : ι → R) (x : M) : (∑ᶠ i, f i) • x = ∑ᶠ i, f i • x

{ι : Sort u_6}
{R : Type u_7}
{M : Type u_8}
[Ring R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
(f : ι → R)
(x : M)

(∑ᶠ (i : ι), f i) • x = ∑ᶠ (i : ι), f i • x


@[rclike_simps]
theorem conj_to_real {x : ℝ} : conj x = x


@[to_additive]
theorem units_val {a x y : Mˣ} (h : SemiconjBy a x y) : SemiconjBy (a : M) x y

{M : Type u_1}
[Monoid M]
{a x y : Mˣ}
(h : SemiconjBy a x y)


theorem of_mul_of {i j} (a : A i) (b : A j) :
    of A i a * of A j b = of _ (i + j) (GradedMonoid.GMul.mul a b)

(DirectSum.of A i) a * (DirectSum.of A j) b = (DirectSum.of A (i + j)) (GradedMonoid.GMul.mul a b)


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

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

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


@[simp]
theorem mem_insert_iff {x a : α} {s : Set α} : x ∈ insert a s ↔ x = a ∨ x ∈ s


theorem isIntegralClosure_adjoin_singleton_of_prime [hcycl : IsCyclotomicExtension {p} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑p) : IsIntegralClosure (adjoin ℤ ({ζ} : Set K)) ℤ K

{p : ℕ+}
{K : Type u}
[Field K]
[CharZero K]
{ζ : K}
[hp : Fact (Nat.Prime ↑p)]
[hcycl : IsCyclotomicExtension {p} ℚ K]
(hζ : IsPrimitiveRoot ζ ↑p)

IsIntegralClosure ↥(Algebra.adjoin ℤ {ζ}) ℤ K


theorem concat_append (a : α) (l₁ l₂ : List α) : concat l₁ a ++ l₂ = l₁ ++ a :: l₂


@[to_additive (attr := simp)]
lemma units_zpow_right {a : M} {x y : Mˣ} (h : SemiconjBy a x y) :
    ∀ m : ℤ, SemiconjBy a ↑(x ^ m) ↑(y ^ m)

{M : Type u_1}
[Monoid M]
{a : M}
{x y : Mˣ}
(h : SemiconjBy a ↑x ↑y)
(m : ℤ)


/-- A cyclotomic extension splits `cyclotomic n K` if `n ∈ S` and `ne_zero (n : K)`. -/
theorem splits_cyclotomic [IsCyclotomicExtension S K L] (hS : n ∈ S) :
    Splits (algebraMap K L) (cyclotomic n K)

{n : ℕ+}
{S : Set ℕ+}
(K : Type w)
(L : Type z)
[Field K]
[Field L]
[Algebra K L]
[IsCyclotomicExtension S K L]
(hS : n ∈ S)

Polynomial.Splits (algebraMap K L) (Polynomial.cyclotomic (↑n) K)


/-- This applies to the frobenius norm. -/
@[local instance]
theorem frobeniusBoundedSMul [SeminormedRing R] [SeminormedAddCommGroup α] [Module R α]
    [BoundedSMul R α] :
    BoundedSMul R (Matrix m n α)

{R : Type u_1}
{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[SeminormedRing R]
[SeminormedAddCommGroup α]
[Module R α]
[BoundedSMul R α]


theorem succ_lt_of_isLimit {o a : Ordinal} (h : IsLimit o) : succ a < o ↔ a < o


@[simp]
theorem map_top (f : α → β) : map f ⊤ = 𝓟 (range f)


theorem diophFn_comp1 {S : Set (Option α → ℕ)} (d : Dioph S) {f : (α → ℕ) → ℕ} (df : DiophFn f) :
    Dioph {v | f v ::ₒ v ∈ S}

{α : Type u}
{S : Set (Option α → ℕ)}
(d : Dioph S)
{f : (α → ℕ) → ℕ}
(df : Dioph.DiophFn f)


/-- A finite dimensional vector space over an `RCLike` is a proper metric space.

This is not an instance because it would cause a search for `FiniteDimensional ?x E` before
`RCLike ?x`. -/
theorem proper_rclike [FiniteDimensional K E] : ProperSpace E

(K : Type u_1)
(E : Type u_2)
[RCLike K]
[NormedAddCommGroup E]
[NormedSpace K E]
[FiniteDimensional K E]


protected theorem ofNat_add_one_out (n : ℕ) : ↑n + (1 : ℤ) = ↑(succ n)


theorem reduce_isSpecial' (u : XgcdType) (hs : u.IsSpecial) : u.reduce.IsSpecial'


@[simp]
theorem limsup_eq_bot : f.limsup u = ⊥ ↔ u =ᶠ[f] ⊥

{α : Type u_2}
{β : Type u_3}
[CompleteLinearOrder α]
[TopologicalSpace α]
[FirstCountableTopology α]
[OrderTopology α]
{f : Filter β}
[CountableInterFilter f]
{u : β → α}


@[simp]
theorem algebraMap_eq_one_iff (x : R) : algebraMap R (FreeAlgebra R X) x = 1 ↔ x = 1

{R : Type u_1}
[CommSemiring R]
{X : Type u_2}
(x : R)

(algebraMap R (FreeAlgebra R X)) x = 1 ↔ x = 1


theorem isArtinian_of_fg_of_artinian {R M} [Ring R] [AddCommGroup M] [Module R M]
    (N : Submodule R M) [IsArtinianRing R] (hN : N.FG) : IsArtinian R N

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(N : Submodule R M)
[IsArtinianRing R]
(hN : N.FG)


theorem derivWithin_mul (hxs : UniqueDiffWithinAt 𝕜 s x) (hc : DifferentiableWithinAt 𝕜 c s x)
    (hd : DifferentiableWithinAt 𝕜 d s x) :
    derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{c d : 𝕜 → 𝔸}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(hc : DifferentiableWithinAt 𝕜 c s x)
(hd : DifferentiableWithinAt 𝕜 d s x)


@[simp]
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}
[Preorder α]
[Preorder β]
[Preorder γ]
[Preorder δ]
[MulZeroOneClass α]
[MulZeroOneClass β]
[MulZeroOneClass γ]
[MulZeroOneClass δ]
(f : γ →*₀o δ)
(g : β →*₀o γ)
(h : α →*₀o β)


theorem Fintype.card_eq_card_units_add_one [GroupWithZero α] [Fintype α] [DecidableEq α] :
    Fintype.card α = Fintype.card αˣ + 1

{α : Type u_1}
[GroupWithZero α]
[Fintype α]
[DecidableEq α]


theorem unbounded_le_iff [LinearOrder α] : Unbounded (· ≤ ·) s ↔ ∀ a, ∃ b ∈ s, a < b

{α : Type u_1}
{s : Set α}
[LinearOrder α]

Set.Unbounded (fun x x_1 => x ≤ x_1) s ↔ ∀ (a : α), ∃ b ∈ s, a < b


/-- Multiplication by a nonzero element `a` on the right
as a `DilationEquiv` of a normed division ring. -/
@[simps!]
def DilationEquiv.mulRight (a : α) (ha : a ≠ 0) : α ≃ᵈ α

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


/-- If `b` is a right identity for `f : α → β → α`, then `pure b` is a right identity for
`Filter.map₂ f`. -/
theorem map₂_right_identity {f : α → β → α} {b : β} (h : ∀ a, f a b = a) (l : Filter α) :
    map₂ f l (pure b) = l

{α : Type u_1}
{β : Type u_3}
{f : α → β → α}
{b : β}
(h : ∀ (a : α), f a b = a)
(l : Filter α)


@[simp]
theorem aleph_mul_aleph0 (o : Ordinal) : aleph o * ℵ₀ = aleph o

Cardinal.aleph o * ℵ₀ = Cardinal.aleph o


/-- **Rearrangement Inequality**: Pointwise scalar multiplication of `f` and `g` is minimized when
`f` and `g` antivary together. Stated by permuting the entries of `g`. -/
theorem AntivaryOn.sum_smul_le_sum_smul_comp_perm (hfg : AntivaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) : ∑ i ∈ s, f i • g i ≤ ∑ i ∈ s, f i • g (σ i)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{s : Finset ι}
{σ : Equiv.Perm ι}
{f : ι → α}
{g : ι → β}
(hfg : AntivaryOn f g ↑s)
(hσ : {x | σ x ≠ x} ⊆ ↑s)


/-- A reformulation of the Gamma recurrence relation which is true for `s = 0` as well. -/
theorem one_div_Gamma_eq_self_mul_one_div_Gamma_add_one (s : ℂ) :
    (Gamma s)⁻¹ = s * (Gamma (s + 1))⁻¹

(Complex.Gamma s)⁻¹ = s * (Complex.Gamma (s + 1))⁻¹


theorem generateHas_compl {C : Set (Set α)} {s : Set α} : GenerateHas C sᶜ ↔ GenerateHas C s

{α : Type u_1}
{C : Set (Set α)}
{s : Set α}

MeasurableSpace.DynkinSystem.GenerateHas C sᶜ ↔ MeasurableSpace.DynkinSystem.GenerateHas C s


/-- The constant map is alternating when `ι` is empty. -/
@[simps! toContinuousMultilinearMap apply]
def constOfIsEmpty [IsEmpty ι] (m : N) : M [⋀^ι]→L[R] N

(R : Type u_1)
(M : Type u_2)
{N : Type u_4}
(ι : Type u_6)
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
[IsEmpty ι]
(m : N)

(ContinuousAlternatingMap.constOfIsEmpty R M ι m).toContinuousMultilinearMap =
  ContinuousMultilinearMap.constOfIsEmpty R (fun x => M) m


theorem support_formPerm_of_nodup [Fintype α] (l : List α) (h : Nodup l) (h' : ∀ x : α, l ≠ [x]) :
    support (formPerm l) = l.toFinset

{α : Type u_1}
[DecidableEq α]
[Fintype α]
(l : List α)
(h : l.Nodup)
(h' : ∀ (x : α), l ≠ [x])


@[simp] theorem length_cons {α} (a : α) (as : List α) : (cons a as).length = as.length + 1


@[simp]
theorem map_id : p.map (RingHom.id _) = p


theorem Matrix.toBilin_comp (M : Matrix n n R₂) (P Q : Matrix n o R₂) :
    (Matrix.toBilin b M).comp (toLin c b P) (toLin c b Q) = Matrix.toBilin c (Pᵀ * M * Q)

{R₂ : Type u_5}
{M₂ : Type u_6}
[CommSemiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{n : Type u_11}
{o : Type u_12}
[Fintype n]
[Fintype o]
[DecidableEq n]
(b : Basis n R₂ M₂)
{M₂' : Type u_13}
[AddCommMonoid M₂']
[Module R₂ M₂']
(c : Basis o R₂ M₂')
[DecidableEq o]
(M : Matrix n n R₂)
(P Q : Matrix n o R₂)

((Matrix.toBilin b) M).comp ((Matrix.toLin c b) P) ((Matrix.toLin c b) Q) = (Matrix.toBilin c) (P.transpose * M * Q)


@[to_additive (attr := simp)]
theorem lift_apply_mk (f : M →* P) (g : N →* P) (x : FreeMonoid (M ⊕ N)) :
    lift f g (mk x) = FreeMonoid.lift (Sum.elim f g) x

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[MulOneClass M]
[MulOneClass N]
[Monoid P]
(f : M →* P)
(g : N →* P)
(x : FreeMonoid (M ⊕ N))

(Monoid.Coprod.lift f g) (Monoid.Coprod.mk x) = (FreeMonoid.lift (Sum.elim ⇑f ⇑g)) x


theorem _root_.continuous_real_toNNReal : Continuous Real.toNNReal


theorem natCast_one : ((1 : Nat) : Int) = (1 : Int)


@[to_additive]
theorem Finite.mul : s.Finite → t.Finite → (s * t).Finite


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

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


/-- The equivalence of categories expressing right unity of products of categories.  -/
@[simps]
def rightUnitorEquivalence : C × Discrete (PUnit : Type w) ≌ C

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

(CategoryTheory.prod.rightUnitorEquivalence C).unitIso =
  CategoryTheory.Iso.refl (𝟭 (C × CategoryTheory.Discrete PUnit.{w + 1}))


theorem aux_uniformity_eq : 𝓤 (PiLp p β) = 𝓤[Pi.uniformSpace _]

(p : ℝ≥0∞)
{ι : Type u_2}
(β : ι → Type u_4)
[Fact (1 ≤ p)]
[(i : ι) → PseudoEMetricSpace (β i)]
[Fintype ι]


theorem strictConvex_Ioi (r : β) : StrictConvex 𝕜 (Ioi r)

{𝕜 : Type u_1}
{β : Type u_5}
[OrderedSemiring 𝕜]
[TopologicalSpace β]
[LinearOrderedCancelAddCommMonoid β]
[OrderTopology β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
(r : β)


@[to_additive (attr := simp)]
theorem inv_inv (a : G) : a⁻¹⁻¹ = a

{G : Type u_1}
[InvolutiveInv G]
(a : G)


/-- `AddEquivClass F A B` states that `F` is a type of addition-preserving morphisms.
You should extend this class when you extend `AddEquiv`. -/
class AddEquivClass (F : Type*) (A B : outParam Type*) [Add A] [Add B] [EquivLike F A B] :
    Prop where
  /-- Preserves addition. -/
  map_add : ∀ (f : F) (a b), f (a + b) = f a + f b

{F : Type u_12}
{A : outParam (Type u_13)}
{B : outParam (Type u_14)}
[Add A]
[Add B]
[EquivLike F A B]
[self : AddEquivClass F A B]
(f : F)
(a b : A)


/-- A Type `R` is a `CompatibleRing` if it is a structure for the language of rings and this
structure is the same as the structure already given on `R` by the classes `Add`, `Mul` etc.

It is recommended to use this type class as a hypothesis to any theorem whose statement
requires a type to have be both a `Ring` (or `Field` etc.) and a
`Language.ring.Structure`  -/
/- This class does not extend `Add` etc, because this way it can be used in
combination with a `Ring`, or `Field` instance without having multiple different
`Add` structures on the Type. -/
class CompatibleRing (R : Type*) [Add R] [Mul R] [Neg R] [One R] [Zero R]
    extends Language.ring.Structure R where
  /-- Addition in the `Language.ring.Structure` is the same as the addition given by the
    `Add` instance -/
  funMap_add : ∀ x, funMap addFunc x = x 0 + x 1
  /-- Multiplication in the `Language.ring.Structure` is the same as the multiplication given by the
    `Mul` instance -/
  funMap_mul : ∀ x, funMap mulFunc x = x 0 * x 1
  /-- Negation in the `Language.ring.Structure` is the same as the negation given by the
    `Neg` instance -/
  funMap_neg : ∀ x, funMap negFunc x = -x 0
  /-- The constant `0` in the `Language.ring.Structure` is the same as the constant given by the
    `Zero` instance -/
  funMap_zero : ∀ x, funMap (zeroFunc : Language.ring.Constants) x = 0
  /-- The constant `1` in the `Language.ring.Structure` is the same as the constant given by the
    `One` instance -/
  funMap_one : ∀ x, funMap (oneFunc : Language.ring.Constants) x = 1

[self : FirstOrder.Ring.CompatibleRing R]

FirstOrder.Language.Structure.funMap FirstOrder.Ring.zeroFunc x = 0


@[simp]
theorem codRestrict_apply (p) (f : r ≺i s) (H H₂ a) : codRestrict p f H H₂ a = ⟨f a, H a⟩

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(p : Set β)
(f : r ≺i s)
(H : ∀ (a : α), f.toRelEmbedding a ∈ p)
(H₂ : f.top ∈ p)
(a : α)

(PrincipalSeg.codRestrict p f H H₂).toRelEmbedding a = ⟨f.toRelEmbedding a, ⋯⟩


/-- The difference of two Hurwitz zeta functions is differentiable everywhere. -/
lemma differentiable_hurwitzZeta_sub_hurwitzZeta (a b : UnitAddCircle) :
    Differentiable ℂ (fun s ↦ hurwitzZeta a s - hurwitzZeta b s)

Differentiable ℂ fun s => HurwitzZeta.hurwitzZeta a s - HurwitzZeta.hurwitzZeta b s


@[simp, norm_cast]
theorem coe_add (x y : s) : ((x + y : s) : R) = (x + y : R)

{R : Type u}
[NonAssocSemiring R]
(s : Subsemiring R)
(x y : ↥s)


theorem two_zsmul_toReal_eq_two_mul_add_two_pi {θ : Angle} :
    ((2 : ℤ) • θ).toReal = 2 * θ.toReal + 2 * π ↔ θ.toReal ≤ -π / 2

(2 • θ).toReal = 2 * θ.toReal + 2 * π ↔ θ.toReal ≤ -π / 2


@[simp]
theorem self_trans_symm (e : R ≃+* S) : e.trans e.symm = RingEquiv.refl R

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


lemma lift_comp_comm_eq  (f : M →ₗ[R] N →ₗ[R] P) :
    lift f ∘ₗ TensorProduct.comm R N M = lift f.flip

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

TensorProduct.lift f ∘ₗ ↑(TensorProduct.comm R N M) = TensorProduct.lift f.flip


/-- `a : α` is a Stieltjes point for `f : α → ℚ → ℝ` if `f a` is monotone with limit 0 at -∞
and 1 at +∞ and satisfies a continuity property. -/
structure IsRatStieltjesPoint (f : α → ℚ → ℝ) (a : α) : Prop where
  mono : Monotone (f a)
  tendsto_atTop_one : Tendsto (f a) atTop (𝓝 1)
  tendsto_atBot_zero : Tendsto (f a) atBot (𝓝 0)
  iInf_rat_gt_eq : ∀ t : ℚ, ⨅ r : Ioi t, f a r = f a t

{f : α → ℚ → ℝ}

(self : ProbabilityTheory.IsRatStieltjesPoint f a)


theorem of_lt_right [LinearOrder α] (h : (a:α) < b) (eq : b = b') : ¬b' ≤ a

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


@[simp]
theorem trace_trace [Algebra S T] [IsScalarTower R S T]
    [Module.Free R S] [Module.Finite R S] [Module.Free S T] [Module.Finite S T] (x : T) :
    trace R S (trace S T x) = trace R T x

{R : Type u_1}
{S : Type u_2}
{T : Type u_3}
[CommRing R]
[CommRing S]
[CommRing T]
[Algebra R S]
[Algebra R T]
[Algebra S T]
[IsScalarTower R S T]
[Module.Free R S]
[Module.Finite R S]
[Module.Free S T]
[Module.Finite S T]
(x : T)

(Algebra.trace R S) ((Algebra.trace S T) x) = (Algebra.trace R T) x


/-- Linear map sending the matrix [a, b; c, d] to the matrix [ac₀ + bd₀, - ad₀ + bc₀; c, d], for
some fixed `(c₀, d₀)`. -/
@[simps!]
def lcRow0Extend {cd : Fin 2 → ℤ} (hcd : IsCoprime (cd 0) (cd 1)) :
    Matrix (Fin 2) (Fin 2) ℝ ≃ₗ[ℝ] Matrix (Fin 2) (Fin 2) ℝ

(f : (i : Fin 2) → (fun a => Fin 2 → ℝ) i)

∀ (a : Fin 2),
  (ModularGroup.lcRow0Extend hcd).symm f i a =
    (![(LinearMap.GeneralLinearGroup.generalLinearEquiv ℝ (Fin 2 → ℝ))
              (Matrix.GeneralLinearGroup.toLinear (Matrix.planeConformalMatrix (↑(cd 0)) (-↑(cd 1)) ⋯)),
            LinearEquiv.refl ℝ (Fin 2 → ℝ)]
          i).symm
      (f i) a


theorem nextCoeff_eq_zero_of_eraseLead_eq_zero (h : f.eraseLead = 0) : f.nextCoeff = 0

{R : Type u_1}
[Semiring R]
{f : R[X]}
(h : f.eraseLead = 0)


/-- Rotation by 0 is the identity. -/
@[simp]
theorem rotation_zero : o.rotation 0 = LinearIsometryEquiv.refl ℝ V

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


@[simp]
lemma toProd_ι_tmul_one (m₁ : M₁) : toProd Q₁ Q₂ (ι _ m₁ ᵍ⊗ₜ 1) = ι _ (m₁, 0)

{R : Type u_1}
{M₁ : Type u_2}
{M₂ : Type u_3}
[CommRing R]
[AddCommGroup M₁]
[AddCommGroup M₂]
[Module R M₁]
[Module R M₂]
(Q₁ : QuadraticForm R M₁)
(Q₂ : QuadraticForm R M₂)
(m₁ : M₁)

(CliffordAlgebra.toProd Q₁ Q₂) ((CliffordAlgebra.ι Q₁) m₁ ᵍ⊗ₜ[R] 1) =
  (CliffordAlgebra.ι (QuadraticMap.prod Q₁ Q₂)) (m₁, 0)


theorem lt_one_iff_num_lt_denom {q : ℚ} : q < 1 ↔ q.num < q.den


/-- The forgetful functor from the Eilenberg-Moore category, forgetting the coalgebraic
structure. -/
@[simps]
def forget : Coalgebra G ⥤ C

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

∀ {X Y : G.Coalgebra} (f : X ⟶ Y), G.forget.map f = f.f


{α : Type u_1}
[CanonicallyOrderedAddCommMonoid α]
[Sub α]
[OrderedSub α]
(a : α)


/-- A specialization of `mem_iInter₂`. -/
theorem mem_biInter {s : Set α} {t : α → Set β} {y : β} (h : ∀ x ∈ s, y ∈ t x) :
    y ∈ ⋂ x ∈ s, t x

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : α → Set β}
{y : β}
(h : ∀ x ∈ s, y ∈ t x)


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

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Lattice α]
[Lattice β]
[Lattice γ]
(f : LatticeHom β γ)
(g : LatticeHom α β)


@[simp]
theorem fst_prodExtendRight (ab : α₁ × β₁) : (prodExtendRight a e ab).fst = ab.fst

{α₁ : Type u_1}
{β₁ : Type u_2}
[DecidableEq α₁]
(a : α₁)
(e : Equiv.Perm β₁)
(ab : α₁ × β₁)

((Equiv.Perm.prodExtendRight a e) ab).1 = ab.1


theorem memℒp_approxOn_range [BorelSpace E] {f : β → E} {μ : Measure β} (fmeas : Measurable f)
    [SeparableSpace (range f ∪ {0} : Set E)] (hf : Memℒp f p μ) (n : ℕ) :
    Memℒp (approxOn f fmeas (range f ∪ {0}) 0 (by simp) n) p μ

[TopologicalSpace.SeparableSpace ↑(Set.range f ∪ {0})]

MeasureTheory.Memℒp (↑(MeasureTheory.SimpleFunc.approxOn f fmeas (Set.range f ∪ {0}) 0 ⋯ n)) p μ


theorem lsub_le_sup_succ {ι : Type u} (f : ι → Ordinal.{max u v}) :
    lsub.{_, v} f ≤ succ (sup.{_, v} f)

Ordinal.lsub f ≤ Order.succ (Ordinal.sup f)


@[simp]
theorem arsinh_inj : arsinh x = arsinh y ↔ x = y


@[simp]
theorem support_one : (1 : Perm α).support = ∅

{α : Type u_1}
[DecidableEq α]
[Fintype α]


theorem to_rightInvOn' {s : Set α} (hf : AntilipschitzWith K (s.restrict f)) {g : β → α}
    {t : Set β} (g_maps : MapsTo g t s) (g_inv : RightInvOn g f t) :
    LipschitzWith K (t.restrict g)


@[to_additive (attr := simp)]
theorem coe_prod [CommMonoid β] [ContinuousMul β] {ι : Type*} (s : Finset ι) (f : ι → C(α, β)) :
    ⇑(∏ i ∈ s, f i) = ∏ i ∈ s, (f i : α → β)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[CommMonoid β]
[ContinuousMul β]
{ι : Type u_3}
(s : Finset ι)
(f : ι → C(α, β))


theorem rangeRestrict_surjective (f : A →ₐ[R] B) : Function.Surjective (f.rangeRestrict)

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


/-- `Fin.castSucc` as an `OrderEmbedding`.

`castSuccOrderEmb i` embeds `i : Fin n` in `Fin (n+1)`. -/
@[simps! apply toEmbedding]
def castSuccOrderEmb : Fin n ↪o Fin (n + 1)

Fin.castSuccOrderEmb.toEmbedding = { toFun := Fin.castSucc, inj' := ⋯ }


theorem eq_of_slope_eq_zero {f : k → PE} {a b : k} (h : slope f a b = (0 : E)) : f a = f b

{k : Type u_1}
{E : Type u_2}
{PE : Type u_3}
[Field k]
[AddCommGroup E]
[Module k E]
[AddTorsor E PE]
{f : k → PE}
{a b : k}
(h : slope f a b = 0)


/-- A walk with its endpoints defeq is `Nil` if and only if it is equal to `nil`. -/
lemma nil_iff_eq_nil : ∀ {p : G.Walk v v}, p.Nil ↔ p = nil

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


@[simp]
theorem units_apply_inv_apply (f : CircleDeg1Liftˣ) (x : ℝ) :
    f ((f⁻¹ : CircleDeg1Liftˣ) x) = x


/-- If an element `a` divides another element `c` in a ring, `a` divides the sum of another element
`b` with `c` iff `a` divides `b`. -/
theorem dvd_add_left (h : a ∣ c) : a ∣ b + c ↔ a ∣ b

{α : Type u_1}
[NonUnitalRing α]
{a b c : α}
(h : a ∣ c)


@[simp]
theorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅

{α : Type u}
{σ : Type v}
{M : εNFA α σ}
(a : α)


theorem move₂_ok {p k₁ k₂ q s L₁ o L₂} {S : K' → List Γ'} (h₁ : k₁ ≠ rev ∧ k₂ ≠ rev ∧ k₁ ≠ k₂)
    (h₂ : S rev = []) (e : splitAtPred p (S k₁) = (L₁, o, L₂)) :
    Reaches₁ (TM2.step tr) ⟨some (move₂ p k₁ k₂ q), s, S⟩
      ⟨some q, none, update (update S k₁ (o.elim id List.cons L₂)) k₂ (L₁ ++ S k₂)⟩

{S : Turing.PartrecToTM2.K' → List Turing.PartrecToTM2.Γ'}

(h₁ : k₁ ≠ Turing.PartrecToTM2.K'.rev ∧ k₂ ≠ Turing.PartrecToTM2.K'.rev ∧ k₁ ≠ k₂)

(h₂ : S Turing.PartrecToTM2.K'.rev = [])

(e : Turing.PartrecToTM2.splitAtPred p (S k₁) = (L₁, o, L₂))

Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
  { l := some (Turing.PartrecToTM2.move₂ p k₁ k₂ q), var := s, stk := S }
  { l := some q, var := none, stk := Function.update (Function.update S k₁ (o.elim id List.cons L₂)) k₂ (L₁ ++ S k₂) }


@[simp] lemma nsmul_one {A} [AddMonoidWithOne A] : ∀ n : ℕ, n • (1 : A) = n

{A : Type u_6}
[AddMonoidWithOne A]
(n : ℕ)


theorem completion.norm_incl_eq {V : SemiNormedGrp} {v : V} : ‖completion.incl v‖ = ‖v‖


lemma Basis.mapEmbedding {X : Set α} (hIX : M.Basis I X) (f : α ↪ β) :
    (M.mapEmbedding f).Basis (f '' I) (f '' X)

{α : Type u_1}
{β : Type u_2}
{I : Set α}
{M : Matroid α}
{X : Set α}
(hIX : M.Basis I X)
(f : α ↪ β)

(M.mapEmbedding f).Basis (⇑f '' I) (⇑f '' X)


theorem blockTriangular_transvection {i j : m} (hij : b i ≤ b j) (c : R) :
    BlockTriangular (transvection i j c) b

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{b : m → α}
[Preorder α]
[DecidableEq m]
{i j : m}
(hij : b i ≤ b j)
(c : R)

(Matrix.transvection i j c).BlockTriangular b


theorem coprime_pow_primes {p q : ℕ} (n m : ℕ) (pp : Prime p) (pq : Prime q) (h : p ≠ q) :
    Coprime (p ^ n) (q ^ m)

{p q : ℕ}
(n m : ℕ)
(pp : Nat.Prime p)
(pq : Nat.Prime q)
(h : p ≠ q)


lemma Module.FinitePresentation.isLocalizedModule_map
    {M' : Type*} [AddCommGroup M'] [Module R M'] (f : M →ₗ[R] M') [IsLocalizedModule S f]
    {N' : Type*} [AddCommGroup N'] [Module R N'] (g : N →ₗ[R] N') [IsLocalizedModule S g]
    [Module.FinitePresentation R M] :
      IsLocalizedModule S (IsLocalizedModule.map S f g)

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(S : Submonoid R)
{M' : Type u_1}
[AddCommGroup M']
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
{N' : Type u_2}
[AddCommGroup N']
[Module R N']
(g : N →ₗ[R] N')
[IsLocalizedModule S g]
[Module.FinitePresentation R M]


theorem affineCombination_eq_centerMass {ι : Type*} {t : Finset ι} {p : ι → E} {w : ι → R}
    (hw₂ : ∑ i ∈ t, w i = 1) : t.affineCombination R p w = centerMass t w p

{R : Type u_1}
{E : Type u_3}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
{ι : Type u_8}
{t : Finset ι}
{p : ι → E}
{w : ι → R}
(hw₂ : ∑ i ∈ t, w i = 1)

(Finset.affineCombination R t p) w = t.centerMass w p


theorem dot_of_left_zero (w : ∀ x, x ∈ xs → x = 0) : dot xs ys = 0

{xs ys : Lean.Omega.IntList}
(w : ∀ (x : Int), x ∈ xs → x = 0)


lemma smul (x : R[X]) (y : W.CoordinateRing) : x • y = mk W (C x) * y

{R : Type u}
[CommRing R]
{W : WeierstrassCurve.Affine R}
(x : R[X])
(y : W.CoordinateRing)

x • y = (WeierstrassCurve.Affine.CoordinateRing.mk W) (Polynomial.C x) * y


protected theorem mul_sub (M : Matrix m n α) (N N' : Matrix n o α) :
    M * (N - N') = M * N - M * N'

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
[NonUnitalNonAssocRing α]
[Fintype n]
(M : Matrix m n α)
(N N' : Matrix n o α)


theorem ContDiff.sqrt (hf : ContDiff ℝ n f) (h : ∀ x, f x ≠ 0) : ContDiff ℝ n fun y => √(f y)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{n : ℕ∞}
(hf : ContDiff ℝ n f)
(h : ∀ (x : E), f x ≠ 0)


/-- If all multiplications cancel then every element is regular. -/
@[to_additive "If all additions cancel then every element is add-regular."]
theorem IsRegular.all [Mul R] [IsCancelMul R] (g : R) : IsRegular g

{R : Type u_1}
[Mul R]
[IsCancelMul R]
(g : R)


theorem symmDiff_le_iff {a b c : α} : a ∆ b ≤ c ↔ a ≤ b ⊔ c ∧ b ≤ a ⊔ c

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


theorem trans (he' : e'.MDifferentiable I' I'') : (e.trans e').MDifferentiable I I''

(he : PartialHomeomorph.MDifferentiable I I' e)

(he' : PartialHomeomorph.MDifferentiable I' I'' e')

PartialHomeomorph.MDifferentiable I I'' (e ≫ₕ e')


/-- If `W₁ : MorphismProperty C₁` and `W₂ : MorphismProperty C₂`, a `LocalizerMorphism W₁ W₂`
is the datum of a functor `C₁ ⥤ C₂` which sends morphisms in `W₁` to morphisms in `W₂` -/
structure LocalizerMorphism where
  /-- a functor between the two categories -/
  functor : C₁ ⥤ C₂
  /-- the functor is compatible with the `MorphismProperty` -/
  map : W₁ ≤ W₂.inverseImage functor

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(self : CategoryTheory.LocalizerMorphism W₁ W₂)


/-- Restricting to a larger box does not change the set of boxes. We cannot claim equality
of prepartitions because they have different types. -/
theorem restrict_boxes_of_le (π : Prepartition I) (h : I ≤ J) : (π.restrict J).boxes = π.boxes

{ι : Type u_1}
{I J : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
(h : I ≤ J)


lemma adjoin_eq (S : StarSubalgebra R A) : adjoin R (S : Set A) = S

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


@[to_additive (attr := simp)]
theorem unop_le_unop_iff {S₁ S₂ : Submonoid Mᵐᵒᵖ} : S₁.unop ≤ S₂.unop ↔ S₁ ≤ S₂

{M : Type u_2}
[MulOneClass M]
{S₁ S₂ : Submonoid Mᵐᵒᵖ}


theorem modEq_iff_toIcoMod_add_period_eq_toIocMod :
    a ≡ b [PMOD p] ↔ toIcoMod hp a b + p = toIocMod hp a b

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


/-- An iso `α ≃+ β` can equivalently be viewed as an iso `αᵐᵒᵖ ≃+ βᵐᵒᵖ`. -/
@[simps]
def AddEquiv.mulOp {α β} [Add α] [Add β] : α ≃+ β ≃ (αᵐᵒᵖ ≃+ βᵐᵒᵖ)

{α : Type u_2}
{β : Type u_3}
[Add α]
[Add β]
(f : α ≃+ β)

AddEquiv.mulOp f = MulOpposite.opAddEquiv.symm.trans (f.trans MulOpposite.opAddEquiv)


theorem Poly.of_denote_eq_cancel {ctx : Context} {m₁ m₂ : Poly} (h : denote_eq ctx (cancel m₁ m₂)) : denote_eq ctx (m₁, m₂)

(h : Nat.Linear.Poly.denote_eq ctx (m₁.cancel m₂))


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


@[to_additive]
lemma iCondIndepFun.indepFun_div_left (hf_indep : iCondIndepFun m' hm' (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) :
    CondIndepFun m' hm' (f i / f j) (f k) μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.iCondIndepFun m' hm' (fun x => m) f μ)

ProbabilityTheory.CondIndepFun m' hm' (f i - f j) (f k) μ


@[simp]
theorem ListBlank.map_mk {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : PointedMap Γ Γ') (l : List Γ) :
    (ListBlank.mk l).map f = ListBlank.mk (l.map f)

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Turing.PointedMap Γ Γ')
(l : List Γ)

Turing.ListBlank.map f (Turing.ListBlank.mk l) = Turing.ListBlank.mk (List.map f.f l)


theorem mul_lt_mul_of_le_of_lt_of_nonneg_of_pos [PosMulStrictMono α] [MulPosMono α]
    (h₁ : a ≤ b) (h₂ : c < d) (c0 : 0 ≤ c) (b0 : 0 < b) : a * c < b * d

{α : Type u_1}
{a b c d : α}
[Mul α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
[MulPosMono α]
(h₁ : a ≤ b)
(h₂ : c < d)
(c0 : 0 ≤ c)
(b0 : 0 < b)


@[simp, norm_cast, rclike_simps]
theorem ofReal_im : ∀ r : ℝ, im (r : K) = 0


theorem add_eq_right_iff {a b : Cardinal} : a + b = b ↔ max ℵ₀ a ≤ b ∨ a = 0


theorem measure_eq_iSup (H : InnerRegularWRT μ p q) (hU : q U) :
    μ U = ⨆ (K) (_ : K ⊆ U) (_ : p K), μ K

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p q : Set α → Prop}
{U : Set α}
(H : μ.InnerRegularWRT p q)
(hU : q U)

μ U = ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), μ K


@[simp] lemma disjointSigma_basis_iff {h I X} :
    (Matroid.disjointSigma M h).Basis I X ↔
      (∀ i, (M i).Basis (I ∩ (M i).E) (X ∩ (M i).E)) ∧ I ⊆ X ∧ X ⊆ ⋃ i, (M i).E

{h : Pairwise (Disjoint on fun i => (M i).E)}

(Matroid.disjointSigma M h).Basis I X ↔ (∀ (i : ι), (M i).Basis (I ∩ (M i).E) (X ∩ (M i).E)) ∧ I ⊆ X ∧ X ⊆ ⋃ i, (M i).E


@[simp, norm_cast]
theorem cast_finsupp_prod [CommRing R] (g : α → M → ℤ) :
    (↑(f.prod g) : R) = f.prod fun a b => ↑(g a b)

{α : Type u_1}
{M : Type u_5}
{R : Type u_11}
[Zero M]
(f : α →₀ M)
[CommRing R]
(g : α → M → ℤ)

↑(f.prod g) = f.prod fun a b => ↑(g a b)


theorem finite_setOf_isRoot {p : R[X]} (hp : p ≠ 0) : Set.Finite { x | IsRoot p x }

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


@[simp]
theorem toDFinsupp_sub [AddGroup M] (f g : ι →₀ M) :
    (f - g).toDFinsupp = f.toDFinsupp - g.toDFinsupp

{ι : Type u_1}
{M : Type u_3}
[AddGroup M]
(f g : ι →₀ M)


theorem irrefl [IsIrrefl α r] (a : α) : ¬a ≺ a

{α : Sort u}
{r : α → α → Prop}
[IsIrrefl α r]
(a : α)


theorem nat_rec {f : α → ℕ} {g : α → σ} {h : α → ℕ × σ → σ} (hf : Computable f) (hg : Computable g)
    (hh : Computable₂ h) :
    Computable fun a => Nat.rec (motive := fun _ => σ) (g a) (fun y IH => h a (y, IH)) (f a)

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
{f : α → ℕ}
{g : α → σ}
{h : α → ℕ × σ → σ}
(hf : Computable f)
(hg : Computable g)
(hh : Computable₂ h)

Computable fun a => Nat.rec (g a) (fun y IH => h a (y, IH)) (f a)


theorem toPartialEquiv_injective :
    Injective (toPartialEquiv : PartialHomeomorph X Y → PartialEquiv X Y)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]


theorem quotientEquivQuotientMinpolyMap_apply_mk (pb : PowerBasis R S) (I : Ideal R) (g : R[X]) :
    pb.quotientEquivQuotientMinpolyMap I (Ideal.Quotient.mk (I.map (algebraMap R S))
      (aeval pb.gen g)) = Ideal.Quotient.mk
        (Ideal.span ({(minpoly R pb.gen).map (Ideal.Quotient.mk I)} : Set (Polynomial (R ⧸ I))))
          (g.map (Ideal.Quotient.mk I))

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(pb : PowerBasis R S)
(I : Ideal R)
(g : R[X])

(pb.quotientEquivQuotientMinpolyMap I)
    ((Ideal.Quotient.mk (Ideal.map (algebraMap R S) I)) ((Polynomial.aeval pb.gen) g)) =
  (Ideal.Quotient.mk (Ideal.span {Polynomial.map (Ideal.Quotient.mk I) (minpoly R pb.gen)}))
    (Polynomial.map (Ideal.Quotient.mk I) g)


theorem dist_pointReflection_self' (x y : P) :
    dist (pointReflection 𝕜 x y) y = ‖2 • (x -ᵥ y)‖

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(x y : P)

dist ((AffineIsometryEquiv.pointReflection 𝕜 x) y) y = ‖2 • (x -ᵥ y)‖


theorem enumOrd_strictMono (hS : Unbounded (· < ·) S) : StrictMono (enumOrd S)

(hS : Set.Unbounded (fun x x_1 => x < x_1) S)


/-- For an inclusion `i : V ⟶ U` between open sets of the prime spectrum of `R`, the comap of the
identity from OO_X(U) to OO_X(V) equals as the restriction map of the structure sheaf.

This is a generalization of the fact that, for fixed `U`, the comap of the identity from OO_X(U)
to OO_X(U) is the identity.
-/
theorem comap_id_eq_map (U V : Opens (PrimeSpectrum.Top R)) (iVU : V ⟶ U) :
    (comap (RingHom.id R) U V fun p hpV => leOfHom iVU <| hpV) =
      (structureSheaf R).1.map iVU.op

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

AlgebraicGeometry.StructureSheaf.comap (RingHom.id R) U V ⋯ = (AlgebraicGeometry.Spec.structureSheaf R).val.map iVU.op


protected theorem stronglyMeasurable [LE E] (hf : Supermartingale f ℱ μ) (i : ι) :
    StronglyMeasurable[ℱ i] (f i)

(hf : MeasureTheory.Supermartingale f ℱ μ)


protected theorem le_ediv_iff_mul_le {a b c : Int} (H : 0 < c) : a ≤ b / c ↔ a * c ≤ b


@[to_additive]
theorem orbit_nonempty (a : α) : Set.Nonempty (orbit M a)

{M : Type u}
[AddMonoid M]
{α : Type v}
[AddAction M α]
(a : α)


@[simp]
theorem support_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
    (p.concat h).support = p.support.concat w

{V : Type u}
{G : SimpleGraph V}
{u v w : V}
(p : G.Walk u v)
(h : G.Adj v w)


@[gcongr]
theorem prod_mono : ∀ {a b : FactorSet α}, a ≤ b → a.prod ≤ b.prod

{α : Type u_1}
[CancelCommMonoidWithZero α]
{a b : Associates.FactorSet α}


@[to_additive (attr := simp)]
theorem MonoidHom.coe_coe [MonoidHomClass F M N] (f : F) : ((f : M →* N) : M → N) = f

{M : Type u_4}
{N : Type u_5}
{F : Type u_9}
[AddZeroClass M]
[AddZeroClass N]
[FunLike F M N]
[AddMonoidHomClass F M N]
(f : F)


/-- The braiding isomorphism can be passed through a map by swapping the order. -/
@[reassoc]
theorem braid_natural [HasBinaryProducts C] {W X Y Z : C} (f : X ⟶ Y) (g : Z ⟶ W) :
    prod.map f g ≫ (prod.braiding _ _).hom = (prod.braiding _ _).hom ≫ prod.map g f

CategoryTheory.Limits.prod.map f g ≫ (CategoryTheory.Limits.prod.braiding Y W).hom =
  (CategoryTheory.Limits.prod.braiding X Z).hom ≫ CategoryTheory.Limits.prod.map g f


theorem setToFun_smul_left' (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C') (c : ℝ)
    (h_smul : ∀ s, MeasurableSet s → μ s < ∞ → T' s = c • T s) (f : α → E) :
    setToFun μ T' hT' f = c • setToFun μ T hT f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

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

(h_smul : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → T' s = c • T s)

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


/-- Recurrence relation (in `k`) for the `n`-th Fourier coefficient of `Bₖ`. -/
theorem bernoulliFourierCoeff_recurrence (k : ℕ) {n : ℤ} (hn : n ≠ 0) :
    bernoulliFourierCoeff k n =
      1 / (-2 * π * I * n) * (ite (k = 1) 1 0 - k * bernoulliFourierCoeff (k - 1) n)

bernoulliFourierCoeff k n =
  1 / (-2 * ↑π * Complex.I * ↑n) * ((if k = 1 then 1 else 0) - ↑k * bernoulliFourierCoeff (k - 1) n)


lemma derivWithin_lt_slope (hfc : StrictConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableWithinAt ℝ f S x) :
    derivWithin f S x < slope f x y

{S : Set ℝ}
{f : ℝ → ℝ}
{x y : ℝ}
(hfc : StrictConvexOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hfd : DifferentiableWithinAt ℝ f S x)


@[simp]
theorem coe_mk (e : P₁ ≃ P₂) (e' : V₁ ≃ₗ[k] V₂) (h) : ((⟨e, e', h⟩ : P₁ ≃ᵃ[k] P₂) : P₁ → P₂) = e

(h : ∀ (p : P₁) (v : V₁), e (v +ᵥ p) = e' v +ᵥ e p)

⇑{ toEquiv := e, linear := e', map_vadd' := h } = ⇑e


theorem map_comap_eq (f : L →ₐ[K] L') (S : IntermediateField K L') :
    (S.comap f).map f = S ⊓ f.fieldRange

{K : Type u_1}
{L : Type u_2}
{L' : Type u_3}
[Field K]
[Field L]
[Field L']
[Algebra K L]
[Algebra K L']
(f : L →ₐ[K] L')
(S : IntermediateField K L')

IntermediateField.map f (IntermediateField.comap f S) = S ⊓ f.fieldRange


@[simp]
theorem empty_mul_empty (A : Matrix m' (Fin 0) α) (B : Matrix (Fin 0) o' α) : A * B = 0

{α : Type u}
{m' : Type uₘ}
{o' : Type uₒ}
[NonUnitalNonAssocSemiring α]
(A : Matrix m' (Fin 0) α)
(B : Matrix (Fin 0) o' α)


theorem Perm.mem_iff {a : α} {l₁ l₂ : List α} (p : l₁ ~ l₂) : a ∈ l₁ ↔ a ∈ l₂

{α : Type u_1}
{a : α}
{l₁ l₂ : List α}
(p : l₁ ~ l₂)

a ∈ l₁ ↔ a ∈ l₂


theorem Icc_subset_Icc (ha : a₂ ≤ a₁) (hb : b₁ ≤ b₂) : Icc a₁ b₁ ⊆ Icc a₂ b₂

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a₁ a₂ b₁ b₂ : α}
(ha : a₂ ≤ a₁)
(hb : b₁ ≤ b₂)


theorem eLpNorm'_le_eLpNorm'_mul_eLpNorm' {p q r : ℝ} (hf : AEStronglyMeasurable f μ)
    (hg : AEStronglyMeasurable g μ) (b : E → F → G)
    (h : ∀ᵐ x ∂μ, ‖b (f x) (g x)‖₊ ≤ ‖f x‖₊ * ‖g x‖₊) (hp0_lt : 0 < p) (hpq : p < q)
    (hpqr : 1 / p = 1 / q + 1 / r) :
    eLpNorm' (fun x => b (f x) (g x)) p μ ≤ eLpNorm' f q μ * eLpNorm' g r μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

(h : ∀ᵐ (x : α) ∂μ, ‖b (f x) (g x)‖₊ ≤ ‖f x‖₊ * ‖g x‖₊)

MeasureTheory.eLpNorm' (fun x => b (f x) (g x)) p μ ≤ MeasureTheory.eLpNorm' f q μ * MeasureTheory.eLpNorm' g r μ


theorem add_pf_add_gt (b₁ : R) (_ : a + b₂ = c) : a + (b₁ + b₂) = b₁ + c

{R : Type u_1}
[CommSemiring R]
{a b₂ c : R}
(b₁ : R)


theorem union_distrib_iInter_right (s : ι → Set α) (t : Set α) : (⋂ i, s i) ∪ t = ⋂ i, s i ∪ t

{α : Type u_1}
{ι : Sort u_4}
(s : ι → Set α)
(t : Set α)


theorem abs_prod {ι : Type*} (s : Finset ι) (f : ι → ℂ) :
    Complex.abs (s.prod f) = s.prod fun I => Complex.abs (f I)

{ι : Type u_1}
(s : Finset ι)
(f : ι → ℂ)

Complex.abs (s.prod f) = ∏ I ∈ s, Complex.abs (f I)


theorem volume_subtype_coe_le_volume (hu : NullMeasurableSet u) (t : Set u) :
    volume (((↑) : u → δ) '' t) ≤ volume t

(hu : MeasureTheory.NullMeasurableSet u MeasureTheory.volume)

MeasureTheory.volume (Subtype.val '' t) ≤ MeasureTheory.volume t


theorem paste_horiz_iff {X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C} {h₁₁ : X₁₁ ⟶ X₁₂} {h₁₂ : X₁₂ ⟶ X₁₃}
    {h₂₁ : X₂₁ ⟶ X₂₂} {h₂₂ : X₂₂ ⟶ X₂₃} {v₁₁ : X₁₁ ⟶ X₂₁} {v₁₂ : X₁₂ ⟶ X₂₂} {v₁₃ : X₁₃ ⟶ X₂₃}
    (s : IsPullback h₁₂ v₁₂ v₁₃ h₂₂) (e : h₁₁ ≫ v₁₂ = v₁₁ ≫ h₂₁) :
    IsPullback (h₁₁ ≫ h₁₂) v₁₁ v₁₃ (h₂₁ ≫ h₂₂) ↔ IsPullback h₁₁ v₁₁ v₁₂ h₂₁

{X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C}

{h₁₁ : X₁₁ ⟶ X₁₂}

{h₁₂ : X₁₂ ⟶ X₁₃}

{h₂₁ : X₂₁ ⟶ X₂₂}

{h₂₂ : X₂₂ ⟶ X₂₃}

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

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

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

(s : CategoryTheory.IsPullback h₁₂ v₁₂ v₁₃ h₂₂)

(e : h₁₁ ≫ v₁₂ = v₁₁ ≫ h₂₁)

CategoryTheory.IsPullback (h₁₁ ≫ h₁₂) v₁₁ v₁₃ (h₂₁ ≫ h₂₂) ↔ CategoryTheory.IsPullback h₁₁ v₁₁ v₁₂ h₂₁


@[to_additive (attr := simp)]
theorem smul_empty (s : Finset α) : s • (∅ : Finset β) = ∅

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
(s : Finset α)


theorem fg_of_fg_map {R M P : Type*} [Ring R] [AddCommGroup M] [Module R M] [AddCommGroup P]
    [Module R P] (f : M →ₗ[R] P)
    (hf : LinearMap.ker f = ⊥) {N : Submodule R M}
    (hfn : (N.map f).FG) : N.FG

{R : Type u_4}
{M : Type u_5}
{P : Type u_6}
[Ring R]
[AddCommGroup M]
[Module R M]
[AddCommGroup P]
[Module R P]
(f : M →ₗ[R] P)
(hf : LinearMap.ker f = ⊥)
{N : Submodule R M}
(hfn : (Submodule.map f N).FG)


@[simp] lemma measurableSet_preimage_down {s : Set α} :
    MeasurableSet (ULift.down ⁻¹' s) ↔ MeasurableSet s

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}


/-- A fraction is equal to its expansion by a factor from `S`. -/
@[to_additive "A difference is equal to its expansion by a summand from `S`."]
protected theorem expand' (r : X) (s s' : S) : r /ₒ s = s' • r /ₒ (s' * s)

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
{X : Type u_2}
[AddAction R X]
(r : X)
(s s' : ↥S)


/-- For a separable polynomial, its Galois group has cardinality
equal to the dimension of its splitting field over `F`. -/
theorem card_of_separable (hp : p.Separable) : Fintype.card p.Gal = finrank F p.SplittingField

{F : Type u_1}
[Field F]
{p : F[X]}
(hp : p.Separable)

Fintype.card p.Gal = FiniteDimensional.finrank F p.SplittingField


lemma intCast_cast_sub (x y : ZMod n) : (cast (x - y) : ℤ) = (cast x - cast y) % n


/-- To prove that a linear ordered monoid is an ordered module, it suffices to verify only the first
axiom of `OrderedSMul`. -/
theorem OrderedSMul.mk'' [OrderedSemiring 𝕜] [LinearOrderedAddCommMonoid M] [SMulWithZero 𝕜 M]
    (h : ∀ ⦃c : 𝕜⦄, 0 < c → StrictMono fun a : M => c • a) : OrderedSMul 𝕜 M

(h : ∀ ⦃c : 𝕜⦄, 0 < c → StrictMono fun a => c • a)


theorem lineDifferentiableWithinAt_congr_set (h : s =ᶠ[𝓝 x] t) :
    LineDifferentiableWithinAt 𝕜 f s x v ↔ LineDifferentiableWithinAt 𝕜 f t x v

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


@[reassoc (attr := simp)]
lemma biprodXIso_hom_snd (i : ι) :
    (biprodXIso K L i).hom ≫ biprod.snd = (biprod.snd : K ⊞ L ⟶ L).f i

[∀ (i : ι), CategoryTheory.Limits.HasBinaryBiproduct (K.X i) (L.X i)]

(K.biprodXIso L i).hom ≫ CategoryTheory.Limits.biprod.snd = CategoryTheory.Limits.biprod.snd.f i


lemma traceDual_top' :
    (⊤ : Submodule B L)ᵛ =
      if ((LinearMap.range (Algebra.trace K L)).restrictScalars A ≤ 1) then ⊤ else ⊥

{A : Type u_1}
{K : Type u_2}
{L : Type u}
{B : Type u_3}
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]

Submodule.traceDual A K ⊤ = if Submodule.restrictScalars A (LinearMap.range (Algebra.trace K L)) ≤ 1 then ⊤ else ⊥


lemma essSurj_mapComposableArrows [W.HasLeftCalculusOfFractions] (n : ℕ) :
    (L.mapComposableArrows n).EssSurj

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


/-- A nontrivial subsingleton filter is equal to `pure a` for some `a`. -/
theorem Subsingleton.exists_eq_pure [l.NeBot] (hl : l.Subsingleton) : ∃ a, l = pure a

{α : Type u_1}
{l : Filter α}
[l.NeBot]
(hl : l.Subsingleton)


/-- See also `smul_ae`. -/
@[to_additive "See also `vadd_ae`."]
theorem tendsto_smul_ae (c : G) : Filter.Tendsto (c • ·) (ae μ) (ae μ)

[MeasureTheory.SMulInvariantMeasure G α μ]

Filter.Tendsto (fun x => c • x) (MeasureTheory.ae μ) (MeasureTheory.ae μ)


/-- Negating a rotation is equivalent to rotation by π plus the angle. -/
theorem neg_rotation (θ : Real.Angle) (x : V) : -o.rotation θ x = o.rotation (π + θ) x

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

-(o.rotation θ) x = (o.rotation (↑π + θ)) x


theorem OrderIso.map_iSup [CompleteLattice β] (f : α ≃o β) (x : ι → α) :
    f (⨆ i, x i) = ⨆ i, f (x i)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
[CompleteLattice α]
[CompleteLattice β]
(f : α ≃o β)
(x : ι → α)


theorem zero_apply (i : ι) : (0 : Π₀ i, β i) i = 0

{ι : Type u}
{β : ι → Type v}
[(i : ι) → Zero (β i)]
(i : ι)


lemma IsPushout.iff_of_iso {sq₁ sq₂ : Square C} (e : sq₁ ≅ sq₂) :
    sq₁.IsPushout ↔ sq₂.IsPushout

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{sq₁ sq₂ : CategoryTheory.Square C}
(e : sq₁ ≅ sq₂)


@[to_additive (attr := simp)]
theorem inv_iInf {ι : Sort*} (S : ι → Submonoid G) : (⨅ i, S i)⁻¹ = ⨅ i, (S i)⁻¹

{G : Type u_2}
[AddGroup G]
{ι : Sort u_6}
(S : ι → AddSubmonoid G)


/-- If a function `f` with a densely ordered codomain is monotone on a left neighborhood of `a` and
the image of this neighborhood under `f` is a left neighborhood of `f a`, then `f` is continuous at
`a` from the left. -/
theorem continuousWithinAt_left_of_monotoneOn_of_image_mem_nhdsWithin [DenselyOrdered β] {f : α → β}
    {s : Set α} {a : α} (h_mono : MonotoneOn f s) (hs : s ∈ 𝓝[≤] a) (hfs : f '' s ∈ 𝓝[≤] f a) :
    ContinuousWithinAt f (Iic a) a

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[LinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
[DenselyOrdered β]
{f : α → β}
{s : Set α}
{a : α}
(h_mono : MonotoneOn f s)
(hs : s ∈ 𝓝[≤] a)
(hfs : f '' s ∈ 𝓝[≤] f a)


/-- Shorthand for using projection notation with `Function.bijective_iff_existsUnique`. -/
protected theorem Bijective.existsUnique {f : α → β} (hf : Bijective f) (b : β) :
    ∃! a : α, f a = b

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
(hf : Function.Bijective f)
(b : β)


theorem Iic_subset_Iic : Iic a ⊆ Iic b ↔ a ≤ b


/-- A weakly upper modular lattice is a lattice where `a ⊔ b` covers `a` and `b` if `a` and `b` both
cover `a ⊓ b`. -/
class IsWeakUpperModularLattice (α : Type*) [Lattice α] : Prop where
/-- `a ⊔ b` covers `a` and `b` if `a` and `b` both cover `a ⊓ b`. -/
  covBy_sup_of_inf_covBy_covBy {a b : α} : a ⊓ b ⋖ a → a ⊓ b ⋖ b → a ⋖ a ⊔ b

{α : Type u_2}
[Lattice α]
[self : IsWeakUpperModularLattice α]
{a b : α}


@[ext]
theorem ext {f g : CompleteLatticeHom α β} (h : ∀ a, f a = g a) : f = g

{α : Type u_2}
{β : Type u_3}
[CompleteLattice α]
[CompleteLattice β]
{f g : CompleteLatticeHom α β}
(h : ∀ (a : α), f a = g a)


@[simp]
theorem coe_coe_fn (f : r ≼i s) : ((f : r ↪r s) : α → β) = f

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ≼i s)


theorem map_one_sub_of_lt (h : v x < 1) : v (1 - x) = 1

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedCommGroupWithZero Γ₀]
(v : Valuation R Γ₀)
{x : R}
(h : v x < 1)


/-- All `F`-embeddings of a field `K` into another field `A` factor through any intermediate
field of `A/F` in which the minimal polynomial of elements of `K` splits. -/
@[simps]
def IntermediateField.algHomEquivAlgHomOfSplits (L : IntermediateField F A)
    (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) :
    (K →ₐ[F] L) ≃ (K →ₐ[F] A)

(hL : ∀ (x : K), Polynomial.Splits (algebraMap F ↥L) (minpoly F x))

(IntermediateField.algHomEquivAlgHomOfSplits A L hL).symm f = f.codRestrict L.toSubalgebra ⋯


/-- Composition of two isomorphisms -/
@[trans, simps]
def trans (α : X ≅ Y) (β : Y ≅ Z) : X ≅ Z

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
(α : X ≅ Y)
(β : Y ≅ Z)

(α ≪≫ β).inv = CategoryTheory.CategoryStruct.comp β.inv α.inv


@[to_additive mem_ball_iff_norm']
theorem mem_ball_iff_norm''' : b ∈ ball a r ↔ ‖a / b‖ < r

{E : Type u_6}
[SeminormedAddGroup E]
{a b : E}
{r : ℝ}


/-- An angle in a right-angled triangle expressed using `arctan`, version subtracting vectors. -/
theorem angle_sub_eq_arctan_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x ≠ 0) :
    angle x (x - y) = Real.arctan (‖y‖ / ‖x‖)

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}
(h : ⟪x, y⟫_ℝ = 0)
(h0 : x ≠ 0)

InnerProductGeometry.angle x (x - y) = Real.arctan (‖y‖ / ‖x‖)


theorem PushoutCocone.inr_colimit_cocone {X Y Z : C} (f : Z ⟶ X) (g : Z ⟶ Y)
    [HasColimit (span f g)] : PushoutCocone.inr (colimit.cocone (span f g)) = pushout.inr _ _

[CategoryTheory.Limits.HasColimit (CategoryTheory.Limits.span f g)]

CategoryTheory.Limits.PushoutCocone.inr (CategoryTheory.Limits.colimit.cocone (CategoryTheory.Limits.span f g)) =
  CategoryTheory.Limits.pushout.inr f g


@[simp]
lemma δ_snd :
    δ 0 1 (snd φ) = -(fst φ).1.comp (Cochain.ofHom φ) (add_zero 1)

CochainComplex.HomComplex.δ 0 1 (CochainComplex.mappingCone.snd φ) =
  -(↑(CochainComplex.mappingCone.fst φ)).comp (CochainComplex.HomComplex.Cochain.ofHom φ) ⋯


theorem not_isUniform_iff :
    ¬G.IsUniform ε s t ↔ ∃ s', s' ⊆ s ∧ ∃ t', t' ⊆ t ∧ ↑s.card * ε ≤ s'.card ∧
      ↑t.card * ε ≤ t'.card ∧ ε ≤ |G.edgeDensity s' t' - G.edgeDensity s t|

{α : Type u_1}
{𝕜 : Type u_2}
[LinearOrderedField 𝕜]
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε : 𝕜}
{s t : Finset α}

¬G.IsUniform ε s t ↔
  ∃ s' ⊆ s, ∃ t' ⊆ t, ↑s.card * ε ≤ ↑s'.card ∧ ↑t.card * ε ≤ ↑t'.card ∧ ε ≤ ↑|G.edgeDensity s' t' - G.edgeDensity s t|


theorem UniformContinuous.prod_mk_right {f : α × β → γ} (h : UniformContinuous f) (a) :
    UniformContinuous fun b => f (a, b)

{α : Type ua}
{β : Type ub}
{γ : Type uc}
[UniformSpace α]
[UniformSpace β]
[UniformSpace γ]
{f : α × β → γ}
(h : UniformContinuous f)
(a : α)


theorem factorization_gcd {a b : ℕ} (ha_pos : a ≠ 0) (hb_pos : b ≠ 0) :
    (gcd a b).factorization = a.factorization ⊓ b.factorization

(a.gcd b).factorization = a.factorization ⊓ b.factorization


@[simp]
theorem transpose_col (v : m → α) : (Matrix.col ι v)ᵀ = Matrix.row ι v

{m : Type u_2}
{α : Type v}
{ι : Type u_6}
(v : m → α)

(Matrix.col ι v).transpose = Matrix.row ι v


/-- Finite-presentation can be checked on a standard covering of the target. -/
theorem finitePresentation_ofLocalizationSpanTarget :
    OfLocalizationSpanTarget @FinitePresentation


/-- A `MulEquiv` `φ` between two semigroups `M` and `N` induces a `MulEquiv` between
a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
See `MulHom.subsemigroupMap` for a variant for `MulHom`s. -/
@[to_additive (attr := simps)
      "An `AddEquiv` `φ` between two additive semigroups `M` and `N` induces an `AddEquiv`
      between a subsemigroup `S ≤ M` and the subsemigroup `φ(S) ≤ N`.
      See `AddHom.addSubsemigroupMap` for a variant for `AddHom`s."]
def subsemigroupMap (e : M ≃* N) (S : Subsemigroup M) : S ≃* S.map (e : M →ₙ* N)

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(e : M ≃+ N)
(S : AddSubsemigroup M)
(x : ↥S)


@[simp] theorem snd_inv (x : tsze R M) : snd x⁻¹ = -((fst x)⁻¹ •> snd x <• (fst x)⁻¹)

{R : Type u}
{M : Type v}
[Neg M]
[Inv R]
[SMul Rᵐᵒᵖ M]
[SMul R M]
(x : tsze R M)

x⁻¹.snd = -(x.fst⁻¹ •> x.snd <• x.fst⁻¹)


theorem injective_subtype : Injective p.subtype

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
(p : Submodule R M)


theorem minpolyGen_map (pb : PowerBasis A S) (e : S ≃ₐ[A] S') :
    (pb.map e).minpolyGen = pb.minpolyGen

{S : Type u_2}
[Ring S]
{A : Type u_4}
[CommRing A]
{S' : Type u_7}
[CommRing S']
[Algebra A S]
[Algebra A S']
(pb : PowerBasis A S)
(e : S ≃ₐ[A] S')


theorem isRat_mul {α} [Ring α] {f : α → α → α} {a b : α} {na nb nc : ℤ} {da db dc k : ℕ} :
    f = HMul.hMul → IsRat a na da → IsRat b nb db →
    Int.mul na nb = Int.mul k nc →
    Nat.mul da db = Nat.mul k dc →
    IsRat (f a b) nc dc

{α : Type u_1}
[Ring α]
{f : α → α → α}
{a b : α}
{na nb nc : ℤ}
{da db dc k : ℕ}

f = HMul.hMul →
  Mathlib.Meta.NormNum.IsRat a na da →
    Mathlib.Meta.NormNum.IsRat b nb db →
      na.mul nb = (↑k).mul nc → da.mul db = k.mul dc → Mathlib.Meta.NormNum.IsRat (f a b) nc dc


theorem mem_iff {n : ℕ} (v : Vector G n) : v ∈ vectorsProdEqOne G n ↔ v.toList.prod = 1

(G : Type u_2)
[Group G]
{n : ℕ}
(v : Mathlib.Vector G n)

v ∈ Equiv.Perm.vectorsProdEqOne G n ↔ v.toList.prod = 1


/-- This is a mixin class describing a locally finite order,
that is, is an order where bounded intervals are finite.
When you don't care too much about definitional equality, you can use `LocallyFiniteOrder.ofIcc` or
`LocallyFiniteOrder.ofFiniteIcc` to build a locally finite order from just `Finset.Icc`. -/
class LocallyFiniteOrder (α : Type*) [Preorder α] where
  /-- Left-closed right-closed interval -/
  finsetIcc : α → α → Finset α
  /-- Left-closed right-open interval -/
  finsetIco : α → α → Finset α
  /-- Left-open right-closed interval -/
  finsetIoc : α → α → Finset α
  /-- Left-open right-open interval -/
  finsetIoo : α → α → Finset α
  /-- `x ∈ finsetIcc a b ↔ a ≤ x ∧ x ≤ b` -/
  finset_mem_Icc : ∀ a b x : α, x ∈ finsetIcc a b ↔ a ≤ x ∧ x ≤ b
  /-- `x ∈ finsetIco a b ↔ a ≤ x ∧ x < b` -/
  finset_mem_Ico : ∀ a b x : α, x ∈ finsetIco a b ↔ a ≤ x ∧ x < b
  /-- `x ∈ finsetIoc a b ↔ a < x ∧ x ≤ b` -/
  finset_mem_Ioc : ∀ a b x : α, x ∈ finsetIoc a b ↔ a < x ∧ x ≤ b
  /-- `x ∈ finsetIoo a b ↔ a < x ∧ x < b` -/
  finset_mem_Ioo : ∀ a b x : α, x ∈ finsetIoo a b ↔ a < x ∧ x < b

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

x ∈ LocallyFiniteOrder.finsetIco a b ↔ a ≤ x ∧ x < b


theorem mkAlgHom_surjective (s : A → A → Prop) : Function.Surjective (mkAlgHom S s)

(S : Type uS)
[CommSemiring S]
{A : Type uA}
[Semiring A]
[Algebra S A]
(s : A → A → Prop)

Function.Surjective ⇑(RingQuot.mkAlgHom S s)


@[simp]
theorem merge_nil_left (t : Ordnode α) : merge t nil = t


@[simp]
theorem fromEdgeSet_inter (s t : Set (Sym2 V)) :
    fromEdgeSet (s ∩ t) = fromEdgeSet s ⊓ fromEdgeSet t

SimpleGraph.fromEdgeSet (s ∩ t) = SimpleGraph.fromEdgeSet s ⊓ SimpleGraph.fromEdgeSet t


theorem mem_smul_pointwise_iff_exists (m : M) (a : α) (S : Submonoid M) :
    m ∈ a • S ↔ ∃ s : M, s ∈ S ∧ a • s = m

{α : Type u_1}
{M : Type u_3}
[Monoid M]
[Monoid α]
[MulDistribMulAction α M]
(m : M)
(a : α)
(S : Submonoid M)


/-- If `E / F` is a separable extension, `E` is perfect, then `F` is also prefect. -/
theorem perfectField_of_isSeparable_of_perfectField_top [Algebra.IsSeparable F E] [PerfectField E] :
    PerfectField F

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
[Algebra.IsSeparable F E]
[PerfectField E]


/-- When lowered to a prop, `Matrix.diagonalInvertibleEquivInvertible` forms an `iff`. -/
@[simp]
theorem isUnit_diagonal {v : n → α} : IsUnit (diagonal v) ↔ IsUnit v

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


theorem LeftInverse.image_image {g : β → α} (h : LeftInverse g f) (s : Set α) :
    g '' (f '' s) = s

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


/-- The inclusion of each summand in the coproduct decomposition of simplices
in split simplicial objects is a natural transformation of functors
`SimplicialObject.Split C ⥤ C` -/
@[simps]
def natTransCofanInj {Δ : SimplexCategoryᵒᵖ} (A : Splitting.IndexSet Δ) :
    evalN C A.1.unop.len ⟶ forget C ⋙ (evaluation SimplexCategoryᵒᵖ C).obj Δ

(A : SimplicialObject.Splitting.IndexSet Δ)

(SimplicialObject.Split.natTransCofanInj C A).app S = (S.s.cofan Δ).inj A


/-- Composing an alternating map twice with the same linear map in each argument is
the same as composing with their composition. -/
theorem compLinearMap_assoc (f : M [⋀^ι]→ₗ[R] N) (g₁ : M₂ →ₗ[R] M) (g₂ : M₃ →ₗ[R] M₂) :
    (f.compLinearMap g₁).compLinearMap g₂ = f.compLinearMap (g₁ ∘ₗ g₂)

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


@[to_additive] lemma sup_div_inf_eq_mabs_div (a b : α) : (a ⊔ b) / (a ⊓ b) = |b / a|ₘ

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


theorem union_union_distrib_right (s t u : Finset α) : s ∪ t ∪ u = s ∪ u ∪ (t ∪ u)

{α : Type u_1}
[DecidableEq α]
(s t u : Finset α)


lemma antivary_inv₀ (hf : StrongLT 0 f) (hg : StrongLT 0 g) : Antivary f⁻¹ g⁻¹ ↔ Antivary f g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemifield α]
[LinearOrderedSemifield β]
{f : ι → α}
{g : ι → β}
(hf : StrongLT 0 f)
(hg : StrongLT 0 g)


@[simp]
theorem realize_rel₁ {R : L.Relations 1} {t : L.Term _} :
    (R.formula₁ t).Realize v ↔ RelMap R ![t.realize v]

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{v : α → M}
{R : L.Relations 1}
{t : L.Term α}

(R.formula₁ t).Realize v ↔ FirstOrder.Language.Structure.RelMap R ![FirstOrder.Language.Term.realize v t]


theorem sSup_eq_top : sSup s = ⊤ ↔ ∀ b < ⊤, ∃ a ∈ s, b < a

{α : Type u_1}
[CompleteLinearOrder α]
{s : Set α}


@[simp]
theorem toList_map {β : Type*} (v : Vector α n) (f : α → β) :
    (v.map f).toList = v.toList.map f

{n : ℕ}
{α : Type u_1}
{β : Type u_2}
(v : Mathlib.Vector α n)
(f : α → β)

(Mathlib.Vector.map f v).toList = List.map f v.toList


theorem arg_ofReal_of_neg {x : ℝ} (hx : x < 0) : arg x = π


@[to_additive]
theorem prod_comm {s : Finset γ} {t : Finset α} {f : γ → α → β} :
    (∏ x ∈ s, ∏ y ∈ t, f x y) = ∏ y ∈ t, ∏ x ∈ s, f x y

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[CommMonoid β]
{s : Finset γ}
{t : Finset α}
{f : γ → α → β}

∏ x ∈ s, ∏ y ∈ t, f x y = ∏ y ∈ t, ∏ x ∈ s, f x y


theorem mem_pi {s : Set (∀ i, α i)} :
    s ∈ pi f ↔ ∃ I : Set ι, I.Finite ∧ ∃ t : ∀ i, Set (α i), (∀ i, t i ∈ f i) ∧ I.pi t ⊆ s

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

s ∈ Filter.pi f ↔ ∃ I, I.Finite ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ I.pi t ⊆ s


@[simp]
nonrec theorem integral_neg : ∫ x in a..b, -f x ∂μ = -∫ x in a..b, f x ∂μ

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ℝ}
{f : ℝ → E}
{μ : MeasureTheory.Measure ℝ}

∫ (x : ℝ) in a..b, -f x ∂μ = -∫ (x : ℝ) in a..b, f x ∂μ


@[to_additive] theorem mul_eq_mul_iff_eq_and_eq [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· < ·)] {a b c d : α} (hac : a ≤ c) (hbd : b ≤ d) :
    a * b = c * d ↔ a = c ∧ b = d

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


/-- The sum of two upper semicontinuous functions is upper semicontinuous. Formulated with
`[ContinuousAdd]`. The primed version of the lemma uses an explicit continuity assumption on
addition, for application to `EReal`. -/
theorem UpperSemicontinuousWithinAt.add {f g : α → γ} (hf : UpperSemicontinuousWithinAt f s x)
    (hg : UpperSemicontinuousWithinAt g s x) :
    UpperSemicontinuousWithinAt (fun z => f z + g z) s x


lemma congr_apply_of [IsDirected ι (· ≤ ·)]
    (e : (i : ι) → G i ≃+* G' i)
    (he : ∀ i j h, (e j).toRingHom.comp (f i j h) = (f' i j h).comp (e i))
    {i : ι} (g : G i) :
    congr e he (of G _ i g) = of G' (fun _ _ h ↦ f' _ _ h) i (e i g)

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

(he : ∀ (i j : ι) (h : i ≤ j), (e j).toRingHom.comp (f i j h) = (f' i j h).comp ↑(e i))

(Ring.DirectLimit.congr e he) ((Ring.DirectLimit.of G (fun x x_1 h => ⇑(f x x_1 h)) i) g) =
  (Ring.DirectLimit.of G' (fun x x_1 h => ⇑(f' x x_1 h)) i) ((e i) g)


@[deprecated (since := "2024-05-05")] theorem forall₂_iff_nthLe {l₁ : List α} {l₂ : List β} :
    Forall₂ R l₁ l₂ ↔ l₁.length = l₂.length ∧ ∀ i h₁ h₂, R (l₁.nthLe i h₁) (l₂.nthLe i h₂)

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
{l₁ : List α}
{l₂ : List β}

List.Forall₂ R l₁ l₂ ↔
  l₁.length = l₂.length ∧ ∀ (i : ℕ) (h₁ : i < l₁.length) (h₂ : i < l₂.length), R (l₁.nthLe i h₁) (l₂.nthLe i h₂)


@[simp] theorem univ_sigma_preimage_mk (s : Set (Σ i, α i)) :
    (univ : Set ι).sigma (fun i ↦ Sigma.mk i ⁻¹' s) = s

{ι : Type u_1}
{α : ι → Type u_3}
(s : Set ((i : ι) × α i))

(Set.univ.sigma fun i => Sigma.mk i ⁻¹' s) = s


@[to_additive]
theorem smul_apply_eq_smul_apply_inv_smul (f : F) (T : leftTransversals (H : Set G)) (q : G ⧸ H) :
    (toEquiv (f • T).2 q : G) = f • (toEquiv T.2 (f⁻¹ • q) : G)

{G : Type u_1}
[Group G]
{H : Subgroup G}
{F : Type u_2}
[Group F]
[MulAction F G]
[MulAction.QuotientAction F H]
(f : F)
(T : ↑(Subgroup.leftTransversals ↑H))
(q : G ⧸ H)

↑((Subgroup.MemLeftTransversals.toEquiv ⋯) q) = f • ↑((Subgroup.MemLeftTransversals.toEquiv ⋯) (f⁻¹ • q))


theorem map_rat_smul [AddCommGroup M] [AddCommGroup M₂]
    [_instM : Module ℚ M] [_instM₂ : Module ℚ M₂]
    {F : Type*} [FunLike F M M₂] [AddMonoidHomClass F M M₂]
    (f : F) (c : ℚ) (x : M) : f (c • x) = c • f x

{M : Type u_1}
{M₂ : Type u_2}
[AddCommGroup M]
[AddCommGroup M₂]
[_instM : Module ℚ M]
[_instM₂ : Module ℚ M₂]
{F : Type u_3}
[FunLike F M M₂]
[AddMonoidHomClass F M M₂]
(f : F)
(c : ℚ)
(x : M)


theorem subsingleton_iff_le_one : Subsingleton (Fin n) ↔ n ≤ 1


lemma toFinite_apply (μ : Measure α) [SFinite μ] (s : Set α) :
    μ.toFinite s = (μ.toFiniteAux Set.univ)⁻¹ * μ.toFiniteAux s

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


@[simp]
lemma pushout.map_id {X Y Z : C}
    {f : X ⟶ Y} {g : X ⟶ Z} [HasPushout f g] :
    pushout.map f g f g (𝟙 _) (𝟙 _) (𝟙 _) (by simp) (by simp) = 𝟙 _

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

CategoryTheory.Limits.pushout.map f g f g (𝟙 Y) (𝟙 Z) (𝟙 X) ⋯ ⋯ = 𝟙 (CategoryTheory.Limits.pushout f g)


theorem injective_pointReflection_left_of_injective_bit0 {G P : Type*} [AddCommGroup G]
    [AddTorsor G P] (h : Injective (2 • · : G → G)) (y : P) :
    Injective fun x : P => pointReflection x y

{G : Type u_3}
{P : Type u_4}
[AddCommGroup G]
[AddTorsor G P]
(h : Function.Injective fun x => 2 • x)
(y : P)

Function.Injective fun x => (Equiv.pointReflection x) y


@[to_additive]
theorem finprod_cond_eq_prod_of_cond_iff (f : α → M) {p : α → Prop} {t : Finset α}
    (h : ∀ {x}, f x ≠ 1 → (p x ↔ x ∈ t)) : (∏ᶠ (i) (_ : p i), f i) = ∏ i ∈ t, f i

(h : ∀ {x : α}, f x ≠ 1 → (p x ↔ x ∈ t))

∏ᶠ (i : α) (_ : p i), f i = ∏ i ∈ t, f i


/-- If a family is affinely independent, a point in the family is not
in the affine span of the other points, if the underlying ring is
nontrivial. -/
theorem AffineIndependent.not_mem_affineSpan_diff [Nontrivial k] {p : ι → P}
    (ha : AffineIndependent k p) (i : ι) (s : Set ι) : p i ∉ affineSpan k (p '' (s \ {i}))

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{ι : Type u_4}
[Nontrivial k]
{p : ι → P}
(ha : AffineIndependent k p)
(i : ι)
(s : Set ι)


/-- Construct an isomorphism in the Drinfeld center from
a morphism whose underlying morphism is an isomorphism.
-/
@[simps]
def isoMk {X Y : Center C} (f : X ⟶ Y) [IsIso f.f] : X ≅ Y

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{X Y : CategoryTheory.Center C}
(f : X ⟶ Y)
[CategoryTheory.IsIso f.f]


theorem Codisjoint.mono_left (h : a ≤ b) : Codisjoint a c → Codisjoint b c

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


@[to_additive]
lemma mulSupport_inf [SemilatticeInf M] (f g : α → M) :
    mulSupport (fun x ↦ f x ⊓ g x) ⊆ mulSupport f ∪ mulSupport g

{α : Type u_2}
{M : Type u_4}
[One M]
[SemilatticeInf M]
(f g : α → M)

(Function.mulSupport fun x => f x ⊓ g x) ⊆ Function.mulSupport f ∪ Function.mulSupport g


theorem le_initialBound : l ≤ initialBound ε l

l ≤ SzemerediRegularity.initialBound ε l


/-- A `Ctop α σ` is a realization of a topology (basis) on `α`,
  represented by a type `σ` together with operations for the top element and
  the intersection operation. -/
structure Ctop (α σ : Type*) where
  f : σ → Set α
  top : α → σ
  top_mem : ∀ x : α, x ∈ f (top x)
  inter : ∀ (a b) (x : α), x ∈ f a ∩ f b → σ
  inter_mem : ∀ a b x h, x ∈ f (inter a b x h)
  inter_sub : ∀ a b x h, f (inter a b x h) ⊆ f a ∩ f b

{α : Type u_1}
{σ : Type u_2}
(self : Ctop α σ)
(a b : σ)
(x : α)
(h : x ∈ self.f a ∩ self.f b)


@[to_additive]
theorem card_le_card_mul_left {s : Finset α} (hs : s.Nonempty) : t.card ≤ (s * t).card

{α : Type u_2}
[Add α]
[IsLeftCancelAdd α]
[DecidableEq α]
(t : Finset α)
{s : Finset α}
(hs : s.Nonempty)


protected theorem Finite.lowerClosure [LocallyFiniteOrderBot α] (hs : s.Finite) :
    (lowerClosure s : Set α).Finite

{α : Type u_1}
[Preorder α]
{s : Set α}
[LocallyFiniteOrderBot α]
(hs : s.Finite)


/-- Left unit cancellation `1 ⊗ X ≅ X` in `Dial C`. -/
@[simps!] def leftUnitor (X : Dial C) : tensorObj tensorUnit X ≅ X

X.leftUnitor.inv.F = CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.snd


theorem of'_commute [Semiring k] [AddZeroClass G] {a : G} (h : ∀ a', AddCommute a a')
    (f : AddMonoidAlgebra k G) :
    Commute (of' k G a) f

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[AddZeroClass G]
{a : G}
(h : ∀ (a' : G), AddCommute a a')
(f : AddMonoidAlgebra k G)


theorem sum_apply {ι : Type*} (t : Finset ι) (f : ι → M₁ →SL[σ₁₂] M₂) (b : M₁) :
    (∑ d ∈ t, f d) b = ∑ d ∈ t, f d b

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


∀ (x x_1 : ℝ),
  Real.add x x_1 =
    match x, x_1 with
    | { cauchy := a }, { cauchy := b } => { cauchy := a + b }


theorem isClosed_of_mem_irreducibleComponents (s) (H : s ∈ irreducibleComponents X) :
    IsClosed s

{X : Type u_1}
[TopologicalSpace X]
(s : Set X)
(H : s ∈ irreducibleComponents X)


theorem star_rmatch_iff (P : RegularExpression α) :
    ∀ x : List α, (star P).rmatch x ↔ ∃ S : List (List α), x
          = S.join ∧ ∀ t ∈ S, t ≠ [] ∧ P.rmatch t

{α : Type u_1}
[dec : DecidableEq α]
(P : RegularExpression α)
(x : List α)

P.star.rmatch x = true ↔ ∃ S, x = S.join ∧ ∀ t ∈ S, t ≠ [] ∧ P.rmatch t = true


@[to_additive (attr := measurability)]
theorem List.measurable_prod' (l : List (α → M)) (hl : ∀ f ∈ l, Measurable f) :
    Measurable l.prod

{M : Type u_2}
{α : Type u_3}
[Monoid M]
[MeasurableSpace M]
[MeasurableMul₂ M]
{m : MeasurableSpace α}
(l : List (α → M))
(hl : ∀ f ∈ l, Measurable f)


@[to_additive (attr := simp)]
theorem coe_orderHom (f : α →*o β) : ((f : α →o β) : α → β) = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulOneClass α]
[MulOneClass β]
(f : α →*o β)


theorem gcd_rel_right : (gcdW a b * b : ℕ) = gcdY a b * a + gcd a b

↑(a.gcdW b) * ↑b = a.gcdY b * ↑a + ↑(a.gcd b)


/-- A key lemma to prove $A_5$ is simple. Shows that any normal subgroup of an alternating group on
  at least 5 elements is the entire alternating group if it contains a 3-cycle. -/
theorem IsThreeCycle.alternating_normalClosure (h5 : 5 ≤ Fintype.card α) {f : Perm α}
    (hf : IsThreeCycle f) :
    normalClosure ({⟨f, hf.mem_alternatingGroup⟩} : Set (alternatingGroup α)) = ⊤

{α : Type u_1}
[Fintype α]
[DecidableEq α]
(h5 : 5 ≤ Fintype.card α)
{f : Equiv.Perm α}
(hf : f.IsThreeCycle)


@[ext]
theorem ext {f g : E →ₛₗᵢ[σ₁₂] E₂} (h : ∀ x, f x = g x) : f = g

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
{f g : E →ₛₗᵢ[σ₁₂] E₂}
(h : ∀ (x : E), f x = g x)


@[simp]
theorem Prefunctor.IsCovering.map_injective (hφ : φ.IsCovering) {u v : U} :
    Injective fun f : u ⟶ v => φ.map f

{U : Type u_1}
[Quiver U]
{V : Type u_2}
[Quiver V]
(φ : U ⥤q V)
(hφ : φ.IsCovering)
{u v : U}


@[mono]
theorem comap_mono {A B : DiscreteQuotient Y} (h : A ≤ B) : A.comap f ≤ B.comap f

{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(f : C(X, Y))
{A B : DiscreteQuotient Y}
(h : A ≤ B)

DiscreteQuotient.comap f A ≤ DiscreteQuotient.comap f B


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

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


lemma isIso_of_coyoneda_map_bijective {X Y : C} (f : X ⟶ Y)
    (hf : ∀ (T : C), Function.Bijective (fun (x : Y ⟶ T) => f ≫ x)) :
    IsIso f

(hf : ∀ (T : C), Function.Bijective fun x => CategoryTheory.CategoryStruct.comp f x)


@[simp]
theorem toReal_pi_div_two : ((π / 2 : ℝ) : Angle).toReal = π / 2


theorem sbtw_comm {x y z : P} : Sbtw R x y z ↔ Sbtw R z y x

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


theorem differentiableAt_cosh {x : ℂ} : DifferentiableAt ℂ cosh x


theorem Nat.rel_of_forall_rel_succ_of_le (r : β → β → Prop) [IsRefl β r] [IsTrans β r] {f : ℕ → β}
    (h : ∀ n, r (f n) (f (n + 1))) ⦃a b : ℕ⦄ (hab : a ≤ b) : r (f a) (f b)

{β : Type v}
(r : β → β → Prop)
[IsRefl β r]
[IsTrans β r]
{f : ℕ → β}
(h : ∀ (n : ℕ), r (f n) (f (n + 1)))
⦃a b : ℕ⦄
(hab : a ≤ b)


@[simp] theorem get_set_ne (a : Array α) (i : Fin a.size) {j : Nat} (v : α) (hj : j < a.size)
    (h : i.1 ≠ j) : (a.set i v)[j]'(by simp [*]) = a[j]

{α : Type u_1}
(a : Array α)
(i : Fin a.size)
{j : Nat}
(v : α)
(hj : j < a.size)
(h : ↑i ≠ j)


protected theorem trichotomy (p : ℝ≥0∞) : p = 0 ∨ p = ∞ ∨ 0 < p.toReal


theorem subperm_append_left {l₁ l₂ : List α} : ∀ l, l ++ l₁ <+~ l ++ l₂ ↔ l₁ <+~ l₂

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


theorem HasAntitoneBasis.prod {ι : Type*} [LinearOrder ι] {f : Filter α} {g : Filter β}
    {s : ι → Set α} {t : ι → Set β} (hf : HasAntitoneBasis f s) (hg : HasAntitoneBasis g t) :
    HasAntitoneBasis (f ×ˢ g) fun n => s n ×ˢ t n

{α : Type u_1}
{β : Type u_2}
{ι : Type u_6}
[LinearOrder ι]
{f : Filter α}
{g : Filter β}
{s : ι → Set α}
{t : ι → Set β}
(hf : f.HasAntitoneBasis s)
(hg : g.HasAntitoneBasis t)

(f ×ˢ g).HasAntitoneBasis fun n => s n ×ˢ t n


lemma inv_le_dual :
    I⁻¹ ≤ dual A K I

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


@[to_additive (attr := simp)]
theorem isUnit_unop {M} [Monoid M] {m : Mᵐᵒᵖ} : IsUnit (unop m) ↔ IsUnit m


@[simp]
theorem sup_hnot_self (a : α) : a ⊔ ￢a = ⊤

{α : Type u_2}
[CoheytingAlgebra α]
(a : α)


/-- Nonzero elements have nonzero adic valuation. -/
theorem intValuation_ne_zero (x : R) (hx : x ≠ 0) : v.intValuationDef x ≠ 0

(v : IsDedekindDomain.HeightOneSpectrum R)


@[simp]
theorem zipWith_apply (f : ∀ i, β₁ i → β₂ i → β i) (hf : ∀ i, f i 0 0 = 0) (g₁ : Π₀ i, β₁ i)
    (g₂ : Π₀ i, β₂ i) (i : ι) : zipWith f hf g₁ g₂ i = f i (g₁ i) (g₂ i)

{ι : Type u}
{β : ι → Type v}
{β₁ : ι → Type v₁}
{β₂ : ι → Type v₂}
[(i : ι) → Zero (β i)]
[(i : ι) → Zero (β₁ i)]
[(i : ι) → Zero (β₂ i)]
(f : (i : ι) → β₁ i → β₂ i → β i)
(hf : ∀ (i : ι), f i 0 0 = 0)
(g₁ : Π₀ (i : ι), β₁ i)
(g₂ : Π₀ (i : ι), β₂ i)
(i : ι)

(DFinsupp.zipWith f hf g₁ g₂) i = f i (g₁ i) (g₂ i)


theorem eventually_pow_one_div_le {x : ℝ≥0∞} (hx : x ≠ ∞) {y : ℝ≥0∞} (hy : 1 < y) :
    ∀ᶠ n : ℕ in atTop, x ^ (1 / n : ℝ) ≤ y

{x : ℝ≥0∞}
(hx : x ≠ ⊤)
{y : ℝ≥0∞}
(hy : 1 < y)

∀ᶠ (n : ℕ) in Filter.atTop, x ^ (1 / ↑n) ≤ y


lemma primeFactors_gcd (ha : a ≠ 0) (hb : b ≠ 0) :
    (a.gcd b).primeFactors = a.primeFactors ∩ b.primeFactors


lemma _root_.Set.Finite.eventuallyEq_iInter {ι : Type*} {s : Set ι} (hs : s.Finite)
    {f g : ι → Set α} (heq : ∀ i ∈ s, f i =ᶠ[l] g i) : (⋂ i ∈ s, f i) =ᶠ[l] (⋂ i ∈ s, g i)

{α : Type u}
{l : Filter α}
{ι : Type u_2}
{s : Set ι}
(hs : s.Finite)
{f g : ι → Set α}
(heq : ∀ i ∈ s, f i =ᶠ[l] g i)


theorem map_hom {α β γ} [AddCommGroup β] [AddCommGroup γ] (a : FreeAbelianGroup α) (f : α → β)
    (g : β →+ γ) : g (lift f a) = lift (g ∘ f) a

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommGroup β]
[AddCommGroup γ]
(a : FreeAbelianGroup α)
(f : α → β)
(g : β →+ γ)

g ((FreeAbelianGroup.lift f) a) = (FreeAbelianGroup.lift (⇑g ∘ f)) a


@[to_additive]
theorem ofList_singleton (x : α) : ofList [x] = of x

FreeAddMonoid.ofList [x] = FreeAddMonoid.of x


/-- If `u = o(v)` along `l`, then `(u / v) * v = u` eventually at `l`. -/
theorem IsLittleO.eventually_mul_div_cancel (h : u =o[l] v) : u / v * v =ᶠ[l] u

{α : Type u_1}
{𝕜 : Type u_15}
[NormedDivisionRing 𝕜]
{l : Filter α}
{u v : α → 𝕜}
(h : u =o[l] v)


protected nonrec theorem SmoothWithinAt.coordChangeL
    (hf : SmoothWithinAt IM IB f s x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
    SmoothWithinAt IM 𝓘(𝕜, F →L[𝕜] F) (fun y ↦ (e.coordChangeL 𝕜 e' (f y) : F →L[𝕜] F)) s x

[TopologicalSpace (Bundle.TotalSpace F E)]

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

SmoothWithinAt IM 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Trivialization.coordChangeL 𝕜 e e' (f y))) s x


theorem Ioi_mem_nhdsSet_Ioc (h : a ≤ b) : Ioi a ∈ 𝓝ˢ (Ioc b c)

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{a b c : α}
(h : a ≤ b)


theorem continuousWithinAt_snd {s : Set (α × β)} {p : α × β} : ContinuousWithinAt Prod.snd s p

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{s : Set (α × β)}
{p : α × β}


/-- Finite products of analytic functions are analytic -/
theorem Finset.analyticOn_prod {A : Type*} [NormedCommRing A] [NormedAlgebra 𝕜 A]
    {f : α → E → A} {s : Set E} (N : Finset α) (h : ∀ n ∈ N, AnalyticOn 𝕜 (f n) s) :
    AnalyticOn 𝕜 (fun z ↦ ∏ n ∈ N, f n z) s

{α : Type u_1}
{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{A : Type u_9}
[NormedCommRing A]
[NormedAlgebra 𝕜 A]
{f : α → E → A}
{s : Set E}
(N : Finset α)
(h : ∀ n ∈ N, AnalyticOn 𝕜 (f n) s)

AnalyticOn 𝕜 (fun z => ∏ n ∈ N, f n z) s


theorem frobenius_natCast (n : ℕ) : frobenius R p n = n

(R : Type u)
[CommSemiring R]
(p : ℕ)
[ExpChar R p]
(n : ℕ)


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

⇑FreeAddMagma.toFreeAddSemigroup ∘ FreeAddMagma.of = FreeAddSemigroup.of


@[deprecated disintegrate (since := "2024-07-26")]
lemma compProd_fst_condKernelUnitReal (κ : Kernel Unit (α × ℝ)) [IsFiniteKernel κ] :
    fst κ ⊗ₖ condKernelUnitReal κ = κ

(κ : ProbabilityTheory.Kernel Unit (α × ℝ))


@[simp, fun_prop]
protected theorem DifferentiableAt.fst (h : DifferentiableAt 𝕜 f₂ x) :
    DifferentiableAt 𝕜 (fun x => (f₂ x).1) x

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


theorem encard_le_one_iff : s.encard ≤ 1 ↔ ∀ a b, a ∈ s → b ∈ s → a = b

s.encard ≤ 1 ↔ ∀ (a b : α), a ∈ s → b ∈ s → a = b


@[simp]
theorem coeFn_add (f g : lp E p) : ⇑(f + g) = f + g

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


/-- Exactness of `L₀.X₂ ⟶ L₀.X₃ ⟶ L₃.X₁`. -/
lemma L₁'_exact : S.L₁'.Exact

(S : CategoryTheory.ShortComplex.SnakeInput C)


@[to_additive]
theorem subset_interior_mul' : interior s * interior t ⊆ interior (s * t)

{α : Type u}
[TopologicalSpace α]
[Group α]
[ContinuousConstSMul αᵐᵒᵖ α]
{s t : Set α}


@[simp]
theorem infinite_prod : Infinite (α × β) ↔ Infinite α ∧ Nonempty β ∨ Nonempty α ∧ Infinite β


@[simp]
theorem support_of [∀ (i : ι) (x : β i), Decidable (x ≠ 0)] (i : ι) (x : β i) (h : x ≠ 0) :
    (of _ i x).support = {i}

[(i : ι) → (x : β i) → Decidable (x ≠ 0)]

DFinsupp.support ((DirectSum.of β i) x) = {i}


/-- Sum of a list of elements in a subring is in the subring. -/
protected theorem list_sum_mem {l : List R} : (∀ x ∈ l, x ∈ s) → l.sum ∈ s

{R : Type u}
[Ring R]
(s : Subring R)
{l : List R}


@[simp]
theorem chain'_append_cons_cons {b c : α} {l₁ l₂ : List α} :
    Chain' R (l₁ ++ b :: c :: l₂) ↔ Chain' R (l₁ ++ [b]) ∧ R b c ∧ Chain' R (c :: l₂)

{α : Type u}
{R : α → α → Prop}
{b c : α}
{l₁ l₂ : List α}

List.Chain' R (l₁ ++ b :: c :: l₂) ↔ List.Chain' R (l₁ ++ [b]) ∧ R b c ∧ List.Chain' R (c :: l₂)


/-- The unipotent lower triangular matrix
```
(1 0)
(r 1)
```
as an isomorphism.
-/
@[simps]
def Biprod.unipotentLower {X₁ X₂ : C} (r : X₂ ⟶ X₁) : X₁ ⊞ X₂ ≅ X₁ ⊞ X₂

(CategoryTheory.Biprod.unipotentLower r).hom = CategoryTheory.Biprod.ofComponents (𝟙 X₁) 0 r (𝟙 X₂)


theorem mk'_eq_zero_iff (x : R) (s : M) : mk' S x s = 0 ↔ ∃ m : M, ↑m * x = 0

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

IsLocalization.mk' S x s = 0 ↔ ∃ m, ↑m * x = 0


theorem lintegral_nnnorm_add_left {f : α → β} (hf : AEStronglyMeasurable f μ) (g : α → γ) :
    ∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

∫⁻ (a : α), ↑‖f a‖₊ + ↑‖g a‖₊ ∂μ = ∫⁻ (a : α), ↑‖f a‖₊ ∂μ + ∫⁻ (a : α), ↑‖g a‖₊ ∂μ


theorem stdSimplex_eq_inter : stdSimplex 𝕜 ι = (⋂ x, { f | 0 ≤ f x }) ∩ { f | ∑ x, f x = 1 }

(𝕜 : Type u_1)
(ι : Type u_5)
[OrderedSemiring 𝕜]
[Fintype ι]

stdSimplex 𝕜 ι = (⋂ x, {f | 0 ≤ f x}) ∩ {f | ∑ x : ι, f x = 1}


theorem concaveOn_const (c : β) (hs : Convex 𝕜 s) : ConcaveOn 𝕜 s fun _ => c

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
{s : Set E}
(c : β)
(hs : Convex 𝕜 s)


@[simp]
theorem iterateFrobenius_zero : iterateFrobenius R p 0 = RingHom.id R

(R : Type u)
[CommSemiring R]
(p : ℕ)
[ExpChar R p]


theorem csSup_eq_greatest_of_bdd {s : Set ℤ} [DecidablePred (· ∈ s)] (b : ℤ) (Hb : ∀ z ∈ s, z ≤ b)
    (Hinh : ∃ z : ℤ, z ∈ s) : sSup s = greatestOfBdd b Hb Hinh

{s : Set ℤ}
[DecidablePred fun x => x ∈ s]
(b : ℤ)
(Hb : ∀ z ∈ s, z ≤ b)
(Hinh : ∃ z, z ∈ s)


theorem IsPositive.orthogonalProjection_comp {T : E →L[𝕜] E} (hT : T.IsPositive) (U : Submodule 𝕜 E)
    [CompleteSpace U] : (orthogonalProjection U ∘L T ∘L U.subtypeL).IsPositive

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
{T : E →L[𝕜] E}
(hT : T.IsPositive)
(U : Submodule 𝕜 E)
[CompleteSpace ↥U]

((orthogonalProjection U).comp (T.comp U.subtypeL)).IsPositive


theorem HasFiniteFPowerSeriesOnBall.differentiableOn
    (h : HasFiniteFPowerSeriesOnBall f p x n r) : DifferentiableOn 𝕜 f (EMetric.ball x r)


theorem range_prod_map {W X Y Z : TopCat.{u}} (f : W ⟶ Y) (g : X ⟶ Z) :
    Set.range (Limits.prod.map f g) =
      (Limits.prod.fst : Y ⨯ Z ⟶ _) ⁻¹' Set.range f ∩
        (Limits.prod.snd : Y ⨯ Z ⟶ _) ⁻¹' Set.range g

{W X Y Z : TopCat}
(f : W ⟶ Y)
(g : X ⟶ Z)

Set.range ⇑(CategoryTheory.Limits.prod.map f g) =
  ⇑CategoryTheory.Limits.prod.fst ⁻¹' Set.range ⇑f ∩ ⇑CategoryTheory.Limits.prod.snd ⁻¹' Set.range ⇑g


/-- The two projections `Δ_{X/Y} ⟶ X` form a kernel pair for `f : X ⟶ Y`. -/
theorem diagonal_isKernelPair : IsKernelPair f (pullback.fst f f) (pullback.snd f f)

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

CategoryTheory.IsKernelPair f (CategoryTheory.Limits.pullback.fst f f) (CategoryTheory.Limits.pullback.snd f f)


theorem TotalSpace.mk_cast {x x' : B} (h : x = x') (b : E x) :
    .mk' F x' (cast (congr_arg E h) b) = TotalSpace.mk x b

{B : Type u_1}
{F : Type u_2}
{E : B → Type u_3}
{x x' : B}
(h : x = x')
(b : E x)

Bundle.TotalSpace.mk' F x' (cast ⋯ b) = { proj := x, snd := b }


theorem integral_add_compl (hs : MeasurableSet s) (hfi : Integrable f μ) :
    ∫ x in s, f x ∂μ + ∫ x in sᶜ, f x ∂μ = ∫ x, f x ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{s : Set X}
{μ : MeasureTheory.Measure X}
(hs : MeasurableSet s)
(hfi : MeasureTheory.Integrable f μ)

∫ (x : X) in s, f x ∂μ + ∫ (x : X) in sᶜ, f x ∂μ = ∫ (x : X), f x ∂μ


@[to_additive]
protected theorem _root_.IsUnit.finset : IsUnit a → IsUnit ({a} : Finset α)

{α : Type u_2}
[DecidableEq α]
[Monoid α]
{a : α}


@[simp]
theorem zero_smul (m : M) : (0 : R) • m = 0

(R : Type u_1)
{M : Type u_3}
[Zero R]
[Zero M]
[SMulWithZero R M]
(m : M)


theorem gcd_zero_left' [GCDMonoid α] (a : α) : Associated (gcd 0 a) a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
(a : α)


@[simp] lemma toEquiv_le_toEquiv {a b : α} : toEquiv a ≤ toEquiv b ↔ b ⤳ a

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

Specialization.toEquiv a ≤ Specialization.toEquiv b ↔ b ⤳ a


theorem tan_sub_int_mul_pi (x : ℝ) (n : ℤ) : tan (x - n * π) = tan x

Real.tan (x - ↑n * Real.pi) = Real.tan x


@[aesop unsafe 10% (rule_sets := [Matroid])]
lemma mem_ground_of_mem_closure (he : e ∈ M.closure X) : e ∈ M.E

{α : Type u_2}
{M : Matroid α}
{X : Set α}
{e : α}
(he : e ∈ M.closure X)


@[simp]
theorem cons_vecAppend (ho : o + 1 = m + 1 + n) (x : α) (u : Fin m → α) (v : Fin n → α) :
    vecAppend ho (vecCons x u) v = vecCons x (vecAppend (by omega) u v)

{α : Type u}
{m n o : ℕ}
(ho : o + 1 = m + 1 + n)
(x : α)
(u : Fin m → α)
(v : Fin n → α)

Matrix.vecAppend ho (Matrix.vecCons x u) v = Matrix.vecCons x (Matrix.vecAppend ⋯ u v)


@[gcongr]
theorem toReal_mono (hb : b ≠ ∞) (h : a ≤ b) : a.toReal ≤ b.toReal


@[simp]
theorem coe_toContinuousLinearEquiv_symm' (e : E ≃ₗ[𝕜] F) :
    (e.toContinuousLinearEquiv.symm : F → E) = e.symm

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
{F : Type w}
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousSMul 𝕜 F]
[CompleteSpace 𝕜]
[T2Space E]
[T2Space F]
[FiniteDimensional 𝕜 E]
(e : E ≃ₗ[𝕜] F)


/-- Note that the `Invertible (f r)` argument can be satisfied by using `letI := Invertible.map f r`
before applying this lemma. -/
theorem map_invOf {R : Type*} {S : Type*} {F : Type*} [MulOneClass R] [Monoid S]
    [FunLike F R S] [MonoidHomClass F R S] (f : F) (r : R)
    [Invertible r] [ifr : Invertible (f r)] :
    f (⅟ r) = ⅟ (f r)

{R : Type u_1}
{S : Type u_2}
{F : Type u_3}
[MulOneClass R]
[Monoid S]
[FunLike F R S]
[MonoidHomClass F R S]
(f : F)
(r : R)
[Invertible r]
[ifr : Invertible (f r)]


/-- `toFun` is the same as the result of coercing to a function. -/
@[simp]
theorem toFun_eq_coe (f : P1 →ᵃ[k] P2) : f.toFun = ⇑f

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]
(f : P1 →ᵃ[k] P2)


/-- Lift a `MonoidHom` to `Finset` via `image`. -/
@[to_additive (attr := simps) "Lift an `add_monoid_hom` to `Finset` via `image`"]
def imageMonoidHom [MulOneClass β] [FunLike F α β] [MonoidHomClass F α β] (f : F) :
    Finset α →* Finset β

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[DecidableEq β]
[MulOneClass α]
[MulOneClass β]
[FunLike F α β]
[MonoidHomClass F α β]
(f : F)

∀ (a : Finset α), (Finset.imageMonoidHom f) a = (Finset.imageMulHom f).toFun a


@[to_additive]
theorem lt_one_of_mul_lt_left [ContravariantClass α α (swap (· * ·)) (· < ·)] {a b : α}
    (h : a * b < b) :
    a < 1

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


/-- The Jacobi symbol `J(a | b)` depends only on `b` mod `4*a`. -/
theorem mod_right (a : ℤ) {b : ℕ} (hb : Odd b) : J(a | b) = J(a | b % (4 * a.natAbs))

jacobiSym a b = jacobiSym a (b % (4 * a.natAbs))


theorem isBigO_of_le' (hfg : ∀ x, ‖f x‖ ≤ c * ‖g x‖) : f =O[l] g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{c : ℝ}
{f : α → E}
{g : α → F}
(l : Filter α)
(hfg : ∀ (x : α), ‖f x‖ ≤ c * ‖g x‖)


theorem mem_Icc_of_Ioo (h : x ∈ Ioo a b) : x ∈ Icc a b

{α : Type u_1}
[Preorder α]
{a b x : α}
(h : x ∈ Set.Ioo a b)


/-- `DFunLike.coe` as an `AlgHom`. -/
@[simps!] def coeFnAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y] :
    LocallyConstant X Y →ₐ[R] X → Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
(R : Type u_6)
[CommSemiring R]
[Semiring Y]
[Algebra R Y]

∀ (a : LocallyConstant X Y) (a_1 : X), (LocallyConstant.coeFnAlgHom R) a a_1 = a a_1


theorem insertNth_comm (a b : α) :
    ∀ (i j : ℕ) (l : List α) (_ : i ≤ j) (_ : j ≤ length l),
      (l.insertNth i a).insertNth (j + 1) b = (l.insertNth j b).insertNth i a

{α : Type u}
(a b : α)
(i j : ℕ)
(l : List α)

i ≤ j → j ≤ l.length → List.insertNth (j + 1) b (List.insertNth i a l) = List.insertNth i a (List.insertNth j b l)


theorem singleton_def (a : α) : ({a} : Set α) = insert a ∅