theorem StarConvex.add_smul_sub_mem (hs : StarConvex 𝕜 x s) (hy : y ∈ s) {t : 𝕜} (ht₀ : 0 ≤ t)
    (ht₁ : t ≤ 1) : x + t • (y - x) ∈ s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{x y : E}
{s : Set E}
(hs : StarConvex 𝕜 x s)
(hy : y ∈ s)
{t : 𝕜}
(ht₀ : 0 ≤ t)
(ht₁ : t ≤ 1)


@[simp]
theorem coe_neg (f : ModularForm Γ k) : ⇑(-f) = -f

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(f : ModularForm Γ k)


theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t

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

e.IsImage s t ↔ e.target ∩ ↑e.symm ⁻¹' s = e.target ∩ t


/-- We can transport limits of shape `J` along an equivalence `J ≌ J'`.
-/
theorem hasLimitsOfShape_of_equivalence {J' : Type u₂} [Category.{v₂} J'] (e : J ≌ J')
    [HasLimitsOfShape J C] : HasLimitsOfShape J' C


@[simp] lemma top_mul (hb : b ≠ 0) : ⊤ * b = ⊤

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


@[simp]
theorem diag_union_offDiag : s.diag ∪ s.offDiag = s ×ˢ s

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


theorem initiallySmall_of_initial_of_initiallySmall [InitiallySmall.{w} K] : InitiallySmall.{w} J

{J : Type u}
[CategoryTheory.Category.{v, u} J]
{K : Type u₁}
[CategoryTheory.Category.{v₁, u₁} K]
(F : K ⥤ J)
[F.Initial]
[CategoryTheory.InitiallySmall K]


theorem IsRelPrime.of_add_mul_right_left (h : IsRelPrime (x + z * y) y) : IsRelPrime x y

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


theorem map_smul [Module R E₂] {e : E ≃ₗᵢ[R] E₂} (c : R) (x : E) : e (c • x) = c • e x

{R : Type u_1}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R E₂]
{e : E ≃ₗᵢ[R] E₂}
(c : R)
(x : E)


/-- If a type carries two unital binary operations that distribute over each other,
then they have the same unit elements.

In fact, the two operations are the same, and give a commutative monoid structure,
see `eckmann_hilton.CommMonoid`. -/
theorem one : e₁ = e₂

(distrib : ∀ (a b c d : X), m₁ (m₂ a b) (m₂ c d) = m₂ (m₁ a c) (m₁ b d))


@[to_additive]
theorem mulIndicator_inv' (s : Set α) (f : α → G) : mulIndicator s f⁻¹ = (mulIndicator s f)⁻¹

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


theorem algebraMap_eq : algebraMap R A = (algebraMap S A).comp (algebraMap R S)

(R : Type u)
(S : Type v)
(A : Type w)
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Algebra R S]
[Algebra S A]
[Algebra R A]
[IsScalarTower R S A]


@[to_additive (attr := simp)]
theorem prod_map_mul : (m.map fun i => f i * g i).prod = (m.map f).prod * (m.map g).prod

{ι : Type u_2}
{α : Type u_3}
[AddCommMonoid α]
{m : Multiset ι}
{f g : ι → α}

(Multiset.map (fun i => f i + g i) m).sum = (Multiset.map f m).sum + (Multiset.map g m).sum


@[simp]
theorem iterate_frobenius_mk (n : ℕ) (x : K) :
    (frobenius (PerfectClosure K p) p)^[n] (mk K p ⟨n, x⟩) = of K p x

(K : Type u)
[CommRing K]
(p : ℕ)
[Fact (Nat.Prime p)]
[CharP K p]
(n : ℕ)
(x : K)

(⇑(frobenius (PerfectClosure K p) p))^[n] (PerfectClosure.mk K p (n, x)) = (PerfectClosure.of K p) x


@[simp]
theorem lie_zsmul (a : ℤ) : ⁅x, a • m⁆ = a • ⁅x, m⁆

{L : Type v}
{M : Type w}
[LieRing L]
[AddCommGroup M]
[LieRingModule L M]
(x : L)
(m : M)
(a : ℤ)


theorem vector_cons {n} : Primrec₂ (@Vector.cons α n)


/-- A version of `continuous_inf_dom_right` for binary functions -/
theorem continuous_inf_dom_right₂ {X Y Z} {f : X → Y → Z} {ta1 ta2 : TopologicalSpace X}
    {tb1 tb2 : TopologicalSpace Y} {tc1 : TopologicalSpace Z}
    (h : by haveI := ta2; haveI := tb2; exact Continuous fun p : X × Y => f p.1 p.2) : by
    haveI := ta1 ⊓ ta2; haveI := tb1 ⊓ tb2; exact Continuous fun p : X × Y => f p.1 p.2

{X : Type u_5}
{Y : Type u_6}
{Z : Type u_7}
{f : X → Y → Z}
{ta1 ta2 : TopologicalSpace X}
{tb1 tb2 : TopologicalSpace Y}
{tc1 : TopologicalSpace Z}
(h : Continuous fun p => f p.1 p.2)


theorem apply_mk (f : α → β) (h h') (x : α) : SimpleFunc.mk f h h' x = f x

(h : ∀ (x : β), MeasurableSet (f ⁻¹' {x}))

↑{ toFun := f, measurableSet_fiber' := h, finite_range' := h' } x = f x


theorem lcm_ne_zero (hm : m ≠ 0) (hn : n ≠ 0) : lcm m n ≠ 0


@[to_additive (attr := measurability)]
protected theorem mul_const [Mul β] [ContinuousMul β] (hf : AEStronglyMeasurable f μ) (c : β) :
    AEStronglyMeasurable (fun x => f x * c) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun x => f x * c) μ


@[to_additive exists_pos_of_sum_zero_of_exists_nonzero]
theorem exists_one_lt_of_prod_one_of_exists_ne_one' (f : ι → M) (h₁ : ∏ i ∈ s, f i = 1)
    (h₂ : ∃ i ∈ s, f i ≠ 1) : ∃ i ∈ s, 1 < f i

{ι : Type u_1}
{M : Type u_4}
[LinearOrderedCancelCommMonoid M]
{s : Finset ι}
(f : ι → M)
(h₁ : ∏ i ∈ s, f i = 1)
(h₂ : ∃ i ∈ s, f i ≠ 1)


theorem volume_pi_Ioo {a b : ι → ℝ} :
    volume (pi univ fun i => Ioo (a i) (b i)) = ∏ i, ENNReal.ofReal (b i - a i)

{ι : Type u_1}
[Fintype ι]
{a b : ι → ℝ}

MeasureTheory.volume (Set.univ.pi fun i => Set.Ioo (a i) (b i)) = ∏ i : ι, ENNReal.ofReal (b i - a i)


@[to_additive (attr := simp) sum_eq_zero_iff]
theorem prod_eq_one_iff' : ∏ x ∈ s, f x = 1 ↔ ∀ x ∈ s, f x = 1

{ι : Type u_1}
{M : Type u_4}
[CanonicallyOrderedAddCommMonoid M]
{f : ι → M}
{s : Finset ι}


@[simp]
theorem appHom_valid_glue {X : D} {Y : C} (f : op X ⟶ op (G.obj Y)) :
    appHom α X ≫ ℱ'.val.map f = ℱ.map f ≫ α.app (op Y)

{K : CategoryTheory.GrothendieckTopology D}

{ℱ : CategoryTheory.Functor Dᵒᵖ (Type v)}

(f : Opposite.op X ⟶ Opposite.op (G.obj Y))

CategoryTheory.CategoryStruct.comp (CategoryTheory.Functor.IsCoverDense.Types.appHom α X) (ℱ'.val.map f) =
  CategoryTheory.CategoryStruct.comp (ℱ.map f) (α.app (Opposite.op Y))


/-- If a pair of measures `HaveLebesgueDecomposition`, then `rnDeriv` chooses the
measurable function from `HaveLebesgueDecomposition`, otherwise it returns the zero function.
For sigma-finite measures, `μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)`. -/
noncomputable irreducible_def rnDeriv (μ ν : Measure α) : α → ℝ≥0∞

{α : Type u_3}
{m : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)

μ.rnDeriv ν = if h : μ.HaveLebesgueDecomposition ν then (Classical.choose ⋯).2 else 0


theorem nonempty_compl_range {ι : Type u} (f : ι → Ordinal.{max u v}) : (Set.range f)ᶜ.Nonempty


@[to_additive]
theorem disjoint_def' {p₁ p₂ : Submonoid M} :
    Disjoint p₁ p₂ ↔ ∀ {x y : M}, x ∈ p₁ → y ∈ p₂ → x = y → x = 1

{M : Type u_1}
[MulOneClass M]
{p₁ p₂ : Submonoid M}


theorem progMeasurable_const [MeasurableSpace ι] (f : Filtration ι m) (b : β) :
    ProgMeasurable f (fun _ _ => b : ι → Ω → β)

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

MeasureTheory.ProgMeasurable f fun x x => b


protected theorem le_lt_asymm : ∀{a b : Nat}, a ≤ b → ¬(b < a)


theorem Ico_subset_Ico_right (h : b₁ ≤ b₂) : Ico a b₁ ⊆ Ico a b₂

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


@[simp] lemma birkhoffSet_inf (a b : α) : birkhoffSet (a ⊓ b) = birkhoffSet a ∩ birkhoffSet b

{α : Type u_1}
[DistribLattice α]
[Fintype α]
[DecidablePred SupIrred]
(a b : α)

OrderEmbedding.birkhoffSet (a ⊓ b) = OrderEmbedding.birkhoffSet a ∩ OrderEmbedding.birkhoffSet b


@[simp, mfld_simps]
theorem symm_toPartialEquiv : e.symm.toPartialEquiv = e.toPartialEquiv.symm

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


theorem epi_of_target_iso_zero {X Y : C} (f : X ⟶ Y) (i : Y ≅ 0) : Epi f


lemma ne_of_ssubset [IsIrrefl α (· ⊂ ·)] {a b : α} : a ⊂ b → a ≠ b

{α : Type u}
[HasSSubset α]
[IsIrrefl α fun x x_1 => x ⊂ x_1]
{a b : α}


theorem IndepSets.iUnion {s : ι → Set (Set Ω)} {s' : Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : Kernel α Ω} {μ : Measure α} (hyp : ∀ n, IndepSets (s n) s' κ μ) :
    IndepSets (⋃ n, s n) s' κ μ

(hyp : ∀ (n : ι), ProbabilityTheory.Kernel.IndepSets (s n) s' κ μ)

ProbabilityTheory.Kernel.IndepSets (⋃ n, s n) s' κ μ


@[simp]
theorem coe_pointwise_smul (a : α) (S : AddSubgroup A) : ↑(a • S) = a • (S : Set A)

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[Monoid α]
[DistribMulAction α A]
(a : α)
(S : AddSubgroup A)


theorem Associated.mul_right [CommMonoid α] {a b : α} (h : a ~ᵤ b) (c : α) : a * c ~ᵤ b * c

{α : Type u_1}
[CommMonoid α]
{a b : α}
(h : a ~ᵤ b)
(c : α)


theorem RespectsIso.cancel_right_isIso (hP : RespectsIso @P) {R S T : CommRingCat} (f : R ⟶ S)
    (g : S ⟶ T) [IsIso g] : P (f ≫ g) ↔ P f

{P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}


theorem mem_balancedCoreAux_iff : x ∈ balancedCoreAux 𝕜 s ↔ ∀ r : 𝕜, 1 ≤ ‖r‖ → x ∈ r • s

{𝕜 : Type u_1}
{E : Type u_2}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
{s : Set E}
{x : E}

x ∈ balancedCoreAux 𝕜 s ↔ ∀ (r : 𝕜), 1 ≤ ‖r‖ → x ∈ r • s


theorem leadingCoeff_map_of_leadingCoeff_ne_zero (f : R →+* S) (hf : f (leadingCoeff p) ≠ 0) :
    leadingCoeff (p.map f) = f (leadingCoeff p)

{R : Type u}
{S : Type v}
[Semiring R]
{p : R[X]}
[Semiring S]
(f : R →+* S)
(hf : f p.leadingCoeff ≠ 0)

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


@[simp, norm_cast] lemma coe_nonempty : (s : Set α).Nonempty ↔ s ≠ ⊤


lemma nodup_entries (f : Finmap β) : f.entries.Nodup

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


@[fun_prop, measurability]
theorem prod_mk {f : α → β} {g : α → γ} (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) :
    AEMeasurable (fun x => (f x, g x)) μ

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
[MeasurableSpace γ]
{μ : MeasureTheory.Measure α}
{f : α → β}
{g : α → γ}
(hf : AEMeasurable f μ)
(hg : AEMeasurable g μ)


theorem AnalyticAt.congr (hf : AnalyticAt 𝕜 f x) (hg : f =ᶠ[𝓝 x] g) : AnalyticAt 𝕜 g x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{x : E}
(hf : AnalyticAt 𝕜 f x)
(hg : f =ᶠ[𝓝 x] g)


(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[CategoryTheory.Functor.IsDenseSubsite J K G]


@[to_additive (attr := simp)]
theorem threeGPFree_empty : ThreeGPFree (∅ : Set α)


/-- To rewrite from right to left, use `Finset.sup'_comp_eq_map`. -/
@[simp]
theorem sup'_map {s : Finset γ} {f : γ ↪ β} (g : β → α) (hs : (s.map f).Nonempty) :
    (s.map f).sup' hs g = s.sup' (map_nonempty.1 hs) (g ∘ f)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[SemilatticeSup α]
{s : Finset γ}
{f : γ ↪ β}
(g : β → α)
(hs : (Finset.map f s).Nonempty)

(Finset.map f s).sup' hs g = s.sup' ⋯ (g ∘ ⇑f)


theorem nf_repr_split {o o' m} [NF o] (h : split o = (o', m)) : NF o' ∧ repr o = repr o' + m

{o o' : ONote}
{m : ℕ}
[o.NF]
(h : o.split = (o', m))


/-- The morphism of short complexes `S.map F ⟶ S.map G` induced by
a natural transformation `F ⟶ G`. -/
@[simps]
def mapNatTrans {F G : C ⥤ D} [F.PreservesZeroMorphisms] [G.PreservesZeroMorphisms] (τ : F ⟶ G) :
    S.map F ⟶ S.map G


theorem isAffine_of_isIso {X Y : Scheme} (f : X ⟶ Y) [IsIso f] [h : IsAffine Y] : IsAffine X

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


theorem disjoint_of_disjoint_append_left_right (d : Disjoint (l₁ ++ l₂) l) : Disjoint l₂ l

∀ {α : Type u_1} {l₁ l₂ l : List α}, (l₁ ++ l₂).Disjoint l → l₂.Disjoint l


@[simp] lemma max_eq_zero_iff : max m n = 0 ↔ m = 0 ∧ n = 0


theorem _root_.HasCompactSupport.convolution_integrand_bound_right (hcg : HasCompactSupport g)
    (hg : Continuous g) {x t : G} {s : Set G} (hx : x ∈ s) :
    ‖L (f t) (g (x - t))‖ ≤ (-tsupport g + s).indicator (fun t => ‖L‖ * ‖f t‖ * ⨆ i, ‖g i‖) t

{𝕜 : Type u𝕜}
{G : Type uG}
{E : Type uE}
{E' : Type uE'}
{F : Type uF}
[NormedAddCommGroup E]
[NormedAddCommGroup E']
[NormedAddCommGroup F]
{f : G → E}
{g : G → E'}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 E']
[NormedSpace 𝕜 F]
(L : E →L[𝕜] E' →L[𝕜] F)
[AddGroup G]
[TopologicalSpace G]
(hcg : HasCompactSupport g)
(hg : Continuous g)
{x t : G}
{s : Set G}
(hx : x ∈ s)

‖(L (f t)) (g (x - t))‖ ≤ (-tsupport g + s).indicator (fun t => ‖L‖ * ‖f t‖ * ⨆ i, ‖g i‖) t


@[simp]
theorem reverse_coe (l : List α) : (l : Cycle α).reverse = l.reverse


theorem not_mem_of_lt_csInf {x : α} {s : Set α} (h : x < sInf s) (hs : BddBelow s) : x ∉ s

{α : Type u_1}
[ConditionallyCompleteLattice α]
{x : α}
{s : Set α}
(h : x < sInf s)
(hs : BddBelow s)


@[simp] theorem is_lt (a : Fin n) : (a : Nat) < n


theorem wcovBy_of_le_of_le (h1 : a ≤ b) (h2 : b ≤ a) : a ⩿ b

{α : Type u_1}
[Preorder α]
{a b : α}
(h1 : a ≤ b)
(h2 : b ≤ a)


@[to_additive (attr := simp) le_add_iff_nonneg_right]
theorem le_mul_iff_one_le_right' [CovariantClass α α (· * ·) (· ≤ ·)]
    [ContravariantClass α α (· * ·) (· ≤ ·)] (a : α) {b : α} :
    a ≤ a * b ↔ 1 ≤ b

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

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


@[mono]
theorem monotone : Monotone (u ∘ l)

{α : Type u_1}
{β : Type u_4}
[Preorder α]
[Preorder β]
{u : β → α}
(l : LowerAdjoint u)


@[to_additive (attr := norm_cast, simp)]
theorem coe_multiset_prod {M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (m : Multiset S) :
    (m.prod : M) = (m.map (↑)).prod

{B : Type u_3}
{S : B}
{M : Type u_4}
[CommMonoid M]
[SetLike B M]
[SubmonoidClass B M]
(m : Multiset ↥S)

↑m.prod = (Multiset.map Subtype.val m).prod


private theorem supOfBasis_nonneg : 0 ≤ supOfBasis K

(K : Type u_1)
[Field K]
[NumberField K]


theorem eq_liftAlgHom_comp_mkAlgHom {s : A → A → Prop} (f : RingQuot s →ₐ[S] B) :
    f = liftAlgHom S ⟨f.comp (mkAlgHom S s), fun x y h ↦ congr_arg f (mkAlgHom_rel S h)⟩

(S : Type uS)
[CommSemiring S]
{A : Type uA}
[Semiring A]
[Algebra S A]
{B : Type u₄}
[Semiring B]
[Algebra S B]
{s : A → A → Prop}
(f : RingQuot s →ₐ[S] B)

f = (RingQuot.liftAlgHom S) ⟨f.comp (RingQuot.mkAlgHom S s), ⋯⟩


/-- The canonical (semi)ring isomorphism from `R` to `Module.End Rᵐᵒᵖ R` induced by the left
multiplication. -/
@[simps]
def moduleEndSelfOp : R ≃+* Module.End Rᵐᵒᵖ R

(Module.moduleEndSelfOp R) s = DistribMulAction.toLinearMap Rᵐᵒᵖ R s


@[to_additive]
theorem prod_eq_multiset_prod [CommMonoid β] (s : Finset α) (f : α → β) :
    ∏ x ∈ s, f x = (s.1.map f).prod

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

∏ x ∈ s, f x = (Multiset.map f s.val).prod


@[simp]
theorem csSup_pair (a b : α) : sSup {a, b} = a ⊔ b

{α : Type u_1}
[ConditionallyCompleteLattice α]
(a b : α)


@[to_additive]
theorem Nonempty.subset_one_iff (h : s.Nonempty) : s ⊆ 1 ↔ s = 1

{α : Type u_2}
[One α]
{s : Finset α}
(h : s.Nonempty)


/-- The quaternion basis vectors within the algebra. -/
@[simps i j k]
def quaternionBasis : QuaternionAlgebra.Basis (CliffordAlgebra (Q c₁ c₂)) c₁ c₂

(CliffordAlgebraQuaternion.quaternionBasis c₁ c₂).i = (CliffordAlgebra.ι (CliffordAlgebraQuaternion.Q c₁ c₂)) (1, 0)


/-- The `atTop` filter for an open interval `Ioi a` comes from the `atTop` filter in the ambient
order. -/
theorem atTop_Ioi_eq [SemilatticeSup α] (a : α) : atTop = comap ((↑) : Ioi a → α) atTop

{α : Type u_3}
[SemilatticeSup α]
(a : α)

Filter.atTop = Filter.comap Subtype.val Filter.atTop


@[simp] theorem arrowCongr'_trans {α₁ α₂ β₁ β₂ α₃ β₃ : Type*}
    (e₁ : α₁ ≃ α₂) (e₁' : β₁ ≃ β₂) (e₂ : α₂ ≃ α₃) (e₂' : β₂ ≃ β₃) :
    arrowCongr' (e₁.trans e₂) (e₁'.trans e₂') = (arrowCongr' e₁ e₁').trans (arrowCongr' e₂ e₂')

{α₁ : Type u_1}
{α₂ : Type u_2}
{β₁ : Type u_3}
{β₂ : Type u_4}
{α₃ : Type u_5}
{β₃ : Type u_6}
(e₁ : α₁ ≃ α₂)
(e₁' : β₁ ≃ β₂)
(e₂ : α₂ ≃ α₃)
(e₂' : β₂ ≃ β₃)

(e₁.trans e₂).arrowCongr' (e₁'.trans e₂') = (e₁.arrowCongr' e₁').trans (e₂.arrowCongr' e₂')


theorem sub_dvd_eval_sub (a b : R) (p : R[X]) : a - b ∣ p.eval a - p.eval b

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

a - b ∣ Polynomial.eval a p - Polynomial.eval b p


theorem exists_open_singleton_of_finite [T0Space X] [Finite X] [Nonempty X] :
    ∃ x : X, IsOpen ({x} : Set X)

{X : Type u_1}
[TopologicalSpace X]
[T0Space X]
[Finite X]
[Nonempty X]


/-- We can transport colimits of shape `J` along an equivalence `J ≌ J'`.
-/
theorem hasColimitsOfShape_of_equivalence {J' : Type u₂} [Category.{v₂} J'] (e : J ≌ J')
    [HasColimitsOfShape J C] : HasColimitsOfShape J' C


lemma mul_nonpos_iff_neg_imp_nonneg [PosMulStrictMono α] [MulPosStrictMono α]
    [CovariantClass α α (· + ·) (· ≤ ·)] [ContravariantClass α α (· + ·) (· ≤ ·)] :
    a * b ≤ 0 ↔ (a < 0 → 0 ≤ b) ∧ (0 < b → a ≤ 0)

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

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


/-- This lemma is strictly weaker than `hitting_of_le`. -/
theorem hitting_of_lt {m : ι} (h : m < n) : hitting u s n m ω = m

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[ConditionallyCompleteLinearOrder ι]
{u : ι → Ω → β}
{s : Set β}
{n : ι}
{ω : Ω}
{m : ι}
(h : m < n)


private theorem teichmuller_mul_aux₁ (x y : MvPolynomial R ℚ) :
    teichmullerFun p (x * y) = teichmullerFun p x * teichmullerFun p y

(p : ℕ)
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
(x y : MvPolynomial R ℚ)

WittVector.teichmullerFun p (x * y) = WittVector.teichmullerFun p x * WittVector.teichmullerFun p y


theorem symm_bijective : Function.Bijective (Equiv.symm : (α ≃ β) → β ≃ α)


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

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

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


/-- If `F` creates the limit of `K` and `K ⋙ F` has a limit, then `K` has a limit. -/
theorem hasColimit_of_created (K : J ⥤ C) (F : C ⥤ D) [HasColimit (K ⋙ F)] [CreatesColimit K F] :
    HasColimit K

[CategoryTheory.Limits.HasColimit (K ⋙ F)]


/-- For functors out of a discrete category,
a natural isomorphism is just a collection of isomorphisms,
as the naturality squares are trivial.
-/
@[simps!]
def natIso {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ≅ G.obj i) :
    F ≅ G

{F G : CategoryTheory.Functor (CategoryTheory.Discrete I) C}

(f : (i : CategoryTheory.Discrete I) → F.obj i ≅ G.obj i)

(CategoryTheory.Discrete.natIso f).inv.app X = (f X).inv


@[to_additive (attr := simp)]
theorem fst_toProd (x : M ∗ N) : (toProd x).1 = fst x

{M : Type u_1}
{N : Type u_2}
[AddMonoid M]
[AddMonoid N]
(x : AddMonoid.Coprod M N)

(AddMonoid.Coprod.toSum x).1 = AddMonoid.Coprod.fst x


theorem IsRat.to_isNat {α} [Ring α] : ∀ {a : α} {n}, IsRat a (.ofNat n) (nat_lit 1) → IsNat a n

Mathlib.Meta.NormNum.IsRat a (Int.ofNat n) 1 → Mathlib.Meta.NormNum.IsNat a n


theorem lt_of_floor_lt (h : ⌊a⌋₊ < n) : a < n

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
{n : ℕ}
(h : ⌊a⌋₊ < n)


lemma image_subset_infs_left : b ∈ t → s.image (· ⊓ b) ⊆ s ⊼ t

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

b ∈ t → Finset.image (fun x => x ⊓ b) s ⊆ s ⊼ t


@[simp]
theorem pushforwardToOfIso_app {X Y : TopCat} (H₁ : X ≅ Y) {ℱ : Y.Presheaf C} {𝒢 : X.Presheaf C}
    (H₂ : ℱ ⟶ H₁.hom _* 𝒢) (U : (Opens X)ᵒᵖ) :
    (pushforwardToOfIso H₁ H₂).app U =
      H₂.app (op ((Opens.map H₁.inv).obj (unop U))) ≫
        𝒢.map (eqToHom (by simp [Opens.map, Set.preimage_preimage]))

(H₂ : ℱ ⟶ (TopCat.Presheaf.pushforward C H₁.hom).obj 𝒢)

(TopCat.Presheaf.pushforwardToOfIso H₁ H₂).app U =
  H₂.app (Opposite.op ((TopologicalSpace.Opens.map H₁.inv).obj (Opposite.unop U))) ≫ 𝒢.map (CategoryTheory.eqToHom ⋯)


/-- The right unitor as a natural isomorphism. -/
@[simps!]
def rightUnitorNatIso : tensorUnitRight C ≅ 𝟭 C

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

(CategoryTheory.MonoidalCategory.rightUnitorNatIso C).inv.app X = (CategoryTheory.MonoidalCategory.rightUnitor X).inv


@[simp]
theorem intCast_cast (i : ZMod n) : ((cast i : ℤ) : R) = cast i

{n : ℕ}
{R : Type u_1}
[Ring R]
(i : ZMod n)


@[to_additive (attr := simp 1100)]
theorem coe_toMulHom {f : M ≃* N} : (f.toMulHom : M → N) = f

{M : Type u_6}
{N : Type u_7}
[Add M]
[Add N]
{f : M ≃+ N}


theorem borel_anti : Antitone (@borel α)


theorem toLp_norm_eq_toLp_norm_coe :
    ‖(toLp p μ 𝕜 : C(α, E) →L[𝕜] Lp E p μ)‖ =
      ‖(BoundedContinuousFunction.toLp p μ 𝕜 : (α →ᵇ E) →L[𝕜] Lp E p μ)‖

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[TopologicalSpace α]
[BorelSpace α]
[SecondCountableTopologyEither α E]
[CompactSpace α]
[MeasureTheory.IsFiniteMeasure μ]
{𝕜 : Type u_5}
[Fact (1 ≤ p)]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]

‖ContinuousMap.toLp p μ 𝕜‖ = ‖BoundedContinuousFunction.toLp p μ 𝕜‖


theorem abs_def (q : ℚ) : |q| = q.num.natAbs /. q.den


@[simp]
theorem untrop_sup (x y : Tropical R) : untrop (x ⊔ y) = untrop x ⊔ untrop y

{R : Type u}
[LinearOrder R]
(x y : Tropical R)

Tropical.untrop (x ⊔ y) = Tropical.untrop x ⊔ Tropical.untrop y


lemma succAbove_castPred_self (p : Fin (n + 1)) (h : p ≠ last n) :
    succAbove p (p.castPred h) = (p.castPred h).succ

{n : ℕ}
(p : Fin (n + 1))
(h : p ≠ Fin.last n)

p.succAbove (p.castPred h) = (p.castPred h).succ


/-- An injective presentation of an object `X` consists of a monomorphism `f : X ⟶ J`
to some injective object `J`.
-/
structure InjectivePresentation (X : C) where
  J : C
  injective : Injective J := by infer_instance
  f : X ⟶ J
  mono : Mono f := by infer_instance

(self : CategoryTheory.InjectivePresentation X)


@[simp] theorem zipWithAll_nil_right :
    zipWithAll f as [] = as.map fun a => f (some a) none

∀ {α : Type u_1} {α_1 : Type u_2} {α_2 : Type u_3} {f : Option α → Option α_1 → α_2} {as : List α},
  List.zipWithAll f as List.nil = List.map (fun a => f (some a) none) as


theorem hasDerivWithinAt_iff_tendsto :
    HasDerivWithinAt f f' s x ↔
      Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - (x' - x) • f'‖) (𝓝[s] x) (𝓝 0)

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

HasDerivWithinAt f f' s x ↔ Filter.Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - (x' - x) • f'‖) (𝓝[s] x) (𝓝 0)


@[to_additive]
protected theorem mul_mem_cancel_right {x y : G} (h : x ∈ H) : y * x ∈ H ↔ y ∈ H

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)
{x y : G}
(h : x ∈ H)


theorem DifferentiableOn.cpow (hf : DifferentiableOn ℂ f s) (hg : DifferentiableOn ℂ g s)
    (h0 : Set.MapsTo f s slitPlane) : DifferentiableOn ℂ (fun x ↦ f x ^ g x) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f g : E → ℂ}
{s : Set E}
(hf : DifferentiableOn ℂ f s)
(hg : DifferentiableOn ℂ g s)
(h0 : Set.MapsTo f s Complex.slitPlane)

DifferentiableOn ℂ (fun x => f x ^ g x) s


/-- Approximate `f ⋆ g` if the support of the `f` is bounded within a ball, and `g` is near `g x₀`
on a ball with the same radius around `x₀`.

This is a special case of `dist_convolution_le'` where `L` is `(•)`, `f` has integral 1 and `f` is
nonnegative. -/
theorem dist_convolution_le {f : G → ℝ} {x₀ : G} {R ε : ℝ} {z₀ : E'} (hε : 0 ≤ ε)
    (hf : support f ⊆ ball (0 : G) R) (hnf : ∀ x, 0 ≤ f x) (hintf : ∫ x, f x ∂μ = 1)
    (hmg : AEStronglyMeasurable g μ) (hg : ∀ x ∈ ball x₀ R, dist (g x) z₀ ≤ ε) :
    dist ((f ⋆[lsmul ℝ ℝ, μ] g : G → E') x₀) z₀ ≤ ε

(hf : Function.support f ⊆ Metric.ball 0 R)

(hmg : MeasureTheory.AEStronglyMeasurable g μ)

(hg : ∀ x ∈ Metric.ball x₀ R, dist (g x) z₀ ≤ ε)

dist (MeasureTheory.convolution f g (ContinuousLinearMap.lsmul ℝ ℝ) μ x₀) z₀ ≤ ε


/-- Given an exact short complex `S` and a limit kernel fork `kf` for `S.g`, this is the
left homology data for `S` with `K := kf.pt` and `H := 0`. -/
@[simps]
noncomputable def Exact.leftHomologyDataOfIsLimitKernelFork
    (hS : S.Exact) [HasZeroObject C] (kf : KernelFork S.g) (hkf : IsLimit kf) :
    S.LeftHomologyData

(kf : CategoryTheory.Limits.KernelFork S.g)

(hkf : CategoryTheory.Limits.IsLimit kf)

(hS.leftHomologyDataOfIsLimitKernelFork kf hkf).K = kf.pt


theorem T0Space.of_cover (h : ∀ x y, Inseparable x y → ∃ s : Set X, x ∈ s ∧ y ∈ s ∧ T0Space s) :
    T0Space X

(h : ∀ (x y : X), Inseparable x y → ∃ s, x ∈ s ∧ y ∈ s ∧ T0Space ↑s)


@[simp]
theorem support_filter : (f.filter p).support = f.support.filter p

{α : Type u_1}
{M : Type u_5}
[Zero M]
(p : α → Prop)
[DecidablePred p]
(f : α →₀ M)

(Finsupp.filter p f).support = Finset.filter p f.support


/-- A locally uniform limit on a set of functions which are continuous on this set is itself
continuous on this set. -/
protected theorem TendstoLocallyUniformlyOn.continuousOn (h : TendstoLocallyUniformlyOn F f p s)
    (hc : ∀ᶠ n in p, ContinuousOn (F n) s) [NeBot p] : ContinuousOn f s

{F : ι → α → β}

(hc : ∀ᶠ (n : ι) in p, ContinuousOn (F n) s)


lemma IsLindelof.of_coe [LindelofSpace s] : IsLindelof s

{X : Type u}
[TopologicalSpace X]
{s : Set X}
[LindelofSpace ↑s]


theorem Decidable.imp_iff_not_or [Decidable a] : (a → b) ↔ (¬a ∨ b)

a → b ↔ ¬a ∨ b


protected theorem Reachable.rfl {u : V} : G.Reachable u u

{V : Type u}
{G : SimpleGraph V}
{u : V}


theorem ConvexOn.convex_epigraph (hf : ConvexOn 𝕜 s f) :
    Convex 𝕜 { p : E × β | p.1 ∈ s ∧ f p.1 ≤ p.2 }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConvexOn 𝕜 s f)


theorem OneOneReducible.of_equiv_symm {α β} [Primcodable α] [Primcodable β] {e : α ≃ β}
    (q : β → Prop) (h : Computable e.symm) : q ≤₁ (q ∘ e)

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{e : α ≃ β}
(q : β → Prop)
(h : Computable ⇑e.symm)


theorem comp {g : B →+* C} {f : A →+* B} (hg : g.FinitePresentation) (hf : f.FinitePresentation) :
    (g.comp f).FinitePresentation

{A : Type u_1}
{B : Type u_2}
{C : Type u_3}
[CommRing A]
[CommRing B]
[CommRing C]
{g : B →+* C}
{f : A →+* B}
(hg : g.FinitePresentation)
(hf : f.FinitePresentation)


@[mono] lemma exterior_mono : Monotone (exterior : Set α → Set α)


theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0}

ContinuousOn Real.tan {x | Real.cos x ≠ 0}


lemma toNat_lt_toNat {a b : ℤ} (hb : 0 < b) : toNat a < toNat b ↔ a < b


@[simp]
protected theorem add_halves (a : ℝ≥0∞) : a / 2 + a / 2 = a


lemma pentagon : tensorHom (associator X₁ X₂ X₃).hom (𝟙 X₄) ≫
    (associator X₁ (tensorObj X₂ X₃) X₄).hom ≫ tensorHom (𝟙 X₁) (associator X₂ X₃ X₄).hom =
    (associator (tensorObj X₁ X₂) X₃ X₄).hom ≫ (associator X₁ X₂ (tensorObj X₃ X₄)).hom

(X₁ X₂ X₃ X₄ : CategoryTheory.GradedObject I C)

[(CategoryTheory.GradedObject.Monoidal.tensorObj X₁ X₂).HasTensor X₃]

[X₁.HasTensor (CategoryTheory.GradedObject.Monoidal.tensorObj X₂ X₃)]

[(CategoryTheory.GradedObject.Monoidal.tensorObj X₂ X₃).HasTensor X₄]

[X₂.HasTensor (CategoryTheory.GradedObject.Monoidal.tensorObj X₃ X₄)]

[(CategoryTheory.GradedObject.Monoidal.tensorObj (CategoryTheory.GradedObject.Monoidal.tensorObj X₁ X₂) X₃).HasTensor
    X₄]

[(CategoryTheory.GradedObject.Monoidal.tensorObj X₁ (CategoryTheory.GradedObject.Monoidal.tensorObj X₂ X₃)).HasTensor
    X₄]

[X₁.HasTensor
    (CategoryTheory.GradedObject.Monoidal.tensorObj (CategoryTheory.GradedObject.Monoidal.tensorObj X₂ X₃) X₄)]

[X₁.HasTensor
    (CategoryTheory.GradedObject.Monoidal.tensorObj X₂ (CategoryTheory.GradedObject.Monoidal.tensorObj X₃ X₄))]

[(CategoryTheory.GradedObject.Monoidal.tensorObj X₁ X₂).HasTensor
    (CategoryTheory.GradedObject.Monoidal.tensorObj X₃ X₄)]

[X₁.HasGoodTensor₁₂Tensor (CategoryTheory.GradedObject.Monoidal.tensorObj X₂ X₃) X₄]

[X₁.HasGoodTensorTensor₂₃ (CategoryTheory.GradedObject.Monoidal.tensorObj X₂ X₃) X₄]

[(CategoryTheory.GradedObject.Monoidal.tensorObj X₁ X₂).HasGoodTensor₁₂Tensor X₃ X₄]

[(CategoryTheory.GradedObject.Monoidal.tensorObj X₁ X₂).HasGoodTensorTensor₂₃ X₃ X₄]

[X₁.HasGoodTensor₁₂Tensor X₂ (CategoryTheory.GradedObject.Monoidal.tensorObj X₃ X₄)]

[X₁.HasGoodTensorTensor₂₃ X₂ (CategoryTheory.GradedObject.Monoidal.tensorObj X₃ X₄)]

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.GradedObject.Monoidal.tensorHom (CategoryTheory.GradedObject.Monoidal.associator X₁ X₂ X₃).hom
      (CategoryTheory.CategoryStruct.id X₄))
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.GradedObject.Monoidal.associator X₁ (CategoryTheory.GradedObject.Monoidal.tensorObj X₂ X₃) X₄).hom
      (CategoryTheory.GradedObject.Monoidal.tensorHom (CategoryTheory.CategoryStruct.id X₁)
        (CategoryTheory.GradedObject.Monoidal.associator X₂ X₃ X₄).hom)) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.GradedObject.Monoidal.associator (CategoryTheory.GradedObject.Monoidal.tensorObj X₁ X₂) X₃ X₄).hom
    (CategoryTheory.GradedObject.Monoidal.associator X₁ X₂ (CategoryTheory.GradedObject.Monoidal.tensorObj X₃ X₄)).hom


@[simp]
theorem zero_cpow {x : ℂ} (h : x ≠ 0) : (0 : ℂ) ^ x = 0


@[to_additive (attr := simp)]
theorem empty_pow (hn : n ≠ 0) : (∅ : Finset α) ^ n = ∅

{α : Type u_2}
[DecidableEq α]
[AddMonoid α]
{n : ℕ}
(hn : n ≠ 0)


lemma rpow_p_mul_one_sub_smoothingFn_le :
    ∀ᶠ (n : ℕ) in atTop, ∀ i, (r i n) ^ (p a b) * (1 - ε (r i n))
      ≤ (b i) ^ (p a b) * n ^ (p a b) * (1 - ε n)

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(R : AkraBazziRecurrence T g a b r)

∀ᶠ (n : ℕ) in Filter.atTop,
  ∀ (i : α),
    ↑(r i n) ^ AkraBazziRecurrence.p a b * (1 - AkraBazziRecurrence.smoothingFn ↑(r i n)) ≤
      b i ^ AkraBazziRecurrence.p a b * ↑n ^ AkraBazziRecurrence.p a b * (1 - AkraBazziRecurrence.smoothingFn ↑n)


/-- A topological ring is `J`-adic if and only if it admits the powers of `J` as a basis of
open neighborhoods of zero. -/
theorem isAdic_iff [top : TopologicalSpace R] [TopologicalRing R] {J : Ideal R} :
    IsAdic J ↔
      (∀ n : ℕ, IsOpen ((J ^ n : Ideal R) : Set R)) ∧
        ∀ s ∈ 𝓝 (0 : R), ∃ n : ℕ, ((J ^ n : Ideal R) : Set R) ⊆ s

{R : Type u_1}
[CommRing R]
[top : TopologicalSpace R]
[TopologicalRing R]
{J : Ideal R}

IsAdic J ↔ (∀ (n : ℕ), IsOpen ↑(J ^ n)) ∧ ∀ s ∈ 𝓝 0, ∃ n, ↑(J ^ n) ⊆ s


theorem isSeparable_ae_range (hf : AEStronglyMeasurable f μ) :
    ∃ t : Set β, IsSeparable t ∧ ∀ᵐ x ∂μ, f x ∈ t

(hf : MeasureTheory.AEStronglyMeasurable f μ)

∃ t, TopologicalSpace.IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t


@[higher_order snd_comp_fst]
theorem snd_fst {α₀ α₁ β₀ β₁} (f : α₀ → α₁) (f' : β₀ → β₁) (x : F α₀ β₀) :
    snd f' (fst f x) = bimap f f' x

{F : Type u₀ → Type u₁ → Type u₂}
[Bifunctor F]
[LawfulBifunctor F]
{α₀ α₁ : Type u₀}
{β₀ β₁ : Type u₁}
(f : α₀ → α₁)
(f' : β₀ → β₁)
(x : F α₀ β₀)

Bifunctor.snd f' (Bifunctor.fst f x) = bimap f f' x


theorem smul_def (g : ConjAct G) (h : G) : g • h = ofConjAct g * h * (ofConjAct g)⁻¹

{G : Type u_3}
[DivInvMonoid G]
(g : ConjAct G)
(h : G)

g • h = ConjAct.ofConjAct g * h * (ConjAct.ofConjAct g)⁻¹


/-- A co-Heyting algebra is a bounded lattice with an additional binary difference operation `\`
such that `\ a` is right adjoint to `⊔ a`. -/
class CoheytingAlgebra (α : Type*) extends GeneralizedCoheytingAlgebra α, OrderTop α, HNot α where
  /-- `⊤ \ a` is `￢a` -/
  top_sdiff (a : α) : ⊤ \ a = ￢a

{α : Type u_4}
[self : CoheytingAlgebra α]
(a : α)


theorem IsBaseChange.equiv_tmul (s : S) (m : M) : h.equiv (s ⊗ₜ m) = s • f m

{R : Type u_1}
{M : Type v₁}
{N : Type v₂}
{S : Type v₃}
[AddCommMonoid M]
[AddCommMonoid N]
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Module R M]
[Module R N]
[Module S N]
[IsScalarTower R S N]
{f : M →ₗ[R] N}
(h : IsBaseChange S f)
(s : S)
(m : M)


theorem mod_add_div' (m k : ℕ+) : (mod m k + div m k * k : ℕ) = m


theorem mapRange.linearMap_comp (f : ∀ i, β₁ i →ₗ[R] β₂ i) (f₂ : ∀ i, β i →ₗ[R] β₁ i) :
    (mapRange.linearMap fun i => (f i).comp (f₂ i)) =
      (mapRange.linearMap f).comp (mapRange.linearMap f₂)

{ι : Type u_1}
{R : Type u_2}
[Semiring R]
{β : ι → Type u_6}
{β₁ : ι → Type u_7}
{β₂ : ι → Type u_8}
[(i : ι) → AddCommMonoid (β i)]
[(i : ι) → AddCommMonoid (β₁ i)]
[(i : ι) → AddCommMonoid (β₂ i)]
[(i : ι) → Module R (β i)]
[(i : ι) → Module R (β₁ i)]
[(i : ι) → Module R (β₂ i)]
(f : (i : ι) → β₁ i →ₗ[R] β₂ i)
(f₂ : (i : ι) → β i →ₗ[R] β₁ i)

(DFinsupp.mapRange.linearMap fun i => f i ∘ₗ f₂ i) = DFinsupp.mapRange.linearMap f ∘ₗ DFinsupp.mapRange.linearMap f₂


theorem decay_add_le_aux (k n : ℕ) (f g : 𝓢(E, F)) (x : E) :
    ‖x‖ ^ k * ‖iteratedFDeriv ℝ n ((f : E → F) + (g : E → F)) x‖ ≤
      ‖x‖ ^ k * ‖iteratedFDeriv ℝ n f x‖ + ‖x‖ ^ k * ‖iteratedFDeriv ℝ n g x‖

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(k n : ℕ)
(f g : SchwartzMap E F)
(x : E)

‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f + ⇑g) x‖ ≤
  ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ + ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑g) x‖


theorem image_subtype_val_Ioc_subset (a b : {x // p x}) :
    Subtype.val '' Ioc a b ⊆ Ioc a.val b.val

{α : Type u_1}
[Preorder α]
{p : α → Prop}
(a b : { x // p x })

Subtype.val '' Set.Ioc a b ⊆ Set.Ioc ↑a ↑b


@[to_additive]
theorem smul_fixedBy (g h : G) :
    h • fixedBy α g = fixedBy α (h * g * h⁻¹)

(α : Type u_1)
{G : Type u_2}
[Group G]
[MulAction G α]
(g h : G)

h • MulAction.fixedBy α g = MulAction.fixedBy α (h * g * h⁻¹)


/-- A finite group of order dividing a prime is cyclic. -/
@[to_additive "A finite group of order dividing a prime is cyclic."]
theorem isCyclic_of_card_dvd_prime {α : Type u} [Group α] {p : ℕ} [hp : Fact p.Prime]
    (h : Nat.card α ∣ p) : IsCyclic α

{α : Type u}
[AddGroup α]
{p : ℕ}
[hp : Fact (Nat.Prime p)]
(h : Nat.card α ∣ p)


lemma comap_comp (w : InfinitePlace K) (f : F →+* K) (g : k →+* F) :
    w.comap (f.comp g) = (w.comap f).comap g

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
{F : Type u_3}
[Field F]
(w : NumberField.InfinitePlace K)
(f : F →+* K)
(g : k →+* F)


lemma Measurable.and (hp : Measurable p) (hq : Measurable q) : Measurable fun a ↦ p a ∧ q a

{α : Type u_1}
[MeasurableSpace α]
{p q : α → Prop}
(hp : Measurable p)
(hq : Measurable q)


@[simp] lemma toColex_univ [Fintype α] : toColex (univ : Finset α) = ⊤

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


theorem map_eq_zero_iff (r : R) : algebraMap R S r = 0 ↔ ∃ m : M, ↑m * r = 0

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

(algebraMap R S) r = 0 ↔ ∃ m, ↑m * r = 0


@[to_additive Left.pow_nonneg]
theorem Left.one_le_pow_of_le (hx : 1 ≤ x) : ∀ {n : ℕ}, 1 ≤ x ^ n

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


@[to_additive]
lemma iIndepFun.indepFun_mul_right (hf_indep : iIndepFun (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hij : i ≠ j) (hik : i ≠ 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) μ


/-- See `finprod_comp`, `Fintype.prod_bijective` and `Finset.prod_bij`. -/
@[to_additive "See `finsum_comp`, `Fintype.sum_bijective` and `Finset.sum_bij`."]
theorem finprod_eq_of_bijective {f : α → M} {g : β → M} (e : α → β) (he₀ : Bijective e)
    (he₁ : ∀ x, f x = g (e x)) : ∏ᶠ i, f i = ∏ᶠ j, g j

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{g : β → M}
(e : α → β)
(he₀ : Function.Bijective e)
(he₁ : ∀ (x : α), f x = g (e x))


theorem MapsTo.mono_right (hf : MapsTo f s t₁) (ht : t₁ ⊆ t₂) : MapsTo f s t₂

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t₁ t₂ : Set β}
{f : α → β}
(hf : Set.MapsTo f s t₁)
(ht : t₁ ⊆ t₂)


theorem map_perm [DecidableEq ι] [Fintype ι] (v : ι → M) (σ : Equiv.Perm ι) :
    g (v ∘ σ) = Equiv.Perm.sign σ • g v

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N' : Type u_6}
[AddCommGroup N']
[Module R N']
{ι : Type u_7}
(g : M [⋀^ι]→ₗ[R] N')
[DecidableEq ι]
[Fintype ι]
(v : ι → M)
(σ : Equiv.Perm ι)


theorem union_iInter₂ (s : Set α) (t : ∀ i, κ i → Set α) :
    (s ∪ ⋂ (i) (j), t i j) = ⋂ (i) (j), s ∪ t i j

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

s ∪ ⋂ i, ⋂ j, t i j = ⋂ i, ⋂ j, s ∪ t i j


/-- If `f` is a family of mutually conditionally independent random variables
(`iCondIndepFun m' hm' m f μ`) and `S, T` are two disjoint finite index sets, then the tuple formed
by `f i` for `i ∈ S` is conditionally independent of the tuple `(f i)_i` for `i ∈ T`. -/
theorem iCondIndepFun.condIndepFun_finset {β : ι → Type*}
    {m : ∀ i, MeasurableSpace (β i)} {f : ∀ i, Ω → β i} (S T : Finset ι) (hST : Disjoint S T)
    (hf_Indep : iCondIndepFun m' hm' m f μ) (hf_meas : ∀ i, Measurable (f i)) :
    CondIndepFun m' hm' (fun a (i : S) => f i a) (fun a (i : T) => f i a) μ

(hf_Indep : ProbabilityTheory.iCondIndepFun m' hm' m f μ)

ProbabilityTheory.CondIndepFun m' hm' (fun a i => f (↑i) a) (fun a i => f (↑i) a) μ


@[simp]
lemma preOneHypercover_sieve₀ : S.preOneHypercover.sieve₀ = S.1

{J : CategoryTheory.GrothendieckTopology C}


/--
`P` is local at the target if
1. `P` respects isomorphisms.
2. If `P` holds for `f : X ⟶ Y`, then `P` holds for `f ∣_ U` for any `U`.
3. If `P` holds for `f ∣_ U` for an open cover `U` of `Y`, then `P` holds for `f`.
-/
protected lemma mk' {P : MorphismProperty Scheme} [P.RespectsIso]
    (restrict : ∀ {X Y : Scheme} (f : X ⟶ Y) (U : Y.Opens), P f → P (f ∣_ U))
    (of_sSup_eq_top :
      ∀ {X Y : Scheme.{u}} (f : X ⟶ Y) {ι : Type u} (U : ι → Y.Opens), iSup U = ⊤ →
        (∀ i, P (f ∣_ U i)) → P f) :
    IsLocalAtTarget P

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

(restrict : ∀ {X Y : AlgebraicGeometry.Scheme} (f : X ⟶ Y) (U : Y.Opens), P f → P (f ∣_ U))

(of_sSup_eq_top :
  ∀ {X Y : AlgebraicGeometry.Scheme} (f : X ⟶ Y) {ι : Type u} (U : ι → Y.Opens),
    iSup U = ⊤ → (∀ (i : ι), P (f ∣_ U i)) → P f)


theorem lt_lim {f : CauSeq α abs} {x : α} (h : CauSeq.const abs x < f) : x < lim f

{α : Type u_1}
[LinearOrderedField α]
[CauSeq.IsComplete α abs]
{f : CauSeq α abs}
{x : α}
(h : CauSeq.const abs x < f)


theorem chain'_map (f : β → α) {l : List β} :
    Chain' R (map f l) ↔ Chain' (fun a b : β => R (f a) (f b)) l

{α : Type u}
{β : Type v}
{R : α → α → Prop}
(f : β → α)
{l : List β}

List.Chain' R (List.map f l) ↔ List.Chain' (fun a b => R (f a) (f b)) l


lemma tendsto_apprSeq :
    Tendsto (fun n : ℕ ↦ (fun x ↦ hF.apprSeq n x)) atTop (𝓝 (indicator F fun _ ↦ (1 : ℝ≥0)))

{X : Type u_1}
[TopologicalSpace X]
[HasOuterApproxClosed X]
{F : Set X}
(hF : IsClosed F)

Filter.Tendsto (fun n x => (hF.apprSeq n) x) Filter.atTop (𝓝 (F.indicator fun x => 1))


lemma setIntegral_tilted [SFinite μ] (f : α → ℝ) (g : α → E) (s : Set α) :
    ∫ x in s, g x ∂(μ.tilted f) = ∫ x in s, (exp (f x) / ∫ x, exp (f x) ∂μ) • (g x) ∂μ

{α : Type u_1}
{mα : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasureTheory.SFinite μ]
(f : α → ℝ)
(g : α → E)
(s : Set α)

∫ (x : α) in s, g x ∂μ.tilted f = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ


theorem ringEquivOfRingEquiv_mk' {j : R ≃+* P} (H : M.map j.toMonoidHom = T) (x : R) (y : M) :
    ringEquivOfRingEquiv S Q j H (mk' S x y) =
      mk' Q (j x) ⟨j y, show j y ∈ T from H ▸ Set.mem_image_of_mem j y.2⟩

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
{T : Submonoid P}
{Q : Type u_4}
[CommSemiring Q]
[Algebra P Q]
[IsLocalization T Q]
{j : R ≃+* P}
(H : Submonoid.map j.toMonoidHom M = T)
(x : R)
(y : ↥M)

(IsLocalization.ringEquivOfRingEquiv S Q j H) (IsLocalization.mk' S x y) = IsLocalization.mk' Q (j x) ⟨j ↑y, ⋯⟩


/-- The images of disjoint lists under a partially defined map are disjoint -/
theorem disjoint_pmap {p : α → Prop} {f : ∀ a : α, p a → β} {s t : List α}
    (hs : ∀ a ∈ s, p a) (ht : ∀ a ∈ t, p a)
    (hf : ∀ (a a' : α) (ha : p a) (ha' : p a'), f a ha = f a' ha' → a = a')
    (h : Disjoint s t) :
    Disjoint (s.pmap f hs) (t.pmap f ht)

(List.pmap f s hs).Disjoint (List.pmap f t ht)


theorem closure_image_subset (hf : IsClosedMap f) (s : Set X) :
    closure (f '' s) ⊆ f '' closure s

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


theorem re_ofReal_mul (r : ℝ) (z : ℂ) : (r * z).re = r * z.re


@[simp]
theorem toDualBotEquiv_symm_top [LE α] : WithTop.toDualBotEquiv.symm (⊤ : (WithBot α)ᵒᵈ) = ⊤


/-- Precomposing `f` with `Prod.snd` is `C^n` at `x : E × F` -/
theorem ContDiffAt.snd'' {f : F → G} {x : E × F} (hf : ContDiffAt 𝕜 n f x.2) :
    ContDiffAt 𝕜 n (fun x : E × F => f x.2) 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]
{n : ℕ∞}
{f : F → G}
{x : E × F}
(hf : ContDiffAt 𝕜 n f x.2)


@[to_additive]
theorem mulETransformLeft.fst_mul_snd_subset :
    (mulETransformLeft e x).1 * (mulETransformLeft e x).2 ⊆ x.1 * x.2

{α : Type u_1}
[DecidableEq α]
[AddGroup α]
(e : α)
(x : Finset α × Finset α)

(Finset.addETransformLeft e x).1 + (Finset.addETransformLeft e x).2 ⊆ x.1 + x.2


theorem Separable.injective_of_prod_X_sub_C [Nontrivial R] {ι : Sort _} [Fintype ι] {f : ι → R}
    (hfs : (∏ i, (X - C (f i))).Separable) : Function.Injective f

(hfs : (∏ i : ι, (Polynomial.X - Polynomial.C (f i))).Separable)


@[to_additive]
theorem mul_finprod_cond_ne (a : α) (hf : (mulSupport f).Finite) :
    (f a * ∏ᶠ (i) (_ : i ≠ a), f i) = ∏ᶠ i, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
(a : α)
(hf : (Function.support f).Finite)

f a + ∑ᶠ (i : α) (_ : i ≠ a), f i = ∑ᶠ (i : α), f i


theorem Decidable.not_iff_iff_and_not_or_not_and [Decidable a] [Decidable b] :
    (¬ (a ↔ b)) ↔ (a ∧ ¬ b) ∨ ((¬ a) ∧ b)

{a b : Prop}
[Decidable a]
[Decidable b]

¬(a ↔ b) ↔ a ∧ ¬b ∨ ¬a ∧ b


@[to_additive]
theorem _root_.Finset.periodic_prod [Add α] [CommMonoid β] {ι : Type*} {f : ι → α → β}
    (s : Finset ι) (hs : ∀ i ∈ s, Periodic (f i) c) : Periodic (∏ i ∈ s, f i) c

{f : ι → α → β}

(hs : ∀ i ∈ s, Function.Periodic (f i) c)


@[to_additive (attr := simp)]
lemma sup'_one [SemilatticeSup β] (f : α → β) : sup' 1 one_nonempty f = f 1

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


@[to_additive (attr := simp)]
theorem map_smul : map (c • ·) μ = μ

[MeasureTheory.SMulInvariantMeasure M α μ]

MeasureTheory.Measure.map (fun x => c • x) μ = μ


@[simp]
theorem getElem_zipWith {f : α → β → γ} {l : List α} {l' : List β}
    {i : Nat} {h : i < (zipWith f l l').length} :
    (zipWith f l l')[i] =
      f (l[i]'(lt_length_left_of_zipWith h))
        (l'[i]'(lt_length_right_of_zipWith h))

{α : Type u}
{β : Type u_1}
{γ : Type u_2}
{f : α → β → γ}
{l : List α}
{l' : List β}
{i : ℕ}
{h : i < (List.zipWith f l l').length}


/-- The birational order isomorphism between `ℝ≥0∞` and the unit interval `Set.Iic (1 : ℝ≥0∞)`. -/
@[simps! apply_coe]
def orderIsoIicOneBirational : ℝ≥0∞ ≃o Iic (1 : ℝ≥0∞)

↑(ENNReal.orderIsoIicOneBirational x) = (x⁻¹ + 1)⁻¹


lemma integrable_prod {f : α → E × F} :
    Integrable f μ ↔ Integrable (fun x ↦ (f x).1) μ ∧ Integrable (fun x ↦ (f x).2) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_5}
{F : Type u_6}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f : α → E × F}

MeasureTheory.Integrable f μ ↔
  MeasureTheory.Integrable (fun x => (f x).1) μ ∧ MeasureTheory.Integrable (fun x => (f x).2) μ


@[simp]
lemma equivShrink_symm_neg [Neg α] [Small α] (x : Shrink α) :
    (equivShrink α).symm (-x) = -(equivShrink α).symm x

{α : Type u_1}
[Neg α]
[Small.{u_2, u_1} α]
(x : Shrink.{u_2, u_1} α)


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


theorem nullMeasurableSet_eq_fun {E} [MeasurableSpace E] [AddGroup E] [MeasurableSingletonClass E]
    [MeasurableSub₂ E] {f g : α → E} (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) :
    NullMeasurableSet { x | f x = g x } μ

{α : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_4}
[MeasurableSpace E]
[AddGroup E]
[MeasurableSingletonClass E]
[MeasurableSub₂ E]
{f g : α → E}
(hf : AEMeasurable f μ)
(hg : AEMeasurable g μ)

MeasureTheory.NullMeasurableSet {x | f x = g x} μ


@[simp] lemma mul_den_eq_num (q : ℚ) : q * q.den = q.num


@[to_additive]
theorem nhds_hasBasis (B : GroupFilterBasis G) (x₀ : G) :
    HasBasis (@nhds G B.topology x₀) (fun V : Set G ↦ V ∈ B) fun V ↦ (fun y ↦ x₀ * y) '' V

{G : Type u}
[AddGroup G]
(B : AddGroupFilterBasis G)
(x₀ : G)

(𝓝 x₀).HasBasis (fun V => V ∈ B) fun V => (fun y => x₀ + y) '' V


theorem div_le_one (hb : 0 < b) : a / b ≤ 1 ↔ a ≤ b

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


protected theorem sum_mem {ι : Type w} {t : Finset ι} {f : ι → A} (h : ∀ x ∈ t, f x ∈ S) :
    (∑ x ∈ t, f x) ∈ S

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)
{ι : Type w}
{t : Finset ι}
{f : ι → A}
(h : ∀ x ∈ t, f x ∈ S)


@[gcongr]
protected theorem div_le_div {a b c d : ℕ} (h1 : a ≤ b) (h2 : d ≤ c) (h3 : d ≠ 0) : a / c ≤ b / d


/-- The inclusion of a subset is 1-Lipschitz. -/
protected theorem subtype_val (s : Set α) : LipschitzWith 1 (Subtype.val : s → α)

{α : Type u}
[PseudoEMetricSpace α]
(s : Set α)


theorem list_map {f : α → List β} {g : α → β → σ} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec fun a => (f a).map (g a)

{α : Type u_1}
{β : Type u_2}
{σ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : α → List β}
{g : α → β → σ}
(hf : Primrec f)
(hg : Primrec₂ g)


@[to_additive]
lemma Multipliable.of_nat_of_neg {f : ℤ → G} (hf₁ : Multipliable fun n : ℕ ↦ f n)
    (hf₂ : Multipliable fun n : ℕ ↦ f (-n)) : Multipliable f

{G : Type u_2}
[CommGroup G]
[TopologicalSpace G]
[TopologicalGroup G]
{f : ℤ → G}
(hf₁ : Multipliable fun n => f ↑n)
(hf₂ : Multipliable fun n => f (-↑n))


theorem solution_spec' {a₁ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (a₂ : 𝕎 k) :
    solution p a₁ a₂ ^ p * a₁.coeff 0 = solution p a₁ a₂ * a₂.coeff 0

(p : ℕ)
[hp : Fact (Nat.Prime p)]
{k : Type u_1}
[Field k]
[IsAlgClosed k]
{a₁ : WittVector p k}
(ha₁ : a₁.coeff 0 ≠ 0)
(a₂ : WittVector p k)

WittVector.RecursionBase.solution p a₁ a₂ ^ p * a₁.coeff 0 = WittVector.RecursionBase.solution p a₁ a₂ * a₂.coeff 0


/-- **Lagrange's Theorem**: The order of a subgroup divides the order of its ambient group. -/
@[to_additive "**Lagrange's Theorem**: The order of an additive subgroup divides the order of its
 ambient additive group."]
theorem card_subgroup_dvd_card (s : Subgroup α) : Nat.card s ∣ Nat.card α

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


/-- There exist two lists of `TransvectionStruct` such that multiplying by them on the left and
on the right makes a matrix block-diagonal. -/
theorem exists_isTwoBlockDiagonal_list_transvec_mul_mul_list_transvec
    (M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜) :
    ∃ L L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜),
      IsTwoBlockDiagonal ((L.map toMatrix).prod * M * (L'.map toMatrix).prod)

∃ L L',
  ((List.map Matrix.TransvectionStruct.toMatrix L).prod * M *
      (List.map Matrix.TransvectionStruct.toMatrix L').prod).IsTwoBlockDiagonal


theorem _root_.MeasureTheory.Integrable.integral_norm_condDistrib_map
    (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
    Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂condDistrib Y X μ x) (μ.map X)

(hf_int : MeasureTheory.Integrable f (MeasureTheory.Measure.map (fun a => (X a, Y a)) μ))

MeasureTheory.Integrable (fun x => ∫ (y : Ω), ‖f (x, y)‖ ∂(ProbabilityTheory.condDistrib Y X μ) x)
  (MeasureTheory.Measure.map X μ)


@[to_additive (attr := simp) toProd_nsmul]
theorem toProd_pow : (s ^ n).toProd = s.toProd ^ n

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

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


@[simp]
theorem mem_Ioc : x ∈ Ioc a b ↔ a < x ∧ x ≤ b

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


@[to_additive (attr := mono)]
theorem mul_subset_mul : s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ * t₁ ⊆ s₂ * t₂

{α : Type u_2}
[DecidableEq α]
[Mul α]
{s₁ s₂ t₁ t₂ : Finset α}

s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ * t₁ ⊆ s₂ * t₂


@[simp]
theorem mem_inf {μ ν : YoungDiagram} {x : ℕ × ℕ} : x ∈ μ ⊓ ν ↔ x ∈ μ ∧ x ∈ ν

x ∈ μ ⊓ ν ↔ x ∈ μ ∧ x ∈ ν


@[to_additive]
theorem comap_equiv_eq_map_symm (f : N ≃* G) (K : Subgroup G) :
    K.comap (G := N) f = K.map f.symm

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : N ≃* G)
(K : Subgroup G)

Subgroup.comap (↑f) K = Subgroup.map (↑f.symm) K


/-- The typeclass `SecondCountableTopologyEither α β` registers the fact that at least one of
the two spaces has second countable topology. This is the right assumption to ensure that continuous
maps from `α` to `β` are strongly measurable. -/
class SecondCountableTopologyEither (α β : Type*) [TopologicalSpace α] [TopologicalSpace β] :
  Prop where
  /-- The projection out of `SecondCountableTopologyEither` -/
  out : SecondCountableTopology α ∨ SecondCountableTopology β

[self : SecondCountableTopologyEither α β]


@[simp]
theorem cons_mul [Fintype n'] (v : n' → α) (A : Fin m → n' → α) (B : Matrix n' o' α) :
    of (vecCons v A) * B = of (vecCons (v ᵥ* B) (of.symm (of A * B)))

{α : Type u}
{m : ℕ}
{n' : Type uₙ}
{o' : Type uₒ}
[NonUnitalNonAssocSemiring α]
[Fintype n']
(v : n' → α)
(A : Fin m → n' → α)
(B : Matrix n' o' α)

Matrix.of (Matrix.vecCons v A) * B = Matrix.of (Matrix.vecCons (Matrix.vecMul v B) (Matrix.of.symm (Matrix.of A * B)))


/-- Noncommutative version of `Algebra.adjoin_range_eq_range`. -/
theorem _root_.Algebra.adjoin_eq_range_freeAlgebra_lift (s : Set A) :
    Algebra.adjoin R s = (FreeAlgebra.lift R ((↑) : s → A)).range

(R : Type u_1)
[CommSemiring R]
{A : Type u_3}
[Semiring A]
[Algebra R A]
(s : Set A)

Algebra.adjoin R s = ((FreeAlgebra.lift R) Subtype.val).range


@[simp] theorem coe_sInf (S : Set L) : (↑(sInf S) : α) = sInf {(s : α) | s ∈ S}

{α : Type u_1}
[CompleteLattice α]
{L : CompleteSublattice α}
(S : Set ↥L)


theorem measure_union_null (hs : μ s = 0) (ht : μ t = 0) : μ (s ∪ t) = 0

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{s t : Set α}
(hs : μ s = 0)
(ht : μ t = 0)


/-- `x ↦ a / x` as an order-reversing equivalence. -/
@[to_additive (attr := simps!) "`x ↦ a - x` as an order-reversing equivalence."]
def OrderIso.divLeft (a : α) : α ≃o αᵒᵈ

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

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

∀ (a_1 : α), (OrderIso.subLeft a) a_1 = OrderDual.toDual (a - a_1)


lemma mkPostcomp_id (f : S ⟶ T.obj Y) : mkPostcomp f (𝟙 Y) = eqToHom (by aesop_cat)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{S : D}
{Y : C}
{T : CategoryTheory.Functor C D}
(f : S ⟶ T.obj Y)

CategoryTheory.StructuredArrow.mkPostcomp f (CategoryTheory.CategoryStruct.id Y) = CategoryTheory.eqToHom ⋯


@[simp]
theorem map_subtype_range_inclusion {p p' : Submodule R M} (h : p ≤ p') :
    map p'.subtype (range <| inclusion h) = p

{R : Type u_1}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p p' : Submodule R M}
(h : p ≤ p')

Submodule.map p'.subtype (LinearMap.range (Submodule.inclusion h)) = p


lemma closure_subset_closure (M : Matroid α) (h : X ⊆ Y) : M.closure X ⊆ M.closure Y

{α : Type u_2}
{X Y : Set α}
(M : Matroid α)
(h : X ⊆ Y)


/-- Ring homomorphisms preserve addition. -/
protected theorem map_add (f : α →+* β) : ∀ a b, f (a + b) = f a + f b

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β} (f : α →+* β) (a b : α), f (a + b) = f a + f b


theorem cyclotomic_prime_mul_X_sub_one (R : Type*) [Ring R] (p : ℕ) [hn : Fact (Nat.Prime p)] :
    cyclotomic p R * (X - 1) = X ^ p - 1

(R : Type u_1)
[Ring R]
(p : ℕ)
[hn : Fact (Nat.Prime p)]

Polynomial.cyclotomic p R * (Polynomial.X - 1) = Polynomial.X ^ p - 1


@[simp]
protected theorem get_mk (x : F fun i ↦ G i α) : Comp.get (Comp.mk x) = x

{n m : ℕ}
{F : TypeVec.{u} n → Type u_1}
{G : Fin2 n → TypeVec.{u} m → Type u}
{α : TypeVec.{u} m}
(x : F fun i => G i α)


/-- A null set has empty interior. -/
theorem interior_eq_empty_of_null (hs : μ s = 0) : interior s = ∅

{X : Type u_1}
[TopologicalSpace X]
{m : MeasurableSpace X}
{μ : MeasureTheory.Measure X}
[μ.IsOpenPosMeasure]
{s : Set X}
(hs : μ s = 0)


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

{S : Set ℝ}
{f : ℝ → ℝ}
{x y f' : ℝ}
(hfc : ConvexOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hf' : HasDerivAt f f' y)


/-- The functor `AddGroup ⥤ Group` by sending `X ↦ multiplicative Y` and `f ↦ f`.
-/
@[simps]
def toGrp : AddGrp ⥤ Grp

AddGrp.toGrp.obj X = Grp.of (Multiplicative ↑X)


@[simp]
theorem testBit_lxor (m n k) : testBit (Int.xor m n) k = xor (testBit m k) (testBit n k)

(m.xor n).testBit k = xor (m.testBit k) (n.testBit k)


@[to_additive]
theorem snd_one : (1 : NonemptyInterval α).snd = 1


/-- Given a short exact complex `S` in `C` that is short exact (`hS`), this is the
canonical isomorphism between the triangle `hS.singleTriangle` in the derived category
and the triangle attached to the corresponding short exact sequence of cochain complexes
after the application of the single functor. -/
@[simps!]
noncomputable def singleTriangleIso :
    hS.singleTriangle ≅
      triangleOfSES (hS.map_of_exact (HomologicalComplex.single C (ComplexShape.up ℤ) 0))

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[HasDerivedCategory C]
{S : CategoryTheory.ShortComplex C}
(hS : S.ShortExact)

hS.singleTriangleIso.hom.hom₁ = ((DerivedCategory.singleFunctorsPostcompQIso C).hom.hom 0).app S.X₁


/-- `S.normedMk` satisfies `IsQuotient`. -/
theorem isQuotientQuotient (S : AddSubgroup M) : IsQuotient S.normedMk

{M : Type u_1}
[SeminormedAddCommGroup M]
(S : AddSubgroup M)


theorem average_union_mem_segment {f : α → E} {s t : Set α} (hd : AEDisjoint μ s t)
    (ht : NullMeasurableSet t μ) (hsμ : μ s ≠ ∞) (htμ : μ t ≠ ∞) (hfs : IntegrableOn f s μ)
    (hft : IntegrableOn f t μ) :
    ⨍ x in s ∪ t, f x ∂μ ∈ [⨍ x in s, f x ∂μ -[ℝ] ⨍ x in t, f x ∂μ]

(ht : MeasureTheory.NullMeasurableSet t μ)

(hfs : MeasureTheory.IntegrableOn f s μ)

(hft : MeasureTheory.IntegrableOn f t μ)

⨍ (x : α) in s ∪ t, f x ∂μ ∈ [⨍ (x : α) in s, f x ∂μ-[ℝ]⨍ (x : α) in t, f x ∂μ]


theorem neighborSet_subgraphOfAdj_subset {u v w : V} (hvw : G.Adj v w) :
    (G.subgraphOfAdj hvw).neighborSet u ⊆ {v, w}

{V : Type u}
{G : SimpleGraph V}
{u v w : V}
(hvw : G.Adj v w)


lemma reciprocalFactors_even {n : ℕ} (h0 : n ≠ 0) (h2 : Even n) :
    reciprocalFactors n = 3 :: reciprocalFactors (n / 2)

DihedralGroup.reciprocalFactors n = 3 :: DihedralGroup.reciprocalFactors (n / 2)


theorem smoothOn_fst {s : Set (M × N)} : SmoothOn (I.prod J) I Prod.fst s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{s : Set (M × N)}


@[reassoc (attr := simp)]
theorem QInfty_comp_PInfty : (QInfty : K[X] ⟶ _) ≫ PInfty = 0

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X : CategoryTheory.SimplicialObject C}

AlgebraicTopology.DoldKan.QInfty ≫ AlgebraicTopology.DoldKan.PInfty = 0


@[to_additive Filter.Tendsto.norm]
theorem Filter.Tendsto.norm' (h : Tendsto f l (𝓝 a)) : Tendsto (fun x => ‖f x‖) l (𝓝 ‖a‖)

{α : Type u_3}
{E : Type u_6}
[SeminormedGroup E]
{a : E}
{l : Filter α}
{f : α → E}
(h : Filter.Tendsto f l (𝓝 a))

Filter.Tendsto (fun x => ‖f x‖) l (𝓝 ‖a‖)


theorem eq_of_isEqvAux [DecidableEq α] (a b : Array α) (hsz : a.size = b.size) (i : Nat) (hi : i ≤ a.size) (heqv : Array.isEqvAux a b hsz (fun x y => x = y) i) (j : Nat) (low : i ≤ j) (high : j < a.size) : a[j] = b[j]'(hsz ▸ high)

(heqv : a.isEqvAux b hsz (fun x y => decide (x = y)) i = true)


/-- If `I` and `I'` are initial, they are isomorphic. -/
@[simps]
def IsInitial.uniqueUpToIso {I I' : C} (hI : IsInitial I) (hI' : IsInitial I') : I ≅ I'

(hI : CategoryTheory.Limits.IsInitial I)

(hI' : CategoryTheory.Limits.IsInitial I')


protected theorem tsub_lt_iff_right (hb : AddLECancellable b) (hba : b ≤ a) :
    a - b < c ↔ a < c + b

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


@[simp]
theorem image_nontrivial {f : α → β} (hf : f.Injective) : (f '' s).Nontrivial ↔ s.Nontrivial

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


@[simp]
theorem dual_id : BoundedOrderHom.dual (BoundedOrderHom.id α) = BoundedOrderHom.id _

{α : Type u_2}
[Preorder α]
[BoundedOrder α]

BoundedOrderHom.dual (BoundedOrderHom.id α) = BoundedOrderHom.id αᵒᵈ


theorem piecewise_le {δ : α → Type*} [∀ i, Preorder (δ i)] {s : Set α} [∀ j, Decidable (j ∈ s)]
    {f₁ f₂ g : ∀ i, δ i} (h₁ : ∀ i ∈ s, f₁ i ≤ g i) (h₂ : ∀ i ∉ s, f₂ i ≤ g i) :
    s.piecewise f₁ f₂ ≤ g

{α : Type u_1}
{δ : α → Type u_7}
[(i : α) → Preorder (δ i)]
{s : Set α}
[(j : α) → Decidable (j ∈ s)]
{f₁ f₂ g : (i : α) → δ i}
(h₁ : ∀ i ∈ s, f₁ i ≤ g i)
(h₂ : ∀ i ∉ s, f₂ i ≤ g i)


/-- The tensor product expressed as a functor. -/
@[simps]
def tensor : C × C ⥤ C

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

(CategoryTheory.MonoidalCategory.tensor C).map f = CategoryTheory.MonoidalCategory.tensorHom f.1 f.2


theorem mul_sub_mul_div_mul_nonpos_iff (hc : c ≠ 0) (hd : d ≠ 0) :
    (a * d - b * c) / (c * d) ≤ 0 ↔ a / c ≤ b / d

{α : Type u_2}
[LinearOrderedField α]
{a b c d : α}
(hc : c ≠ 0)
(hd : d ≠ 0)


lemma Q_map_eq_of_homotopy {K L : HomologicalComplex C c} {f g : K ⟶ L} (h : Homotopy f g) :
    Q.map f = Q.map g

HomologicalComplexUpToQuasiIso.Q.map f = HomologicalComplexUpToQuasiIso.Q.map g


theorem isPure_iff {s : Semiquot α} : IsPure s ↔ ∃ a, s = pure a


theorem fold_op_rel_iff_or {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∨ r x z)
    {c : β} : r c (s.fold op b f) ↔ r c b ∨ ∃ x ∈ s, r c (f x)

{op : β → β → β}

(hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∨ r x z)

r c (Finset.fold op b f s) ↔ r c b ∨ ∃ x ∈ s, r c (f x)


@[simp]
theorem self_comp_symm (h : α ≃ᵤ β) : (h : α → β) ∘ h.symm = id

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(h : α ≃ᵤ β)


@[simp]
theorem fromLocalizedModule'_mk (m : M) (s : S) :
    fromLocalizedModule' S f (LocalizedModule.mk m s) =
      (IsLocalizedModule.map_units f s).unit⁻¹.val (f m)

{R : Type u_1}
[CommSemiring R]
(S : Submonoid R)
{M : Type u_2}
{M' : Type u_3}
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
(m : M)
(s : ↥S)

IsLocalizedModule.fromLocalizedModule' S f (LocalizedModule.mk m s) = ↑⋯.unit⁻¹ (f m)


theorem Subperm.cons_left {l₁ l₂ : List α} (h : l₁ <+~ l₂) (x : α) (hx : count x l₁ < count x l₂) :
    x :: l₁ <+~ l₂

(hx : List.count x l₁ < List.count x l₂)


/-- If two words correspond to the same element in the free group, then they
have a common maximal reduction. This is the proof that the function that sends
an element of the free group to its maximal reduction is well-defined. -/
@[to_additive "If two words correspond to the same element in the additive free group, then they
  have a common maximal reduction. This is the proof that the function that sends an element of the
  free group to its maximal reduction is well-defined."]
theorem reduce.sound (H : mk L₁ = mk L₂) : reduce L₁ = reduce L₂

(H : FreeAddGroup.mk L₁ = FreeAddGroup.mk L₂)

FreeAddGroup.reduce L₁ = FreeAddGroup.reduce L₂


theorem eq_generateFrom_countableBasis [SecondCountableTopology α] :
    ‹TopologicalSpace α› = generateFrom (countableBasis α)

(α : Type u)
[t : TopologicalSpace α]
[SecondCountableTopology α]

t = TopologicalSpace.generateFrom (TopologicalSpace.countableBasis α)


/-- Push a Coxeter system through a group isomorphism. -/
@[simps]
protected def map (e : W ≃* H) : CoxeterSystem M H

{B : Type u_1}
{W : Type u_3}
{H : Type u_4}
[Group W]
[Group H]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(e : W ≃* H)

(cs.map e).mulEquiv = e.symm.trans cs.mulEquiv


protected theorem IsGreatest.image2 (ha : IsGreatest s a) (hb : IsGreatest t b) :
    IsGreatest (image2 f s t) (f a b)

{f : α → β → γ}

(h₀ : ∀ (b : β), Monotone (Function.swap f b))


theorem norm_le_of_ae_bound [IsFiniteMeasure μ] {f : Lp E p μ} {C : ℝ} (hC : 0 ≤ C)
    (hfC : ∀ᵐ x ∂μ, ‖f x‖ ≤ C) : ‖f‖ ≤ measureUnivNNReal μ ^ p.toReal⁻¹ * C

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[MeasureTheory.IsFiniteMeasure μ]
{f : ↥(MeasureTheory.Lp E p μ)}
{C : ℝ}
(hC : 0 ≤ C)
(hfC : ∀ᵐ (x : α) ∂μ, ‖↑↑f x‖ ≤ C)

‖f‖ ≤ ↑(MeasureTheory.measureUnivNNReal μ) ^ p.toReal⁻¹ * C


theorem le_toNNRat_iff_coe_le' {q : ℚ≥0} (hq : 0 < q) : q ≤ toNNRat p ↔ ↑q ≤ p


@[simp]
lemma LinearEquiv.charpoly_conj (e : M₁ ≃ₗ[R] M₂) (φ : Module.End R M₁) :
    (e.conj φ).charpoly = φ.charpoly

{R : Type u_1}
{M₁ : Type u_3}
{M₂ : Type u_4}
[CommRing R]
[Nontrivial R]
[AddCommGroup M₁]
[Module R M₁]
[Module.Finite R M₁]
[Module.Free R M₁]
[AddCommGroup M₂]
[Module R M₂]
[Module.Finite R M₂]
[Module.Free R M₂]
(e : M₁ ≃ₗ[R] M₂)
(φ : Module.End R M₁)

LinearMap.charpoly (e.conj φ) = LinearMap.charpoly φ


/-- The smallest `S`-submodule that contains all `x ∈ I * y ∈ J`
is also the smallest `R`-submodule that does so. -/
@[simp]
theorem restrictScalars_mul {R S : Type*} [CommSemiring R] [CommSemiring S] [Algebra R S]
    (I J : Ideal S) : (I * J).restrictScalars R = I.restrictScalars R * J.restrictScalars R

{R : Type u_4}
{S : Type u_5}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
(I J : Ideal S)

Submodule.restrictScalars R (I * J) = Submodule.restrictScalars R I * Submodule.restrictScalars R J


theorem isUnit_iff_isIso {C : Type u} [Category.{v} C] {X : C} (f : End X) :
    IsUnit (f : End X) ↔ IsIso f

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


/-- The backward direction of `Comon_ (Mon_ C) ≌ Mon_ (Comon_ C)` -/
@[simps]
def ofMon_Comon_ : Mon_ (Comon_ C) ⥤ Bimon_ C

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

∀ {X Y : Mon_ (Comon_ C)} (f : X ⟶ Y), ((Bimon_.ofMon_Comon_ C).map f).hom = (Comon_.forgetMonoidal C).mapMon.map f


/-- On a metric space `X` with a measure `μ`, consider for each `x : X` a family of measurable sets
with nonempty interiors, called `setsAt x`. This family is a Vitali family if it satisfies the
following property: consider a (possibly non-measurable) set `s`, and for any `x` in `s` a
subfamily `f x` of `setsAt x` containing sets of arbitrarily small diameter. Then one can extract
a disjoint subfamily covering almost all `s`.

Vitali families are provided by covering theorems such as the Besicovitch covering theorem or the
Vitali covering theorem. They make it possible to formulate general versions of theorems on
differentiations of measure that apply in both contexts.
-/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure VitaliFamily {m : MeasurableSpace α} (μ : Measure α) where
  /-- Sets of the family "centered" at a given point. -/
  setsAt :  α → Set (Set α)
  /-- All sets of the family are measurable. -/
  measurableSet : ∀ x : α, ∀ s ∈ setsAt x, MeasurableSet s
  /-- All sets of the family have nonempty interior. -/
  nonempty_interior : ∀ x : α, ∀ s ∈ setsAt x, (interior s).Nonempty
  /-- For any closed ball around `x`, there exists a set of the family contained in this ball. -/
  nontrivial : ∀ (x : α), ∀ ε > (0 : ℝ), ∃ s ∈ setsAt x, s ⊆ closedBall x ε
  /-- Consider a (possibly non-measurable) set `s`,
  and for any `x` in `s` a subfamily `f x` of `setsAt x`
  containing sets of arbitrarily small diameter.
  Then one can extract a disjoint subfamily covering almost all `s`. -/
  covering : ∀ (s : Set α) (f : α → Set (Set α)),
    (∀ x ∈ s, f x ⊆ setsAt x) → (∀ x ∈ s, ∀ ε > (0 : ℝ), ∃ a ∈ f x, a ⊆ closedBall x ε) →
    ∃ t : Set (α × Set α), (∀ p ∈ t, p.1 ∈ s) ∧ (t.PairwiseDisjoint fun p ↦ p.2) ∧
      (∀ p ∈ t, p.2 ∈ f p.1) ∧ μ (s \ ⋃ p ∈ t, p.2) = 0

{α : Type u_1}
[MetricSpace α]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(self : VitaliFamily μ)
(x : α)
(s : Set α)


@[to_additive]
theorem Multipliable.vanishing (hf : Multipliable f) ⦃e : Set G⦄ (he : e ∈ 𝓝 (1 : G)) :
    ∃ s : Finset α, ∀ t, Disjoint t s → (∏ k ∈ t, f k) ∈ e

{α : Type u_1}
{G : Type u_5}
[TopologicalSpace G]
[CommGroup G]
[TopologicalGroup G]
{f : α → G}
(hf : Multipliable f)
⦃e : Set G⦄
(he : e ∈ 𝓝 1)

∃ s, ∀ (t : Finset α), Disjoint t s → ∏ k ∈ t, f k ∈ e


@[simp]
theorem nullHomotopicMap'_f_of_not_rel_right {k₁ k₀ : ι} (r₁₀ : c.Rel k₁ k₀)
    (hk₁ : ∀ l : ι, ¬c.Rel l k₁) (h : ∀ i j, c.Rel j i → (C.X i ⟶ D.X j)) :
    (nullHomotopicMap' h).f k₁ = C.d k₁ k₀ ≫ h k₀ k₁ r₁₀

(h : (i j : ι) → c.Rel j i → (C.X i ⟶ D.X j))

(Homotopy.nullHomotopicMap' h).f k₁ = C.d k₁ k₀ ≫ h k₀ k₁ r₁₀


@[gcongr]
theorem min_mono {s t : Finset α} (st : s ⊆ t) : t.min ≤ s.min

{α : Type u_2}
[LinearOrder α]
{s t : Finset α}
(st : s ⊆ t)


theorem map_map (g : S →+* T) (f : R →+* S) : (s.map f).map g = s.map (g.comp f)

{R : Type u}
{S : Type v}
{T : Type w}
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring T]
(s : Subsemiring R)
(g : S →+* T)
(f : R →+* S)

Subsemiring.map g (Subsemiring.map f s) = Subsemiring.map (g.comp f) s


/-- In the canonical isometric isomorphism between a Hilbert sum `E` of `G` and `lp G 2`,
a vector `w : lp G 2` is the image of the infinite sum of the associated elements in `E`. -/
protected theorem IsHilbertSum.linearIsometryEquiv_symm_apply (hV : IsHilbertSum 𝕜 G V)
    (w : lp G 2) : hV.linearIsometryEquiv.symm w = ∑' i, V i (w i)

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[cplt : CompleteSpace E]
{G : ι → Type u_4}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
{V : (i : ι) → G i →ₗᵢ[𝕜] E}
(hV : IsHilbertSum 𝕜 G V)
(w : ↥(lp G 2))

hV.linearIsometryEquiv.symm w = ∑' (i : ι), (V i) (↑w i)


theorem sin_pi_div_two_sub (x : ℂ) : sin (π / 2 - x) = cos x

Complex.sin (↑Real.pi / 2 - x) = Complex.cos x


theorem destutter_cons_cons :
    (a :: b :: l).destutter R = if R a b then a :: destutter' R b l else destutter' R a l

{α : Type u_1}
(l : List α)
(R : α → α → Prop)
[DecidableRel R]
{a b : α}

List.destutter R (a :: b :: l) = if R a b then a :: List.destutter' R b l else List.destutter' R a l


@[to_additive]
theorem lift_surjective_iff :
    Function.Surjective (f.lift hg) ↔ ∀ v : P, ∃ x : M × S, v * g x.2 = g x.1

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{g : M →+ P}
(hg : ∀ (y : ↥S), IsAddUnit (g ↑y))

Function.Surjective ⇑(f.lift hg) ↔ ∀ (v : P), ∃ x, v + g ↑x.2 = g x.1


@[simp]
theorem toFinsupp_X : X.toFinsupp = Finsupp.single 1 (1 : R)

Polynomial.X.toFinsupp = Finsupp.single 1 1


lemma sSup_le_sSup_iff_of_atoms (hS : BooleanGenerators S) (X Y : Set α) (hX : X ⊆ S) (hY : Y ⊆ S) :
    sSup X ≤ sSup Y ↔ X ⊆ Y

(hS : IsCompactlyGenerated.BooleanGenerators S)


@[to_additive (attr := simp, norm_cast) coe_nonneg]
theorem one_le_coe [LE α] : 1 ≤ (a : WithBot α) ↔ 1 ≤ a

0 ≤ ↑a ↔ 0 ≤ a


@[to_additive add_self_zsmul]
lemma mul_zpow_self (a : G) (n : ℤ) : a ^ n * a = a ^ (n + 1)

{G : Type u_3}
[Group G]
(a : G)
(n : ℤ)


theorem tendsto_atTop_atTop_of_monotone [Preorder α] [Preorder β] {f : α → β} (hf : Monotone f)
    (h : ∀ b, ∃ a, b ≤ f a) : Tendsto f atTop atTop

{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : α → β}
(hf : Monotone f)
(h : ∀ (b : β), ∃ a, b ≤ f a)

Filter.Tendsto f Filter.atTop Filter.atTop


@[simp]
theorem IsOrtho.comap_iff (f : E ≃ₗᵢ[𝕜] F) {U V : Submodule 𝕜 F} : U.comap f ⟂ V.comap f ↔ U ⟂ V

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
(f : E ≃ₗᵢ[𝕜] F)
{U V : Submodule 𝕜 F}

Submodule.comap f U ⟂ Submodule.comap f V ↔ U ⟂ V


/-- An equivalence of Lie algebras is a morphism which is also a linear equivalence. We could
instead define an equivalence to be a morphism which is also a (plain) equivalence. However it is
more convenient to define via linear equivalence to get `.toLinearEquiv` for free. -/
structure LieEquiv (R : Type u) (L : Type v) (L' : Type w) [CommRing R] [LieRing L] [LieAlgebra R L]
  [LieRing L'] [LieAlgebra R L'] extends L →ₗ⁅R⁆ L' where
  /-- The inverse function of an equivalence of Lie algebras -/
  invFun : L' → L
  /-- The inverse function of an equivalence of Lie algebras is a left inverse of the underlying
  function. -/
  left_inv : Function.LeftInverse invFun toLieHom.toFun
  /-- The inverse function of an equivalence of Lie algebras is a right inverse of the underlying
  function. -/
  right_inv : Function.RightInverse invFun toLieHom.toFun

{R : Type u}
{L : Type v}
{L' : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(self : L ≃ₗ⁅R⁆ L')


/-- Linear map version of the map `toMultilinearMap` associating to a continuous alternating map
the corresponding multilinear map. -/
@[simps]
def toContinuousMultilinearMapLinear :
    M [⋀^ι]→L[A] N →ₗ[R] ContinuousMultilinearMap A (fun _ : ι => M) N

{R : Type u_1}
{A : Type u_2}
{M : Type u_3}
{N : Type u_4}
{ι : Type u_5}
[Semiring R]
[Semiring A]
[AddCommMonoid M]
[AddCommMonoid N]
[TopologicalSpace M]
[TopologicalSpace N]
[ContinuousAdd N]
[Module A M]
[Module A N]
[Module R N]
[ContinuousConstSMul R N]
[SMulCommClass A R N]
(self : M [⋀^ι]→L[A] N)

ContinuousAlternatingMap.toContinuousMultilinearMapLinear self = self.toContinuousMultilinearMap


@[simp]
theorem associator_inv_app {F G H : C ⥤ D} {X} :
    ((α_ F G H).inv : F ⊗ G ⊗ H ⟶ (F ⊗ G) ⊗ H).app X = (α_ (F.obj X) (G.obj X) (H.obj X)).inv

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

(α_ F G H).inv.app X = (α_ (F.obj X) (G.obj X) (H.obj X)).inv


/-- When the first map `S.f` is zero, this is the left homology data on `S` given
by any limit kernel fork of `S.g` -/
@[simps]
def ofIsLimitKernelFork (hf : S.f = 0) (c : KernelFork S.g) (hc : IsLimit c) :
    S.LeftHomologyData

(c : CategoryTheory.Limits.KernelFork S.g)

(CategoryTheory.ShortComplex.LeftHomologyData.ofIsLimitKernelFork S hf c hc).K = c.pt


theorem congr_eqRec {β : α → Sort _} (f : (x : α) → β x → γ) (h : x = x') (y : β x) :
  f x' (Eq.rec y h) = f x y

{α : Sort u_1}
{γ : Sort u_2}
{x x' : α}
{β : α → Sort u_3}
(f : (x : α) → β x → γ)
(h : x = x')
(y : β x)


theorem setToFun_zero_left' (hT : DominatedFinMeasAdditive μ T C)
    (h_zero : ∀ s, MeasurableSet s → μ s < ∞ → T s = 0) : setToFun μ T hT f = 0

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(h_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → T s = 0)


/-- See also `Filter.Tendsto.atTop_mul_const_of_neg` for a version of this lemma for
`LinearOrderedField`s which does not require the `Archimedean` assumption. -/
theorem Tendsto.atTop_mul_const_of_neg' (hr : r < 0) (hf : Tendsto f l atTop) :
    Tendsto (fun x => f x * r) l atBot

{α : Type u_1}
{R : Type u_2}
{l : Filter α}
{f : α → R}
{r : R}
[LinearOrderedRing R]
[Archimedean R]
(hr : r < 0)
(hf : Filter.Tendsto f l Filter.atTop)

Filter.Tendsto (fun x => f x * r) l Filter.atBot


theorem Indep.base_of_maximal (hI : M.Indep I) (h : ∀ J, M.Indep J → I ⊆ J → I = J) : M.Base I

(h : ∀ (J : Set α), M.Indep J → I ⊆ J → I = J)


/-- The variation of a function on the union of two sets `s` and `t`, with `s` to the left of `t`,
bounds the sum of the variations along `s` and `t`. -/
theorem add_le_union (f : α → E) {s t : Set α} (h : ∀ x ∈ s, ∀ y ∈ t, x ≤ y) :
    eVariationOn f s + eVariationOn f t ≤ eVariationOn f (s ∪ t)

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
(f : α → E)
{s t : Set α}
(h : ∀ x ∈ s, ∀ y ∈ t, x ≤ y)


@[simp]
lemma tilted_neg_same [IsProbabilityMeasure μ] (hf : Integrable (fun x ↦ exp (f x)) μ) :
    (μ.tilted f).tilted (-f) = μ

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


lemma odd_sub' (h : n ≤ m) : Odd (m - n) ↔ (Odd n ↔ Even m)


/-- Pointwise minimum of two monotone functions is a monotone function. -/
protected theorem min [Preorder α] [LinearOrder β] {f g : α → β} {s : Set α} (hf : MonotoneOn f s)
    (hg : MonotoneOn g s) : MonotoneOn (fun x => min (f x) (g x)) s

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


/-- A subtype of a subtype is equivalent to the subtype of elements satisfying both predicates. -/
@[simps!]
def subtypeSubtypeEquivSubtypeInter {α : Type u} (p q : α → Prop) :
    { x : Subtype p // q x.1 } ≃ Subtype fun x => p x ∧ q x

∀ (a : { x // p x ∧ q x }), ↑↑((Equiv.subtypeSubtypeEquivSubtypeInter p q).symm a) = ↑a


theorem add_thirds (a : α) : a / 3 + a / 3 + a / 3 = a

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


/-- Counterpart to `List.prod_take_succ` when we have an inverse operation -/
@[to_additive (attr := simp)
  "Counterpart to `List.sum_take_succ` when we have a negation operation"]
theorem prod_drop_succ :
    ∀ (L : List G) (i : ℕ) (p), (L.drop (i + 1)).prod = (L.get ⟨i, p⟩)⁻¹ * (L.drop i).prod

{G : Type u_7}
[AddGroup G]
(L : List G)
(i : ℕ)
(p : i < L.length)

(List.drop (i + 1) L).sum = -L.get ⟨i, p⟩ + (List.drop i L).sum


protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f g μ ν)
    (h₂ : IdentDistrib g h ν ρ) : IdentDistrib f h μ ρ

(h₁ : ProbabilityTheory.IdentDistrib f g μ ν)

(h₂ : ProbabilityTheory.IdentDistrib g h ν ρ)


theorem iSup_split (f : β → α) (p : β → Prop) :
    ⨆ i, f i = (⨆ (i) (_ : p i), f i) ⊔ ⨆ (i) (_ : ¬p i), f i

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
(f : β → α)
(p : β → Prop)

⨆ i, f i = (⨆ i, ⨆ (_ : p i), f i) ⊔ ⨆ i, ⨆ (_ : ¬p i), f i


@[simp]
theorem length_sort {s : Multiset α} : (sort r s).length = card s

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

(Multiset.sort r s).length = Multiset.card s


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

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
{H : Subgroup G}
(hH : IsCompact ↑H)


/-- The constant functor sending everything to `PUnit.star`. -/
@[simps!]
def star : C ⥤ Discrete PUnit.{w + 1}

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


@[simp, norm_cast]
theorem coe_neg (x : ℝ) : ↑(-x) = (-x : ℝ*)


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

(X : CategoryTheory.Pretriangulated.Triangle C)

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


@[simp]
theorem imJ_star : (star a).imJ = -a.imJ

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(a : ℍ[R,c₁,c₂])


@[simp]
theorem Real.Angle.arg_expMapCircle (θ : Real.Angle) :
    (arg (Real.Angle.expMapCircle θ) : Real.Angle) = θ


@[to_additive]
theorem continuous_val : Continuous ((↑) : Mˣ → M)

{M : Type u_1}
[TopologicalSpace M]
[Monoid M]


/-- The square of `J(a | b)` is `1` when `a` and `b` are coprime. -/
theorem sq_one {a : ℤ} {b : ℕ} (h : a.gcd b = 1) : J(a | b) ^ 2 = 1


@[to_additive]
theorem smul_Lp_sub (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f - g) = c • f - c • g

[MeasureTheory.SMulInvariantMeasure M α μ]


lemma fermatLastTheoremFor_iff_nat {n : ℕ} : FermatLastTheoremFor n ↔ FermatLastTheoremWith ℕ n


theorem mk'_mul_coeIdeal_eq_coeIdeal {I J : Ideal R₁} {x y : R₁} (hy : y ∈ R₁⁰) :
    spanSingleton R₁⁰ (IsLocalization.mk' K x ⟨y, hy⟩) * I = (J : FractionalIdeal R₁⁰ K) ↔
      Ideal.span {x} * I = Ideal.span {y} * J

{R₁ : Type u_3}
[CommRing R₁]
(K : Type u_4)
[Field K]
[Algebra R₁ K]
[IsFractionRing R₁ K]
{I J : Ideal R₁}
{x y : R₁}
(hy : y ∈ R₁⁰)

FractionalIdeal.spanSingleton R₁⁰ (IsLocalization.mk' K x ⟨y, hy⟩) * ↑I = ↑J ↔ Ideal.span {x} * I = Ideal.span {y} * J


/-- **Church-Rosser theorem** for word reduction: If `w1 w2 w3` are words such that `w1` reduces
to `w2` and `w3` respectively, then there is a word `w4` such that `w2` and `w3` reduce to `w4`
respectively. This is also known as Newman's diamond lemma. -/
@[to_additive
  "**Church-Rosser theorem** for word reduction: If `w1 w2 w3` are words such that `w1` reduces
  to `w2` and `w3` respectively, then there is a word `w4` such that `w2` and `w3` reduce to `w4`
  respectively. This is also known as Newman's diamond lemma."]
theorem church_rosser : Red L₁ L₂ → Red L₁ L₃ → Join Red L₂ L₃

{α : Type u}
{L₁ L₂ L₃ : List (α × Bool)}

FreeGroup.Red L₁ L₂ → FreeGroup.Red L₁ L₃ → Relation.Join FreeGroup.Red L₂ L₃


@[simp]
protected theorem extractLsb_ofFin {n} (x : Fin (2^n)) (hi lo : Nat) :
  extractLsb hi lo (@BitVec.ofFin n x) = .ofNat (hi-lo+1) (x.val >>> lo)

{n : Nat}
(x : Fin (2 ^ n))
(hi lo : Nat)

BitVec.extractLsb hi lo { toFin := x } = BitVec.ofNat (hi - lo + 1) (↑x >>> lo)


/-- When every element of a set `s` is bounded by an element of a set `t`, and conversely, then
`s` and `t` have the same supremum. This holds even when the sets may be empty or unbounded. -/
theorem csSup_eq_csSup_of_forall_exists_le {s t : Set α}
    (hs : ∀ x ∈ s, ∃ y ∈ t, x ≤ y) (ht : ∀ y ∈ t, ∃ x ∈ s, y ≤ x) :
    sSup s = sSup t

{α : Type u_1}
[ConditionallyCompleteLinearOrder α]
{s t : Set α}
(hs : ∀ x ∈ s, ∃ y ∈ t, x ≤ y)
(ht : ∀ y ∈ t, ∃ x ∈ s, y ≤ x)


theorem MonotoneOn.map_min (hf : MonotoneOn f s) (ha : a ∈ s) (hb : b ∈ s) : f (min a b) =
    min (f a) (f b)

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


theorem analyticSet_range_of_polishSpace {β : Type*} [TopologicalSpace β] [PolishSpace β]
    {f : β → α} (f_cont : Continuous f) : AnalyticSet (range f)

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_3}
[TopologicalSpace β]
[PolishSpace β]
{f : β → α}
(f_cont : Continuous f)


@[simp] theorem iff_self_or (a b : Prop) : (a ↔ a ∨ b) ↔ (b → a)


/-- If a function `f` is continuous on a convex set `D ⊆ ℝ` and `f''` is strictly negative on the
interior, then `f` is strictly concave on `D`.
Note that we don't require twice differentiability explicitly as it already implied by the second
derivative being strictly negative, except at at most one point. -/
theorem strictConcaveOn_of_deriv2_neg {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ}
    (hf : ContinuousOn f D) (hf'' : ∀ x ∈ interior D, deriv^[2] f x < 0) :
    StrictConcaveOn ℝ D f


theorem hasDerivWithinAt : HasDerivWithinAt f (f.linear 1) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(f : 𝕜 →ᵃ[𝕜] E)
{s : Set 𝕜}
{x : 𝕜}


@[simp]
theorem closure_univ : closure (univ : Set X) = univ


/-- The minimal distance to the empty set is 0 (if you want to have the more reasonable
value `∞` instead, use `EMetric.infEdist`, which takes values in `ℝ≥0∞`) -/
@[simp]
theorem infDist_empty : infDist x ∅ = 0

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


@[simp]
theorem coe_inv : ↑ₘA⁻¹ = adjugate A

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(A : Matrix.SpecialLinearGroup n R)


theorem reflectsMonomorphisms.of_iso {F G : C ⥤ D} [ReflectsMonomorphisms F] (α : F ≅ G) :
    ReflectsMonomorphisms G

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


@[to_additive (attr := simp)]
theorem mulSupport_one : (mulSupport fun _ : α => (1 : M)) = ∅


theorem toPOUFun_eq_mul_prod (i : ι) (x : X) (t : Finset ι)
    (ht : ∀ j, WellOrderingRel j i → f j x ≠ 0 → j ∈ t) :
    f.toPOUFun i x = f i x * ∏ j ∈ t.filter fun j => WellOrderingRel j i, (1 - f j x)

(ht : ∀ (j : ι), WellOrderingRel j i → (f j) x ≠ 0 → j ∈ t)

f.toPOUFun i x = (f i) x * ∏ j ∈ Finset.filter (fun j => WellOrderingRel j i) t, (1 - (f j) x)


lemma RightTotal.rel_forall (h : RightTotal R) :
    ((R ⇒ (· → ·)) ⇒ (· → ·)) (fun p => ∀i, p i) (fun q => ∀i, q i)

{α : Type u₁}
{β : Type u₂}
{R : α → β → Prop}
(h : Relator.RightTotal R)

((R ⇒ fun x x_1 => x → x_1) ⇒ fun x x_1 => x → x_1) (fun p => (i : α) → p i) fun q => ∀ (i : β), q i


theorem _root_.Relator.LeftUnique.forall₂ (hr : LeftUnique R) : LeftUnique (Forall₂ R)

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
(hr : Relator.LeftUnique R)


@[to_additive (attr := simp)]
theorem map_one (f : α → β) : f <$> (1 : FreeGroup α) = 1


theorem eq_none_iff {o : Part α} : o = none ↔ ∀ a, a ∉ o


theorem Finset.card_eq_of_equiv_fintype {s : Finset α} [Fintype β] (i : s ≃ β) :
    s.card = Fintype.card β

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
[Fintype β]
(i : { x // x ∈ s } ≃ β)


@[simp]
theorem xa_pow_four (i : ZMod (2 * n)) : xa i ^ 4 = 1


/-- The functor which sends a functor to types to its sections. -/
@[simps]
def sectionsFunctor : (J ⥤ Type w) ⥤ Type max u w

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

(CategoryTheory.Functor.sectionsFunctor J).obj F = ↑F.sections


@[simp]
theorem inclusion_inclusion {S T U : Subalgebra R A} (hst : S ≤ T) (htu : T ≤ U) (x : S) :
    inclusion htu (inclusion hst x) = inclusion (le_trans hst htu) x

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{S T U : Subalgebra R A}
(hst : S ≤ T)
(htu : T ≤ U)
(x : ↥S)

(Subalgebra.inclusion htu) ((Subalgebra.inclusion hst) x) = (Subalgebra.inclusion ⋯) x


/-- Turán-maximality with `0 < r` transfers across graph isomorphisms. -/
theorem IsTuranMaximal.iso {W : Type*} [Fintype W] [DecidableEq W] {H : SimpleGraph W}
    [DecidableRel H.Adj] (h : G.IsTuranMaximal r) (f : G ≃g H) (hr : 0 < r) : H.IsTuranMaximal r

{V : Type u_1}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{r : ℕ}
{W : Type u_2}
[Fintype W]
[DecidableEq W]
{H : SimpleGraph W}
[DecidableRel H.Adj]
(h : G.IsTuranMaximal r)
(f : G ≃g H)
(hr : 0 < r)


@[simp]
theorem map_sub [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x y : M₁ i) :
    f (update m i (x - y)) = f (update m i x) - f (update m i y)

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommGroup (M₁ i)]
[AddCommGroup M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(f : MultilinearMap R M₁ M₂)
[DecidableEq ι]
(m : (i : ι) → M₁ i)
(i : ι)
(x y : M₁ i)

f (Function.update m i (x - y)) = f (Function.update m i x) - f (Function.update m i y)


theorem rcomap'_sets (r : Rel α β) (f : Filter β) :
    (rcomap' r f).sets = Rel.image (fun s t => r.preimage s ⊆ t) f.sets

{α : Type u}
{β : Type v}
(r : Rel α β)
(f : Filter β)

(Filter.rcomap' r f).sets = Rel.image (fun s t => r.preimage s ⊆ t) f.sets


theorem isBounded_of_image2_right {f : α → β → γ} {K₂ : ℝ≥0} (hf : ∀ a, AntilipschitzWith K₂ (f a))
    {s : Set α} {t : Set β} (hst : IsBounded (Set.image2 f s t)) : IsBounded s ∨ IsBounded t

{f : α → β → γ}

(hf : ∀ (a : α), AntilipschitzWith K₂ (f a))

(hst : Bornology.IsBounded (Set.image2 f s t))

Bornology.IsBounded s ∨ Bornology.IsBounded t


@[ext high]
theorem ext_to_ring (f g : A →ₗc[R] R) : f = g

{R : Type u}
(A : Type v)
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Coalgebra R A]
(f g : A →ₗc[R] R)


theorem comap_le_comap_smul (fₗ : N →ₗ[R] N₂) (c : R) : comap fₗ qₗ ≤ comap (c • fₗ) qₗ

{R : Type u_1}
{N : Type u_9}
{N₂ : Type u_10}
[CommSemiring R]
[AddCommMonoid N]
[AddCommMonoid N₂]
[Module R N]
[Module R N₂]
(qₗ : Submodule R N₂)
(fₗ : N →ₗ[R] N₂)
(c : R)

Submodule.comap fₗ qₗ ≤ Submodule.comap (c • fₗ) qₗ


@[simp]
theorem nhdsSet_insert (x : X) (s : Set X) : 𝓝ˢ (insert x s) = 𝓝 x ⊔ 𝓝ˢ s

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


theorem count_coe_nonneg (J : Ideal R) : 0 ≤ count K v J

(v : IsDedekindDomain.HeightOneSpectrum R)


protected theorem isLocalHomeomorphOn (hf : IsCoveringMapOn f s) :
    IsLocalHomeomorphOn f (f ⁻¹' s)

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


@[simp]
theorem finInsepDegree_bot : finInsepDegree F (⊥ : IntermediateField F E) = 1

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


theorem hext {X Y : PresheafedSpace C} (α β : Hom X Y) (w : α.base = β.base) (h : HEq α.c β.c) :
    α = β

{X Y : AlgebraicGeometry.PresheafedSpace C}


/-- The functorial action of `X ⊗ Y` in `Dial C`. -/
@[simps] def tensorHom {X₁ X₂ Y₁ Y₂ : Dial C} (f : X₁ ⟶ X₂) (g : Y₁ ⟶ Y₂) :
    tensorObj X₁ Y₁ ⟶ tensorObj X₂ Y₂

(CategoryTheory.Dial.tensorHom f g).F =
  CategoryTheory.Limits.prod.lift
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Limits.prod.map CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.fst) f.F)
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Limits.prod.map CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.snd) g.F)


@[simp] theorem mem_sigma_iff : x ∈ s.sigma t ↔ x.1 ∈ s ∧ x.2 ∈ t x.1

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

x ∈ s.sigma t ↔ x.fst ∈ s ∧ x.snd ∈ t x.fst


/-- If a `Finset` of a subtype is converted to the main type with
`Embedding.subtype`, the result is a subset of the set giving the
subtype. -/
theorem map_subtype_subset {t : Set α} (s : Finset t) : ↑(s.map (Embedding.subtype _)) ⊆ t

{α : Type u_1}
{t : Set α}
(s : Finset ↑t)

↑(Finset.map (Function.Embedding.subtype fun x => x ∈ t) s) ⊆ t


@[simp]
theorem innerDualCone_empty : (∅ : Set H).innerDualCone = ⊤

{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace ℝ H]


@[simp]
theorem coe_srange : (srange f : Set S) = Set.range f

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

↑(NonUnitalRingHom.srange f) = Set.range ⇑f


/-- For a function on a convex set in a linearly ordered space (where the order and the algebraic
structures aren't necessarily compatible), in order to prove that it is strictly concave it suffices
to verify the inequality `a • f x + b • f y < f (a • x + b • y)` for `x < y` and positive `a`, `b`.
The main use case is `E = 𝕜` however one can apply it, e.g., to `𝕜^n` with lexicographic order. -/
theorem LinearOrder.strictConcaveOn_of_lt (hs : Convex 𝕜 s)
    (hf : ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → x < y → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 →
      a • f x + b • f y < f (a • x + b • y)) :
    StrictConcaveOn 𝕜 s f

(hf :
  ∀ ⦃x : E⦄,
    x ∈ s → ∀ ⦃y : E⦄, y ∈ s → x < y → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • f x + b • f y < f (a • x + b • y))


theorem CliqueFree.mono (h : m ≤ n) : G.CliqueFree m → G.CliqueFree n

{α : Type u_1}
{G : SimpleGraph α}
{m n : ℕ}
(h : m ≤ n)


theorem uniformity_prod [UniformSpace α] [UniformSpace β] :
    𝓤 (α × β) =
      ((𝓤 α).comap fun p : (α × β) × α × β => (p.1.1, p.2.1)) ⊓
        (𝓤 β).comap fun p : (α × β) × α × β => (p.1.2, p.2.2)

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[UniformSpace β]

𝓤 (α × β) = Filter.comap (fun p => (p.1.1, p.2.1)) (𝓤 α) ⊓ Filter.comap (fun p => (p.1.2, p.2.2)) (𝓤 β)


@[simp]
theorem irrational_rat_sub_iff : Irrational (q - x) ↔ Irrational x


theorem cos_lt_cos_of_nonneg_of_le_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y ≤ π / 2)
    (hxy : x < y) : cos y < cos x

{x y : ℝ}
(hx₁ : 0 ≤ x)
(hy₂ : y ≤ Real.pi / 2)
(hxy : x < y)


theorem eq_or_mem_of_mem_insert {l : List α} (h : a ∈ l.insert b) : a = b ∨ a ∈ l

{α : Type u_1}
[BEq α]
[LawfulBEq α]
{a b : α}
{l : List α}
(h : a ∈ List.insert b l)


/-- Shortcut lemma for `Matrix.toLin'_mul` and `LinearMap.comp_apply` -/
theorem Matrix.toLin'_mul_apply [Fintype m] [DecidableEq m] (M : Matrix l m R) (N : Matrix m n R)
    (x) : Matrix.toLin' (M * N) x = Matrix.toLin' M (Matrix.toLin' N x)

{R : Type u_1}
[CommSemiring R]
{l : Type u_3}
{m : Type u_4}
{n : Type u_5}
[DecidableEq n]
[Fintype n]
[Fintype m]
[DecidableEq m]
(M : Matrix l m R)
(N : Matrix m n R)
(x : n → R)

(Matrix.toLin' (M * N)) x = (Matrix.toLin' M) ((Matrix.toLin' N) x)


@[simp]
theorem withDensity_zero : μ.withDensity 0 = 0

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}


@[simp]
theorem sup_sum {α : Type u} {β : Type v} (f : α ⊕ β → Ordinal) :
    sup.{max u v, w} f =
      max (sup.{u, max v w} fun a => f (Sum.inl a)) (sup.{v, max u w} fun b => f (Sum.inr b))

{α : Type u}
{β : Type v}
(f : α ⊕ β → Ordinal.{max (max u v) w})

Ordinal.sup f = max (Ordinal.sup fun a => f (Sum.inl a)) (Ordinal.sup fun b => f (Sum.inr b))


/-- If `x` is almost a root of `P` in the sense that `P(x)` is nilpotent (and `P'(x)` is a
unit) then we may write `x` as a sum `x = n + r` where `n` is nilpotent and `r` is a root of `P`.
Moreover, `n` and `r` are unique.

This can be used to prove the Jordan-Chevalley decomposition of linear endomorphims. -/
theorem exists_unique_nilpotent_sub_and_aeval_eq_zero
    (h : IsNilpotent (aeval x P)) (h' : IsUnit (aeval x <| derivative P)) :
    ∃! r, IsNilpotent (x - r) ∧ aeval r P = 0

(h : IsNilpotent ((Polynomial.aeval x) P))

(h' : IsUnit ((Polynomial.aeval x) (Polynomial.derivative P)))

∃! r, IsNilpotent (x - r) ∧ (Polynomial.aeval r) P = 0


@[simp] theorem ForInStep.run_yield : (ForInStep.yield a).run = a

∀ {α : Type u_1} {a : α}, (ForInStep.yield a).run = a


@[simp]
theorem le_symmDiff_iff_right : b ≤ a ∆ b ↔ Disjoint a b

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


/-- Composition of morphisms of `Bipointed`. -/
@[simps]
def comp {X Y Z : Bipointed.{u}} (f : Bipointed.Hom X Y) (g : Bipointed.Hom Y Z) :
    Bipointed.Hom X Z

{X Y Z : Bipointed}
(f : X.Hom Y)
(g : Y.Hom Z)

∀ (a : X.X), (f.comp g).toFun a = (g.toFun ∘ f.toFun) a


@[to_additive (attr := ext)]
theorem CancelMonoid.ext {M : Type*} ⦃m₁ m₂ : CancelMonoid M⦄
    (h_mul : (letI := m₁; HMul.hMul : M → M → M) = (letI := m₂; HMul.hMul : M → M → M)) :
    m₁ = m₂

{M : Type u_1}
⦃m₁ m₂ : AddCancelMonoid M⦄
(h_mul : HAdd.hAdd = HAdd.hAdd)


theorem add_le_add_left {I J : FractionalIdeal S P} (hIJ : I ≤ J) (J' : FractionalIdeal S P) :
    J' + I ≤ J' + J

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


@[simp]
theorem isPath_reverse_iff {u v : V} (p : G.Walk u v) : p.reverse.IsPath ↔ p.IsPath

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


/-- The product over a sum can be written as a sum over the product of sets, `Finset.Pi`.
  `Finset.prod_univ_sum` is an alternative statement when the product is over `univ`. -/
lemma prod_sum (s : Finset ι) (t : ∀ i, Finset (κ i)) (f : ∀ i, κ i → α) :
    ∏ a ∈ s, ∑ b ∈ t a, f a b = ∑ p ∈ s.pi t, ∏ x ∈ s.attach, f x.1 (p x.1 x.2)

{ι : Type u_1}
{α : Type u_2}
{κ : ι → Type u_5}
[CommSemiring α]
[DecidableEq ι]
(s : Finset ι)
(t : (i : ι) → Finset (κ i))
(f : (i : ι) → κ i → α)

∏ a ∈ s, ∑ b ∈ t a, f a b = ∑ p ∈ s.pi t, ∏ x ∈ s.attach, f (↑x) (p ↑x ⋯)


theorem appLE (H : P f) (U : Y.affineOpens) (V : X.affineOpens) (e) : Q (f.appLE U V e)

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)

{Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}

Q (AlgebraicGeometry.Scheme.Hom.appLE f (↑U) (↑V) e)


theorem Perm.dropSlice_inter [DecidableEq α] {xs ys : List α} (n m : ℕ) (h : xs ~ ys)
    (h' : ys.Nodup) : List.dropSlice n m xs ~ ys ∩ List.dropSlice n m xs

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

(List.dropSlice n m xs).Perm (ys ∩ List.dropSlice n m xs)


@[simp]
theorem iteratedPDeriv_one (m : Fin 1 → E) (f : 𝓢(E, F)) :
    iteratedPDeriv 𝕜 m f = pderivCLM 𝕜 (m 0) f

(𝕜 : Type u_1)
{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[RCLike 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(m : Fin 1 → E)
(f : SchwartzMap E F)

(SchwartzMap.iteratedPDeriv 𝕜 m) f = (SchwartzMap.pderivCLM 𝕜 (m 0)) f


theorem le_iff_nhds {α : Type*} (t t' : TopologicalSpace α) :
    t ≤ t' ↔ ∀ x, @nhds α t x ≤ @nhds α t' x

{α : Type u_1}
(t t' : TopologicalSpace α)


@[simp]
theorem transpose_transpose (M : Matrix m n α) : Mᵀᵀ = M

{m : Type u_2}
{n : Type u_3}
{α : Type v}
(M : Matrix m n α)


@[simp]
theorem val_eq_to_measure (ν : ProbabilityMeasure Ω) : ν.val = (ν : Measure Ω)

(ν : MeasureTheory.ProbabilityMeasure Ω)


theorem lower_le_lower (hJ : J ∈ π) : I.lower ≤ J.lower

{ι : Type u_1}
{I J : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
(hJ : J ∈ π)


@[simp]
lemma homEquiv_apply (h : IsColimit t) {W : C} (f : t.pt ⟶ W) :
    h.homEquiv W f = (t.extend f).ι

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{t : CategoryTheory.Limits.Cocone F}
(h : CategoryTheory.Limits.IsColimit t)
{W : C}
(f : t.pt ⟶ W)


@[to_additive (attr := simp)]
theorem dist_smul [PseudoMetricSpace X] [SMul M X] [IsometricSMul M X] (c : M) (x y : X) :
    dist (c • x) (c • y) = dist x y

{M : Type u}
{X : Type w}
[PseudoMetricSpace X]
[SMul M X]
[IsometricSMul M X]
(c : M)
(x y : X)


@[to_additive zsmul_zero, simp]
lemma one_zpow : ∀ n : ℤ, (1 : α) ^ n = 1

{α : Type u_1}
[DivisionMonoid α]
(n : ℤ)


@[simp]
lemma prod.lift_snd {F₁ F₂ : C ⥤ Type w} (τ₁ : F ⟶ F₁) (τ₂ : F ⟶ F₂) :
    prod.lift τ₁ τ₂ ≫ prod.snd = τ₂

{F F₁ F₂ : CategoryTheory.Functor C (Type w)}

CategoryTheory.CategoryStruct.comp (CategoryTheory.FunctorToTypes.prod.lift τ₁ τ₂)
    CategoryTheory.FunctorToTypes.prod.snd =
  τ₂


theorem Nonempty.snd (h : (s ×ˢ t).Nonempty) : t.Nonempty

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : Finset β}
(h : (s ×ˢ t).Nonempty)


theorem IndepFun.ae_eq {mβ : MeasurableSpace β} {mβ' : MeasurableSpace β'}
    {f' : Ω → β} {g' : Ω → β'} (hfg : IndepFun f g μ)
    (hf : f =ᵐ[μ] f') (hg : g =ᵐ[μ] g') : IndepFun f' g' μ

(hfg : ProbabilityTheory.IndepFun f g μ)


theorem dualBasis_repr (l : Dual R M) (i : ι) : b.dualBasis.repr l i = l (b i)

{R : Type uR}
{M : Type uM}
{ι : Type uι}
[CommRing R]
[AddCommGroup M]
[Module R M]
[DecidableEq ι]
(b : Basis ι R M)
[Finite ι]
(l : Module.Dual R M)
(i : ι)


theorem lsum_symm_apply (f : (α →₀ M) →ₗ[R] N) (x : α) : (lsum S).symm f x = f.comp (lsingle x)

{α : Type u_1}
{M : Type u_2}
{N : Type u_3}
{R : Type u_5}
(S : Type u_6)
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
[Module S N]
[SMulCommClass R S N]
(f : (α →₀ M) →ₗ[R] N)
(x : α)

(Finsupp.lsum S).symm f x = f ∘ₗ Finsupp.lsingle x


@[simp]
theorem average_const (μ : Measure α) [IsFiniteMeasure μ] [h : NeZero μ] (c : E) :
    ⨍ _x, c ∂μ = c

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure μ]
[h : NeZero μ]
(c : E)


theorem leftDual_rightDual_le_of_le {I I' : Set β} (h : I' ∈ R.rightFixedPoints) (h₁ : I ≤ I') :
    R.leftDual (R.rightDual I) ≤ I'

{α : Type u_1}
{β : Type u_2}
(R : Rel α β)
{I I' : Set β}
(h : I' ∈ R.rightFixedPoints)
(h₁ : I ≤ I')


theorem eval_maximal {σ} {f : σ → Option σ} {a b} (h : b ∈ eval f a) {c} : Reaches f b c ↔ c = b

{σ : Type u_1}
{f : σ → Option σ}
{a b : σ}
(h : b ∈ Turing.eval f a)
{c : σ}


@[to_additive]
theorem forall_mk {C : α ⧸ s → Prop} : (∀ x : α ⧸ s, C x) ↔ ∀ x : α, C x

{α : Type u_1}
[AddGroup α]
{s : AddSubgroup α}
{C : α ⧸ s → Prop}


/-- Interpret a `Homeomorph` as a `PartialHomeomorph` by restricting it
to an open set `s` in the domain and to `t` in the codomain. -/
@[simps! (config := .asFn) apply symm_apply toPartialEquiv,
  simps! (config := .lemmasOnly) source target]
def _root_.Homeomorph.toPartialHomeomorphOfImageEq (e : X ≃ₜ Y) (s : Set X) (hs : IsOpen s)
    (t : Set Y) (h : e '' s = t) : PartialHomeomorph X Y

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : X ≃ₜ Y)
(s : Set X)
(hs : IsOpen s)
(t : Set Y)
(h : ⇑e '' s = t)

↑(e.toPartialHomeomorphOfImageEq s hs t h).symm = ⇑e.symm


@[fun_prop]
theorem DifferentiableOn.pow (ha : DifferentiableOn 𝕜 a s) (n : ℕ) :
    DifferentiableOn 𝕜 (fun x => a x ^ n) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{𝔸 : Type u_6}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{a : E → 𝔸}
(ha : DifferentiableOn 𝕜 a s)
(n : ℕ)


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

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{S₁ : Subalgebra R Aᵐᵒᵖ}
{S₂ : Subalgebra R A}


theorem Equiv.Perm.not_solvable (X : Type*) (hX : 5 ≤ Cardinal.mk X) :
    ¬IsSolvable (Equiv.Perm X)


/-- Assume that a function `f` has a derivative at every point of a set `s`. Then one may cover `s`
with countably many closed sets `t n` on which `f` is well approximated by linear maps `A n`. -/
theorem exists_closed_cover_approximatesLinearOn_of_hasFDerivWithinAt [SecondCountableTopology F]
    (f : E → F) (s : Set E) (f' : E → E →L[ℝ] F) (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x)
    (r : (E →L[ℝ] F) → ℝ≥0) (rpos : ∀ A, r A ≠ 0) :
    ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] F),
      (∀ n, IsClosed (t n)) ∧
        (s ⊆ ⋃ n, t n) ∧
          (∀ n, ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧
            (s.Nonempty → ∀ n, ∃ y ∈ s, A n = f' y)

∃ t A,
  (∀ (n : ℕ), IsClosed (t n)) ∧
    s ⊆ ⋃ n, t n ∧
      (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧ (s.Nonempty → ∀ (n : ℕ), ∃ y ∈ s, A n = f' y)


theorem map_enum (f : α → β) (l : List α) : map (Prod.map id f) (enum l) = enum (map f l)

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

List.map (Prod.map id f) l.enum = (List.map f l).enum


theorem toEnd_smul (m : M) (x : CentroidHom α) : (m • x).toEnd = m • x.toEnd

{M : Type u_2}
{α : Type u_5}
[NonUnitalNonAssocSemiring α]
[Monoid M]
[DistribMulAction M α]
[SMulCommClass M α α]
[IsScalarTower M α α]
(m : M)
(x : CentroidHom α)


@[simp]
theorem integralClosure_eq_bot [NoZeroSMulDivisors R A] [Nontrivial A] : integralClosure R A = ⊥

(R : Type u_1)
(A : Type u_2)
[CommRing R]
[CommRing A]
[Algebra R A]
[iic : IsIntegrallyClosedIn R A]
[NoZeroSMulDivisors R A]
[Nontrivial A]


theorem vsub_union : s -ᵥ (t₁ ∪ t₂) = s -ᵥ t₁ ∪ (s -ᵥ t₂)

{α : Type u_2}
{β : Type u_3}
[VSub α β]
{s t₁ t₂ : Set β}


@[simp]
theorem support_bernoulli : (bernoulli p h).support = { b | cond b (p ≠ 0) (p ≠ 1) }

(PMF.bernoulli p h).support = {b | bif b then p ≠ 0 else p ≠ 1}


@[simp]
theorem toRealLinearIsometryEquiv_symm_apply (f : E ≃ᵢ F) (y : F) :
    (f.toRealLinearIsometryEquiv.symm : F → E) y = f.symm (y + f 0)

{E : Type u_1}
{F : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : E ≃ᵢ F)
(y : F)

f.toRealLinearIsometryEquiv.symm y = f.symm (y + f 0)