theorem superpolynomialDecay_iff_zpow_tendsto_zero (hk : Tendsto k l atTop) :
    SuperpolynomialDecay l k f ↔ ∀ z : ℤ, Tendsto (fun a : α => k a ^ z * f a) l (𝓝 0)

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{k : α → β}
(f : α → β)
[TopologicalSpace β]
[LinearOrderedField β]
[OrderTopology β]
(hk : Filter.Tendsto k l Filter.atTop)

Asymptotics.SuperpolynomialDecay l k f ↔ ∀ (z : ℤ), Filter.Tendsto (fun a => k a ^ z * f a) l (nhds 0)


/-- If `π` is a family of π-systems, then `piiUnionInter π S` is a π-system. -/
theorem isPiSystem_piiUnionInter (π : ι → Set (Set α)) (hpi : ∀ x, IsPiSystem (π x)) (S : Set ι) :
    IsPiSystem (piiUnionInter π S)

{α : Type u_1}
{ι : Type u_2}
(π : ι → Set (Set α))
(hpi : ∀ (x : ι), IsPiSystem (π x))
(S : Set ι)


/-- A version of `fderivWithin.comp` that is useful to rewrite the composition of two derivatives
  into a single derivative. This version always applies, but creates a new side-goal `f x = y`. -/
theorem fderivWithin_fderivWithin {g : F → G} {f : E → F} {x : E} {y : F} {s : Set E} {t : Set F}
    (hg : DifferentiableWithinAt 𝕜 g t y) (hf : DifferentiableWithinAt 𝕜 f s x) (h : MapsTo f s t)
    (hxs : UniqueDiffWithinAt 𝕜 s x) (hy : f x = y) (v : E) :
    fderivWithin 𝕜 g t y (fderivWithin 𝕜 f s x v) = fderivWithin 𝕜 (g ∘ f) s x v

{𝕜 : 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]
{g : F → G}
{f : E → F}
{x : E}
{y : F}
{s : Set E}
{t : Set F}
(hg : DifferentiableWithinAt 𝕜 g t y)
(hf : DifferentiableWithinAt 𝕜 f s x)
(h : Set.MapsTo f s t)
(hxs : UniqueDiffWithinAt 𝕜 s x)
(hy : f x = y)
(v : E)

(fderivWithin 𝕜 g t y) ((fderivWithin 𝕜 f s x) v) = (fderivWithin 𝕜 (g ∘ f) s x) v


theorem productOfMemOpens_inducing : Inducing (productOfMemOpens X)


theorem Integrable.inner_const (hf : Integrable f μ) (c : E) :
    Integrable (fun x => ⟪f x, c⟫) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_2}
{𝕜 : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{f : α → E}
(hf : MeasureTheory.Integrable f μ)
(c : E)

MeasureTheory.Integrable (fun x => ⟪f x, c⟫_𝕜) μ


theorem support_subset_support_matPolyEquiv (m : Matrix n n R[X]) (i j : n) :
    support (m i j) ⊆ support (matPolyEquiv m)

{R : Type u_1}
[CommSemiring R]
{n : Type w}
[DecidableEq n]
[Fintype n]
(m : Matrix n n R[X])
(i j : n)

(m i j).support ⊆ (matPolyEquiv m).support


theorem eval₂' :
    Polynomial.eval₂ (Subfield.subtype <| FixedPoints.subfield G F) x (minpoly G F x) = 0

(G : Type u)
[Group G]
(F : Type v)
[Field F]
[MulSemiringAction G F]
[Fintype G]
(x : F)

Polynomial.eval₂ (FixedPoints.subfield G F).subtype x (FixedPoints.minpoly G F x) = 0


@[to_additive]
theorem prod_Ico_add' [OrderedCancelAddCommMonoid α] [ExistsAddOfLE α] [LocallyFiniteOrder α]
    (f : α → M) (a b c : α) : (∏ x ∈ Ico a b, f (x + c)) = ∏ x ∈ Ico (a + c) (b + c), f x

{α : Type u_1}
{M : Type u_2}
[CommMonoid M]
[OrderedCancelAddCommMonoid α]
[ExistsAddOfLE α]
[LocallyFiniteOrder α]
(f : α → M)
(a b c : α)

∏ x ∈ Finset.Ico a b, f (x + c) = ∏ x ∈ Finset.Ico (a + c) (b + c), f x


lemma _root_.nsmul_eq_mul' (a : α) (n : ℕ) : n • a = a * n

{α : Type u_1}
[NonAssocSemiring α]
(a : α)
(n : ℕ)


@[to_additive] lemma IsUnit.pow (n : ℕ) : IsUnit a → IsUnit (a ^ n)

{M : Type u_1}
[AddMonoid M]
{a : M}
(n : ℕ)


@[to_additive (attr := elab_as_elim)]
protected theorem cases_on {P : WithOne α → Prop} : ∀ x : WithOne α, P 1 → (∀ a : α, P a) → P x

{α : Type u}
{P : WithOne α → Prop}
(x : WithOne α)


@[simp]
theorem preimage_image (e : P₁ ≃ᵃL[k] P₂) (s : Set P₁) : e ⁻¹' (e '' s) = s

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(e : P₁ ≃ᵃL[k] P₂)
(s : Set P₁)


@[simp] lemma ker_pure (a : α) : ker (pure a) = {a}


@[simp] theorem preimage_uIoc [LinearOrder β] (e : α ↪o β) (x y : α) :
    e ⁻¹' (uIoc (e x) (e y)) = uIoc x y

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[LinearOrder β]
(e : α ↪o β)
(x y : α)


theorem Derivation.liftKaehlerDifferential_D :
    (KaehlerDifferential.D R S).liftKaehlerDifferential = LinearMap.id

(R : Type u)
(S : Type v)
[CommRing R]
[CommRing S]
[Algebra R S]


/-- The functor from the double-opposite of a category to the underlying category. -/
@[simps]
def unopUnop : Cᵒᵖᵒᵖ ⥤ C

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

(CategoryTheory.unopUnop C).obj X = Opposite.unop (Opposite.unop X)


@[simp]
theorem toWithTop_add {x y : PartENat} : toWithTop (x + y) = toWithTop x + toWithTop y

(x + y).toWithTop = x.toWithTop + y.toWithTop


@[to_additive]
theorem index_eq_zero_of_relindex_eq_zero (h : H.relindex K = 0) : H.index = 0

{G : Type u_1}
[AddGroup G]
{H K : AddSubgroup G}
(h : H.relindex K = 0)


/-- The canonical isomorphism of triangles
`binaryProductTriangle X₁ X₂ ≅ binaryBiproductTriangle X₁ X₂`. -/
@[simps!]
def binaryProductTriangleIsoBinaryBiproductTriangle
    (X₁ X₂ : C) [HasZeroMorphisms C] [HasBinaryBiproduct X₁ X₂] :
    binaryProductTriangle X₁ X₂ ≅ binaryBiproductTriangle X₁ X₂

(CategoryTheory.Pretriangulated.binaryProductTriangleIsoBinaryBiproductTriangle X₁ X₂).inv.hom₁ = 𝟙 X₁


/-- If `𝔖` covers `α`, then the topology of `𝔖`-convergence is T₂. -/
theorem t2Space_of_covering [T2Space β] (h : ⋃₀ 𝔖 = univ) : T2Space (α →ᵤ[𝔖] β)

{α : Type u_1}
{β : Type u_2}
[UniformSpace β]
{𝔖 : Set (Set α)}
[T2Space β]
(h : ⋃₀ 𝔖 = Set.univ)


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

{f : ι → Ω → β}

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

ProbabilityTheory.IndepFun (f i - f j) (f k) μ


/-- The two paths coercion can take to an `AddMonoidHom` are equivalent -/
theorem toAddMonoidMom_commutes (f : R ≃+* S) :
    (f : R →+* S).toAddMonoidHom = (f : R ≃+ S).toAddMonoidHom

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


@[to_additive]
theorem lift_comp_of (f : α → M) : lift f ∘ of = f

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

⇑(FreeAddMonoid.lift f) ∘ FreeAddMonoid.of = f


theorem Continuous.comp {g : Y → Z} (hg : Continuous g) (hf : Continuous f) :
    Continuous (g ∘ f)

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X → Y}
{g : Y → Z}
(hg : Continuous g)
(hf : Continuous f)


lemma functor_additive
    (hr : ∀ ⦃X Y : C⦄ (f₁ f₂ g₁ g₂ : X ⟶ Y) (_ : r f₁ f₂) (_ : r g₁ g₂), r (f₁ + g₁) (f₂ + g₂)) :
    letI := preadditive r hr
    (functor r).Additive

(hr : ∀ ⦃X Y : C⦄ (f₁ f₂ g₁ g₂ : X ⟶ Y), r f₁ f₂ → r g₁ g₂ → r (f₁ + g₁) (f₂ + g₂))


@[simp]
nonrec theorem map_sum {X Y : C} {α : Type*} (f : α → (X ⟶ Y)) (s : Finset α) :
    F.map (∑ a ∈ s, f a) = ∑ a ∈ s, F.map (f a)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Category.{u_6, u_2} D]
[CategoryTheory.Preadditive C]
[CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor C D)
[F.Additive]
{X Y : C}
{α : Type u_4}
(f : α → (X ⟶ Y))
(s : Finset α)


/-- The inner product of two vectors, divided by the product of their
norms, has value -1 if and only if they are nonzero and one is
a negative multiple of the other. -/
theorem real_inner_div_norm_mul_norm_eq_neg_one_iff (x y : F) :
    ⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) = -1 ↔ x ≠ 0 ∧ ∃ r : ℝ, r < 0 ∧ y = r • x

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
(x y : F)

⟪x, y⟫_ℝ / (‖x‖ * ‖y‖) = -1 ↔ x ≠ 0 ∧ ∃ r < 0, y = r • x


theorem mem_finsupp_iff {t : ι → Finset α} :
    f ∈ s.finsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i

{ι : Type u_1}
{α : Type u_2}
[Zero α]
{s : Finset ι}
{f : ι →₀ α}
{t : ι → Finset α}


/-- Build a `MulEquiv` from an isomorphism in the category `CommGroup`. -/
@[to_additive (attr := simps!)]
def commGroupIsoToMulEquiv {X Y : CommGrp} (i : X ≅ Y) : X ≃* Y

i.addCommGroupIsoToAddEquiv.symm a = i.inv a


theorem ofLower_inj {a b : WithLower α} : ofLower a = ofLower b ↔ a = b

{α : Type u_1}
{a b : Topology.WithLower α}

Topology.WithLower.ofLower a = Topology.WithLower.ofLower b ↔ a = b


/-- If `map f μ = μ`, then the measure of the preimage of any null measurable set `s`
is equal to the measure of `s`.
Note that this lemma does not assume (a.e.) measurability of `f`. -/
lemma measure_preimage_of_map_eq_self {f : α → α} (hf : map f μ = μ)
    {s : Set α} (hs : NullMeasurableSet s μ) : μ (f ⁻¹' s) = μ s

(hf : MeasureTheory.Measure.map f μ = μ)

(hs : MeasureTheory.NullMeasurableSet s μ)


/-- A short complex `S` is short exact if it is exact, `S.f` is a mono and `S.g` is an epi. -/
structure ShortExact : Prop where
  exact : S.Exact
  [mono_f : Mono S.f]
  [epi_g : Epi S.g]


/-- The right homology map data associated to the zero morphism between two short complexes. -/
@[simps]
def zero (h₁ : S₁.RightHomologyData) (h₂ : S₂.RightHomologyData) :
    RightHomologyMapData 0 h₁ h₂

(CategoryTheory.ShortComplex.RightHomologyMapData.zero h₁ h₂).φH = 0


@[simp]
theorem ofNat_mem_center [NonAssocSemiring M] (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n)) ∈ Set.center M

(M : Type u_1)
[NonAssocSemiring M]
(n : ℕ)
[n.AtLeastTwo]


@[simp]
theorem coe_of {X : Type*} (to_prod : X × X) : ↥(of to_prod) = X


/-- For any multiplicative function `f` with `f 1 = 1` and any `n ≠ 0`,
we can evaluate `f n` by evaluating `f` at `p ^ k` over the factorization of `n` -/
theorem multiplicative_factorization {β : Type*} [CommMonoid β] (f : ℕ → β)
    (h_mult : ∀ x y : ℕ, Coprime x y → f (x * y) = f x * f y) (hf : f 1 = 1) :
    ∀ {n : ℕ}, n ≠ 0 → f n = n.factorization.prod fun p k => f (p ^ k)

(h_mult : ∀ (x y : ℕ), x.Coprime y → f (x * y) = f x * f y)


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

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
{f g : α →CO β}
(h : ∀ (a : α), f a = g a)


theorem image.fac : factorThruImage f ≫ image.ι f = f

{R : Type u}
[Ring R]
{G H : ModuleCat R}
(f : G ⟶ H)

ModuleCat.factorThruImage f ≫ ModuleCat.image.ι f = f


@[simp]
theorem equivRange_apply (f : M ↪[L] N) (x : M) : (f.equivRange x : N) = f x

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(f : L.Embedding M N)
(x : M)


theorem nhdsSet_diagonal (X) [TopologicalSpace (X × X)] :
    𝓝ˢ (diagonal X) = ⨆ (x : X), 𝓝 (x, x)

(X : Type u_3)
[TopologicalSpace (X × X)]


@[simp, mfld_simps]
theorem mk_coe_symm (e : PartialEquiv X Y) (a b c d) :
    ((PartialHomeomorph.mk e a b c d).symm : Y → X) = e.symm

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialEquiv X Y)
(a : IsOpen e.source)
(b : IsOpen e.target)
(c : ContinuousOn (↑e) e.source)
(d : ContinuousOn e.invFun e.target)

↑{ toPartialEquiv := e, open_source := a, open_target := b, continuousOn_toFun := c, continuousOn_invFun := d }.symm =
  ↑e.symm


@[simp]
theorem transpose_dualTensorHom (f : Module.Dual R M) (m : M) :
    Dual.transpose (R := R) (dualTensorHom R M M (f ⊗ₜ m)) =
    dualTensorHom R _ _ (Dual.eval R M m ⊗ₜ f)

{R : Type u}
{M : Type v₁}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(f : Module.Dual R M)
(m : M)

Module.Dual.transpose ((dualTensorHom R M M) (f ⊗ₜ[R] m)) =
  (dualTensorHom R (Module.Dual R M) (Module.Dual R M)) ((Module.Dual.eval R M) m ⊗ₜ[R] f)


@[simp]
theorem mapPair_right : (mapPair f g).app ⟨right⟩ = g

{F G : CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair ⥤ C}

(f : F.obj { as := CategoryTheory.Limits.WalkingPair.left } ⟶ G.obj { as := CategoryTheory.Limits.WalkingPair.left })

(g : F.obj { as := CategoryTheory.Limits.WalkingPair.right } ⟶ G.obj { as := CategoryTheory.Limits.WalkingPair.right })

(CategoryTheory.Limits.mapPair f g).app { as := CategoryTheory.Limits.WalkingPair.right } = g


@[simp]
theorem uniqueUpToIso_hom_right (P : IsKan s) (Q : IsKan t) :
    (uniqueUpToIso P Q).hom.right = P.desc t

{s t : CategoryTheory.Bicategory.LeftExtension f g}

(P.uniqueUpToIso Q).hom.right = P.desc t


theorem Real.iInf_mul_of_nonpos (ha : r ≤ 0) (f : ι → ℝ) : (⨅ i, f i) * r = ⨆ i, f i * r

{ι : Sort u_1}
{r : ℝ}
(ha : r ≤ 0)
(f : ι → ℝ)


theorem dvd_of_factorization_pos {n p : ℕ} (hn : n.factorization p ≠ 0) : p ∣ n


theorem biUnion_le (πi : ∀ J, Prepartition J) : π.biUnion πi ≤ π

(πi : (J : BoxIntegral.Box ι) → BoxIntegral.Prepartition J)


/-- Quotienting a group by its torsion subgroup yields a torsion free group. -/
@[to_additive AddIsTorsionFree.quotient_torsion
      "Quotienting a group by its additive torsion subgroup yields an additive torsion free group."]
theorem IsTorsionFree.quotient_torsion : IsTorsionFree <| G ⧸ torsion G

AddMonoid.IsTorsionFree (G ⧸ AddCommGroup.torsion G)


@[simp]
theorem op_map_id_obj (x : X) (U : (OpenNhds x)ᵒᵖ) : (map (𝟙 X) x).op.obj U = U

{X : TopCat}
(x : ↑X)
(U : (TopologicalSpace.OpenNhds x)ᵒᵖ)

(TopologicalSpace.OpenNhds.map (𝟙 X) x).op.obj U = U


@[to_additive (attr := simp)]
theorem norm_inv_eq {x : FreeGroup α} : norm x⁻¹ = norm x

{α : Type u}
[DecidableEq α]
{x : FreeGroup α}


@[to_additive addIndex_mono]
theorem index_mono {K K' V : Set G} (hK' : IsCompact K') (h : K ⊆ K') (hV : (interior V).Nonempty) :
    index K V ≤ index K' V

{G : Type u_1}
[Group G]
[TopologicalSpace G]
[TopologicalGroup G]
{K K' V : Set G}
(hK' : IsCompact K')
(h : K ⊆ K')
(hV : (interior V).Nonempty)

MeasureTheory.Measure.haar.index K V ≤ MeasureTheory.Measure.haar.index K' V


@[to_additive (attr := simp)]
theorem toWord_mk : (mk L₁).toWord = reduce L₁

{α : Type u}
{L₁ : List (α × Bool)}
[DecidableEq α]

(FreeGroup.mk L₁).toWord = FreeGroup.reduce L₁


theorem map_extend_nhdsWithin_eq_image_of_subset {y : M} (hy : y ∈ f.source) (hs : s ⊆ f.source) :
    map (f.extend I) (𝓝[s] y) = 𝓝[f.extend I '' s] f.extend I y

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(f : PartialHomeomorph M H)
(I : ModelWithCorners 𝕜 E H)
{s : Set M}
{y : M}
(hy : y ∈ f.source)
(hs : s ⊆ f.source)

Filter.map (↑(f.extend I)) (𝓝[s] y) = 𝓝[↑(f.extend I) '' s] ↑(f.extend I) y


@[to_additive (attr := simp)]
protected theorem map_one' (f : α → β) : (1 : Filter α).map f = pure (f 1)

{α : Type u_2}
{β : Type u_3}
[One α]
(f : α → β)


theorem Ioo_inl_inl : Ioo (inl a₁ : α ⊕ β) (inl a₂) = (Ioo a₁ a₂).map Embedding.inl

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(a₁ a₂ : α)

Finset.Ioo (Sum.inl a₁) (Sum.inl a₂) = Finset.map Function.Embedding.inl (Finset.Ioo a₁ a₂)


@[simp]
lemma nonempty_primeFactors {n : ℕ} : n.primeFactors.Nonempty ↔ 1 < n


theorem lt_one_div (ha : 0 < a) (hb : 0 < b) : a < 1 / b ↔ b < 1 / a

{α : Type u_2}
[LinearOrderedSemifield α]
{a b : α}
(ha : 0 < a)
(hb : 0 < b)


/-- The composition operator (in the target) with a Lipschitz map is Lipschitz. -/
theorem lipschitz_comp {G : β → γ} {C : ℝ≥0} (H : LipschitzWith C G) :
    LipschitzWith C (comp G H : (α →ᵇ β) → α →ᵇ γ)

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[PseudoMetricSpace β]
[PseudoMetricSpace γ]
{G : β → γ}
{C : ℝ≥0}
(H : LipschitzWith C G)

LipschitzWith C (BoundedContinuousFunction.comp G H)


theorem add_eq_max_of_ne {f g : PadicSeq p} (hfgne : f.norm ≠ g.norm) :
    (f + g).norm = max f.norm g.norm

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{f g : PadicSeq p}
(hfgne : f.norm ≠ g.norm)


theorem isTheta_cpow_const_rpow {b : ℂ} (hl : b.re = 0 → b ≠ 0 → ∀ᶠ x in l, f x ≠ 0) :
    (fun x => f x ^ b) =Θ[l] fun x => abs (f x) ^ b.re

(hl : b.re = 0 → b ≠ 0 → ∀ᶠ (x : α) in l, f x ≠ 0)

(fun x => f x ^ b) =Θ[l] fun x => Complex.abs (f x) ^ b.re


@[simps]
instance Cocone.category : Category (Cocone F)

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

∀ {X Y Z : CategoryTheory.Limits.Cocone F} (f : X ⟶ Y) (g : Y ⟶ Z), (f ≫ g).hom = f.hom ≫ g.hom


theorem Perm.drop_inter [DecidableEq α] {xs ys : List α} (n : ℕ) (h : xs ~ ys) (h' : ys.Nodup) :
    xs.drop n ~ ys.inter (xs.drop n)

{α : Type u_1}
[DecidableEq α]
{xs ys : List α}
(n : ℕ)
(h : xs.Perm ys)
(h' : ys.Nodup)

(List.drop n xs).Perm (ys.inter (List.drop n xs))


@[simp, norm_cast]
theorem coe_X (s : σ) : ((X s : MvPolynomial σ R) : MvPowerSeries σ R) = MvPowerSeries.X s

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(s : σ)


theorem Monic.dvd_of_fraction_map_dvd_fraction_map [IsIntegrallyClosed R] {p q : R[X]}
    (hp : p.Monic) (hq : q.Monic)
    (h : q.map (algebraMap R K) ∣ p.map (algebraMap R K)) : q ∣ p

(h : Polynomial.map (algebraMap R K) q ∣ Polynomial.map (algebraMap R K) p)


theorem HasLineDerivWithinAt.hasLineDerivAt
    (h : HasLineDerivWithinAt 𝕜 f f' s x v) (hs : s ∈ 𝓝 x) :
    HasLineDerivAt 𝕜 f f' 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}
{f' : F}
{s : Set E}
{x v : E}
(h : HasLineDerivWithinAt 𝕜 f f' s x v)
(hs : s ∈ 𝓝 x)


/-- A family of gluing data consists of
1. An index type `J`
2. A locally ringed space `U i` for each `i : J`.
3. A locally ringed space `V i j` for each `i j : J`.
  (Note that this is `J × J → LocallyRingedSpace` rather than `J → J → LocallyRingedSpace` to
  connect to the limits library easier.)
4. An open immersion `f i j : V i j ⟶ U i` for each `i j : ι`.
5. A transition map `t i j : V i j ⟶ V j i` for each `i j : ι`.
such that
6. `f i i` is an isomorphism.
7. `t i i` is the identity.
8. `V i j ×[U i] V i k ⟶ V i j ⟶ V j i` factors through `V j k ×[U j] V j i ⟶ V j i` via some
    `t' : V i j ×[U i] V i k ⟶ V j k ×[U j] V j i`.
9. `t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _`.

We can then glue the spaces `U i` together by identifying `V i j` with `V j i`, such
that the `U i`'s are open subspaces of the glued space.
-/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure GlueData extends CategoryTheory.GlueData LocallyRingedSpace where
  f_open : ∀ i j, LocallyRingedSpace.IsOpenImmersion (f i j)

AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion (self.f i j)


theorem snd_bot [Bot α] [Bot β] : (⊥ : α × β).snd = ⊥

(α : Type u)
(β : Type v)
[Bot α]
[Bot β]


theorem isBounded (a : A) : Bornology.IsBounded (σ a)

{𝕜 : Type u_1}
{A : Type u_2}
[NormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
(a : A)


theorem adapted_zero [Zero β] (f : Filtration ι m) : Adapted f (0 : ι → Ω → β)

{Ω : Type u_1}
(β : Type u_2)
{ι : Type u_3}
{m : MeasurableSpace Ω}
[TopologicalSpace β]
[Preorder ι]
[Zero β]
(f : MeasureTheory.Filtration ι m)


@[simp] theorem getLast_map (f : α → β) (l : List α) (h) :
    getLast (map f l) h = f (getLast l (by simpa using h))

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(l : List α)
(h : List.map f l ≠ [])

(List.map f l).getLast h = f (l.getLast ⋯)


@[simp] lemma antidiagonal_filter_le_snd_of_le {n k : ℕ} (h : k ≤ n) :
    (antidiagonal n).filter (fun a ↦ k ≤ a.snd) = (antidiagonal (n - k)).map
      (Embedding.prodMap (Embedding.refl ℕ) ⟨_, add_left_injective k⟩)

Finset.filter (fun a => k ≤ a.2) (Finset.antidiagonal n) =
  Finset.map ((Function.Embedding.refl ℕ).prodMap { toFun := fun x => x + k, inj' := ⋯ }) (Finset.antidiagonal (n - k))


theorem encode_lt_rfind' (cf) : encode cf < encode (rfind' cf)

Encodable.encode cf < Encodable.encode cf.rfind'


lemma r_zero (i₁ : I₁) (i₃ : I₃) : r ⟨i₁, 0, i₃⟩ = π ⟨i₁, i₃⟩

(τ : CategoryTheory.GradedObject.TriangleIndexData r π)


@[simp]
theorem map_eq_nil {β : Type*} (f : α → β) (s : Cycle α) : map f s = nil ↔ s = nil

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

Cycle.map f s = Cycle.nil ↔ s = Cycle.nil


theorem contMDiffOn_model_symm : ContMDiffOn 𝓘(𝕜, E) I n I.symm (range I)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{n : ℕ∞}

ContMDiffOn 𝓘(𝕜, E) I n (↑I.symm) (Set.range ↑I)


@[simp]
theorem val_eq_zero : ∀ {n : ℕ} (a : ZMod n), a.val = 0 ↔ a = 0


@[to_additive]
theorem UniformGroup.ext {G : Type*} [Group G] {u v : UniformSpace G} (hu : @UniformGroup G u _)
    (hv : @UniformGroup G v _)
    (h : @nhds _ u.toTopologicalSpace 1 = @nhds _ v.toTopologicalSpace 1) : u = v

{G : Type u_3}
[AddGroup G]
{u v : UniformSpace G}
(hu : UniformAddGroup G)
(hv : UniformAddGroup G)
(h : 𝓝 0 = 𝓝 0)


theorem Ioi_ssubset_Ici_self : Ioi a ⊂ Ici a


theorem rpow_add_rpow_le_add {p : ℝ} (a b : ℝ≥0∞) (hp1 : 1 ≤ p) :
    (a ^ p + b ^ p) ^ (1 / p) ≤ a + b


theorem Dense.denseRange_val (h : Dense s) : DenseRange ((↑) : s → X)

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
(h : Dense s)


@[to_additive]
theorem Step.sublist (H : Red.Step L₁ L₂) : Sublist L₂ L₁

{α : Type u}
{L₁ L₂ : List (α × Bool)}
(H : FreeAddGroup.Red.Step L₁ L₂)


@[measurability]
theorem measurable_subtype_coe {p : α → Prop} : Measurable ((↑) : Subtype p → α)

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


/-- A multiple of the difference between two points lies in their `vectorSpan`. -/
theorem smul_vsub_mem_vectorSpan_pair (r : k) (p₁ p₂ : P) :
    r • (p₁ -ᵥ p₂) ∈ vectorSpan k ({p₁, p₂} : Set P)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(r : k)
(p₁ p₂ : P)


theorem isNat_prime_1 : {n : ℕ} → IsNat n (nat_lit 1) → ¬ n.Prime

Mathlib.Meta.NormNum.IsNat n 1 → ¬Nat.Prime n


@[simp]
theorem injective_comp (e : E) (f : β → γ) : Function.Injective (f ∘ e) ↔ Function.Injective f

{E : Sort u_1}
{α : Sort u_3}
{β : Sort u_4}
{γ : Sort u_5}
[iE : EquivLike E α β]
(e : E)
(f : β → γ)

Function.Injective (f ∘ ⇑e) ↔ Function.Injective f


theorem IsNilpotent.mapQ (hnp : IsNilpotent f) : IsNilpotent (p.mapQ p f hp)

{R : Type u_1}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
{f : Module.End R M}
{p : Submodule R M}
(hp : p ≤ Submodule.comap f p)
(hnp : IsNilpotent f)


@[simp]
theorem coe_map (S : NonUnitalSubalgebra R A) (f : F) : (map f S : Set B) = f '' S

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[NonUnitalNonAssocSemiring B]
[Module R A]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
(S : NonUnitalSubalgebra R A)
(f : F)

↑(NonUnitalSubalgebra.map f S) = ⇑f '' ↑S


theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R

{R : Type u_1}
[CommSemiring R]
(P : Ideal R)
[hp : P.IsPrime]
[NoZeroDivisors R]


theorem mem_eraseIdx_iff_getElem {x : α} :
    ∀ {l} {k}, x ∈ eraseIdx l k ↔ ∃ i : Fin l.length, ↑i ≠ k ∧ l[i.1] = x

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

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


theorem infsep_pair_le_toReal_inf (hxy : x ≠ y) :
    ({x, y} : Set α).infsep ≤ (edist x y ⊓ edist y x).toReal

{α : Type u_1}
[EDist α]
{x y : α}
(hxy : x ≠ y)

{x, y}.infsep ≤ (edist x y ⊓ edist y x).toReal


theorem countP_cons (b : α) (s) : countP p (b ::ₘ s) = countP p s + if p b then 1 else 0

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
(b : α)
(s : Multiset α)

Multiset.countP p (b ::ₘ s) = Multiset.countP p s + if p b then 1 else 0


theorem le_leftLim (h : x < y) : f x ≤ leftLim f y

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : Monotone f)
{x y : α}
(h : x < y)


theorem mem_stepSet (s : σ) (S : Set σ) (a : α) : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a

{α : Type u}
{σ : Type v}
(M : NFA α σ)
(s : σ)
(S : Set σ)
(a : α)


theorem Disjoint.ne (ha : a ≠ ⊥) (hab : Disjoint a b) : a ≠ b

{α : Type u_1}
[PartialOrder α]
[OrderBot α]
{a b : α}
(ha : a ≠ ⊥)
(hab : Disjoint a b)


lemma map_first_exact_on_four_term_right_exact_of_isSMulRegular_last
    {rs : List R} {f₁ : M →ₗ[R] M₂} {f₂ : M₂ →ₗ[R] M₃} {f₃ : M₃ →ₗ[R] M₄}
    (h₁₂ : Exact f₁ f₂) (h₂₃ : Exact f₂ f₃) (h₃ : Surjective f₃)
    (h₄ : IsWeaklyRegular M₄ rs) :
    Exact (mapQ _ _ _ (smul_top_le_comap_smul_top (Ideal.ofList rs) f₁))
          (mapQ _ _ _ (smul_top_le_comap_smul_top (Ideal.ofList rs) f₂))

(h₄ : RingTheory.Sequence.IsWeaklyRegular M₄ rs)

Function.Exact ⇑((Ideal.ofList rs • ⊤).mapQ (Ideal.ofList rs • ⊤) f₁ ⋯)
  ⇑((Ideal.ofList rs • ⊤).mapQ (Ideal.ofList rs • ⊤) f₂ ⋯)


@[simp]
theorem mapEquiv_apply (x : f α) : mapEquiv f e x = EquivFunctor.map e x

(f : Type u₀ → Type u₁)
[EquivFunctor f]
{α β : Type u₀}
(e : α ≃ β)
(x : f α)

(EquivFunctor.mapEquiv f e) x = EquivFunctor.map e x


@[simp]
theorem dist_vadd_left (v : V) (x : P) : dist (v +ᵥ x) x = ‖v‖

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


theorem isOpen_iff : IsOpen s ↔ ∀ o ∈ s, IsLimit o → ∃ a < o, Set.Ioo a o ⊆ s

IsOpen s ↔ ∀ o ∈ s, o.IsLimit → ∃ a < o, Set.Ioo a o ⊆ s


@[simp]
theorem coe_toRelEmbedding (f : r ≃r s) : (f.toRelEmbedding : α → β) = f

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


@[simp] theorem ihom_obj_ρ_apply {A B : Rep k G} (g : G) (x : A →ₗ[k] B) :
    ((Rep.ihom A).obj B).ρ g x = B.ρ g ∘ₗ x ∘ₗ A.ρ g⁻¹

{k G : Type u}
[CommRing k]
[Group G]
{A B : Rep k G}
(g : G)
(x : CoeSort.coe A →ₗ[k] CoeSort.coe B)

((A.ihom.obj B).ρ g) x = B.ρ g ∘ₗ x ∘ₗ A.ρ g⁻¹


theorem Convex.cthickening (hs : Convex ℝ s) (δ : ℝ) : Convex ℝ (cthickening δ s)

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{s : Set E}
(hs : Convex ℝ s)
(δ : ℝ)


theorem coe_support_append {u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
    ((p.append p').support : Multiset V) = {u} + p.support.tail + p'.support.tail

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

↑(p.append p').support = {u} + ↑p.support.tail + ↑p'.support.tail


theorem coprime_iff_inf_one {a b : α} (ha0 : a ≠ 0) (hb0 : b ≠ 0) :
    Associates.mk a ⊓ Associates.mk b = 1 ↔ ∀ {d : α}, d ∣ a → d ∣ b → ¬Prime d

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
{a b : α}
(ha0 : a ≠ 0)
(hb0 : b ≠ 0)


theorem leftMoves_add : ∀ x y : PGame.{u}, (x + y).LeftMoves = (x.LeftMoves ⊕ y.LeftMoves)


@[simp] lemma unmop_tensorUnit : unmop (𝟙_ Cᴹᵒᵖ) = 𝟙_ C

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


theorem Ioo_mem_nhdsWithin_Ioi {a b c : α} (H : b ∈ Ico a c) : Ioo a c ∈ 𝓝[>] b

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
{a b c : α}
(H : b ∈ Set.Ico a c)


/-- Every linear map from a direct sum agrees with the one obtained by applying
the universal property to each of its components. -/
theorem toModule.unique (f : ⨁ i, M i) : ψ f = toModule R ι N (fun i ↦ ψ.comp <| lof R ι M i) f

(ψ : (DirectSum ι fun i => M i) →ₗ[R] N)

ψ f = (DirectSum.toModule R ι N fun i => ψ ∘ₗ DirectSum.lof R ι M i) f


@[simp, norm_cast]
theorem nnnorm_real (r : ℝ) : ‖(r : ℂ)‖₊ = ‖r‖₊

‖↑r‖₊ = ‖r‖₊


theorem ncard_insert_eq_ite {a : α} [Decidable (a ∈ s)] (hs : s.Finite := by toFinite_tac) :
    ncard (insert a s) = if a ∈ s then s.ncard else s.ncard + 1

{α : Type u_1}
{s : Set α}
{a : α}
[Decidable (a ∈ s)]
(hs : s.Finite := by toFinite_tac)

(insert a s).ncard = if a ∈ s then s.ncard else s.ncard + 1


theorem eq_none_iff_forall_not_mem : o = none ↔ ∀ a, a ∉ o

∀ {α : Type u_1} {o : Option α}, o = none ↔ ∀ (a : α), ¬a ∈ o


@[simp] -- This can be safely removed as a `@[simp]` lemma if `image_smul_setₛₗ` is readded.
theorem image_smul_set :
    h '' (c • s) = c • h '' s

(R : Type u_1)
(M₁ : Type u_4)
(M₂ : Type u_5)
[Monoid R]
[MulAction R M₁]
[MulAction R M₂]
{F : Type u_7}
(h : F)
[FunLike F M₁ M₂]
[MulActionHomClass F R M₁ M₂]
(c : R)
(s : Set M₁)


/-- Note: the converse is not true. For a counterexample, see
  Walter Rudin *Real and Complex Analysis*, example (c) in section 8.9. It is true if the set is
  measurable, see `ae_prod_mem_iff_ae_ae_mem`. -/
theorem ae_ae_of_ae_prod {p : α × β → Prop} (h : ∀ᵐ z ∂μ.prod ν, p z) :
    ∀ᵐ x ∂μ, ∀ᵐ y ∂ν, p (x, y)

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{p : α × β → Prop}
(h : ∀ᵐ (z : α × β) ∂μ.prod ν, p z)


/-- The semilatice generated by a finite set is finite. -/
protected lemma Set.Finite.supClosure (hs : s.Finite) : (supClosure s).Finite

{α : Type u_2}
[SemilatticeSup α]
{s : Set α}
(hs : s.Finite)


/-- Constructs an equivalence between finite distributive lattices from an order isomorphism
between them. -/
@[simps]
def Iso.mk {α β : FinBddDistLat.{u}} (e : α ≃o β) : α ≅ β

(e : ↑α.toBddDistLat.toDistLat ≃o ↑β.toBddDistLat.toDistLat)

(FinBddDistLat.Iso.mk e).inv.toSupHom a = e.symm a


/-- A complete `r`-partite graph has no `n`-cliques for `r < n`. -/
theorem cliqueFree_completeMultipartiteGraph {ι : Type*} [Fintype ι] (V : ι → Type*)
    (hc : card ι < n) : (completeMultipartiteGraph V).CliqueFree n

{n : ℕ}
{ι : Type u_3}
[Fintype ι]
(V : ι → Type u_4)
(hc : Fintype.card ι < n)


@[simp] theorem takeWhile_nil : ([] : List α).takeWhile p = []


theorem IsLindelof.union (hs : IsLindelof s) (ht : IsLindelof t) : IsLindelof (s ∪ t)

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


theorem center_eq_inversion (hR : R ≠ 0) : c = inversion c R x ↔ x = c

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c x : P}
{R : ℝ}
(hR : R ≠ 0)

c = EuclideanGeometry.inversion c R x ↔ x = c


/-- An order isomorphism between types with ordered subtraction preserves subtraction provided that
it preserves addition. -/
theorem OrderIso.map_tsub {M N : Type*} [Preorder M] [Add M] [Sub M] [OrderedSub M]
    [PartialOrder N] [Add N] [Sub N] [OrderedSub N] (e : M ≃o N)
    (h_add : ∀ a b, e (a + b) = e a + e b) (a b : M) : e (a - b) = e a - e b

(h_add : ∀ (a b : M), e (a + b) = e a + e b)


@[gcongr] theorem tsub_le_tsub_left (h : a ≤ b) (c : α) : c - b ≤ c - a

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


theorem normSq_ne_zero : normSq a ≠ 0 ↔ a ≠ 0

{R : Type u_1}
[LinearOrderedCommRing R]
{a : ℍ[R]}


@[simp]
theorem mapRange.equiv_refl : mapRange.equiv (Equiv.refl M) rfl rfl = Equiv.refl (α →₀ M)

Finsupp.mapRange.equiv (Equiv.refl M) ⋯ ⋯ = Equiv.refl (α →₀ M)


@[simp]
theorem lintegral_finset_sum_measure {ι} {m : MeasurableSpace α} (s : Finset ι) (f : α → ℝ≥0∞)
    (μ : ι → Measure α) : ∫⁻ a, f a ∂(∑ i ∈ s, μ i) = ∑ i ∈ s, ∫⁻ a, f a ∂μ i

{α : Type u_1}
{ι : Type u_5}
{m : MeasurableSpace α}
(s : Finset ι)
(f : α → ℝ≥0∞)
(μ : ι → MeasureTheory.Measure α)

∫⁻ (a : α), f a ∂∑ i ∈ s, μ i = ∑ i ∈ s, ∫⁻ (a : α), f a ∂μ i


theorem map_isPath_iff_of_injective (hinj : Function.Injective f) : (p.map f).IsPath ↔ p.IsPath

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
{f : G →g G'}
{u v : V}
{p : G.Walk u v}
(hinj : Function.Injective ⇑f)

(SimpleGraph.Walk.map f p).IsPath ↔ p.IsPath


lemma multinomial_cons (ha : a ∉ s) (f : α → ℕ) :
    multinomial (s.cons a ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f

{α : Type u_1}
{s : Finset α}
{a : α}
(ha : a ∉ s)
(f : α → ℕ)

Nat.multinomial (Finset.cons a s ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * Nat.multinomial s f


theorem antisymm [IsAntisymm α r] {a b : α} : a ≺ b → b ≺ a → a = b

{α : Sort u}
{r : α → α → Prop}
[IsAntisymm α r]
{a b : α}


@[continuity]
theorem continuous_equivIoc_symm : Continuous (equivIoc p a).symm

{𝕜 : Type u_1}
[LinearOrderedAddCommGroup 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
(p : 𝕜)
[hp : Fact (0 < p)]
(a : 𝕜)
[Archimedean 𝕜]

Continuous ⇑(AddCircle.equivIoc p a).symm


@[simp]
theorem mem_orthogonal_iff {N : Submodule R M} {m : M} :
    m ∈ B.orthogonal N ↔ ∀ n ∈ N, IsOrtho B n m

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
{N : Submodule R M}
{m : M}

m ∈ B.orthogonal N ↔ ∀ n ∈ N, B.IsOrtho n m


/-- An antitone map sends a greatest element of a set to a least element of its image. -/
theorem map_isGreatest (Hf : AntitoneOn f t) : IsGreatest t a → IsLeast (f '' t) (f a)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{t : Set α}
{a : α}
(Hf : AntitoneOn f t)


/-- `WalkingParallelPair` as a category is equivalent to a special case of
`WalkingParallelFamily`.  -/
@[simps!]
def walkingParallelFamilyEquivWalkingParallelPair :
    WalkingParallelFamily.{w} (ULift Bool) ≌ WalkingParallelPair

(x : CategoryTheory.Limits.WalkingParallelFamily (ULift.{w, 0} Bool))

CategoryTheory.Limits.walkingParallelFamilyEquivWalkingParallelPair.functor.obj x =
  CategoryTheory.Limits.WalkingParallelFamily.rec CategoryTheory.Limits.WalkingParallelPair.zero
    CategoryTheory.Limits.WalkingParallelPair.one x


theorem Finite.toFinset_image2 (f : α → β → γ) (hs : s.Finite) (ht : t.Finite)
    (hf := hs.image2 f ht) : hf.toFinset = Finset.image₂ f hs.toFinset ht.toFinset

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{s : Set α}
{t : Set β}
(f : α → β → γ)
(hs : s.Finite)
(ht : t.Finite)
(hf : (Set.image2 f s t).Finite := ⋯)

Set.Finite.toFinset hf = Finset.image₂ f hs.toFinset ht.toFinset


/-- A left homology data for a short complex `S` consists of morphisms `i : K ⟶ S.X₂` and
`π : K ⟶ H` such that `i` identifies `K` to the kernel of `g : S.X₂ ⟶ S.X₃`,
and that `π` identifies `H` to the cokernel of the induced map `f' : S.X₁ ⟶ K` -/
structure LeftHomologyData where
  /-- a choice of kernel of `S.g : S.X₂ ⟶ S.X₃`-/
  K : C
  /-- a choice of cokernel of the induced morphism `S.f' : S.X₁ ⟶ K`-/
  H : C
  /-- the inclusion of cycles in `S.X₂` -/
  i : K ⟶ S.X₂
  /-- the projection from cycles to the (left) homology -/
  π : K ⟶ H
  /-- the kernel condition for `i` -/
  wi : i ≫ S.g = 0
  /-- `i : K ⟶ S.X₂` is a kernel of `g : S.X₂ ⟶ S.X₃` -/
  hi : IsLimit (KernelFork.ofι i wi)
  /-- the cokernel condition for `π` -/
  wπ : hi.lift (KernelFork.ofι _ S.zero) ≫ π = 0
  /-- `π : K ⟶ H` is a cokernel of the induced morphism `S.f' : S.X₁ ⟶ K` -/
  hπ : IsColimit (CokernelCofork.ofπ π wπ)

CategoryTheory.CategoryStruct.comp self.i S.g = 0


/-- The sequence `stirlingSeq` is positive for `n > 0`  -/
theorem stirlingSeq'_pos (n : ℕ) : 0 < stirlingSeq (n + 1)


theorem lineMap_apply_ring' (a b c : k) : lineMap a b c = c * (b - a) + a

(AffineMap.lineMap a b) c = c * (b - a) + a


@[simp] lemma addSubmonoid_closure_range_pow {n : ℕ} (hn₀ : n ≠ 0) :
    closure (range fun x : ℚ≥0 ↦ x ^ n) = ⊤

AddSubmonoid.closure (Set.range fun x => x ^ n) = ⊤


theorem extentClosure_anti : Antitone (extentClosure r)

{α : Type u_2}
{β : Type u_3}
(r : α → β → Prop)


/-- A conditionally complete linear order is a linear order in which
every nonempty subset which is bounded above has a supremum, and
every nonempty subset which is bounded below has an infimum.
Typical examples are real numbers or natural numbers.

To differentiate the statements from the corresponding statements in (unconditional)
complete linear orders, we prefix sInf and sSup by a c everywhere. The same statements should
hold in both worlds, sometimes with additional assumptions of nonemptiness or
boundedness. -/
class ConditionallyCompleteLinearOrder (α : Type*) extends ConditionallyCompleteLattice α where
  /-- A `ConditionallyCompleteLinearOrder` is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a `ConditionallyCompleteLinearOrder`, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a `ConditionallyCompleteLinearOrder`, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a `ConditionallyCompleteLinearOrder`, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  /-- If a set is not bounded above, its supremum is by convention `sSup ∅`. -/
  csSup_of_not_bddAbove : ∀ s, ¬BddAbove s → sSup s = sSup (∅ : Set α)
  /-- If a set is not bounded below, its infimum is by convention `sInf ∅`. -/
  csInf_of_not_bddBelow : ∀ s, ¬BddBelow s → sInf s = sInf (∅ : Set α)

[self : ConditionallyCompleteLinearOrder α]


/-- If `μ` is a regular measure, then any open set can be approximated by a compact subset. -/
theorem _root_.IsOpen.exists_lt_isCompact [Regular μ] ⦃U : Set α⦄ (hU : IsOpen U) {r : ℝ≥0∞}
    (hr : r < μ U) : ∃ K, K ⊆ U ∧ IsCompact K ∧ r < μ K

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[μ.Regular]
⦃U : Set α⦄
(hU : IsOpen U)
{r : ℝ≥0∞}
(hr : r < μ U)


/-- A multivatiate polynomial is weighted homogeneous of weighted degree zero if and only if
  its weighted total degree is equal to zero. -/
theorem isWeightedHomogeneous_zero_iff_weightedTotalDegree_eq_zero {p : MvPolynomial σ R} :
    IsWeightedHomogeneous w p 0 ↔ p.weightedTotalDegree w = 0

MvPolynomial.IsWeightedHomogeneous w p 0 ↔ MvPolynomial.weightedTotalDegree w p = 0


lemma bot_ringCon : (⊥ : TwoSidedIdeal R).ringCon = ⊥

(R : Type u_1)
[NonUnitalNonAssocRing R]


theorem ne_bmex {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) {i} (hi) :
    f i hi ≠ bmex.{_, v} o f

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


theorem grade_strictMono : StrictMono (grade 𝕆 : α → 𝕆)

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


theorem lipschitzWith_sup_right (z : α) : LipschitzWith 1 fun x => x ⊔ z

{α : Type u_1}
[NormedLatticeAddCommGroup α]
(z : α)


@[simp]
theorem leftAssocTensor_obj (X) : (leftAssocTensor C).obj X = (X.1 ⊗ X.2.1) ⊗ X.2.2

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

(CategoryTheory.MonoidalCategory.leftAssocTensor C).obj X =
  CategoryTheory.MonoidalCategory.tensorObj (CategoryTheory.MonoidalCategory.tensorObj X.1 X.2.1) X.2.2


/-- If a real function `f` has a derivative `g` everywhere but at a point, and `f` and `g` are
continuous at this point, then `g` is also the derivative of `f` at this point. -/
theorem hasDerivAt_of_hasDerivAt_of_ne {f g : ℝ → E} {x : ℝ}
    (f_diff : ∀ y ≠ x, HasDerivAt f (g y) y) (hf : ContinuousAt f x)
    (hg : ContinuousAt g x) : HasDerivAt f (g x) x

(f_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y)


protected theorem add_right_cancel (h₁ : c ≡ d [MOD n]) (h₂ : a + c ≡ b + d [MOD n]) :
    a ≡ b [MOD n]

{n a b c d : ℕ}
(h₁ : c ≡ d [MOD n])
(h₂ : a + c ≡ b + d [MOD n])


theorem le_def (α β : Type u) : #α ≤ #β ↔ Nonempty (α ↪ β)

Cardinal.mk α ≤ Cardinal.mk β ↔ Nonempty (α ↪ β)


theorem Fix.rec_unique {β : Type u} (g : F (append1 α β) → β) (h : Fix F α → β)
    (hyp : ∀ x, h (Fix.mk x) = g (appendFun id h <$$> x)) : Fix.rec g = h

(hyp : ∀ (x : F (α ::: MvQPF.Fix F α)), h (MvQPF.Fix.mk x) = g (MvFunctor.map (TypeVec.id ::: h) x))


/-- Tensor product of two bimodule objects as a bimodule object. -/
@[simps]
noncomputable def tensorBimod {X Y Z : Mon_ C} (M : Bimod X Y) (N : Bimod Y Z) : Bimod X Z

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

(M.tensorBimod N).actRight = Bimod.TensorBimod.actRight M N


theorem mapM'_eq_mapM [Monad m] [LawfulMonad m] (f : α → m β) (l : List α) :
    mapM' f l = mapM f l

{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
[Monad m]
[LawfulMonad m]
(f : α → m β)
(l : List α)


@[simp]
theorem iSup_principal {ι : Sort w} {s : ι → Set α} : ⨆ x, 𝓟 (s x) = 𝓟 (⋃ i, s i)

{α : Type u}
{ι : Sort w}
{s : ι → Set α}


@[nolint unusedArguments]
protected theorem comp_traverse (f : β → F γ) (g : α → G β) (x : Vector α n) :
    Vector.traverse (Comp.mk ∘ Functor.map f ∘ g) x =
      Comp.mk (Vector.traverse f <$> Vector.traverse g x)

{n : ℕ}
{F G : Type u → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative G]
{α β γ : Type u}
(f : β → F γ)
(g : α → G β)
(x : Mathlib.Vector α n)

Mathlib.Vector.traverse (Functor.Comp.mk ∘ Functor.map f ∘ g) x =
  Functor.Comp.mk (Mathlib.Vector.traverse f <$> Mathlib.Vector.traverse g x)


theorem encard_ne_top_iff : s.encard ≠ ⊤ ↔ s.Finite


theorem eq_of_src (hX : IsZero X) (f g : X ⟶ Y) : f = g

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


theorem support_mul_single [Mul G] [IsRightCancelMul G] (f : MonoidAlgebra k G) (r : k)
    (hr : ∀ y, y * r = 0 ↔ y = 0) (x : G) :
    (f * single x r).support = f.support.map (mulRightEmbedding x)

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

(f * MonoidAlgebra.single x r).support = Finset.map (mulRightEmbedding x) f.support


@[to_additive]
theorem IsCompact.div_closedBall (hs : IsCompact s) (hδ : 0 ≤ δ) (x : E) :
    s / closedBall x δ = x⁻¹ • cthickening δ s

{E : Type u_1}
[SeminormedAddCommGroup E]
{δ : ℝ}
{s : Set E}
(hs : IsCompact s)
(hδ : 0 ≤ δ)
(x : E)

s - Metric.closedBall x δ = -x +ᵥ Metric.cthickening δ s


/-- The canonical isomorphism
`Triangle.shiftFunctor C n ≅ Triangle.shiftFunctor C a ⋙ Triangle.shiftFunctor C b`
when `a + b = n`. -/
@[simps!]
noncomputable def Triangle.shiftFunctorAdd' (a b n : ℤ) (h : a + b = n) :
    Triangle.shiftFunctor C n ≅ Triangle.shiftFunctor C a ⋙ Triangle.shiftFunctor C b

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

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Pretriangulated.Triangle.shiftFunctorAdd' C a b n h).inv.app X).hom₂ =
  (CategoryTheory.shiftFunctorAdd' C a b n h).inv.app X.obj₂


theorem vec3_eq {a₀ a₁ a₂ b₀ b₁ b₂ : α} (h₀ : a₀ = b₀) (h₁ : a₁ = b₁) (h₂ : a₂ = b₂) :
    ![a₀, a₁, a₂] = ![b₀, b₁, b₂]

{α : Type u}
{a₀ a₁ a₂ b₀ b₁ b₂ : α}
(h₀ : a₀ = b₀)
(h₁ : a₁ = b₁)
(h₂ : a₂ = b₂)


@[simp]
lemma zero_cochain_comp_v (z₁ : Cochain F G 0) (z₂ : Cochain G K n) (p q : ℤ) (hpq : p + n = q) :
    (z₁.comp z₂ (zero_add n)).v p q hpq = z₁.v p p (add_zero p) ≫ z₂.v p q hpq

(z₁ : CochainComplex.HomComplex.Cochain F G 0)

(z₂ : CochainComplex.HomComplex.Cochain G K n)

(z₁.comp z₂ ⋯).v p q hpq = z₁.v p p ⋯ ≫ z₂.v p q hpq


theorem u_continuous : Continuous (u : E → ℝ)

(E : Type u_1)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]


@[simp]
theorem holderOnWith_empty (C r : ℝ≥0) (f : X → Y) : HolderOnWith C r f ∅

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
(C r : ℝ≥0)
(f : X → Y)


lemma integral_condKernel (a : α) (hf : Integrable f (κ a)) :
    ∫ b, ∫ ω, f (b, ω) ∂(Kernel.condKernel κ (a, b)) ∂(Kernel.fst κ a) = ∫ x, f x ∂(κ a)

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

∫ (b : β), ∫ (ω : Ω), f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a = ∫ (x : β × Ω), f x ∂κ a


theorem differentiableOn_dslope_of_nmem (h : a ∉ s) :
    DifferentiableOn 𝕜 (dslope f a) s ↔ DifferentiableOn 𝕜 f s

{𝕜 : Type u_1}
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → E}
{a : 𝕜}
{s : Set 𝕜}
(h : a ∉ s)


theorem liftPropWithinAt_congr_iff_of_eventuallyEq (h₁ : g' =ᶠ[𝓝[s] x] g) (hx : g' x = g x) :
    LiftPropWithinAt P g' s x ↔ LiftPropWithinAt P g s x

{H : Type u_1}
{M : Type u_2}
{H' : Type u_3}
{M' : Type u_4}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
[TopologicalSpace H']
[TopologicalSpace M']
[ChartedSpace H' M']
{G : StructureGroupoid H}
{G' : StructureGroupoid H'}
{P : (H → H') → Set H → H → Prop}
{g g' : M → M'}
{s : Set M}
{x : M}
(hG : G.LocalInvariantProp G' P)
(h₁ : g' =ᶠ[𝓝[s] x] g)
(hx : g' x = g x)

ChartedSpace.LiftPropWithinAt P g' s x ↔ ChartedSpace.LiftPropWithinAt P g s x


theorem eq_zero_of_sameRay_neg_smul_right [NoZeroSMulDivisors R M] {r : R} (hr : r < 0)
    (h : SameRay R x (r • x)) : x = 0

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x : M}
[NoZeroSMulDivisors R M]
{r : R}
(hr : r < 0)
(h : SameRay R x (r • x))


theorem IdentDistrib.truncation {β : Type*} [MeasurableSpace β] {ν : Measure β} {f : α → ℝ}
    {g : β → ℝ} (h : IdentDistrib f g μ ν) {A : ℝ} :
    IdentDistrib (truncation f A) (truncation g A) μ ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

ProbabilityTheory.IdentDistrib (ProbabilityTheory.truncation f A) (ProbabilityTheory.truncation g A) μ ν


@[ext]
theorem gradedMonoid_eq_of_cast {Γ : Subgroup SL(2, ℤ)} {a b : GradedMonoid (ModularForm Γ)}
    (h : a.fst = b.fst) (h2 : mcast h a.snd = b.snd) : a = b

(h2 : ModularForm.mcast h a.snd = b.snd)


@[simp]
theorem Orthonormal.equiv_trans {v : Basis ι 𝕜 E} (hv : Orthonormal 𝕜 v) {v' : Basis ι' 𝕜 E'}
    (hv' : Orthonormal 𝕜 v') (e : ι ≃ ι') {v'' : Basis ι'' 𝕜 E''} (hv'' : Orthonormal 𝕜 v'')
    (e' : ι' ≃ ι'') : (hv.equiv hv' e).trans (hv'.equiv hv'' e') = hv.equiv hv'' (e.trans e')

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{ι' : Type u_5}
{ι'' : Type u_6}
{E' : Type u_7}
[NormedAddCommGroup E']
[InnerProductSpace 𝕜 E']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[InnerProductSpace 𝕜 E'']
{v : Basis ι 𝕜 E}
(hv : Orthonormal 𝕜 ⇑v)
{v' : Basis ι' 𝕜 E'}
(hv' : Orthonormal 𝕜 ⇑v')
(e : ι ≃ ι')
{v'' : Basis ι'' 𝕜 E''}
(hv'' : Orthonormal 𝕜 ⇑v'')
(e' : ι' ≃ ι'')


theorem mul_lt_of_lt {a b c : Cardinal} (hc : ℵ₀ ≤ c) (h1 : a < c) (h2 : b < c) : a * b < c

{a b c : Cardinal.{u_1}}
(hc : ℵ₀ ≤ c)
(h1 : a < c)
(h2 : b < c)


private lemma hurwitzZeta_one_sub_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :
    hurwitzZeta x (1 - 2 * k) =
      -1 / (2 * k) * ((Polynomial.bernoulli (2 * k)).map (algebraMap ℚ ℂ)).eval (x : ℂ)

{k : ℕ}
{x : ℝ}
(hk : k ≠ 0)
(hx : x ∈ Set.Icc 0 1)

HurwitzZeta.hurwitzZeta (↑x) (1 - 2 * ↑k) =
  -1 / (2 * ↑k) * Polynomial.eval (↑x) (Polynomial.map (algebraMap ℚ ℂ) (Polynomial.bernoulli (2 * k)))


@[fun_prop]
protected theorem continuousAt_aeval {a : A} : ContinuousAt (fun x : A => aeval x p) a

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[TopologicalSpace A]
[TopologicalSemiring A]
(p : Polynomial R)
{a : A}

ContinuousAt (fun x => (Polynomial.aeval x) p) a


@[elab_as_elim]
protected theorem induction_on' [Finite m] [Finite n] {P : Matrix m n α → Prop} (M : Matrix m n α)
    (h_zero : P 0) (h_add : ∀ p q, P p → P q → P (p + q))
    (h_std_basis : ∀ (i : m) (j : n) (x : α), P (stdBasisMatrix i j x)) : P M

(h_add : ∀ (p q : Matrix m n α), P p → P q → P (p + q))

(h_std_basis : ∀ (i : m) (j : n) (x : α), P (Matrix.stdBasisMatrix i j x))


@[to_additive (attr := simp)]
theorem mulEquiv_apply (e : α ≃ β) [Mul β] (a : α) : (mulEquiv e) a = e a

{α : Type u}
{β : Type v}
(e : α ≃ β)
[Mul β]
(a : α)


lemma gc_exterior_interior : GaloisConnection (exterior : Set α → Set α) interior

{α : Type u_3}
[TopologicalSpace α]
[AlexandrovDiscrete α]


theorem IsIntegral.multiset_prod {s : Multiset A} (h : ∀ x ∈ s, IsIntegral R x) :
    IsIntegral R s.prod

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
{s : Multiset A}
(h : ∀ x ∈ s, IsIntegral R x)


@[to_additive (attr := simp, norm_cast)]
theorem coe_mul (x y : S) : (↑(x * y) : M) = ↑x * ↑y

{M : Type u_1}
[MulOneClass M]
(S : Submonoid M)
(x y : ↥S)


@[simp]
theorem mk_cardinal : #Cardinal = univ.{u, u + 1}

#Cardinal.{u} = Cardinal.univ.{u, u + 1}


theorem variance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ ν) :
    variance f μ = variance g ν

ProbabilityTheory.variance f μ = ProbabilityTheory.variance g ν


@[simp]
protected theorem map_neg (f : M ≃ₗ[R] N) (v : Module.Ray R M) : map f (-v) = -map f v

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
{N : Type u_3}
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(f : M ≃ₗ[R] N)
(v : Module.Ray R M)

(Module.Ray.map f) (-v) = -(Module.Ray.map f) v


theorem symm_map_nhdsWithin_image {x : H} {s : Set H} : map I.symm (𝓝[I '' s] I x) = 𝓝[s] x

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

Filter.map (↑I.symm) (𝓝[↑I '' s] ↑I x) = 𝓝[s] x


/-- If the `σ`-algebra of the codomain of a null measurable function is countably generated,
then the function is a.e.-measurable. -/
lemma MeasureTheory.NullMeasurable.aemeasurable {f : α → β}
    [hc : MeasurableSpace.CountablyGenerated β] (h : NullMeasurable f μ) : AEMeasurable f μ


theorem ext_iff : B = D ↔ ∀ x y, B x y = D x y

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B D : LinearMap.BilinForm R M}


theorem suffixLevenshtein_cons₂ (xs : List α) (y ys) :
    suffixLevenshtein C xs (y :: ys) = (impl C xs) y (suffixLevenshtein C xs ys)

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

suffixLevenshtein C xs (y :: ys) = Levenshtein.impl C xs y (suffixLevenshtein C xs ys)


theorem conjugate_apply (g : G) (v : W) :
    π.conjugate g v = MonoidAlgebra.single g⁻¹ (1 : k) • π (MonoidAlgebra.single g (1 : k) • v)

{k : Type u}
[CommRing k]
{G : Type u}
[Group G]
{V : Type v}
[AddCommGroup V]
[Module k V]
[Module (MonoidAlgebra k G) V]
[IsScalarTower k (MonoidAlgebra k G) V]
{W : Type w}
[AddCommGroup W]
[Module k W]
[Module (MonoidAlgebra k G) W]
[IsScalarTower k (MonoidAlgebra k G) W]
(π : W →ₗ[k] V)
(g : G)
(v : W)

(π.conjugate g) v = MonoidAlgebra.single g⁻¹ 1 • π (MonoidAlgebra.single g 1 • v)


theorem conjTranspose_multiset_sum [AddCommMonoid α] [StarAddMonoid α]
    (s : Multiset (Matrix m n α)) : s.sumᴴ = (s.map conjTranspose).sum

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[AddCommMonoid α]
[StarAddMonoid α]
(s : Multiset (Matrix m n α))

s.sumᴴ = (Multiset.map Matrix.conjTranspose s).sum


@[simp, nolint simpNF] -- Porting note (#10959): simp cannot prove this
theorem familyOfBFamily_enum (o : Ordinal) (f : ∀ a < o, α) (i hi) :
    familyOfBFamily o f
        (enum (· < ·) i
          (by
            convert hi
            exact type_lt _)) =
      f i hi

{α : Type u_1}
(o : Ordinal.{u_4})
(f : (a : Ordinal.{u_4}) → a < o → α)
(i : Ordinal.{u_4})
(hi : i < o)

o.familyOfBFamily f (Ordinal.enum (fun x x_1 => x < x_1) i ⋯) = f i hi


theorem exists_of_length_succ {n} : ∀ l : List α, l.length = n + 1 → ∃ h t, l = h :: t


/-- **Cantor's theorem** -/
theorem cantor (a : Cardinal.{u}) : a < 2 ^ a


theorem SemilatticeSup.ext_sup {α} {A B : SemilatticeSup α}
    (H : ∀ x y : α, (haveI := A; x ≤ y) ↔ x ≤ y)
    (x y : α) :
    (haveI := A; x ⊔ y) = x ⊔ y

{α : Type u_1}
{A B : SemilatticeSup α}
(H : ∀ (x y : α), x ≤ y ↔ x ≤ y)
(x y : α)


theorem meas_ge_le_mul_pow_norm (f : Lp E p μ) (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞) {ε : ℝ≥0∞}
    (hε : ε ≠ 0) : μ { x | ε ≤ ‖f x‖₊ } ≤ ε⁻¹ ^ p.toReal * ENNReal.ofReal ‖f‖ ^ p.toReal

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
(f : ↥(MeasureTheory.Lp E p μ))
(hp_ne_zero : p ≠ 0)
(hp_ne_top : p ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

μ {x | ε ≤ ↑‖↑↑f x‖₊} ≤ ε⁻¹ ^ p.toReal * ENNReal.ofReal ‖f‖ ^ p.toReal


/-- The iterated derivative within a set of the composition with a linear equiv on the left is
obtained by applying the linear equiv to the iterated derivative. This is true without
differentiability assumptions. -/
theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_left (g : F ≃L[𝕜] G) (f : E → F)
    (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) (i : ℕ) :
    iteratedFDerivWithin 𝕜 i (g ∘ f) s x =
      (g : F →L[𝕜] G).compContinuousMultilinearMap (iteratedFDerivWithin 𝕜 i f s x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{x : E}
(g : F ≃L[𝕜] G)
(f : E → F)
(hs : UniqueDiffOn 𝕜 s)
(hx : x ∈ s)
(i : ℕ)

iteratedFDerivWithin 𝕜 i (⇑g ∘ f) s x = (↑g).compContinuousMultilinearMap (iteratedFDerivWithin 𝕜 i f s x)


@[simp]
theorem coe_mul (f g : P1 →ᵃ[k] P1) : ⇑(f * g) = f ∘ g

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


@[simp]
theorem id_comp (f : CocompactMap α β) : (CocompactMap.id _).comp f = f

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


@[simp]
theorem rTensor_smul (r : R) (f : N →ₗ[R] P) : (r • f).rTensor M = r • f.rTensor M

{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]
(r : R)
(f : N →ₗ[R] P)

LinearMap.rTensor M (r • f) = r • LinearMap.rTensor M f


@[to_additive]
theorem Filter.Tendsto.const_mul (b : M) {c : M} {f : α → M} {l : Filter α}
    (h : Tendsto (fun k : α => f k) l (𝓝 c)) : Tendsto (fun k : α => b * f k) l (𝓝 (b * c))

(h : Filter.Tendsto (fun k => f k) l (𝓝 c))

Filter.Tendsto (fun k => b + f k) l (𝓝 (b + c))


@[simp, elementwise, reassoc]
theorem stalkMap_germ' {X Y : PresheafedSpace.{_, _, v} C}
    (α : X ⟶ Y) (U : Opens Y) (x : X) (hx : α.base x ∈ U) :
    Y.presheaf.germ ⟨α.base x, hx⟩ ≫ α.stalkMap x = α.c.app (op U) ≫
      X.presheaf.germ (U := (Opens.map α.base).obj U) ⟨x, hx⟩

{X Y : AlgebraicGeometry.PresheafedSpace C}

Y.presheaf.germ ⟨α.base x, hx⟩ ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x =
  α.c.app (Opposite.op U) ≫ X.presheaf.germ ⟨x, hx⟩


@[simp]
theorem powersetCard_mono {n} {s t : Finset α} (h : s ⊆ t) : powersetCard n s ⊆ powersetCard n t

{α : Type u_1}
{n : ℕ}
{s t : Finset α}
(h : s ⊆ t)

Finset.powersetCard n s ⊆ Finset.powersetCard n t


theorem adjoin_simple_comm (β : E) : F⟮α⟯⟮β⟯.restrictScalars F = F⟮β⟯⟮α⟯.restrictScalars F

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(α β : E)

IntermediateField.restrictScalars F (↥F⟮α⟯)⟮β⟯ = IntermediateField.restrictScalars F (↥F⟮β⟯)⟮α⟯


lemma bot_eq_zero (n : ℕ) : ⊥ = (0 : Fin (n + 1))


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

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

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

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


theorem le_op_iff {S₁ : Subring Rᵐᵒᵖ} {S₂ : Subring R} : S₁ ≤ S₂.op ↔ S₁.unop ≤ S₂

{R : Type u_2}
[Ring R]
{S₁ : Subring Rᵐᵒᵖ}
{S₂ : Subring R}


@[to_additive]
lemma prod_range_diag_flip (n : ℕ) (f : ℕ → ℕ → M) :
    (∏ m ∈ range n, ∏ k ∈ range (m + 1), f k (m - k)) =
      ∏ m ∈ range n, ∏ k ∈ range (n - m), f m k

{M : Type u_2}
[CommMonoid M]
(n : ℕ)
(f : ℕ → ℕ → M)

∏ m ∈ Finset.range n, ∏ k ∈ Finset.range (m + 1), f k (m - k) = ∏ m ∈ Finset.range n, ∏ k ∈ Finset.range (n - m), f m k


theorem IsLittleO.isEquivalent (huv : (u - v) =o[l] v) : u ~[l] v

{α : Type u_1}
{β : Type u_2}
[NormedAddCommGroup β]
{u v : α → β}
{l : Filter α}
(huv : (u - v) =o[l] v)


/-- The currying functor, taking a functor `(C × D) ⥤ E` and producing a functor `C ⥤ (D ⥤ E)`.
-/
@[simps! obj_obj_obj obj_obj_map obj_map_app map_app_app]
def curry : (C × D ⥤ E) ⥤ C ⥤ D ⥤ E

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

∀ {X Y : C} (f : X ⟶ Y) (Y_1 : D),
  ((CategoryTheory.curry.obj F).map f).app Y_1 = F.map (f, CategoryTheory.CategoryStruct.id Y_1)


/-- Given any distinguished triangle
```
      f       g       h
  X  ───> Y  ───> Z  ───> X⟦1⟧
```
the composition `h ≫ f⟦1⟧ = 0`.
See <https://stacks.math.columbia.edu/tag/0146>
-/
@[reassoc]
theorem comp_distTriang_mor_zero₃₁ (T : Triangle C) (H : T ∈ distTriang C) :
    T.mor₃ ≫ T.mor₁⟦1⟧' = 0

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(H : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

T.mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map T.mor₁ = 0


/-- The `MonoidHom` from the preimage of a submonoid to itself. -/
@[to_additive (attr := simps)
      "the `AddMonoidHom` from the preimage of an additive submonoid to itself."]
def submonoidComap (f : M →* N) (N' : Submonoid N) :
    N'.comap f →* N'

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(f : M →* N)
(N' : Submonoid N)
(x : ↥(Submonoid.comap f N'))


/-- The canonical isomorphism between `presheafToSheaf J A ⋙ Sheaf.composeAndSheafify J F`
and `(whiskeringRight Cᵒᵖ A B).obj F ⋙ presheafToSheaf J B` when `F : A ⥤ B`
preserves sheafification. -/
@[simps! inv_app]
noncomputable def presheafToSheafCompComposeAndSheafifyIso :
    presheafToSheaf J A ⋙ Sheaf.composeAndSheafify J F ≅
      (whiskeringRight Cᵒᵖ A B).obj F ⋙ presheafToSheaf J B

(J : CategoryTheory.GrothendieckTopology C)

(CategoryTheory.presheafToSheafCompComposeAndSheafifyIso J F).inv.app X =
  (CategoryTheory.presheafToSheaf J B).map (CategoryTheory.whiskerRight (CategoryTheory.toSheafify J X) F)


lemma biInter_mem {ι : Type*} (hC : IsSetRing C) {s : ι → Set α}
    (S : Finset ι) (hS : S.Nonempty) (hs : ∀ n ∈ S, s n ∈ C) :
    ⋂ i ∈ S, s i ∈ C

{α : Type u_1}
{C : Set (Set α)}
{ι : Type u_2}
(hC : MeasureTheory.IsSetRing C)
{s : ι → Set α}
(S : Finset ι)
(hS : S.Nonempty)
(hs : ∀ n ∈ S, s n ∈ C)


@[simp]
theorem ContinuousMap.C_apply (r : R) (a : α) : ContinuousMap.C r a = algebraMap R A r

{α : Type u_1}
[TopologicalSpace α]
{R : Type u_2}
[CommSemiring R]
{A : Type u_3}
[TopologicalSpace A]
[Semiring A]
[Algebra R A]
[TopologicalSemiring A]
(r : R)
(a : α)

(ContinuousMap.C r) a = (algebraMap R A) r


/-- A linear combination of some subset of an orthonormal set is orthogonal to other members of the
set. -/
theorem Orthonormal.inner_finsupp_eq_zero {v : ι → E} (hv : Orthonormal 𝕜 v) {s : Set ι} {i : ι}
    (hi : i ∉ s) {l : ι →₀ 𝕜} (hl : l ∈ Finsupp.supported 𝕜 𝕜 s) :
    ⟪Finsupp.total ι E 𝕜 v l, v i⟫ = 0

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{v : ι → E}
(hv : Orthonormal 𝕜 v)
{s : Set ι}
{i : ι}
(hi : i ∉ s)
{l : ι →₀ 𝕜}
(hl : l ∈ Finsupp.supported 𝕜 𝕜 s)


theorem three_lt_four_mul_im_sq_of_mem_fdo (h : z ∈ 𝒟ᵒ) : 3 < 4 * z.im ^ 2


theorem span_eq_top_iff {s : Set P₁} (e : P₁ ≃ᵃ[k] P₂) :
    affineSpan k s = ⊤ ↔ affineSpan k (e '' s) = ⊤

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
{s : Set P₁}
(e : P₁ ≃ᵃ[k] P₂)

affineSpan k s = ⊤ ↔ affineSpan k (⇑e '' s) = ⊤


@[simp]
theorem lineMap_same (p : P1) : lineMap p p = const k k p

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
(p : P1)

AffineMap.lineMap p p = AffineMap.const k k p


theorem essInf_antitone_measure {f : α → β} (hμν : μ ≪ ν) : essInf f ν ≤ essInf f μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[CompleteLattice β]
{f : α → β}
(hμν : μ ≪ ν)


theorem all_iff_forall (p : α → Bool) (as : Array α) (start stop) :
    all as p start stop ↔ ∀ i : Fin as.size, start ≤ i.1 ∧ i.1 < stop → p as[i]

{α : Type u_1}
(p : α → Bool)
(as : Array α)
(start stop : Nat)

as.all p start stop = true ↔ ∀ (i : Fin as.size), start ≤ ↑i ∧ ↑i < stop → p as[i] = true


theorem twoBlockTriangular_det' (M : Matrix m m R) (p : m → Prop) [DecidablePred p]
    (h : ∀ i, p i → ∀ j, ¬p j → M i j = 0) :
    M.det = (toSquareBlockProp M p).det * (toSquareBlockProp M fun i => ¬p i).det

(h : ∀ (i : m), p i → ∀ (j : m), ¬p j → M i j = 0)

M.det = (M.toSquareBlockProp p).det * (M.toSquareBlockProp fun i => ¬p i).det


theorem map_injective (adj : F ⊣ G) [F.PreservesMonomorphisms] (I : D) (hI : Injective I) :
    Injective (G.obj I)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u_1}
[CategoryTheory.Category.{u_2, u_1} D]
{F : C ⥤ D}
{G : D ⥤ C}
(adj : F ⊣ G)
[F.PreservesMonomorphisms]
(I : D)
(hI : CategoryTheory.Injective I)


theorem rdropWhile_idempotent : rdropWhile p (rdropWhile p l) = rdropWhile p l

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

List.rdropWhile p (List.rdropWhile p l) = List.rdropWhile p l


theorem HasCompactSupport.comp_smul {β : Type*} [Zero β] {f : α → β} (h : HasCompactSupport f)
    {c : G₀} (hc : c ≠ 0) : HasCompactSupport fun x => f (c • x)

{α : Type u_2}
{G₀ : Type u_4}
[TopologicalSpace α]
[GroupWithZero G₀]
[MulAction G₀ α]
[ContinuousConstSMul G₀ α]
{β : Type u_5}
[Zero β]
{f : α → β}
(h : HasCompactSupport f)
{c : G₀}
(hc : c ≠ 0)


theorem card_le_m_add_one_of_mem_chunk_parts (hs : s ∈ (chunk hP G ε hU).parts) : s.card ≤ m + 1

(hs : s ∈ (SzemerediRegularity.chunk hP G ε hU).parts)

s.card ≤ Fintype.card α / SzemerediRegularity.stepBound P.parts.card + 1


@[norm_cast]
theorem coe_pnat_nat (p : Nat.Primes) : ((p : ℕ+) : ℕ) = p


@[to_additive]
theorem index_dvd_of_le (h : H ≤ K) : K.index ∣ H.index

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


@[simp] lemma coe_toSupHom (f : SupBotHom α β) : ⇑f.toSupHom = f

{α : Type u_3}
{β : Type u_4}
[Sup α]
[Bot α]
[Sup β]
[Bot β]
(f : SupBotHom α β)


theorem mem_span_C_X_sub_C_X_sub_C_iff_eval_eval_eq_zero {b : R[X]} {P : R[X][X]} :
    P ∈ Ideal.span {C (X - C a), X - C b} ↔ (P.eval b).eval a = 0

{R : Type u}
{a : R}
[CommRing R]
{b : R[X]}
{P : R[X][X]}

P ∈ Ideal.span {Polynomial.C (Polynomial.X - Polynomial.C a), Polynomial.X - Polynomial.C b} ↔
  Polynomial.eval a (Polynomial.eval b P) = 0


@[simp 1100] theorem singleton_disjoint : Disjoint [a] l ↔ a ∉ l

∀ {α : Type u_1} {a : α} {l : List α}, [a].Disjoint l ↔ ¬a ∈ l


theorem hasBasis_nhds_infty :
    (𝓝 (∞ : OnePoint X)).HasBasis (fun s : Set X => IsClosed s ∧ IsCompact s) fun s =>
      (↑) '' sᶜ ∪ {∞}

(𝓝 OnePoint.infty).HasBasis (fun s => IsClosed s ∧ IsCompact s) fun s => OnePoint.some '' sᶜ ∪ {OnePoint.infty}


@[to_additive]
theorem noncommProd_commute (s : Multiset α) (comm) (y : α) (h : ∀ x ∈ s, Commute y x) :
    Commute y (s.noncommProd comm)

{α : Type u_3}
[Monoid α]
(s : Multiset α)
(comm : {x | x ∈ s}.Pairwise Commute)
(y : α)
(h : ∀ x ∈ s, Commute y x)


lemma find_comp_succ (h₁ : ∃ n, p n) (h₂ : ∃ n, p (n + 1)) (h0 : ¬ p 0) :
    Nat.find h₁ = Nat.find h₂ + 1

{p : ℕ → Prop}
[DecidablePred p]
(h₁ : ∃ n, p n)
(h₂ : ∃ n, p (n + 1))
(h0 : ¬p 0)


theorem smul_tprod_one_asModule (r : MonoidAlgebra k G) (x : V) (y : W) :
    -- Porting note: required to since Lean 4 doesn't unfold asModule
    let x' : ρV.asModule := x
    let z : (ρV.tprod 1).asModule := x ⊗ₜ y
    r • z = (r • x') ⊗ₜ y

{k : Type u_1}
{G : Type u_2}
{V : Type u_3}
{W : Type u_4}
[CommSemiring k]
[Monoid G]
[AddCommMonoid V]
[Module k V]
[AddCommMonoid W]
[Module k W]
(ρV : Representation k G V)
(r : MonoidAlgebra k G)
(x : V)
(y : W)

let x' := x;
let z := x ⊗ₜ[k] y;
r • z = (r • x') ⊗ₜ[k] y


@[to_additive zero_leftAddCoset]
theorem one_leftCoset : (1 : α) • s = s

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


protected theorem _root_.MonotoneOn.monotone (h : MonotoneOn f s) :
    Monotone (f ∘ Subtype.val : s → β)

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
[Preorder α]
[Preorder β]
(h : MonotoneOn f s)


theorem isBounded_top : IsBounded r ⊤ ↔ ∃ t, ∀ x, r x t

Filter.IsBounded r ⊤ ↔ ∃ t, ∀ (x : α), r x t


/-- `affineSpan` is monotone. -/
@[mono]
theorem affineSpan_mono {s₁ s₂ : Set P} (h : s₁ ⊆ s₂) : affineSpan k s₁ ≤ affineSpan k s₂

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s₁ s₂ : Set P}
(h : s₁ ⊆ s₂)


@[simp]
theorem support_eq_empty {f : α →₀ M} : f.support = ∅ ↔ f = 0

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α →₀ M}


/-- Used in the proof of `psp_from_prime_psp`
-/
private theorem bp_helper {b p : ℕ} (hb : 0 < b) (hp : 1 ≤ p) :
    b ^ (2 * p) - 1 - (b ^ 2 - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)


theorem UniformCauchySeqOn.uniformCauchySeqOnFilter (hF : UniformCauchySeqOn F p s) :
    UniformCauchySeqOnFilter F p (𝓟 s)

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{s : Set α}
{p : Filter ι}
(hF : UniformCauchySeqOn F p s)


lemma ringCon_le_iff {I J : TwoSidedIdeal R} : I ≤ J ↔ I.ringCon ≤ J.ringCon

{R : Type u_1}
[NonUnitalNonAssocRing R]
{I J : TwoSidedIdeal R}


/-- Change a cone on `F.rightOp : J ⥤ Cᵒᵖ` to a cocone on `F : Jᵒᵖ ⥤ C`. -/
@[simps]
def coconeOfConeRightOp (c : Cone F.rightOp) : Cocone F

(c : CategoryTheory.Limits.Cone F.rightOp)

(CategoryTheory.Limits.coconeOfConeRightOp c).ι = CategoryTheory.NatTrans.removeRightOp c.π


/-- A filter `l` with the countable intersection property is disjoint with the neighborhood
filter of a Lindelöf set if and only if it is disjoint with the neighborhood filter of each point
of this set. -/
theorem IsLindelof.disjoint_nhdsSet_right {l : Filter X} [CountableInterFilter l]
    (hs : IsLindelof s) : Disjoint l (𝓝ˢ s) ↔ ∀ x ∈ s, Disjoint l (𝓝 x)

{X : Type u}
[TopologicalSpace X]
{s : Set X}
{l : Filter X}
[CountableInterFilter l]
(hs : IsLindelof s)


theorem _root_.MeasureTheory.Integrable.norm_integral_condexpKernel [NormedSpace ℝ F]
    (hf_int : Integrable f μ) :
    Integrable (fun ω => ‖∫ y, f y ∂condexpKernel μ m ω‖) μ

{Ω : Type u_1}
{F : Type u_2}
{m : MeasurableSpace Ω}
[mΩ : MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]
[NormedAddCommGroup F]
{f : Ω → F}
[NormedSpace ℝ F]
(hf_int : MeasureTheory.Integrable f μ)

MeasureTheory.Integrable (fun ω => ‖∫ (y : Ω), f y ∂(ProbabilityTheory.condexpKernel μ m) ω‖) μ


@[simp]
lemma biUnion_singleton_eq_self [DecidableEq α] : s.biUnion (singleton : α → Finset α) = s

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


@[simp]
theorem mk_apply (f : C(I^N, X)) (H y) : (⟨f, H⟩ : Ω^ N X x) y = f y

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
(f : C(N → ↑I, X))
(H : f ∈ Ω^ N X x)
(y : N → ↑I)


@[simp, reassoc, elementwise] lemma smoothSheafCommRing.forgetStalk_inv_comp_eval
    (x : TopCat.of M) :
    (smoothSheafCommRing.forgetStalk IM I M R x).inv ≫
     (DFunLike.coe (smoothSheafCommRing.evalHom IM I M R x)) =
    smoothSheaf.evalHom _ _ _ _

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{EM : Type u_2}
[NormedAddCommGroup EM]
[NormedSpace 𝕜 EM]
{HM : Type u_3}
[TopologicalSpace HM]
(IM : ModelWithCorners 𝕜 EM HM)
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_5}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(M : Type u)
[TopologicalSpace M]
[ChartedSpace HM M]
(R : Type u)
[TopologicalSpace R]
[ChartedSpace H R]
[CommRing R]
[SmoothRing I R]
(x : ↑(TopCat.of M))

CategoryTheory.CategoryStruct.comp (smoothSheafCommRing.forgetStalk IM I M R x).inv
    ⇑(smoothSheafCommRing.evalHom IM I M R x) =
  smoothSheaf.evalHom IM I R x


@[simp]
theorem FreeAbelianGroup.toFinsupp_comp_toFreeAbelianGroup :
    toFinsupp.comp toFreeAbelianGroup = AddMonoidHom.id (X →₀ ℤ)

FreeAbelianGroup.toFinsupp.comp Finsupp.toFreeAbelianGroup = AddMonoidHom.id (X →₀ ℤ)


theorem torusIntegrable_zero_radius {f : ℂⁿ → E} {c : ℂⁿ} : TorusIntegrable f c 0

{n : ℕ}
{E : Type u_1}
[NormedAddCommGroup E]
{f : (Fin n → ℂ) → E}
{c : Fin n → ℂ}


@[congr]
theorem exists_prop_congr {p p' : Prop} {q q' : p → Prop} (hq : ∀ h, q h ↔ q' h) (hp : p ↔ p') :
    Exists q ↔ ∃ h : p', q' (hp.2 h)

{p p' : Prop}
{q q' : p → Prop}
(hq : ∀ (h : p), q h ↔ q' h)
(hp : p ↔ p')


theorem Matrix.coe_vecMulLinear [Fintype m] (M : Matrix m n R) :
    (M.vecMulLinear : _ → _) = M.vecMul

{R : Type u_1}
[Semiring R]
{m : Type u_3}
{n : Type u_4}
[Fintype m]
(M : Matrix m n R)


theorem UniqueMDiffWithinAt.smooth_bundle_preimage {p : TotalSpace F Z}
    (hs : UniqueMDiffWithinAt I s p.proj) :
    UniqueMDiffWithinAt (I.prod 𝓘(𝕜, F)) (π F Z ⁻¹' s) p

[TopologicalSpace (Bundle.TotalSpace F Z)]

UniqueMDiffWithinAt (I.prod 𝓘(𝕜, F)) (Bundle.TotalSpace.proj ⁻¹' s) p


@[reassoc (attr := simp)]
theorem hom_inv_whiskerRight {X Y : C} (f : X ≅ Y) (Z : C) :
    f.hom ▷ Z ≫ f.inv ▷ Z = 𝟙 (X ⊗ Z)

{C : Type u}
[𝒞 : CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{X Y : C}
(f : X ≅ Y)
(Z : C)

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight f.hom Z)
    (CategoryTheory.MonoidalCategory.whiskerRight f.inv Z) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategory.tensorObj X Z)


@[to_additive]
theorem mem_comm (nH : H.Normal) {a b : G} (h : a * b ∈ H) : b * a ∈ H

{G : Type u_1}
[Group G]
{H : Subgroup G}
(nH : H.Normal)
{a b : G}
(h : a * b ∈ H)


theorem encard_le_coe_iff_finite_ncard_le {k : ℕ} : s.encard ≤ k ↔ s.Finite ∧ s.ncard ≤ k


@[simp]
theorem cycleRange_zero' {n : ℕ} (h : 0 < n) : cycleRange ⟨0, h⟩ = 1


@[simp] theorem exists_or_eq_left (y : α) (p : α → Prop) : ∃ x : α, x = y ∨ p x


lemma isIso_toCycles (hS : S.Exact) [Mono S.f] [S.HasLeftHomology]:
    IsIso S.toCycles

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
[CategoryTheory.Balanced C]
(hS : S.Exact)
[CategoryTheory.Mono S.f]
[S.HasLeftHomology]


@[simp] lemma powersMulHom_symm_apply (f : Multiplicative ℕ →* α) :
    (powersMulHom α).symm f = f (ofAdd 1)

(α : Type u_1)
[CommMonoid α]
(f : Multiplicative ℕ →* α)

(powersMulHom α).symm f = f (Multiplicative.ofAdd 1)


theorem shiftl_succ_eq_bit0_shiftl : ∀ (p : PosNum) (n : Nat), p <<< n.succ = bit0 (p <<< n)


theorem addHaar_ball_mul [Nontrivial E] (x : E) {r : ℝ} (hr : 0 ≤ r) (s : ℝ) :
    μ (ball x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * μ (ball 0 s)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
[Nontrivial E]
(x : E)
{r : ℝ}
(hr : 0 ≤ r)
(s : ℝ)

μ (Metric.ball x (r * s)) = ENNReal.ofReal (r ^ FiniteDimensional.finrank ℝ E) * μ (Metric.ball 0 s)


@[simp]
theorem filter_sub (p : α → Prop) [DecidablePred p] (f₁ f₂ : α →₀ G) :
    filter p (f₁ - f₂) = filter p f₁ - filter p f₂

{α : Type u_1}
{G : Type u_9}
[AddGroup G]
(p : α → Prop)
[DecidablePred p]
(f₁ f₂ : α →₀ G)

Finsupp.filter p (f₁ - f₂) = Finsupp.filter p f₁ - Finsupp.filter p f₂


/-- When `p = ∞`, this lemma does not hold without the additional assumption `Nonempty ι` because
the left-hand side simplifies to `0`, while the right-hand side simplifies to `‖b‖₊`. See
`PiLp.norm_equiv_symm_const'` for a version which exchanges the hypothesis `p ≠ ∞` for
`Nonempty ι`. -/
theorem norm_equiv_symm_const {β} [SeminormedAddCommGroup β] (hp : p ≠ ∞) (b : β) :
    ‖(WithLp.equiv p (ι → β)).symm (Function.const _ b)‖ =
      (Fintype.card ι : ℝ≥0) ^ (1 / p).toReal * ‖b‖

{p : ℝ≥0∞}
{ι : Type u_2}
[Fact (1 ≤ p)]
[Fintype ι]
{β : Type u_5}
[SeminormedAddCommGroup β]
(hp : p ≠ ⊤)
(b : β)

‖(WithLp.equiv p (ι → β)).symm (Function.const ι b)‖ = ↑↑(Fintype.card ι) ^ (1 / p).toReal * ‖b‖


@[simp]
theorem ceil_zero : ⌈(0 : α)⌉ = 0

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]


theorem tendsto_neg_atTop_atBot : Tendsto (Neg.neg : β → β) atTop atBot

Filter.Tendsto Neg.neg Filter.atTop Filter.atBot


lemma Absorbent.zero_mem [NeBot (cobounded G₀)] [AddMonoid E] [DistribMulAction G₀ E]
    {s : Set E} (hs : Absorbent G₀ s) : (0 : E) ∈ s

{G₀ : Type u_1}
{E : Type u_3}
[GroupWithZero G₀]
[Bornology G₀]
[(Bornology.cobounded G₀).NeBot]
[AddMonoid E]
[DistribMulAction G₀ E]
{s : Set E}
(hs : Absorbent G₀ s)


@[to_additive]
theorem subset_interior_div_right : s / interior t ⊆ interior (s / t)

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
{s t : Set G}


/-- A field extension `E / F` of exponential characteristic `q` is purely inseparable
if and only if for every element `x` of `E`, the minimal polynomial of `x` over `F` is of form
`(X - x) ^ (q ^ n)` for some natural number `n`. -/
theorem isPurelyInseparable_iff_minpoly_eq_X_sub_C_pow (q : ℕ) [hF : ExpChar F q] :
    IsPurelyInseparable F E ↔
    ∀ x : E, ∃ n : ℕ, (minpoly F x).map (algebraMap F E) = (X - C x) ^ q ^ n

(F : Type u)
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(q : ℕ)
[hF : ExpChar F q]

IsPurelyInseparable F E ↔
  ∀ (x : E), ∃ n, Polynomial.map (algebraMap F E) (minpoly F x) = (Polynomial.X - Polynomial.C x) ^ q ^ n


/-- This is not an instance because `i` becomes a metavariable. -/
@[to_additive "This is not an instance because `i` becomes a metavariable."]
protected theorem FaithfulSMul' [FaithfulSMul M (α i)] : FaithfulSMul M (Σi, α i)

{ι : Type u_1}
{M : Type u_2}
{α : ι → Type u_4}
[(i : ι) → VAdd M (α i)]
(i : ι)
[FaithfulVAdd M (α i)]


theorem mem_inv_pointwise_smul_iff₀ {a : α} (ha : a ≠ 0) (S : AddSubgroup A) (x : A) :
    x ∈ a⁻¹ • S ↔ a • x ∈ S

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[GroupWithZero α]
[DistribMulAction α A]
{a : α}
(ha : a ≠ 0)
(S : AddSubgroup A)
(x : A)

x ∈ a⁻¹ • S ↔ a • x ∈ S


theorem im_pos_of_dist_center_le {z : ℍ} {r : ℝ} {w : ℂ}
    (h : dist w (center z r) ≤ z.im * Real.sinh r) : 0 < w.im

(h : dist w ↑(z.center r) ≤ z.im * Real.sinh r)


@[to_additive (attr := simp)]
theorem fst_comp_inr : (fst M N).comp (inr M N) = 1

{M : Type u_5}
{N : Type u_6}
[MulOneClass M]
[MulOneClass N]

(MonoidHom.fst M N).comp (MonoidHom.inr M N) = 1


theorem cast_dvd_cast [CommRing α] (m n : ℤ) (h : m ∣ n) : (m : α) ∣ (n : α)

{α : Type u_3}
[CommRing α]
(m n : ℤ)
(h : m ∣ n)


/-- The digits in the base b+2 expansion of n are all less than b+2 -/
theorem digits_lt_base' {b m : ℕ} : ∀ {d}, d ∈ digits (b + 2) m → d < b + 2


@[simp] lemma cast_pos : (0 : R) < n ↔ 0 < n

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


lemma exp_add (x y : EReal) : exp (x + y) = exp x * exp y


theorem max_of_succ_le {a : α} : succ a ≤ a → IsMax a

{α : Type u_1}
[Preorder α]
[SuccOrder α]
{a : α}


lemma rangeLiftInclusion : (liftInclusion S).toHom.range = ⨆ i, S i

{L : FirstOrder.Language}
{ι : Type v}
[Preorder ι]
[Nonempty ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{M : Type u_1}
[L.Structure M]
(S : ι →o L.Substructure M)

(FirstOrder.Language.DirectLimit.liftInclusion S).toHom.range = ⨆ i, S i


lemma IsBounded.image_fst {s : Set (α × β)} (hs : IsBounded s) : IsBounded (Prod.fst '' s)

{α : Type u_1}
{β : Type u_2}
[Bornology α]
[Bornology β]
{s : Set (α × β)}
(hs : Bornology.IsBounded s)


@[to_additive]
theorem mulSupport_comp_eq_of_range_subset {g : M → N} {f : α → M}
    (hg : ∀ {x}, x ∈ range f → (g x = 1 ↔ x = 1)) :
    mulSupport (g ∘ f) = mulSupport f

(hg : ∀ {x : M}, x ∈ Set.range f → (g x = 1 ↔ x = 1))

Function.mulSupport (g ∘ f) = Function.mulSupport f


theorem lsub_pos {ι : Type u} [h : Nonempty ι] (f : ι → Ordinal.{max u v}) : 0 < lsub.{_, v} f


@[continuity]
theorem Continuous.matrix_vecMulVec [Mul R] [ContinuousMul R] {A : X → m → R} {B : X → n → R}
    (hA : Continuous A) (hB : Continuous B) : Continuous fun x => vecMulVec (A x) (B x)

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[Mul R]
[ContinuousMul R]
{A : X → m → R}
{B : X → n → R}
(hA : Continuous A)
(hB : Continuous B)

Continuous fun x => Matrix.vecMulVec (A x) (B x)


theorem lt_size_self (n : ℕ) : n < 2 ^ size n


theorem isBigOWith_const_mul_self (c : R) (f : α → R) (l : Filter α) :
    IsBigOWith ‖c‖ l (fun x => c * f x) f

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

Asymptotics.IsBigOWith ‖c‖ l (fun x => c * f x) f


theorem IsLocalMaxOn.comp_continuousOn [TopologicalSpace δ] {t : Set α} {s : Set δ} {g : δ → α}
    {b : δ} (hf : IsLocalMaxOn f t (g b)) (hst : s ⊆ g ⁻¹' t) (hg : ContinuousOn g s) (hb : b ∈ s) :
    IsLocalMaxOn (f ∘ g) s b

{α : Type u}
{β : Type v}
{δ : Type x}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
[TopologicalSpace δ]
{t : Set α}
{s : Set δ}
{g : δ → α}
{b : δ}
(hf : IsLocalMaxOn f t (g b))
(hst : s ⊆ g ⁻¹' t)
(hg : ContinuousOn g s)
(hb : b ∈ s)


theorem map_lowerCentralSeries_le (f : M →ₗ⁅R,L⁆ M₂) :
    (lowerCentralSeries R L M k).map f ≤ lowerCentralSeries R L M₂ k

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

LieSubmodule.map f (LieModule.lowerCentralSeries R L M k) ≤ LieModule.lowerCentralSeries R L M₂ k


theorem ppow_add (k n : ℕ+) (x : M) : x ^ (k + n) = x ^ k * x ^ n

{M : Type u_1}
[Mul M]
[Pow M ℕ+]
[PNatPowAssoc M]
(k n : ℕ+)
(x : M)


theorem toLinearMap_injective :
    Function.Injective (Isometry.toLinearMap : (Q₁ →qᵢ Q₂) → M₁ →ₗ[R] M₂)

{R : Type u_2}
{M₁ : Type u_4}
{M₂ : Type u_5}
{N : Type u_8}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid N]
[Module R M₁]
[Module R M₂]
[Module R N]
{Q₁ : QuadraticMap R M₁ N}
{Q₂ : QuadraticMap R M₂ N}


@[simp]
theorem equiv_comp : RingHom.comp (equiv i j p) i = j

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(j : K →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar L p]
[ExpChar M p]
[PerfectRing L p]
[IsPerfectClosure i p]
[PerfectRing M p]
[IsPerfectClosure j p]

(↑(IsPerfectClosure.equiv i j p)).comp i = j


/-- The polar coordinates partial homeomorphism in `ℝ^2`, mapping `(r cos θ, r sin θ)` to `(r, θ)`.
It is a homeomorphism between `ℝ^2 - (-∞, 0]` and `(0, +∞) × (-π, π)`. -/
@[simps]
def polarCoord : PartialHomeomorph (ℝ × ℝ) (ℝ × ℝ)

↑polarCoord.symm p = (p.1 * Real.cos p.2, p.1 * Real.sin p.2)


protected theorem sign_eq_div_abs (a : Int) : sign a = a.div (natAbs a)


@[simp]
theorem map_cons {w : V} (h : G.Adj w u) : (cons h p).map f = cons (f.map_adj h) (p.map f)

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

SimpleGraph.Walk.map f (SimpleGraph.Walk.cons h p) = SimpleGraph.Walk.cons ⋯ (SimpleGraph.Walk.map f p)


lemma smul_def (f : R[X]) (m : PolynomialModule R M) :
    f • m = aeval (Finsupp.lmapDomain M R Nat.succ) f m

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(f : R[X])
(m : PolynomialModule R M)

f • m = ((Polynomial.aeval (Finsupp.lmapDomain M R Nat.succ)) f) m


theorem tendsto_iterate_efixedPoint' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
    (hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
    Tendsto (fun n ↦ f^[n] x) atTop (𝓝 <| efixedPoint' f hsc hsf hf x hxs hx)

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

Filter.Tendsto (fun n => f^[n] x) Filter.atTop (𝓝 (ContractingWith.efixedPoint' f hsc hsf hf x hxs hx))


@[simp] theorem sub_ofNat' (x : Fin n) (y : Nat) (lt : 0 < n) :
    x - Fin.ofNat' y lt = Fin.ofNat' ((n - y % n) + x.val) lt

{n : Nat}
(x : Fin n)
(y : Nat)
(lt : 0 < n)

x - Fin.ofNat' y lt = Fin.ofNat' (n - y % n + ↑x) lt


/-- Auxiliary definition for `bifunctorComp₂₃`. -/
@[simps]
def bifunctorComp₂₃Obj (X₁ : C₁) : C₂ ⥤ C₃ ⥤ C₄

(F : CategoryTheory.Functor C₁ (CategoryTheory.Functor C₂₃ C₄))

(G₂₃ : CategoryTheory.Functor C₂ (CategoryTheory.Functor C₃ C₂₃))

((CategoryTheory.bifunctorComp₂₃Obj F G₂₃ X₁).map φ).app X₃ = (F.obj X₁).map ((G₂₃.map φ).app X₃)


@[to_additive]
lemma ofUnits_sSup (s : Set (Subgroup Mˣ)) : (sSup s).ofUnits = ⨆ S ∈ s, S.ofUnits

{M : Type u_1}
[AddMonoid M]
(s : Set (AddSubgroup (AddUnits M)))

(sSup s).ofAddUnits = ⨆ S ∈ s, S.ofAddUnits


@[simp]
theorem bot_eq_zero : (⊥ : FractionalIdeal S P) = 0

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]


/-- The canonical bijection between `α` and `αᵐᵒᵖ`. -/
@[to_additive (attr := simps (config := .asFn) apply symm_apply)
  "The canonical bijection between `α` and `αᵃᵒᵖ`."]
def opEquiv : α ≃ αᵐᵒᵖ


theorem aeval_X_pow {n : ℕ} : aeval x ((X : R[X]) ^ n) = x ^ n

{R : Type u}
{A : Type z}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : A)
{n : ℕ}

(Polynomial.aeval x) (Polynomial.X ^ n) = x ^ n


theorem multinomial_filter_ne [DecidableEq α] (a : α) (m : Multiset α) :
    m.multinomial = m.card.choose (m.count a) * (m.filter (a ≠ ·)).multinomial

{α : Type u_1}
[DecidableEq α]
(a : α)
(m : Multiset α)

m.multinomial = (Multiset.card m).choose (Multiset.count a m) * (Multiset.filter (fun x => a ≠ x) m).multinomial


theorem dite_ne_right_iff : (dite P A fun _ ↦ b) ≠ b ↔ ∃ h, A h ≠ b

{α : Sort u_1}
{P : Prop}
[Decidable P]
{b : α}
{A : P → α}

(dite P A fun x => b) ≠ b ↔ ∃ h, A h ≠ b


theorem last_eraseLast_le (s : CompositionSeries X) : s.eraseLast.last ≤ s.last

{X : Type u}
[Lattice X]
[JordanHolderLattice X]
(s : CompositionSeries X)

(RelSeries.eraseLast s).last ≤ RelSeries.last s


theorem extremePoints_subset : A.extremePoints 𝕜 ⊆ A

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{A : Set E}


theorem add_singleton_eq (a : A) (r : R) : σ a + {r} = σ (a + ↑ₐ r)

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
(a : A)
(r : R)

spectrum R a + {r} = spectrum R (a + (algebraMap R A) r)


@[simp]
theorem toSubalgebra_toIntermediateField (S : Subalgebra K L) (inv_mem : ∀ x ∈ S, x⁻¹ ∈ S) :
    (S.toIntermediateField inv_mem).toSubalgebra = S

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : Subalgebra K L)
(inv_mem : ∀ x ∈ S, x⁻¹ ∈ S)


theorem negSucc_lt_zero (n : Nat) : -[n+1] < 0


/-- An upper set is Lawson open if and only if it is Scott open -/
lemma lawsonOpen_iff_scottOpen_of_isUpperSet {s : Set α} (h : IsUpperSet s) :
    IsOpen (WithLawson.ofLawson ⁻¹' s) ↔ IsOpen (WithScott.ofScott ⁻¹' s)

{α : Type u_1}
[Preorder α]
{s : Set α}
(h : IsUpperSet s)

IsOpen (⇑Topology.WithLawson.ofLawson ⁻¹' s) ↔ IsOpen (⇑Topology.WithScott.ofScott ⁻¹' s)


@[simp]
theorem map'_mk'' (f : α → β) (h) (x : α) :
    (Quotient.mk'' x : Quotient s₁).map' f h = (Quotient.mk'' (f x) : Quotient s₂)

{α : Sort u_1}
{β : Sort u_2}
{s₁ : Setoid α}
{s₂ : Setoid β}
(f : α → β)
(h : (Setoid.r ⇒ Setoid.r) f f)
(x : α)

Quotient.map' f h (Quotient.mk'' x) = Quotient.mk'' (f x)


theorem inv_def (z : ℂ) : z⁻¹ = conj z * ((normSq z)⁻¹ : ℝ)

z⁻¹ = (starRingEnd ℂ) z * ↑(Complex.normSq z)⁻¹


@[simp]
theorem range_natCast : range ((↑) : ℕ → Cardinal) = Iio ℵ₀

Set.range Nat.cast = Set.Iio Cardinal.aleph0


@[to_additive (attr := simp)]
theorem oreDiv_one_smul (r : M) (x : X[S⁻¹]) : (r /ₒ (1 : S)) • x = r • x

{M : Type u_3}
{X : Type u_4}
[AddMonoid M]
{S : AddSubmonoid M}
[AddOreLocalization.AddOreSet S]
[AddAction M X]
(r : M)
(x : AddOreLocalization S X)


@[simp]
theorem sumToIter_Xr (c : S₂) : sumToIter R S₁ S₂ (X (Sum.inr c)) = C (X c)

(R : Type u)
(S₁ : Type v)
(S₂ : Type w)
[CommSemiring R]
(c : S₂)

(MvPolynomial.sumToIter R S₁ S₂) (MvPolynomial.X (Sum.inr c)) = MvPolynomial.C (MvPolynomial.X c)


theorem le_iff_mem_closure (x y : PrimeSpectrum R) :
    x ≤ y ↔ y ∈ closure ({x} : Set (PrimeSpectrum R))

{R : Type u}
[CommSemiring R]
(x y : PrimeSpectrum R)


theorem Quotient.exists {α : Sort*} {s : Setoid α} {p : Quotient s → Prop} :
    (∃ a, p a) ↔ ∃ a : α, p ⟦a⟧

{α : Sort u_3}
{s : Setoid α}
{p : Quotient s → Prop}


theorem get_map (x : (Const n A) α) : Const.get (f <$$> x) = Const.get x

{n : ℕ}
{A : Type u}
{α β : TypeVec.{u} n}
(f : α.Arrow β)
(x : MvQPF.Const n A α)


theorem primorial_succ {n : ℕ} (hn1 : n ≠ 1) (hn : Odd n) : (n + 1)# = n#


@[simp]
theorem filterMap_eq_map (f : α → β) : filterMap (some ∘ f) = map f

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


@[to_additive]
theorem edist_inv [PseudoEMetricSpace G] [IsometricSMul G G] [IsometricSMul Gᵐᵒᵖ G]
    (x y : G) : edist x⁻¹ y = edist x y⁻¹

{G : Type v}
[Group G]
[PseudoEMetricSpace G]
[IsometricSMul G G]
[IsometricSMul Gᵐᵒᵖ G]
(x y : G)


@[mono]
protected lemma Reachable.mono {u v : V} {G G' : SimpleGraph V}
    (h : G ≤ G') (Guv : G.Reachable u v) : G'.Reachable u v

{V : Type u}
{u v : V}
{G G' : SimpleGraph V}
(h : G ≤ G')
(Guv : G.Reachable u v)


theorem add_mul {d : R} (_ : (a₁ : R) * b = c₁) (_ : a₂ * b = c₂) (_ : c₁ + c₂ = d) :
    (a₁ + a₂) * b = d

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

a₁ * b = c₁ → a₂ * b = c₂ → c₁ + c₂ = d → (a₁ + a₂) * b = d


@[simp]
theorem quot_mk_eq_coe (x : R) : Quot.mk c x = (x : c.Quotient)

{R : Type u_2}
[Add R]
[Mul R]
(c : RingCon R)
(x : R)


@[simp]
theorem coe_copy (S : NonUnitalSubalgebra R A) (s : Set A) (hs : s = ↑S) :
    (S.copy s hs : Set A) = s

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
(S : NonUnitalSubalgebra R A)
(s : Set A)
(hs : s = ↑S)


theorem discreteTopology_pi_basisFun [Finite ι] :
    DiscreteTopology (span ℤ (Set.range (Pi.basisFun ℝ ι)))

DiscreteTopology ↥(Submodule.span ℤ (Set.range ⇑(Pi.basisFun ℝ ι)))


theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ι →₀ M))
    (hs : s.Pairwise (_root_.Disjoint on Finsupp.support)) :
    s.sum.support = (s.map Finsupp.support).sup

(hs : Multiset.Pairwise (Disjoint on Finsupp.support) s)

s.sum.support = (Multiset.map Finsupp.support s).sup


theorem support_add (a b : FreeAbelianGroup X) : support (a + b) ⊆ a.support ∪ b.support

{X : Type u_1}
(a b : FreeAbelianGroup X)


/-- `Kᗮ` can be characterized as the intersection of the kernels of the operations of
inner product with each of the elements of `K`. -/
theorem orthogonal_eq_inter : Kᗮ = ⨅ v : K, LinearMap.ker (innerSL 𝕜 (v : E))

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

Kᗮ = ⨅ v, LinearMap.ker ((innerSL 𝕜) ↑v)


/-- The cokernel of `biprod.inr : Y ⟶ X ⊞ Y` is `X`. -/
@[simps!]
def cokernelBiprodInrIso : cokernel (biprod.inr : Y ⟶ X ⊞ Y) ≅ X

CategoryTheory.Limits.cokernelBiprodInrIso.hom =
  CategoryTheory.Limits.colimit.desc (CategoryTheory.Limits.parallelPair CategoryTheory.Limits.biprod.inr 0)
    (CategoryTheory.Limits.biprod.inrCokernelCofork X Y)


@[simp]
theorem denom_algebraMap (p : K[X]) : denom (algebraMap _ (RatFunc K) p) = 1

((algebraMap K[X] (RatFunc K)) p).denom = 1


private lemma ite_ne_zero (ha : a ≠ 0) (hb : b ≠ 0) : ite p a b ≠ 0

{α : Type u_1}
[Zero α]
(p : Prop)
[Decidable p]
{a b : α}
(ha : a ≠ 0)
(hb : b ≠ 0)


/-- The adjoint is unique: a map `A` is the adjoint of `B` iff it satisfies `⟪A x, y⟫ = ⟪x, B y⟫`
for all `x` and `y`. -/
theorem eq_adjoint_iff (A : E →L[𝕜] F) (B : F →L[𝕜] E) : A = B† ↔ ∀ x y, ⟪A x, y⟫ = ⟪x, B y⟫

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[CompleteSpace E]
[CompleteSpace F]
(A : E →L[𝕜] F)
(B : F →L[𝕜] E)

A = ContinuousLinearMap.adjoint B ↔ ∀ (x : E) (y : F), ⟪A x, y⟫_𝕜 = ⟪x, B y⟫_𝕜


theorem coeff_ne_zero_of_eq_degree (hn : degree p = n) : coeff p n ≠ 0

{R : Type u}
{n : ℕ}
[Semiring R]
{p : R[X]}
(hn : p.degree = ↑n)


theorem tsirelson_inequality_aux : √2 * √2 ^ 3 = √2 * (2 * (√2)⁻¹ + 4 * ((√2)⁻¹ * 2⁻¹))


theorem mul_right_eq_zero {a b : M₀} (ha : IsUnit a) : a * b = 0 ↔ b = 0

{M₀ : Type u_2}
[MonoidWithZero M₀]
{a b : M₀}
(ha : IsUnit a)


@[simp]
theorem id_apply (a : α) : BoundedLatticeHom.id α a = a

{α : Type u_3}
[Lattice α]
[BoundedOrder α]
(a : α)


theorem one_le_find : 1 < PNat.find h ↔ ¬p 1

{p : ℕ+ → Prop}
[DecidablePred p]
(h : ∃ n, p n)


lemma isProbabilityMeasureExponential {r : ℝ} (hr : 0 < r) :
    IsProbabilityMeasure (expMeasure r)


@[simp]
theorem pullbackSymmetry_hom_of_mono_eq [Mono f] : (pullbackSymmetry f f).hom = 𝟙 _

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

(CategoryTheory.Limits.pullbackSymmetry f f).hom = 𝟙 (CategoryTheory.Limits.pullback f f)


@[simp]
lemma ΨSq_three : W.ΨSq 3 = W.Ψ₃ ^ 2

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


@[simp]
theorem le_one_iff {n : ℕ+} : n ≤ 1 ↔ n = 1


theorem exists_affineIndependent (s : Set P) :
    ∃ t ⊆ s, affineSpan k t = affineSpan k s ∧ AffineIndependent k ((↑) : t → P)

(k : Type u_1)
(V : Type u_2)
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(s : Set P)

∃ t ⊆ s, affineSpan k t = affineSpan k s ∧ AffineIndependent k Subtype.val


@[to_additive]
theorem isLUB_inv' : IsLUB s⁻¹ a⁻¹ ↔ IsGLB s a

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

[CovariantClass G G (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1]


@[fun_prop]
theorem hasStrictFDerivAt_multiset_prod [DecidableEq ι] [Fintype ι] {u : Multiset ι} {x : ι → 𝔸'} :
    HasStrictFDerivAt (𝕜 := 𝕜) (fun x ↦ (u.map x).prod)
      (u.map (fun i ↦ ((u.erase i).map x).prod • proj i)).sum x

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

HasStrictFDerivAt (fun x => (Multiset.map x u).prod)
  (Multiset.map (fun i => (Multiset.map x (u.erase i)).prod • ContinuousLinearMap.proj i) u).sum x


@[simp]
theorem image_eq_empty : s.image f = ∅ ↔ s = ∅

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f : α → β}
{s : Finset α}


@[field_simps]
lemma two_ne_zero [OfNat α 2] [NeZero (2 : α)] : (2 : α) ≠ 0

{α : Type u_2}
[Zero α]
[OfNat α 2]
[NeZero 2]


@[to_additive]
theorem hasProd_iff_hasProd_of_ne_one_bij {g : γ → α} (i : mulSupport g → β)
    (hi : Injective i) (hf : mulSupport f ⊆ Set.range i)
    (hfg : ∀ x, f (i x) = g x) : HasProd f a ↔ HasProd g a

(hfg : ∀ (x : ↑(Function.support g)), f (i x) = g ↑x)


/-- The cosine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
adjacent side. -/
theorem cos_oangle_left_mul_dist_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : Real.Angle.cos (∡ p₃ p₁ p₂) * dist p₁ p₃ = dist p₁ p₂

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

(∡ p₃ p₁ p₂).cos * dist p₁ p₃ = dist p₁ p₂


theorem integrable_toReal_condDistrib (hX : AEMeasurable X μ) (hs : MeasurableSet s) :
    Integrable (fun a => (condDistrib Y X μ (X a) s).toReal) μ

{α : Type u_1}
{β : Type u_2}
{Ω : Type u_3}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{mα : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure μ]
{X : α → β}
{Y : α → Ω}
{mβ : MeasurableSpace β}
{s : Set Ω}
(hX : AEMeasurable X μ)
(hs : MeasurableSet s)

MeasureTheory.Integrable (fun a => (((ProbabilityTheory.condDistrib Y X μ) (X a)) s).toReal) μ


/-- A functor `C ⥤ D` induces a functor between the corresponding arrow categories. -/
@[simps]
def mapArrow (F : C ⥤ D) : Arrow C ⥤ Arrow D

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


@[simp]
theorem range_restrict (f : α → β) (s : Set α) : Set.range (s.restrict f) = f '' s

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


theorem degree_X_le : degree (X : R[X]) ≤ 1


@[simp]
theorem nonempty_fun : Nonempty (α → β) ↔ IsEmpty α ∨ Nonempty β


/-- The indicator function of a measurable set is McShane integrable with respect to any
locally-finite measure. -/
theorem hasIntegralIndicatorConst (l : IntegrationParams) (hl : l.bRiemann = false)
    {s : Set (ι → ℝ)} (hs : MeasurableSet s) (I : Box ι) (y : E) (μ : Measure (ι → ℝ))
    [IsLocallyFiniteMeasure μ] :
    HasIntegral.{u, v, v} I l (s.indicator fun _ => y) μ.toBoxAdditive.toSMul
      ((μ (s ∩ I)).toReal • y)

BoxIntegral.HasIntegral I l (s.indicator fun x => y) μ.toBoxAdditive.toSMul ((μ (s ∩ ↑I)).toReal • y)


@[to_additive (attr := simp)]
theorem toFinset_mul (s t : Set α) [Fintype s] [Fintype t] [Fintype ↑(s * t)] :
    (s * t).toFinset = s.toFinset * t.toFinset

{α : Type u_2}
[DecidableEq α]
[Mul α]
(s t : Set α)
[Fintype ↑s]
[Fintype ↑t]
[Fintype ↑(s * t)]


@[to_additive even_two_nsmul] lemma IsSquare_sq (a : α) : IsSquare (a ^ 2)


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


theorem IsCoprime.of_add_mul_left_right (h : IsCoprime x (y + x * z)) : IsCoprime x y

{R : Type u}
[CommSemiring R]
{x y z : R}
(h : IsCoprime x (y + x * z))


theorem eventuallyConst_set {s : Set α} :
    EventuallyConst s l ↔ (∀ᶠ x in l, x ∈ s) ∨ (∀ᶠ x in l, x ∉ s)

{α : Type u_1}
{l : Filter α}
{s : Set α}

Filter.EventuallyConst s l ↔ (∀ᶠ (x : α) in l, x ∈ s) ∨ ∀ᶠ (x : α) in l, x ∉ s


/-- A lawful `Control.Monad` gives a category theory `Monad` on the category of types.
-/
@[simps!]
def ofTypeMonad : Monad (Type u)

(m : Type u → Type u)
[Monad m]
[LawfulMonad m]

∀ {X Y : Type u} (f : X ⟶ Y) (a : m X), (CategoryTheory.ofTypeMonad m).map f a = f <$> a


theorem ext_hom ⦃f g : G →* H⦄ (h : ∀ a : Generators G, f (of a) = g (of a)) : f = g

(h : ∀ (a : IsFreeGroup.Generators G), f (IsFreeGroup.of a) = g (IsFreeGroup.of a))


theorem setLIntegral_withDensity_eq_setLIntegral_mul (μ : Measure α) {f g : α → ℝ≥0∞}
    (hf : Measurable f) (hg : Measurable g) {s : Set α} (hs : MeasurableSet s) :
    ∫⁻ x in s, g x ∂μ.withDensity f = ∫⁻ x in s, (f * g) x ∂μ

{α : Type u_1}
{m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
{f g : α → ℝ≥0∞}
(hf : Measurable f)
(hg : Measurable g)
{s : Set α}
(hs : MeasurableSet s)

∫⁻ (x : α) in s, g x ∂μ.withDensity f = ∫⁻ (x : α) in s, (f * g) x ∂μ


theorem mk'_self'' {x : M} : mk' S x.1 x = 1

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


theorem span_nat_eq_addSubmonoid_closure (s : Set M) :
    (span ℕ s).toAddSubmonoid = AddSubmonoid.closure s

{M : Type u_4}
[AddCommMonoid M]
(s : Set M)

(Submodule.span ℕ s).toAddSubmonoid = AddSubmonoid.closure s


@[aesop safe 20 apply (rule_sets := [Measurable])]
protected theorem edist {β : Type*} [SeminormedAddCommGroup β] {f g : α → β}
    (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) :
    AEMeasurable (fun a => edist (f a) (g a)) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)


theorem continuous_sup_rng_left {t₁ : TopologicalSpace α} {t₃ t₂ : TopologicalSpace β} :
    Continuous[t₁, t₂] f → Continuous[t₁, t₂ ⊔ t₃] f

{α : Type u}
{β : Type v}
{f : α → β}
{t₁ : TopologicalSpace α}
{t₃ t₂ : TopologicalSpace β}


theorem Ioc_ae_eq_Icc : Ioc a b =ᵐ[μ] Icc a b

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.NoAtoms μ]
[PartialOrder α]
{a b : α}


theorem isConformalMap_const_smul (hc : c ≠ 0) : IsConformalMap (c • id R M)

{R : Type u_1}
{M : Type u_2}
[NormedField R]
[SeminormedAddCommGroup M]
[NormedSpace R M]
{c : R}
(hc : c ≠ 0)

IsConformalMap (c • ContinuousLinearMap.id R M)


@[simp]
theorem unop_top : (⊤ : Subring Rᵐᵒᵖ).unop = ⊤


theorem const_continuous' (x : β) : Continuous' (Function.const α x)

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
(x : β)

OmegaCompletePartialOrder.Continuous' (Function.const α x)


@[to_additive]
theorem prehaar_sup_le {K₀ : PositiveCompacts G} {U : Set G} (K₁ K₂ : Compacts G)
    (hU : (interior U).Nonempty) :
    prehaar (K₀ : Set G) U (K₁ ⊔ K₂) ≤ prehaar (K₀ : Set G) U K₁ + prehaar (K₀ : Set G) U K₂

{K₀ : TopologicalSpace.PositiveCompacts G}

MeasureTheory.Measure.haar.prehaar (↑K₀) U (K₁ ⊔ K₂) ≤
  MeasureTheory.Measure.haar.prehaar (↑K₀) U K₁ + MeasureTheory.Measure.haar.prehaar (↑K₀) U K₂


@[simp]
theorem trace_smul [Monoid α] [DistribMulAction α R] (r : α) (A : Matrix n n R) :
    trace (r • A) = r • trace A

{n : Type u_3}
{α : Type u_5}
{R : Type u_6}
[Fintype n]
[AddCommMonoid R]
[Monoid α]
[DistribMulAction α R]
(r : α)
(A : Matrix n n R)


private irreducible_def neg {R : Type uR} [Ring R] (r : R → R → Prop) : RingQuot r → RingQuot r

{R : Type u_1}
[Ring R]
(r : R → R → Prop)

∀ (x : RingQuot r),
  RingQuot.neg r x =
    match x with
    | { toQuot := a } => { toQuot := Quot.map (fun a => -a) ⋯ a }


theorem isPrimePow_nat_iff (n : ℕ) : IsPrimePow n ↔ ∃ p k : ℕ, Nat.Prime p ∧ 0 < k ∧ p ^ k = n

IsPrimePow n ↔ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n


@[simp] lemma reindex_isMono {eη : η ≃ η'} {eα : α ≃ α'} {eι : ι ≃ ι'} {C : (ι' → α') → κ} :
    (l.reindex eη eα eι).IsMono C ↔ l.IsMono fun x ↦ C <| eα ∘ x ∘ eι.symm

{η : Type u_5}
{α : Type u_6}
{ι : Type u_7}
{κ : Type u_8}
{l : Combinatorics.Subspace η α ι}
{η' : Type u_9}
{α' : Type u_10}
{ι' : Type u_11}
{eη : η ≃ η'}
{eα : α ≃ α'}
{eι : ι ≃ ι'}
{C : (ι' → α') → κ}

Combinatorics.Subspace.IsMono C (l.reindex eη eα eι) ↔ Combinatorics.Subspace.IsMono (fun x => C (⇑eα ∘ x ∘ ⇑eι.symm)) l


theorem cycleRange_of_le {n : ℕ} {i j : Fin n.succ} (h : j ≤ i) :
    cycleRange i j = if j = i then 0 else j + 1

i.cycleRange j = if j = i then 0 else j + 1


@[simp] theorem add_one_le_iff {n : Nat} : ∀ {k : Fin (n + 1)}, k + 1 ≤ k ↔ k = last _


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


@[simp]
theorem arsinh_le_arsinh : arsinh x ≤ arsinh y ↔ x ≤ y


theorem mul_le_of_le_one_of_le_of_nonneg [MulPosMono α] (ha : a ≤ 1) (h : b ≤ c) (hb : 0 ≤ b) :
    a * b ≤ c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[MulPosMono α]
(ha : a ≤ 1)
(h : b ≤ c)
(hb : 0 ≤ b)


theorem associated_baseChange [Invertible (2 : A)] (Q : QuadraticForm R M₂) :
    associated (R := A) (Q.baseChange A) = (associated (R := R) Q).baseChange A

{R : Type uR}
{A : Type uA}
{M₂ : Type uM₂}
[CommRing R]
[CommRing A]
[AddCommGroup M₂]
[Algebra R A]
[Module R M₂]
[Invertible 2]
[Invertible 2]
(Q : QuadraticForm R M₂)

QuadraticMap.associated (QuadraticForm.baseChange A Q) = LinearMap.BilinMap.baseChange A (QuadraticMap.associated Q)


theorem Fin.transpose_circulant : ∀ {n} (v : Fin n → α), (circulant v)ᵀ = circulant fun i => v (-i)

(Matrix.circulant v).transpose = Matrix.circulant fun i => v (-i)


@[simp]
theorem leadingCoeff_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.leadingCoeff = P.a

{R : Type u_1}
{P : Cubic R}
[Semiring R]
(ha : P.a ≠ 0)


@[simp]
theorem card_powerset (s : Multiset α) : card (powerset s) = 2 ^ card s

Multiset.card s.powerset = 2 ^ Multiset.card s


/-- The coercion from `M →L[R] M₂` to `M →ₗ[R] M₂`, as a linear map. -/
@[simps]
def coeLM : (M →L[R] N₃) →ₗ[S] M →ₗ[R] N₃

{R : Type u_1}
(S : Type u_4)
[Semiring R]
[Semiring S]
{M : Type u_6}
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
{N₃ : Type u_10}
[TopologicalSpace N₃]
[AddCommMonoid N₃]
[Module R N₃]
[Module S N₃]
[SMulCommClass R S N₃]
[ContinuousConstSMul S N₃]
[ContinuousAdd N₃]
(self : M →L[R] N₃)

(ContinuousLinearMap.coeLM S) self = ↑self


theorem subNatNat_of_le {m n : Nat} (h : n ≤ m) : subNatNat m n = ↑(m - n)


/-- A natural transformation is an isomorphism if all its components are isomorphisms.
-/
theorem isIso_of_isIso_app (α : F ⟶ G) [∀ X : C, IsIso (α.app X)] : IsIso α

[∀ (X : C), CategoryTheory.IsIso (α.app X)]


theorem IsArtinian.wellFounded_submodule_lt (R M) [Semiring R] [AddCommMonoid M] [Module R M]
    [IsArtinian R M] : WellFounded ((· < ·) : Submodule R M → Submodule R M → Prop)

(R : Type u_5)
(M : Type u_6)
[Semiring R]
[AddCommMonoid M]
[Module R M]
[IsArtinian R M]


@[to_additive AddLocalization.r_iff_oreEqv_r]
theorem r_iff_oreEqv_r {x y : M × S} : r S x y ↔ (OreLocalization.oreEqv S M).r x y

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{x y : M × ↥S}


@[simp]
theorem AddSubgroup.coe_toIntSubmodule (S : AddSubgroup M) :
    (AddSubgroup.toIntSubmodule S : Set M) = S

{M : Type u_3}
[AddCommGroup M]
(S : AddSubgroup M)