lemma shiftFunctorAdd'_add_zero_hom_app (a : A) (X : C) :
    (shiftFunctorAdd' C a 0 a (add_zero a)).hom.app X =
    (shiftFunctorZero C A).inv.app (X⟦a⟧)

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
[CategoryTheory.HasShift C A]
(a : A)
(X : C)

(CategoryTheory.shiftFunctorAdd' C a 0 a ⋯).hom.app X =
  (CategoryTheory.shiftFunctorZero C A).inv.app ((CategoryTheory.shiftFunctor C a).obj X)


@[to_additive]
theorem quasiMeasurePreserving_div [IsMulLeftInvariant μ] :
    QuasiMeasurePreserving (fun p : G × G => p.1 / p.2) (μ.prod ν) μ

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
(μ ν : MeasureTheory.Measure G)
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
[MeasurableNeg G]
[μ.IsAddLeftInvariant]

MeasureTheory.Measure.QuasiMeasurePreserving (fun p => p.1 - p.2) (μ.prod ν) μ


/-- Reindexing a family of categories gives equivalent `Pi` categories. -/
@[simps]
noncomputable def Pi.equivalenceOfEquiv (e : J ≃ I) :
    (∀ j, C (e j)) ≌ (∀ i, C i)

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

(CategoryTheory.Pi.equivalenceOfEquiv C e).inverse =
  CategoryTheory.Functor.pi' fun i' => CategoryTheory.Pi.eval C (e i')


@[simp] protected theorem sign_mul_abs : ∀ x : EReal, (sign x * x.abs : EReal) = x


theorem Ici_eq_Icc (a : α) : Ici a = Icc a ⊤

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


theorem setLIntegral_dirac' {a : α} {f : α → ℝ≥0∞} (hf : Measurable f) {s : Set α}
    (hs : MeasurableSet s) [Decidable (a ∈ s)] :
    ∫⁻ x in s, f x ∂Measure.dirac a = if a ∈ s then f a else 0

{α : Type u_1}
[MeasurableSpace α]
{a : α}
{f : α → ℝ≥0∞}
(hf : Measurable f)
{s : Set α}
(hs : MeasurableSet s)
[Decidable (a ∈ s)]

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


@[simp]
theorem mem_rmap (r : Rel α β) (l : Filter α) (s : Set β) : s ∈ l.rmap r ↔ r.core s ∈ l

{α : Type u}
{β : Type v}
(r : Rel α β)
(l : Filter α)
(s : Set β)


theorem arg_eq_arg_iff {x y : ℂ} (hx : x ≠ 0) (hy : y ≠ 0) :
    arg x = arg y ↔ (abs y / abs x : ℂ) * x = y

x.arg = y.arg ↔ ↑(Complex.abs y) / ↑(Complex.abs x) * x = y


@[to_additive (attr := simp)]
theorem mul_one : ∀ a : M, a * 1 = a


theorem tendstoIxxClass_inf {l₁ l₁' l₂ l₂' : Filter α} {Ixx} [h : TendstoIxxClass Ixx l₁ l₂]
    [h' : TendstoIxxClass Ixx l₁' l₂'] : TendstoIxxClass Ixx (l₁ ⊓ l₁') (l₂ ⊓ l₂')

[h' : Filter.TendstoIxxClass Ixx l₁' l₂']

Filter.TendstoIxxClass Ixx (l₁ ⊓ l₁') (l₂ ⊓ l₂')


theorem nodup_iff_count_eq_one [DecidableEq α] : Nodup s ↔ ∀ a ∈ s, count a s = 1

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

s.Nodup ↔ ∀ a ∈ s, Multiset.count a s = 1


/-- Reformulation of `hasSum_nat_cosZeta` using `LSeriesHasSum`. -/
lemma LSeriesHasSum_cos (a : ℝ) {s : ℂ} (hs : 1 < re s) :
    LSeriesHasSum (Real.cos <| 2 * π * a * ·) s (cosZeta a s)

LSeriesHasSum (fun x => ↑(Real.cos (2 * π * a * ↑x))) s (HurwitzZeta.cosZeta (↑a) s)


theorem MonotoneOn.quasiconvexOn (hf : MonotoneOn f s) (hs : Convex 𝕜 s) : QuasiconvexOn 𝕜 s f

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


theorem zero_apply (i : Set α) : (0 : VectorMeasure α M) i = 0

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
(i : Set α)


@[simp]
theorem trace_col_mul_row {ι : Type*} [Unique ι] [NonUnitalNonAssocSemiring R] (a b : n → R) :
    trace (col ι a * row ι b) = dotProduct a b

{n : Type u_3}
{R : Type u_6}
[Fintype n]
{ι : Type u_8}
[Unique ι]
[NonUnitalNonAssocSemiring R]
(a b : n → R)

(Matrix.col ι a * Matrix.row ι b).trace = a ⬝ᵥ b


theorem mul_of'_modOf (x : k[G]) (g : G) : x * of' k G g %ᵒᶠ g = 0

{k : Type u_1}
{G : Type u_2}
[Semiring k]
[AddCancelCommMonoid G]
(x : AddMonoidAlgebra k G)
(g : G)

(x * AddMonoidAlgebra.of' k G g).modOf g = 0


@[simp]
theorem sub_top {a : WithTop α} : a - ⊤ = (⊥ : α)

{α : Type u_1}
[Sub α]
[Bot α]
{a : WithTop α}


@[simp]
theorem top_add (a : α) : ⊤ + a = ⊤

{α : Type u_1}
[LinearOrderedAddCommMonoidWithTop α]
(a : α)


protected theorem mul_div_cancel' {n m : Nat} (H : n ∣ m) : n * (m / n) = m


@[reassoc (attr := simp)]
theorem hom_inv_id_tensor' {V W X Y Z : C} (f : V ⟶ W) [IsIso f] (g : X ⟶ Y) (h : Y ⟶ Z) :
    (f ⊗ g) ≫ (inv f ⊗ h) = (𝟙 V ⊗ g) ≫ (𝟙 V ⊗ h)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{V W X Y Z : C}
(f : V ⟶ W)
[CategoryTheory.IsIso f]
(g : X ⟶ Y)
(h : Y ⟶ Z)

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom f g)
    (CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.inv f) h) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id V) g)
    (CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id V) h)


theorem seq_eq_filter_seq {α β : Type u} (f : Filter (α → β)) (g : Filter α) :
    f <*> g = seq f g


theorem nhdsSet_prod_le_of_disjoint_cocompact {f : Filter Y} (hs : IsCompact s)
    (hf : Disjoint f (Filter.cocompact Y)) :
    𝓝ˢ s ×ˢ f ≤ 𝓝ˢ (s ×ˢ Set.univ)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
{f : Filter Y}
(hs : IsCompact s)
(hf : Disjoint f (Filter.cocompact Y))


theorem gradedComm_of_tmul_of (i j : ι) (a : 𝒜 i) (b : ℬ j) :
    gradedComm R 𝒜 ℬ (lof R _ 𝒜 i a ⊗ₜ lof R _ ℬ j b) =
      (-1 : ℤˣ)^(j * i) • (lof R _ ℬ _ b ⊗ₜ lof R _ 𝒜 _ a)

(R : Type u_1)
{ι : Type u_2}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
(𝒜 : ι → Type u_5)
(ℬ : ι → Type u_6)
[CommRing R]
[(i : ι) → AddCommGroup (𝒜 i)]
[(i : ι) → AddCommGroup (ℬ i)]
[(i : ι) → Module R (𝒜 i)]
[(i : ι) → Module R (ℬ i)]
[DirectSum.GRing 𝒜]
[DirectSum.GRing ℬ]
[DirectSum.GAlgebra R 𝒜]
[DirectSum.GAlgebra R ℬ]
(i j : ι)
(a : 𝒜 i)
(b : ℬ j)

(TensorProduct.gradedComm R 𝒜 ℬ) ((DirectSum.lof R ι 𝒜 i) a ⊗ₜ[R] (DirectSum.lof R ι ℬ j) b) =
  (-1) ^ (j * i) • (DirectSum.lof R ι ℬ j) b ⊗ₜ[R] (DirectSum.lof R ι 𝒜 i) a


@[simp] theorem getRight?_inr : (inr x : α ⊕ β).getRight? = some x


theorem replicate_subperm_primeFactorsList_iff {a b n : ℕ} (ha : Prime a) (hb : b ≠ 0) :
    replicate n a <+~ primeFactorsList b ↔ a ^ n ∣ b

{a b n : ℕ}
(ha : Nat.Prime a)
(hb : b ≠ 0)

(List.replicate n a).Subperm b.primeFactorsList ↔ a ^ n ∣ b


@[to_additive]
theorem mk'_cancel (a : M) (b c : S) :
    f.mk' (a * c) (b * c) = f.mk' a b

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
(f : S.LocalizationMap N)
(a : M)
(b c : ↥S)


theorem not_infinite_neg {x : ℝ*} : ¬Infinite x → ¬Infinite (-x)


@[simp]
theorem neLocus_add_left [AddLeftCancelMonoid N] (f g h : α →₀ N) :
    (f + g).neLocus (f + h) = g.neLocus h

{α : Type u_1}
{N : Type u_3}
[DecidableEq α]
[DecidableEq N]
[AddLeftCancelMonoid N]
(f g h : α →₀ N)


theorem integral_average (μ : Measure α) [IsFiniteMeasure μ] (f : α → E) :
    ∫ _, ⨍ a, f a ∂μ ∂μ = ∫ x, f x ∂μ

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

∫ (x : α), ⨍ (a : α), f a ∂μ ∂μ = ∫ (x : α), f x ∂μ


/-- Degen's eight squares identity, see <https://en.wikipedia.org/wiki/Degen%27s_eight-square_identity>.

This sign choice here corresponds to the signs obtained by multiplying two octonions.
-/
theorem sum_eight_sq_mul_sum_eight_sq :
    (x₁ ^ 2 + x₂ ^ 2 + x₃ ^ 2 + x₄ ^ 2 + x₅ ^ 2 + x₆ ^ 2 + x₇ ^ 2 + x₈ ^ 2) *
      (y₁ ^ 2 + y₂ ^ 2 + y₃ ^ 2 + y₄ ^ 2 + y₅ ^ 2 + y₆ ^ 2 + y₇ ^ 2 + y₈ ^ 2) =
    (x₁ * y₁ - x₂ * y₂ - x₃ * y₃ - x₄ * y₄ - x₅ * y₅ - x₆ * y₆ - x₇ * y₇ - x₈ * y₈) ^ 2 +
      (x₁ * y₂ + x₂ * y₁ + x₃ * y₄ - x₄ * y₃ + x₅ * y₆ - x₆ * y₅ - x₇ * y₈ + x₈ * y₇) ^ 2 +
      (x₁ * y₃ - x₂ * y₄ + x₃ * y₁ + x₄ * y₂ + x₅ * y₇ + x₆ * y₈ - x₇ * y₅ - x₈ * y₆) ^ 2 +
      (x₁ * y₄ + x₂ * y₃ - x₃ * y₂ + x₄ * y₁ + x₅ * y₈ - x₆ * y₇ + x₇ * y₆ - x₈ * y₅) ^ 2 +
      (x₁ * y₅ - x₂ * y₆ - x₃ * y₇ - x₄ * y₈ + x₅ * y₁ + x₆ * y₂ + x₇ * y₃ + x₈ * y₄) ^ 2 +
      (x₁ * y₆ + x₂ * y₅ - x₃ * y₈ + x₄ * y₇ - x₅ * y₂ + x₆ * y₁ - x₇ * y₄ + x₈ * y₃) ^ 2 +
      (x₁ * y₇ + x₂ * y₈ + x₃ * y₅ - x₄ * y₆ - x₅ * y₃ + x₆ * y₄ + x₇ * y₁ - x₈ * y₂) ^ 2 +
      (x₁ * y₈ - x₂ * y₇ + x₃ * y₆ + x₄ * y₅ - x₅ * y₄ - x₆ * y₃ + x₇ * y₂ + x₈ * y₁) ^ 2

{x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ : R}


lemma IsPreconnected.preperfect_of_nontrivial [T1Space α] {U : Set α} (hu : U.Nontrivial)
    (h : IsPreconnected U) : Preperfect U

{α : Type u_1}
[TopologicalSpace α]
[T1Space α]
{U : Set α}
(hu : U.Nontrivial)
(h : IsPreconnected U)


theorem IsBigOWith.add_isLittleO (h₁ : IsBigOWith c₁ l f₁ g) (h₂ : f₂ =o[l] g) (hc : c₁ < c₂) :
    IsBigOWith c₂ l (fun x => f₁ x + f₂ x) g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{c₁ c₂ : ℝ}
{g : α → F}
{l : Filter α}
{f₁ f₂ : α → E'}
(h₁ : Asymptotics.IsBigOWith c₁ l f₁ g)
(h₂ : f₂ =o[l] g)
(hc : c₁ < c₂)

Asymptotics.IsBigOWith c₂ l (fun x => f₁ x + f₂ x) g


/-- Induction up to `univ`. -/
theorem Finite.induction_to_univ [Finite α] {C : Set α → Prop} (S0 : Set α)
    (H0 : C S0) (H1 : ∀ S ≠ univ, C S → ∃ a ∉ S, C (insert a S)) : C univ

(H1 : ∀ (S : Set α), S ≠ Set.univ → C S → ∃ a ∉ S, C (insert a S))


/-- Canonical form of the **equality case of Jensen's equality**.

For a strictly concave function `f` and positive weights `w`, we have
`f (∑ i ∈ t, w i • p i) = ∑ i ∈ t, w i • f (p i)` if and only if the points `p` are all equal
(and in fact all equal to their center of mass wrt `w`). -/
lemma StrictConcaveOn.map_sum_eq_iff (hf : StrictConcaveOn 𝕜 s f) (h₀ : ∀ i ∈ t, 0 < w i)
    (h₁ : ∑ i ∈ t, w i = 1) (hmem : ∀ i ∈ t, p i ∈ s) :
    f (∑ i ∈ t, w i • p i) = ∑ i ∈ t, w i • f (p i) ↔ ∀ j ∈ t, p j = ∑ i ∈ t, w i • p i

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
{ι : Type u_5}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[OrderedAddCommGroup β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
{t : Finset ι}
{w : ι → 𝕜}
{p : ι → E}
(hf : StrictConcaveOn 𝕜 s f)
(h₀ : ∀ i ∈ t, 0 < w i)
(h₁ : ∑ i ∈ t, w i = 1)
(hmem : ∀ i ∈ t, p i ∈ s)


theorem Matrix.blockDiagonal'_tsum [DecidableEq l] [T2Space R]
    {f : X → ∀ i, Matrix (m' i) (n' i) R} :
    blockDiagonal' (∑' x, f x) = ∑' x, blockDiagonal' (f x)

{f : X → (i : l) → Matrix (m' i) (n' i) R}

Matrix.blockDiagonal' (∑' (x : X), f x) = ∑' (x : X), Matrix.blockDiagonal' (f x)


@[to_additive (attr := simp)]
theorem MonoidHom.coe_copy {_ : MulOneClass M} {_ : MulOneClass N} (f : M →* N) (f' : M → N)
    (h : f' = f) : (f.copy f' h) = f'

∀ {x : MulOneClass M} {x_1 : MulOneClass N} (f : M →* N) (f' : M → N) (h : f' = ⇑f), ⇑(f.copy f' h) = f'


theorem range_comp (f : A →⋆ₙₐ[R] B) (g : B →⋆ₙₐ[R] C) :
    NonUnitalStarAlgHom.range (g.comp f) = (NonUnitalStarAlgHom.range f).map g

{R : Type u}
{A : Type v}
{B : Type w}
{C : Type w'}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[Star B]
[NonUnitalNonAssocSemiring C]
[Module R C]
[Star C]
(f : A →⋆ₙₐ[R] B)
(g : B →⋆ₙₐ[R] C)

NonUnitalStarAlgHom.range (g.comp f) = NonUnitalStarSubalgebra.map g (NonUnitalStarAlgHom.range f)


@[simp]
theorem _root_.Cardinal.natCast_eq_toPartENat_iff {n : ℕ} {c : Cardinal} :
    ↑n = toPartENat c ↔ ↑n = c


@[simp]
theorem fst_sub : (s - t).fst = s.fst - t.snd

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

(s - t).toProd.1 = s.toProd.1 - t.toProd.2


@[to_additive]
theorem mulAntidiagonal_min_mul_min {α} [LinearOrderedCancelCommMonoid α] {s t : Set α}
    (hs : s.IsWF) (ht : t.IsWF) (hns : s.Nonempty) (hnt : t.Nonempty) :
    mulAntidiagonal hs.isPWO ht.isPWO (hs.min hns * ht.min hnt) = {(hs.min hns, ht.min hnt)}

{α : Type u_2}
[LinearOrderedCancelAddCommMonoid α]
{s t : Set α}
(hs : s.IsWF)
(ht : t.IsWF)
(hns : s.Nonempty)
(hnt : t.Nonempty)

Finset.addAntidiagonal ⋯ ⋯ (hs.min hns + ht.min hnt) = {(hs.min hns, ht.min hnt)}


@[mono]
theorem relNorm_mono {I J : Ideal S} (h : I ≤ J) : relNorm R I ≤ relNorm R J

(R : Type u_1)
[CommRing R]
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsDomain R]
[IsDomain S]
[IsDedekindDomain R]
[IsDedekindDomain S]
[Module.Finite R S]
[Module.Free R S]
{I J : Ideal S}
(h : I ≤ J)

(Ideal.relNorm R) I ≤ (Ideal.relNorm R) J


theorem Subsingleton.map (hl : l.Subsingleton) (f : α → β) : (map f l).Subsingleton

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
(hl : l.Subsingleton)
(f : α → β)


@[simp]
lemma abs_im_eq_abs {z : ℂ} : |z.im| = abs z ↔ z.re = 0


theorem countP_eq_card {s} : countP p s = card s ↔ ∀ a ∈ s, p a

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

Multiset.countP p s = Multiset.card s ↔ ∀ a ∈ s, p a


theorem injective_of_le_imp_le [PartialOrder α] [Preorder β] (f : α → β)
    (h : ∀ {x y}, f x ≤ f y → x ≤ y) : Injective f

{α : Type u}
{β : Type v}
[PartialOrder α]
[Preorder β]
(f : α → β)
(h : ∀ {x y : α}, f x ≤ f y → x ≤ y)


theorem equivMapDomain_refl' : equivMapDomain (Equiv.refl _) = @id (α →₀ M)

Finsupp.equivMapDomain (Equiv.refl α) = id


theorem cos_eq_one_iff (x : ℝ) : cos x = 1 ↔ ∃ n : ℤ, (n : ℝ) * (2 * π) = x

Real.cos x = 1 ↔ ∃ n, ↑n * (2 * Real.pi) = x


/-- `ContinuousMap.HomotopyLike F f₀ f₁` states that `F` is a type of homotopies between `f₀` and
`f₁`.

You should extend this class when you extend `ContinuousMap.Homotopy`. -/
class HomotopyLike {X Y : outParam Type*} [TopologicalSpace X] [TopologicalSpace Y]
    (F : Type*) (f₀ f₁ : outParam <| C(X, Y)) [FunLike F (I × X) Y]
    extends ContinuousMapClass F (I × X) Y : Prop where
  /-- value of the homotopy at 0 -/
  map_zero_left (f : F) : ∀ x, f (0, x) = f₀ x
  /-- value of the homotopy at 1 -/
  map_one_left (f : F) : ∀ x, f (1, x) = f₁ x

[self : ContinuousMap.HomotopyLike F f₀ f₁]


theorem IsRotated.mem_iff (h : l ~r l') {a : α} : a ∈ l ↔ a ∈ l'

{α : Type u}
{l l' : List α}
(h : l ~r l')
{a : α}


theorem quadraticChar_eq_pow_of_char_ne_two' (hF : ringChar F ≠ 2) (a : F) :
    (quadraticChar F a : F) = a ^ (Fintype.card F / 2)

{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
(hF : ringChar F ≠ 2)
(a : F)

↑((quadraticChar F) a) = a ^ (Fintype.card F / 2)


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

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


@[simp, nolint unusedHavesSuffices]
theorem toPGame_rightMoves (o : Ordinal) : o.toPGame.RightMoves = PEmpty


/-- If the algebra map `R →+* A` is injective and `R` has characteristic zero then so does `A`. -/
theorem charZero_of_injective_algebraMap {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]
    (h : Function.Injective (algebraMap R A)) [CharZero R] : CharZero A

(h : Function.Injective ⇑(algebraMap R A))


theorem t0Space_of_injective_of_continuous [TopologicalSpace Y] {f : X → Y}
    (hf : Function.Injective f) (hf' : Continuous f) [T0Space Y] : T0Space X

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : Function.Injective f)
(hf' : Continuous f)
[T0Space Y]


theorem _root_.MeasureTheory.AEStronglyMeasurable.integral_condDistrib (hX : AEMeasurable X μ)
    (hY : AEMeasurable Y μ) (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
    AEStronglyMeasurable (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ

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

MeasureTheory.AEStronglyMeasurable (fun a => ∫ (y : Ω), f (X a, y) ∂(ProbabilityTheory.condDistrib Y X μ) (X a)) μ


@[simp]
theorem continuum_mul_ofNat {n : ℕ} [Nat.AtLeastTwo n] : 𝔠 * no_index (OfNat.ofNat n) = 𝔠

Cardinal.continuum * OfNat.ofNat n = Cardinal.continuum


@[simp]
theorem supIndep_univ_fin_two (f : Fin 2 → α) :
    (Finset.univ : Finset (Fin 2)).SupIndep f ↔ Disjoint (f 0) (f 1)

{α : Type u_1}
[Lattice α]
[OrderBot α]
(f : Fin 2 → α)

Finset.univ.SupIndep f ↔ Disjoint (f 0) (f 1)


@[to_additive]
protected lemma inv_mul_eq_iff_eq_mul (h : IsUnit a) : a⁻¹ * b = c ↔ b = a * c

{α : Type u}
[SubtractionMonoid α]
{a b c : α}
(h : IsAddUnit a)


@[simp] theorem sublist_cons (a : α) (l : List α) : l <+ a :: l


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


@[to_additive (attr := measurability)]
theorem _root_.Finset.stronglyMeasurable_prod {ι : Type*} {f : ι → α → M} (s : Finset ι)
    (hf : ∀ i ∈ s, StronglyMeasurable (f i)) : StronglyMeasurable fun a => ∏ i ∈ s, f i a

(hf : ∀ i ∈ s, MeasureTheory.StronglyMeasurable (f i))

MeasureTheory.StronglyMeasurable fun a => ∑ i ∈ s, f i a


@[simp]
theorem head_cons (a : α) (s) : head (cons a s) = Computation.pure (some a)

{α : Type u}
(a : α)
(s : Stream'.WSeq α)

(Stream'.WSeq.cons a s).head = Computation.pure (some a)


lemma pow_le_pow_iff_left (ha : 0 ≤ a) (hb : 0 ≤ b) (hn : n ≠ 0) : a ^ n ≤ b ^ n ↔ a ≤ b

{R : Type u_3}
[LinearOrderedSemiring R]
{a b : R}
{n : ℕ}
(ha : 0 ≤ a)
(hb : 0 ≤ b)
(hn : n ≠ 0)


theorem setToL1_mono_left {T T' : Set α → E →L[ℝ] G''} {C C' : ℝ}
    (hT : DominatedFinMeasAdditive μ T C) (hT' : DominatedFinMeasAdditive μ T' C')
    (hTT' : ∀ s x, T s x ≤ T' s x) (f : α →₁[μ] E) : setToL1 hT f ≤ setToL1 hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

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

(hTT' : ∀ (s : Set α) (x : E), (T s) x ≤ (T' s) x)

(MeasureTheory.L1.setToL1 hT) f ≤ (MeasureTheory.L1.setToL1 hT') f


theorem tan_neg_of_neg_of_pi_div_two_lt {x : ℝ} (hx0 : x < 0) (hpx : -(π / 2) < x) : tan x < 0


/-- The `p`-adic norm of `0` is `0`. -/
@[simp]
protected theorem zero : padicNorm p 0 = 0


theorem isGalois_iff : IsGalois F E ↔ Algebra.IsSeparable F E ∧ Normal F E

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]


@[simp]
theorem kahler_neg_orientation (x y : E) : (-o).kahler x y = conj (o.kahler x y)

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

((-o).kahler x) y = (starRingEnd ℂ) ((o.kahler x) y)


/-- `LocallyConstant.map` as a linear map. -/
@[simps!]
def mapₗ (R : Type*) [Semiring R] [AddCommMonoid Y] [Module R Y]
    [AddCommMonoid Z] [Module R Z] (f : Y →ₗ[R] Z) :
    LocallyConstant X Y →ₗ[R] LocallyConstant X Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{Z : Type u_6}
(R : Type u_7)
[Semiring R]
[AddCommMonoid Y]
[Module R Y]
[AddCommMonoid Z]
[Module R Z]
(f : Y →ₗ[R] Z)
(g : LocallyConstant X Y)

∀ (a : X), ((LocallyConstant.mapₗ R f) g) a = f (g a)


@[simp]
theorem mem_iSup_of_directed {ι} [Nonempty ι] (S : ι → Submodule R M) (H : Directed (· ≤ ·) S) {x} :
    x ∈ iSup S ↔ ∃ i, x ∈ S i

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{ι : Sort u_9}
[Nonempty ι]
(S : ι → Submodule R M)
(H : Directed (fun x x_1 => x ≤ x_1) S)
{x : M}


theorem derivedSeries_add_eq_bot {k l : ℕ} {I J : LieIdeal R L} (hI : derivedSeries R I k = ⊥)
    (hJ : derivedSeries R J l = ⊥) : derivedSeries R (I + J) (k + l) = ⊥

(hI : LieAlgebra.derivedSeries R (↥↑I) k = ⊥)

(hJ : LieAlgebra.derivedSeries R (↥↑J) l = ⊥)

LieAlgebra.derivedSeries R (↥↑(I + J)) (k + l) = ⊥


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

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


theorem edgeSet_inj : G₁.edgeSet = G₂.edgeSet ↔ G₁ = G₂


/-- In a space with second countable topology and a sigma-finite measure, `FinStronglyMeasurable`
  and `Measurable` are equivalent. -/
theorem finStronglyMeasurable_iff_measurable {_m0 : MeasurableSpace α} (μ : Measure α)
    [SigmaFinite μ] : FinStronglyMeasurable f μ ↔ Measurable f

{α : Type u_1}
{G : Type u_5}
[SeminormedAddCommGroup G]
[MeasurableSpace G]
[BorelSpace G]
[SecondCountableTopology G]
{f : α → G}
{_m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]

MeasureTheory.FinStronglyMeasurable f μ ↔ Measurable f


/-- A subsemiring contains the semiring's 1. -/
protected theorem one_mem : (1 : R) ∈ s

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


@[to_additive]
theorem mul_leftInvEquiv (x : S.leftInv) : (x : M) * S.leftInvEquiv hS x = 1

{M : Type u_1}
[AddCommMonoid M]
(S : AddSubmonoid M)
(hS : S ≤ IsAddUnit.addSubmonoid M)
(x : ↥S.leftNeg)


theorem lookupAll_nodup (a : α) {l : List (Sigma β)} (h : l.NodupKeys) : (lookupAll a l).Nodup

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
{l : List (Sigma β)}
(h : l.NodupKeys)


theorem csSup_image_le {s : Set α} (hs : s.Nonempty) {B : α} (hB : B ∈ upperBounds s) :
    sSup (f '' s) ≤ f B

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[ConditionallyCompleteLattice β]
{f : α → β}
(h_mono : Monotone f)
{s : Set α}
(hs : s.Nonempty)
{B : α}
(hB : B ∈ upperBounds s)


@[continuity]
protected theorem continuous : Continuous f

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(f : P →ᵃⁱ[𝕜] P₂)


@[simp]
protected theorem toFinset_eq_univ [Fintype α] {h : s.Finite} :
    h.toFinset = Finset.univ ↔ s = univ

{α : Type u}
{s : Set α}
[Fintype α]
{h : s.Finite}


theorem IsBigO.congr_of_sub (h : (fun x => f₁ x - f₂ x) =O[l] g) : f₁ =O[l] g ↔ f₂ =O[l] g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{g : α → F}
{l : Filter α}
{f₁ f₂ : α → E'}
(h : (fun x => f₁ x - f₂ x) =O[l] g)


theorem cases_head_iff : ReflTransGen r a b ↔ a = b ∨ ∃ c, r a c ∧ ReflTransGen r c b

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

Relation.ReflTransGen r a b ↔ a = b ∨ ∃ c, r a c ∧ Relation.ReflTransGen r c b


@[to_additive (attr := simp)]
lemma smul_apply' [∀ i, SMul (α i) (β i)] (s : ∀ i, α i) (x : ∀ i, β i) : (s • x) i = s i • x i

{ι : Type u_1}
{α : ι → Type u_4}
{β : ι → Type u_5}
(i : ι)
[(i : ι) → VAdd (α i) (β i)]
(s : (i : ι) → α i)
(x : (i : ι) → β i)


theorem isLittleO_const_smul_right {c : 𝕜} (hc : c ≠ 0) :
    (f =o[l] fun x => c • f' x) ↔ f =o[l] f'

{α : Type u_1}
{E : Type u_3}
{E' : Type u_6}
{𝕜 : Type u_15}
[Norm E]
[SeminormedAddCommGroup E']
[NormedDivisionRing 𝕜]
{f : α → E}
{f' : α → E'}
{l : Filter α}
[Module 𝕜 E']
[BoundedSMul 𝕜 E']
{c : 𝕜}
(hc : c ≠ 0)


theorem Valid'.node4L_lemma₄ {a b c d : ℕ} (lr₁ : 3 * a ≤ b + c + 1 + d) (mr₂ : b + c + 1 ≤ 3 * d)
    (mm₁ : b ≤ 3 * c) : a + b + 1 ≤ 3 * (c + d + 1)


lemma LSeriesSummable_lt_re_of_abscissaOfAbsConv_lt_re {f : ℕ → ℂ} {s : ℂ}
    (hs : abscissaOfAbsConv f < s.re) :
    ∃ x : ℝ, x < s.re ∧ LSeriesSummable f x

(hs : LSeries.abscissaOfAbsConv f < ↑s.re)


lemma cfcHom_mono {a : A} (ha : p a) {f g : C(spectrum R a, R)} (hfg : f ≤ g) :
    cfcHom ha f ≤ cfcHom ha g

[∀ (α : Type u_1) [inst : TopologicalSpace α], StarOrderedRing C(α, R)]


/-- If `φ : NormedAddGroupHom V₁ V` is such that `f.comp φ = g.comp φ`, the induced morphism
`NormedAddGroupHom V₁ (f.equalizer g)`. -/
@[simps]
def lift (φ : NormedAddGroupHom V₁ V) (h : f.comp φ = g.comp φ) :
    NormedAddGroupHom V₁ (f.equalizer g)

{V : Type u_1}
{W : Type u_2}
{V₁ : Type u_3}
[SeminormedAddCommGroup V]
[SeminormedAddCommGroup W]
[SeminormedAddCommGroup V₁]
{f g : NormedAddGroupHom V W}
(φ : NormedAddGroupHom V₁ V)
(h : f.comp φ = g.comp φ)
(v : V₁)

↑((NormedAddGroupHom.Equalizer.lift φ h) v) = φ v


theorem mul_noncommProd_erase [DecidableEq α] (s : Finset α) {a : α} (h : a ∈ s) (f : α → β) (comm)
    (comm' := fun x hx y hy hxy ↦ comm (s.mem_of_mem_erase hx) (s.mem_of_mem_erase hy) hxy) :
    f a * (s.erase a).noncommProd f comm' = s.noncommProd f comm

(comm : (↑s).Pairwise fun a b => Commute (f a) (f b))

(comm' : ∀ x ∈ ↑(s.erase a), ∀ y ∈ ↑(s.erase a), x ≠ y → (fun a b => Commute (f a) (f b)) x y := ⋯)


/-- When applied to `inr` and `inl` themselves, `lift` is the identity. -/
@[simp]
theorem lift_inlAlgHom_inrHom :
    lift (inlAlgHom _ _ _) (inrHom R M |>.restrictScalars S)
      (inr_mul_inr R) (fun _ _ => (inl_mul_inr _ _).symm) (fun _ _ => (inr_mul_inl _ _).symm) =
    AlgHom.id S (tsze R M)

{S : Type u_1}
{R : Type u}
{M : Type v}
[CommSemiring S]
[Semiring R]
[AddCommMonoid M]
[Algebra S R]
[Module S M]
[Module R M]
[Module Rᵐᵒᵖ M]
[SMulCommClass R Rᵐᵒᵖ M]
[IsScalarTower S R M]
[IsScalarTower S Rᵐᵒᵖ M]

TrivSqZeroExt.lift (TrivSqZeroExt.inlAlgHom S R M) (↑S (TrivSqZeroExt.inrHom R M)) ⋯ ⋯ ⋯ = AlgHom.id S (tsze R M)


/-- The functor part of the equivalence `LightProfinite ≌ LightDiagram` -/
@[simps]
noncomputable def lightProfiniteToLightDiagram : LightProfinite.{u} ⥤ LightDiagram.{u}

∀ {X Y : LightProfinite} (f : X ⟶ Y), lightProfiniteToLightDiagram.map f = f


@[to_additive (attr := simp)]
theorem period_one (a : α) : period (1 : M) a = 1

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


@[simp, norm_cast]
theorem coe_neg : ((-x : R) : ℍ[R]) = -x


/-- In a join, dropping all the elements up to an index which is the sum of the lengths of the
first `i` sublists, is the same as taking the join after dropping the first `i` sublists.

See `List.drop_sum_join` for the corresponding statement using `List.sum`. -/
theorem drop_sum_join' (L : List (List α)) (i : ℕ) :
    L.join.drop (Nat.sum ((L.map length).take i)) = (L.drop i).join

{α : Type u_1}
(L : List (List α))
(i : ℕ)

List.drop (Nat.sum (List.take i (List.map List.length L))) L.join = (List.drop i L).join


theorem IsSelfAdjoint.selfAdjointPart_apply {x : A} (hx : IsSelfAdjoint x) :
    selfAdjointPart R x = ⟨x, hx⟩

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


theorem eraseIdx_eq_modifyNthTail : ∀ n (l : List α), eraseIdx l n = modifyNthTail tail n l

l.eraseIdx n = List.modifyNthTail List.tail n l


@[to_additive]
theorem mul_eq_of_eq_div (h : a = c / b) : a * b = c

{G : Type u_3}
[AddGroup G]
{a b c : G}
(h : a = c - b)


/-- Two morphisms of presheaves of types `P ⟶ Q` coincide if the precompositions
with morphisms `yoneda.obj X ⟶ P` agree. -/
lemma hom_ext_yoneda {P Q : Cᵒᵖ ⥤ Type v₁} {f g : P ⟶ Q}
    (h : ∀ (X : C) (p : yoneda.obj X ⟶ P), p ≫ f = p ≫ g) :
    f = g

{P Q : CategoryTheory.Functor Cᵒᵖ (Type v₁)}

(h :
  ∀ (X : C) (p : CategoryTheory.yoneda.obj X ⟶ P),
    CategoryTheory.CategoryStruct.comp p f = CategoryTheory.CategoryStruct.comp p g)


theorem interior_sInter_subset (S : Set (Set X)) : interior (⋂₀ S) ⊆ ⋂ s ∈ S, interior s

{X : Type u}
[TopologicalSpace X]
(S : Set (Set X))


/-- The second theorem that characterises the function `reduce`: the maximal reduction of a word
only reduces to itself. -/
@[to_additive "The second theorem that characterises the function `reduce`: the maximal reduction of
  a word only reduces to itself."]
theorem reduce.min (H : Red (reduce L₁) L₂) : reduce L₁ = L₂

(H : FreeGroup.Red (FreeGroup.reduce L₁) L₂)


@[simp]
theorem nfp_mul_one {a : Ordinal} (ha : 0 < a) : nfp (a * ·) 1 = (a^omega)

Ordinal.nfp (fun x => a * x) 1 = a ^ Ordinal.omega


theorem exists_nat_ge [OrderedSemiring α] [Archimedean α] (x : α) : ∃ n : ℕ, x ≤ n

{α : Type u_1}
[OrderedSemiring α]
[Archimedean α]
(x : α)


lemma map_liftedLimit {C D J : Type*} [Category C] [Category D] [Category J] {K : J ⥤ C}
    {F : C ⥤ D} [CreatesLimit K F] {c : Cone (K ⋙ F)} (t : IsLimit c) (n : J) :
    (liftedLimitMapsToOriginal t).inv.hom ≫ F.map ((liftLimit t).π.app n) = c.π.app n

{c : CategoryTheory.Limits.Cone (K ⋙ F)}

(CategoryTheory.liftedLimitMapsToOriginal t).inv.hom ≫ F.map ((CategoryTheory.liftLimit t).π.app n) = c.π.app n


/-- An orthonormal set in an `InnerProductSpace` is maximal, if and only if the orthogonal
complement of its span is empty. -/
theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 𝕜 ((↑) : v → E)) :
    (∀ u ⊇ v, Orthonormal 𝕜 ((↑) : u → E) → u = v) ↔ (span 𝕜 v)ᗮ = ⊥

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{v : Set E}
(hv : Orthonormal 𝕜 Subtype.val)

(∀ u ⊇ v, Orthonormal 𝕜 Subtype.val → u = v) ↔ (Submodule.span 𝕜 v)ᗮ = ⊥


/-- In a finite-dimensional space, its dimension (seen as a cardinal) coincides with its
`finrank`. This is a copy of `finrank_eq_rank _ _` which creates easier typeclass searches. -/
theorem finrank_eq_rank' [FiniteDimensional K V] : (finrank K V : Cardinal.{v}) = Module.rank K V

(K : Type u)
(V : Type v)
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]

↑(FiniteDimensional.finrank K V) = Module.rank K V


lemma isPrimitive_def : IsPrimitive χ ↔ conductor χ = n

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
(χ : DirichletCharacter R n)


@[elab_as_elim, induction_eliminator]
protected theorem induction_on {motive : M ⊗[R] N → Prop} (z : M ⊗[R] N)
    (zero : motive 0)
    (tmul : ∀ x y, motive <| x ⊗ₜ[R] y)
    (add : ∀ x y, motive x → motive y → motive (x + y)) : motive z

(tmul : ∀ (x : M) (y : N), motive (x ⊗ₜ[R] y))

(add : ∀ (x y : TensorProduct R M N), motive x → motive y → motive (x + y))


theorem headI_dedup [Inhabited α] (l : List α) :
    l.dedup.headI = if l.headI ∈ l.tail then l.tail.dedup.headI else l.headI

{α : Type u_1}
[DecidableEq α]
[Inhabited α]
(l : List α)


@[ext]
theorem ext {p q : Seminorm 𝕜 E} (h : ∀ x, (p : E → ℝ) x = q x) : p = q

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddGroup E]
[SMul 𝕜 E]
{p q : Seminorm 𝕜 E}
(h : ∀ (x : E), p x = q x)


theorem outer_le_length (s : Set ℝ) : f.outer s ≤ f.length s


theorem integral_Ici_eq_integral_Ioi' (hx : μ {x} = 0) :
    ∫ t in Ici x, f t ∂μ = ∫ t in Ioi x, f t ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{μ : MeasureTheory.Measure X}
[PartialOrder X]
{x : X}
(hx : μ {x} = 0)

∫ (t : X) in Set.Ici x, f t ∂μ = ∫ (t : X) in Set.Ioi x, f t ∂μ


theorem IsPrimitive.dvd_iff_fraction_map_dvd_fraction_map {p q : R[X]} (hp : p.IsPrimitive)
    (hq : q.IsPrimitive) : p ∣ q ↔ p.map (algebraMap R K) ∣ q.map (algebraMap R K)

{R : Type u_1}
[CommRing R]
(K : Type u_2)
[Field K]
[Algebra R K]
[IsFractionRing R K]
[IsDomain R]
[NormalizedGCDMonoid R]
{p q : R[X]}
(hp : p.IsPrimitive)
(hq : q.IsPrimitive)

p ∣ q ↔ Polynomial.map (algebraMap R K) p ∣ Polynomial.map (algebraMap R K) q


/-- Given `I : S.Arrow` and a morphism `g : Z ⟶ I.Y`, this is the obvious relation
from `I.precomp g` to `I`. -/
@[simps]
def Arrow.precompRelation {S : J.Cover X} (I : S.Arrow) {Z : C} (g : Z ⟶ I.Y) :
    (I.precomp g).Relation I

{J : CategoryTheory.GrothendieckTopology C}


@[simp] lemma op_inv [Inv α] (a : α) : op a⁻¹ = (op a)⁻¹

AddOpposite.op a⁻¹ = (AddOpposite.op a)⁻¹


theorem IsLUB.frequently_nhds_mem {a : α} {s : Set α} (ha : IsLUB s a) (hs : s.Nonempty) :
    ∃ᶠ x in 𝓝 a, x ∈ s

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{a : α}
{s : Set α}
(ha : IsLUB s a)
(hs : s.Nonempty)


/-- A monic polynomial lifts if and only if it can be lifted to a monic polynomial
of the same degree. -/
theorem lifts_and_degree_eq_and_monic [Nontrivial S] {p : S[X]} (hlifts : p ∈ lifts f)
    (hp : p.Monic) : ∃ q : R[X], map f q = p ∧ q.degree = p.degree ∧ q.Monic

{R : Type u}
[Semiring R]
{S : Type v}
[Semiring S]
{f : R →+* S}
[Nontrivial S]
{p : S[X]}
(hlifts : p ∈ Polynomial.lifts f)
(hp : p.Monic)

∃ q, Polynomial.map f q = p ∧ q.degree = p.degree ∧ q.Monic


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

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


@[simp]
theorem mapIso_hom_app (f g : X ⟶ Y) (h : f = g) (U : Opens Y) :
    (mapIso f g h).hom.app U = eqToHom (by rw [h])

{X Y : TopCat}
(f g : X ⟶ Y)
(h : f = g)
(U : TopologicalSpace.Opens ↑Y)

(TopologicalSpace.Opens.mapIso f g h).hom.app U = CategoryTheory.eqToHom ⋯


@[simp]
theorem sup_himp_self_left (a b : α) : a ⊔ b ⇨ a = b ⇨ a

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


@[to_additive]
theorem mono_iff_ker_eq_bot : Mono f ↔ f.ker = ⊥

CategoryTheory.Mono f ↔ MonoidHom.ker f = ⊥


theorem map_extChartAt_nhds (x : M) : map (extChartAt I x) (𝓝 x) = 𝓝[range I] extChartAt I x x

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

Filter.map (↑(extChartAt I x)) (𝓝 x) = 𝓝[Set.range ↑I] ↑(extChartAt I x) x


@[to_additive (attr := simp)]
theorem comap_top (f : M →ₙ* N) : (⊤ : Subsemigroup N).comap f = ⊤

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


theorem Continuous.measurable2 [SecondCountableTopologyEither α β] {f : δ → α}
    {g : δ → β} {c : α → β → γ} (h : Continuous fun p : α × β => c p.1 p.2) (hf : Measurable f)
    (hg : Measurable g) : Measurable fun a => c (f a) (g a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_5}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[TopologicalSpace β]
[MeasurableSpace β]
[OpensMeasurableSpace β]
[TopologicalSpace γ]
[MeasurableSpace γ]
[BorelSpace γ]
[MeasurableSpace δ]
[SecondCountableTopologyEither α β]
{f : δ → α}
{g : δ → β}
{c : α → β → γ}
(h : Continuous fun p => c p.1 p.2)
(hf : Measurable f)
(hg : Measurable g)


/-- If `C` has an initial object and binary coproducts, then it has finite coproducts. -/
theorem hasFiniteCoproducts_of_has_binary_and_initial : HasFiniteCoproducts C


theorem forall_mem_cons (h : a ∉ s) (p : α → Prop) :
    (∀ x, x ∈ cons a s h → p x) ↔ p a ∧ ∀ x, x ∈ s → p x

{α : Type u_1}
{s : Finset α}
{a : α}
(h : a ∉ s)
(p : α → Prop)

(∀ x ∈ Finset.cons a s h, p x) ↔ p a ∧ ∀ x ∈ s, p x


theorem rpow_add_rpow_le {p q : ℝ} (a b : ℝ≥0∞) (hp_pos : 0 < p) (hpq : p ≤ q) :
    (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)


@[simp]
theorem hasseDeriv_monomial (n : ℕ) (r : R) :
    hasseDeriv k (monomial n r) = monomial (n - k) (↑(n.choose k) * r)

{R : Type u_1}
[Semiring R]
(k n : ℕ)
(r : R)

(Polynomial.hasseDeriv k) ((Polynomial.monomial n) r) = (Polynomial.monomial (n - k)) (↑(n.choose k) * r)


theorem solvable_of_solvable_injective (hf : Function.Injective f) [IsSolvable G'] :
    IsSolvable G

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
{f : G →* G'}
(hf : Function.Injective ⇑f)
[IsSolvable G']


theorem isExposed_empty : IsExposed 𝕜 A ∅

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace 𝕜]
[OrderedRing 𝕜]
[AddCommMonoid E]
[TopologicalSpace E]
[Module 𝕜 E]
{A : Set E}


/-- If measure `μ` is invariant under a group action and is nonzero on a compact set `K`, then it is
positive on any nonempty open set. In case of a regular measure, one can assume `μ ≠ 0` instead of
`μ K ≠ 0`, see `MeasureTheory.measure_isOpen_pos_of_smulInvariant_of_ne_zero`. -/
@[to_additive]
theorem measure_isOpen_pos_of_smulInvariant_of_compact_ne_zero (hK : IsCompact K) (hμK : μ K ≠ 0)
    (hU : IsOpen U) (hne : U.Nonempty) : 0 < μ U

[MeasureTheory.SMulInvariantMeasure G α μ]


@[ext]
lemma hom_ext {X Y : LightCondensed.{u} C} (f g : X ⟶ Y) (h : ∀ S, f.val.app S = g.val.app S) :
    f = g

(h : ∀ (S : LightProfiniteᵒᵖ), f.val.app S = g.val.app S)


@[simp] protected theorem div_one : ∀ a : Int, a.div 1 = a


lemma map_sym_eq_piAntidiag [DecidableEq ι] (s : Finset ι) (n : ℕ) :
    (s.sym n).map ⟨fun m a ↦ m.1.count a, Multiset.count_injective.comp Sym.coe_injective⟩ =
      piAntidiag s n

{ι : Type u_1}
[DecidableEq ι]
(s : Finset ι)
(n : ℕ)

Finset.map { toFun := fun m a => Multiset.count a ↑m, inj' := ⋯ } (s.sym n) = s.piAntidiag n


@[simp]
theorem inversion_dist_center' (c x : P) : inversion c (dist c x) x = x

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

EuclideanGeometry.inversion c (dist c x) x = x


/-- If `f` is continuous on `[a, ∞)`, and is `O (exp (-b * x))` at `∞` for some `b > 0`, then
`f` is integrable on `(a, ∞)`. -/
theorem integrable_of_isBigO_exp_neg {f : ℝ → ℝ} {a b : ℝ} (h0 : 0 < b)
    (hf : ContinuousOn f (Ici a)) (ho : f =O[atTop] fun x => exp (-b * x)) :
    IntegrableOn f (Ioi a)

(ho : f =O[Filter.atTop] fun x => rexp (-b * x))

MeasureTheory.IntegrableOn f (Set.Ioi a) MeasureTheory.volume


theorem count_apply [DecidableEq α] (x : α) (l : FreeAddMonoid α) : count x l = List.count x l

{α : Type u_1}
[DecidableEq α]
(x : α)
(l : FreeAddMonoid α)

(FreeAddMonoid.count x) l = List.count x l


theorem nums_stable_of_terminated (n_le_m : n ≤ m) (terminatedAt_n : g.TerminatedAt n) :
    g.nums m = g.nums n

{K : Type u_1}
{g : GenContFract K}
{n m : ℕ}
[DivisionRing K]
(n_le_m : n ≤ m)
(terminatedAt_n : g.TerminatedAt n)


theorem smul_eq_cast {a : ℕ} (_ : ((a : ℕ) : R) = a') (_ : a' * b = c) : a • b = c

{R : Type u_1}
[CommSemiring R]
{a' b c : R}
{a : ℕ}


/-- A mixin for power-associative multiplication. -/
class NatPowAssoc (M : Type*) [MulOneClass M] [Pow M ℕ] : Prop where
  /-- Multiplication is power-associative. -/
  protected npow_add : ∀ (k n : ℕ) (x : M), x ^ (k + n) = x ^ k * x ^ n
  /-- Exponent zero is one. -/
  protected npow_zero : ∀ (x : M), x ^ 0 = 1
  /-- Exponent one is identity. -/
  protected npow_one : ∀ (x : M), x ^ 1 = x

{M : Type u_2}
[MulOneClass M]
[Pow M ℕ]
[self : NatPowAssoc M]
(x : M)


@[simp]
theorem disjoint_singleton_left : Disjoint (singleton a) s ↔ a ∉ s


/--
An `R`-module `Q` is injective if and only if every injective `R`-linear map descends to a linear
map to `Q`, i.e. in the following diagram, if `f` is injective then there is an `R`-linear map
`h : Y ⟶ Q` such that `g = h ∘ f`
  ```
  X --- f ---> Y
  |
  | g
  v
  Q
  ```
-/
@[mk_iff] class Module.Injective : Prop where
  out : ∀ ⦃X Y : Type v⦄ [AddCommGroup X] [AddCommGroup Y] [Module R X] [Module R Y]
    (f : X →ₗ[R] Y) (_ : Function.Injective f) (g : X →ₗ[R] Q),
    ∃ h : Y →ₗ[R] Q, ∀ x, h (f x) = g x

(R : Type u)
[Ring R]
(Q : Type v)
[AddCommGroup Q]
[Module R Q]

Module.Injective R Q ↔
  ∀ ⦃X Y : Type v⦄ [inst : AddCommGroup X] [inst_1 : AddCommGroup Y] [inst_2 : Module R X] [inst_3 : Module R Y]
    (f : X →ₗ[R] Y), Function.Injective ⇑f → ∀ (g : X →ₗ[R] Q), ∃ h, ∀ (x : X), h (f x) = g x


@[to_additive]
theorem union_smul_inter_subset_union : (s₁ ∪ s₂) • (t₁ ∩ t₂) ⊆ s₁ • t₁ ∪ s₂ • t₂

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

s₁ ∪ s₂ +ᵥ t₁ ∩ t₂ ⊆ s₁ +ᵥ t₁ ∪ (s₂ +ᵥ t₂)


theorem filter_disj_union (s : Finset α) (t : Finset α) (h : Disjoint s t) :
    filter p (disjUnion s t h) = (filter p s).disjUnion (filter p t) (disjoint_filter_filter h)

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
(s t : Finset α)
(h : Disjoint s t)

Finset.filter p (s.disjUnion t h) = (Finset.filter p s).disjUnion (Finset.filter p t) ⋯


@[simp]
lemma image_val_compl : ↑(Dᶜ) = A \ ↑D

Subtype.val '' Dᶜ = A \ Subtype.val '' D


/-- A CHSH tuple in a *-monoid consists of 4 self-adjoint involutions `A₀ A₁ B₀ B₁` such that
the `Aᵢ` commute with the `Bⱼ`.

The physical interpretation is that `A₀` and `A₁` are a pair of boolean observables which
are spacelike separated from another pair `B₀` and `B₁` of boolean observables.
-/
--@[nolint has_nonempty_instance] Porting note(#5171): linter not ported yet
structure IsCHSHTuple {R} [Monoid R] [StarMul R] (A₀ A₁ B₀ B₁ : R) : Prop where
  A₀_inv : A₀ ^ 2 = 1
  A₁_inv : A₁ ^ 2 = 1
  B₀_inv : B₀ ^ 2 = 1
  B₁_inv : B₁ ^ 2 = 1
  A₀_sa : star A₀ = A₀
  A₁_sa : star A₁ = A₁
  B₀_sa : star B₀ = B₀
  B₁_sa : star B₁ = B₁
  A₀B₀_commutes : A₀ * B₀ = B₀ * A₀
  A₀B₁_commutes : A₀ * B₁ = B₁ * A₀
  A₁B₀_commutes : A₁ * B₀ = B₀ * A₁
  A₁B₁_commutes : A₁ * B₁ = B₁ * A₁

{R : Type u_1}
[Monoid R]
[StarMul R]
{A₀ A₁ B₀ B₁ : R}
(self : IsCHSHTuple A₀ A₁ B₀ B₁)


/-- The annihilating ideal generator is a member of the annihilating ideal. -/
theorem annIdealGenerator_mem (a : A) : annIdealGenerator 𝕜 a ∈ annIdeal 𝕜 a

(𝕜 : Type u_1)
{A : Type u_2}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
(a : A)

Polynomial.annIdealGenerator 𝕜 a ∈ Polynomial.annIdeal 𝕜 a


theorem reverse_range' : ∀ s n : Nat, reverse (range' s n) = map (s + n - 1 - ·) (range n)

(List.range' s n).reverse = List.map (fun x => s + n - 1 - x) (List.range n)


theorem Filter.tendsto_cocompact_cocompact_of_norm {f : E → F}
    (h : ∀ ε : ℝ, ∃ r : ℝ, ∀ x : E, r < ‖x‖ → ε < ‖f x‖) :
    Tendsto f (cocompact E) (cocompact F)

(h : ∀ (ε : ℝ), ∃ r, ∀ (x : E), r < ‖x‖ → ε < ‖f x‖)

Filter.Tendsto f (Filter.cocompact E) (Filter.cocompact F)


@[simp]
theorem cospanCompIso_inv_app_right : (cospanCompIso F f g).inv.app WalkingCospan.right = 𝟙 _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : C ⥤ D)
{X Y Z : C}
(f : X ⟶ Z)
(g : Y ⟶ Z)

(CategoryTheory.Limits.cospanCompIso F f g).inv.app CategoryTheory.Limits.WalkingCospan.right =
  𝟙 ((CategoryTheory.Limits.cospan (F.map f) (F.map g)).obj CategoryTheory.Limits.WalkingCospan.right)


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable]))]
theorem Measurable.div' [MeasurableDiv₂ G] (hf : Measurable f) (hg : Measurable g) :
    Measurable (f / g)

{G : Type u_2}
{α : Type u_3}
[MeasurableSpace G]
[Div G]
{m : MeasurableSpace α}
{f g : α → G}
[MeasurableDiv₂ G]
(hf : Measurable f)
(hg : Measurable g)


/-- On a set of unique differentiability, the second derivative is obtained by taking the
derivative of the derivative. -/
lemma iteratedFDerivWithin_two_apply (f : E → F) {z : E} (hs : UniqueDiffOn 𝕜 s) (hz : z ∈ s)
    (m : Fin 2 → E) :
    iteratedFDerivWithin 𝕜 2 f s z m = fderivWithin 𝕜 (fderivWithin 𝕜 f s) s z (m 0) (m 1)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
(f : E → F)
{z : E}
(hs : UniqueDiffOn 𝕜 s)
(hz : z ∈ s)
(m : Fin 2 → E)

(iteratedFDerivWithin 𝕜 2 f s z) m = ((fderivWithin 𝕜 (fderivWithin 𝕜 f s) s z) (m 0)) (m 1)


@[to_additive]
theorem Subgroup.le_topologicalClosure (s : Subgroup G) : s ≤ s.topologicalClosure

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
(s : Subgroup G)


theorem aevalTower_algebraMap (x : R) : aevalTower g y (algebraMap R (MvPolynomial σ R) x) = g x

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{S : Type u_2}
{A : Type u_3}
[CommSemiring S]
[CommSemiring A]
[Algebra S R]
[Algebra S A]
(g : R →ₐ[S] A)
(y : σ → A)
(x : R)

(MvPolynomial.aevalTower g y) ((algebraMap R (MvPolynomial σ R)) x) = g x


theorem edgeFinset_sup_edge [Fintype (edgeSet (G ⊔ edge s t))] (hn : ¬G.Adj s t) (h : s ≠ t) :
    (G ⊔ edge s t).edgeFinset = G.edgeFinset.cons s(s, t) (by simp_all)

[Fintype ↑(G ⊔ SimpleGraph.edge s t).edgeSet]

(G ⊔ SimpleGraph.edge s t).edgeFinset = Finset.cons s(s, t) G.edgeFinset ⋯


@[simp]
theorem toFinsupp_support (s : Multiset α) : s.toFinsupp.support = s.toFinset

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

(Multiset.toFinsupp s).support = s.toFinset


theorem arith_mean_weighted_of_constant (w z : ι → ℝ) (x : ℝ) (hw' : ∑ i ∈ s, w i = 1)
    (hx : ∀ i ∈ s, w i ≠ 0 → z i = x) : ∑ i ∈ s, w i * z i = x

{ι : Type u}
(s : Finset ι)
(w z : ι → ℝ)
(x : ℝ)
(hw' : ∑ i ∈ s, w i = 1)
(hx : ∀ i ∈ s, w i ≠ 0 → z i = x)


/-- Combine two `PartialHomeomorph`s using `Set.piecewise`. The source of the new
`PartialHomeomorph` is `s.ite e.source e'.source = e.source ∩ s ∪ e'.source \ s`, and similarly for
target.  The function sends `e.source ∩ s` to `e.target ∩ t` using `e` and
`e'.source \ s` to `e'.target \ t` using `e'`, and similarly for the inverse function.
To ensure the maps `toFun` and `invFun` are inverse of each other on the new `source` and `target`,
the definition assumes that the sets `s` and `t` are related both by `e.is_image` and `e'.is_image`.
To ensure that the new maps are continuous on `source`/`target`, it also assumes that `e.source` and
`e'.source` meet `frontier s` on the same set and `e x = e' x` on this intersection. -/
@[simps! (config := .asFn) toPartialEquiv apply]
def piecewise (e e' : PartialHomeomorph X Y) (s : Set X) (t : Set Y) [∀ x, Decidable (x ∈ s)]
    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t)
    (Hs : e.source ∩ frontier s = e'.source ∩ frontier s)
    (Heq : EqOn e e' (e.source ∩ frontier s)) : PartialHomeomorph X Y

(Heq : Set.EqOn (↑e) (↑e') (e.source ∩ frontier s))

(e.piecewise e' s t H H' Hs Heq).toPartialEquiv = e.piecewise e'.toPartialEquiv s t H H'


lemma mem_corootSpace' {x : H} :
    x ∈ corootSpace α ↔
    x ∈ Submodule.span R ({⁅y, z⁆ | (y ∈ rootSpace H α) (z ∈ rootSpace H (-α))} : Set H)

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{H : LieSubalgebra R L}
[LieAlgebra.IsNilpotent R ↥H]
[H.IsCartanSubalgebra]
[IsNoetherian R L]
(α : ↥H → R)
{x : ↥H}

x ∈ LieAlgebra.corootSpace α ↔
  x ∈ Submodule.span R {x | ∃ y ∈ LieAlgebra.rootSpace H α, ∃ z ∈ LieAlgebra.rootSpace H (-α), ⁅y, z⁆ = ↑x}


/-- Given sets `s, t` of a commutative monoid `M`, `x ∈ M` is in the submonoid of `M` generated by
    `s ∪ t` iff there exists an element of the submonoid generated by `s` and an element of the
    submonoid generated by `t` whose product is `x`. -/
@[to_additive
      "Given sets `s, t` of a commutative `AddMonoid M`, `x ∈ M` is in the `AddSubmonoid`
      of `M` generated by `s ∪ t` iff there exists an element of the `AddSubmonoid` generated by `s`
      and an element of the `AddSubmonoid` generated by `t` whose sum is `x`."]
theorem mem_closure_union_iff {M : Type*} [CommMonoid M] {s t : Set M} {x : M} :
    x ∈ Closure (s ∪ t) ↔ ∃ y ∈ Closure s, ∃ z ∈ Closure t, y * z = x

{M : Type u_3}
[AddCommMonoid M]
{s t : Set M}
{x : M}

x ∈ AddMonoid.Closure (s ∪ t) ↔ ∃ y ∈ AddMonoid.Closure s, ∃ z ∈ AddMonoid.Closure t, y + z = x


@[simp] theorem val_zero (n : Nat) : (0 : Fin (n + 1)).1 = 0


@[to_additive]
theorem Multipliable.subtype (hf : Multipliable f) (s : Set β) : Multipliable (f ∘ (↑) : s → α)

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[UniformSpace α]
[UniformAddGroup α]
{f : β → α}
[CompleteSpace α]
(hf : Summable f)
(s : Set β)


@[simp]
theorem trace_conj' (f : M →ₗ[R] M) (e : M ≃ₗ[R] N) : trace R N (e.conj f) = trace R M f

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{N : Type u_3}
[AddCommGroup N]
[Module R N]
(f : M →ₗ[R] M)
(e : M ≃ₗ[R] N)

(LinearMap.trace R N) (e.conj f) = (LinearMap.trace R M) f


/-- Technical lemma used in the proof of `hasFTaylorSeriesUpTo_iteratedFDeriv`, to compare sums
over embedding of `Fin k` and `Fin (k + 1)`. -/
private lemma _root_.Equiv.succ_embeddingFinSucc_fst_symm_apply {ι : Type*} [DecidableEq ι]
    {n : ℕ} (e : Fin (n+1) ↪ ι) {k : ι}
    (h'k : k ∈ Set.range (Equiv.embeddingFinSucc n ι e).1) (hk : k ∈ Set.range e) :
    Fin.succ ((Equiv.embeddingFinSucc n ι e).1.toEquivRange.symm ⟨k, h'k⟩)
      = e.toEquivRange.symm ⟨k, hk⟩

(h'k : k ∈ Set.range ⇑((Equiv.embeddingFinSucc n ι) e).fst)

(((Equiv.embeddingFinSucc n ι) e).fst.toEquivRange.symm ⟨k, h'k⟩).succ = e.toEquivRange.symm ⟨k, hk⟩


@[to_additive prod_top]
theorem prod_top (s : Submonoid M) : s.prod (⊤ : Submonoid N) = s.comap (MonoidHom.fst M N)

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(s : AddSubmonoid M)

s.prod ⊤ = AddSubmonoid.comap (AddMonoidHom.fst M N) s


/-- If `H ≤ K`, then `G/H ≃ G/K × K/H` nonconstructively.
The constructive version is `quotientEquivProdOfLE'`. -/
@[to_additive (attr := simps!) "If `H ≤ K`, then `G/H ≃ G/K × K/H` nonconstructively. The
 constructive version is `quotientEquivProdOfLE'`."]
noncomputable def quotientEquivProdOfLE (h_le : s ≤ t) : α ⧸ s ≃ (α ⧸ t) × t ⧸ s.subgroupOf t

{α : Type u_1}
[AddGroup α]
{s t : AddSubgroup α}
(h_le : s ≤ t)
(a : (α ⧸ t) × ↥t ⧸ s.addSubgroupOf t)

(AddSubgroup.quotientEquivSumOfLE h_le).symm a = Quotient.map' (fun b => Quotient.out' a.1 + ↑b) ⋯ a.2


theorem withDensity_rnDeriv_eq (μ ν : Measure α) [HaveLebesgueDecomposition μ ν] (h : μ ≪ ν) :
    ν.withDensity (rnDeriv μ ν) = μ

{α : Type u_1}
{m : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)
[μ.HaveLebesgueDecomposition ν]
(h : μ ≪ ν)


/-- If `f` is continuously polynomial at a point, then it is continuously polynomial in a
nonempty ball around that point. -/
theorem CPolynomialAt.exists_ball_cPolynomialOn {f : E → F} {x : E} (h : CPolynomialAt 𝕜 f x) :
    ∃ r : ℝ, 0 < r ∧ CPolynomialOn 𝕜 f (Metric.ball x r)

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

∃ r, 0 < r ∧ CPolynomialOn 𝕜 f (Metric.ball x r)


theorem injOn_iff_injective : InjOn f s ↔ Injective (s.restrict f)

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

Set.InjOn f s ↔ Function.Injective (s.restrict f)


@[to_additive]
theorem gc_map_comap (f : G →* N) : GaloisConnection (map f) (comap f)

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G →* N)

GaloisConnection (Subgroup.map f) (Subgroup.comap f)


theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) :
    HasDerivWithinAt (fun y => c y * d) (c' * d) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{c : 𝕜 → 𝔸}
{c' : 𝔸}
(hc : HasDerivWithinAt c c' s x)
(d : 𝔸)


/-- A projective R-module has the property that maps from it lift along surjections. -/
theorem projective_lifting_property [h : Projective R P] (f : M →ₗ[R] N) (g : P →ₗ[R] N)
    (hf : Function.Surjective f) : ∃ h : P →ₗ[R] M, f.comp h = g

{R : Type u_1}
[Semiring R]
{P : Type u_2}
[AddCommMonoid P]
[Module R P]
{M : Type u_3}
[AddCommMonoid M]
[Module R M]
{N : Type u_4}
[AddCommMonoid N]
[Module R N]
[h : Module.Projective R P]
(f : M →ₗ[R] N)
(g : P →ₗ[R] N)
(hf : Function.Surjective ⇑f)


@[trans]
theorem lt_of_lt_of_equiv {x y z : PGame} (h₁ : x < y) (h₂ : y ≈ z) : x < z

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


@[to_additive]
theorem card_bot {_ : Fintype (⊥ : Submonoid M)} : card (⊥ : Submonoid M) = 1


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

{K : Type u}
[DivisionRing K]
(s : Subfield K)
{l : List K}


@[simp] theorem getLsb_ofBoolListBE :
    (ofBoolListBE bs).getLsb i = (decide (i < bs.length) && bs.getD (bs.length - 1 - i) false)

(BitVec.ofBoolListBE bs).getLsb i = (decide (i < bs.length) && bs.getD (bs.length - 1 - i) false)


theorem toSubalgebra_injective :
    Function.Injective (IntermediateField.toSubalgebra : IntermediateField K L → _)

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]


theorem smul {R : Type*} [Semiring R] [DistribMulAction R M] [ContinuousConstSMul R M] {r : R}
    {v : VectorMeasure α M} {w : VectorMeasure α N} (h : v ≪ᵥ w) : r • v ≪ᵥ w

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[TopologicalSpace M]
[AddCommMonoid N]
[TopologicalSpace N]
{R : Type u_6}
[Semiring R]
[DistribMulAction R M]
[ContinuousConstSMul R M]
{r : R}
{v : MeasureTheory.VectorMeasure α M}
{w : MeasureTheory.VectorMeasure α N}
(h : v ≪ᵥ w)


@[to_additive nsmul_le_nsmul_iff_left]
theorem pow_le_pow_iff_right' (ha : 1 < a) : a ^ m ≤ a ^ n ↔ m ≤ n

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

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


@[to_additive]
lemma inf_mul_sup [CovariantClass α α (· * ·) (· ≤ ·)] (a b : α) : (a ⊓ b) * (a ⊔ b) = a * b

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


/-- The extension of functors functor `(C ⥤ D) ⥤ (Karoubi C ⥤ D)`
when `D` is idempotent complete. -/
@[simps!]
noncomputable def functorExtension : (C ⥤ D) ⥤ Karoubi C ⥤ D

(C : Type u_1)
(D : Type u_2)
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.IsIdempotentComplete D]
(X : CategoryTheory.Functor C D)

∀ {X_1 Y : CategoryTheory.Idempotents.Karoubi C} (f : X_1 ⟶ Y),
  ((CategoryTheory.Idempotents.functorExtension C D).obj X).map f =
    (CategoryTheory.Idempotents.toKaroubiEquivalence D).inverse.map
      (((CategoryTheory.Idempotents.functorExtension₂ C D).obj X).map f)


theorem ndinter_subset_left (s t : Multiset α) : ndinter s t ⊆ s

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


/-- A function that is complex differentiable on the complex plane is given by evaluating
its Taylor series at any point `c`. -/
lemma taylorSeries_eq_of_entire' {f : ℂ → ℂ} (hf : Differentiable ℂ f) :
    ∑' n : ℕ, (n ! : ℂ)⁻¹ * iteratedDeriv n f c * (z - c) ^ n = f z

(c z : ℂ)
{f : ℂ → ℂ}
(hf : Differentiable ℂ f)

∑' (n : ℕ), (↑n.factorial)⁻¹ * iteratedDeriv n f c * (z - c) ^ n = f z


theorem charpoly_def : f.charpoly = (toMatrix (chooseBasis R M) (chooseBasis R M) f).charpoly

{R : Type u}
{M : Type v}
[CommRing R]
[AddCommGroup M]
[Module R M]
[Module.Free R M]
[Module.Finite R M]
(f : M →ₗ[R] M)

f.charpoly = ((LinearMap.toMatrix (Module.Free.chooseBasis R M) (Module.Free.chooseBasis R M)) f).charpoly


/--
A comonoid object in a functor category induces a functor to the category of comonoid objects.
-/
@[simps]
def functorObj (A : Comon_ (C ⥤ D)) : C ⥤ Comon_ D

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

((CategoryTheory.Monoidal.ComonFunctorCategoryEquivalence.functorObj A).obj X).X = A.X.obj X


theorem SuperpolynomialDecay.mul_const [ContinuousMul β] (hf : SuperpolynomialDecay l k f) (c : β) :
    SuperpolynomialDecay l k fun n => f n * c

(hf : Asymptotics.SuperpolynomialDecay l k f)

Asymptotics.SuperpolynomialDecay l k fun n => f n * c


theorem ofReal_sum_of_nonneg {s : Finset α} {f : α → ℝ} (hf : ∀ i, i ∈ s → 0 ≤ f i) :
    ENNReal.ofReal (∑ i ∈ s, f i) = ∑ i ∈ s, ENNReal.ofReal (f i)

{α : Type u_1}
{s : Finset α}
{f : α → ℝ}
(hf : ∀ i ∈ s, 0 ≤ f i)


@[simp]
theorem FullSubcategory.lift_comp_map (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) (h : ∀ ⦃X⦄, P X → Q X) :
    FullSubcategory.lift P F hF ⋙ FullSubcategory.map h =
      FullSubcategory.lift Q F fun X => h (hF X)

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(P Q : D → Prop)
(F : CategoryTheory.Functor C D)
(hF : ∀ (X : C), P (F.obj X))
(h : ∀ ⦃X : D⦄, P X → Q X)

(CategoryTheory.FullSubcategory.lift P F hF).comp (CategoryTheory.FullSubcategory.map h) =
  CategoryTheory.FullSubcategory.lift Q F ⋯


protected theorem mk''_eq_mk : Quotient.mk'' = Quotient.mk s


theorem exp_ofReal_re (x : ℝ) : (exp x).re = Real.exp x


theorem count_of_coprime [DecidableEq (Associates α)] {a : Associates α} (ha : a ≠ 0)
    {b : Associates α} (hb : b ≠ 0) (hab : ∀ d, d ∣ a → d ∣ b → ¬Prime d) {p : Associates α}
    (hp : Irreducible p) : count p a.factors = 0 ∨ count p b.factors = 0

[(p : Associates α) → Decidable (Irreducible p)]

(hab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d)

p.count a.factors = 0 ∨ p.count b.factors = 0


@[to_additive (attr := simp)]
theorem coe_singletonOneHom : (singletonOneHom : α → Set α) = singleton


@[to_additive]
theorem union_div : (s₁ ∪ s₂) / t = s₁ / t ∪ s₂ / t

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


/-- If the normalized versions of finite measures converge weakly and their total masses
also converge, then the finite measures themselves converge weakly. -/
theorem tendsto_of_tendsto_normalize_testAgainstNN_of_tendsto_mass {γ : Type*} {F : Filter γ}
    {μs : γ → FiniteMeasure Ω} (μs_lim : Tendsto (fun i => (μs i).normalize) F (𝓝 μ.normalize))
    (mass_lim : Tendsto (fun i => (μs i).mass) F (𝓝 μ.mass)) : Tendsto μs F (𝓝 μ)

{μs : γ → MeasureTheory.FiniteMeasure Ω}

(μs_lim : Filter.Tendsto (fun i => (μs i).normalize) F (𝓝 μ.normalize))

(mass_lim : Filter.Tendsto (fun i => (μs i).mass) F (𝓝 μ.mass))


@[simp]
theorem comap_map_eq (f : V ↪ W) (G : SimpleGraph V) : (G.map f).comap f = G

{V : Type u_1}
{W : Type u_2}
(f : V ↪ W)
(G : SimpleGraph V)

SimpleGraph.comap (⇑f) (SimpleGraph.map f G) = G


theorem append_bind {α β} (xs : LazyList α) (ys : Thunk (LazyList α)) (f : α → LazyList β) :
    (xs.append ys).bind f = (xs.bind f).append (ys.get.bind f)

{α : Type u_1}
{β : Type u_2}
(xs : LazyList α)
(ys : Thunk (LazyList α))
(f : α → LazyList β)

(xs.append ys).bind f = (xs.bind f).append { fn := fun x => ys.get.bind f }


theorem curr : ∀ {it}, ValidFor l r it → it.curr = r.headD default

{l r : List Char}
{it : String.Iterator}

String.Iterator.ValidFor l r it → it.curr = r.headD default


@[simp]
theorem symmDiff_compl_self : a ∆ aᶜ = ⊤

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


theorem Filter.Tendsto.arsinh {α : Type*} {l : Filter α} {f : α → ℝ} {a : ℝ}
    (h : Tendsto f l (𝓝 a)) : Tendsto (fun x => arsinh (f x)) l (𝓝 (arsinh a))

{α : Type u_1}
{l : Filter α}
{f : α → ℝ}
{a : ℝ}
(h : Filter.Tendsto f l (𝓝 a))

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


@[to_additive]
theorem ball_one_eq (r : ℝ) : ball (1 : E) r = { x | ‖x‖ < r }

{E : Type u_6}
[SeminormedGroup E]
(r : ℝ)


/-- If `P` is a family of generators of `S` over `R` and `T` is an `R`-algebra, we
obtain a natural family of generators of `T ⊗[R] S` over `T`. -/
@[simps! val, simps! (config := .lemmasOnly) vars]
noncomputable
def baseChange {T} [CommRing T] [Algebra R T] (P : Generators R S) : Generators T (T ⊗[R] S)

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{T : Type u_1}
[CommRing T]
[Algebra R T]
(P : Algebra.Generators R S)


@[simp]
theorem blockDiag'_zero : blockDiag' (0 : Matrix (Σi, m' i) (Σi, n' i) α) = 0

{o : Type u_4}
{m' : o → Type u_7}
{n' : o → Type u_8}
{α : Type u_12}
[Zero α]


@[reassoc (attr := simp)]
theorem id_tensor_pre_app_comp_ev (f : B ⟶ A) (X : C) :
    B ◁ (pre f).app X ≫ (ihom.ev B).app X = f ▷ (A ⟶[C] X) ≫ (ihom.ev A).app X

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{A B : C}
[CategoryTheory.Closed A]
[CategoryTheory.Closed B]
(f : B ⟶ A)
(X : C)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerLeft B ((CategoryTheory.MonoidalClosed.pre f).app X))
    ((CategoryTheory.ihom.ev B).app X) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight f ((CategoryTheory.ihom A).obj X))
    ((CategoryTheory.ihom.ev A).app X)


@[simp]
theorem join_zero : @join α 0 = 0


/-- An alternative recursive definition of `Nat.nth`: `Nat.nth s n` is the infimum of `x ∈ s` such
that `Nat.nth s k < x` for all `k < n`, if this set is nonempty. We do not assume that the set is
nonempty because we use the same "garbage value" `0` both for `sInf` on `ℕ` and for `Nat.nth s n`
for `n ≥ card s`. -/
theorem nth_eq_sInf (p : ℕ → Prop) (n : ℕ) : nth p n = sInf {x | p x ∧ ∀ k < n, nth p k < x}

Nat.nth p n = sInf {x | p x ∧ ∀ k < n, Nat.nth p k < x}


/-- The short complex `A --dZero--> Fun(G, A) --dOne--> Fun(G × G, A)` is isomorphic to the 1st
short complex associated to the complex of inhomogeneous cochains of `A`. -/
@[simps! hom inv]
def shortComplexH1Iso : (inhomogeneousCochains A).sc' 0 1 2 ≅ shortComplexH1 A

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)

(groupCohomology.shortComplexH1Iso A).hom =
  { τ₁ := ↑(groupCohomology.zeroCochainsLequiv A), τ₂ := ↑(groupCohomology.oneCochainsLequiv A),
    τ₃ := ↑(groupCohomology.twoCochainsLequiv A), comm₁₂ := ⋯, comm₂₃ := ⋯ }


@[simp]
theorem lift_lt {a b : Ordinal} : lift.{u,v} a < lift.{u,v} b ↔ a < b

Ordinal.lift.{u, v} a < Ordinal.lift.{u, v} b ↔ a < b


theorem biprod.mapBiprod_hom_desc (f : X ⟶ W) (g : Y ⟶ W) :
    (F.mapBiprod X Y).hom ≫ biprod.desc (F.map f) (F.map g) = F.map (biprod.desc f g)

[CategoryTheory.Limits.PreservesBinaryBiproduct X Y F]

(F.mapBiprod X Y).hom ≫ CategoryTheory.Limits.biprod.desc (F.map f) (F.map g) =
  F.map (CategoryTheory.Limits.biprod.desc f g)


lemma CompleteOrthogonalIdempotents.option (he : OrthogonalIdempotents e) :
    CompleteOrthogonalIdempotents (Option.elim · (1 - ∑ i, e i) e)

{R : Type u_1}
[Ring R]
{I : Type u_3}
{e : I → R}
[Fintype I]
(he : OrthogonalIdempotents e)

CompleteOrthogonalIdempotents fun x => x.elim (1 - ∑ i : I, e i) e


theorem Ioc_subset_Iic_self : Ioc a b ⊆ Iic b


@[simp]
theorem coe_toContinuousMap (f : C_c(α, β)) : (f.toContinuousMap : α → β) = f

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
(f : α →C_c β)


theorem gal_X_pow_sub_C_isSolvable (n : ℕ) (x : F) : IsSolvable (X ^ n - C x).Gal

{F : Type u_1}
[Field F]
(n : ℕ)
(x : F)

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


theorem eraseMax.valid {t} (h : @Valid α _ t) : Valid (eraseMax t)

{α : Type u_1}
[Preorder α]
{t : Ordnode α}
(h : t.Valid)


lemma isInt_emod_zero : ∀ {a b r : ℤ}, IsInt a r → IsNat b (nat_lit 0) → IsInt (a % b) r

Mathlib.Meta.NormNum.IsInt a r → Mathlib.Meta.NormNum.IsNat b 0 → Mathlib.Meta.NormNum.IsInt (a % b) r


theorem totallyBounded_preimage {f : α → β} {s : Set β} (hf : UniformInducing f)
    (hs : TotallyBounded s) : TotallyBounded (f ⁻¹' s)

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{f : α → β}
{s : Set β}
(hf : UniformInducing f)
(hs : TotallyBounded s)


/-- Taking sub-families preserves equicontinuity at a point. -/
theorem EquicontinuousAt.comp {F : ι → X → α} {x₀ : X} (h : EquicontinuousAt F x₀) (u : κ → ι) :
    EquicontinuousAt (F ∘ u) x₀

{ι : Type u_1}
{κ : Type u_2}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{F : ι → X → α}
{x₀ : X}
(h : EquicontinuousAt F x₀)
(u : κ → ι)


theorem isOpen_range_sigmaMk {i : ι} : IsOpen (range (@Sigma.mk ι σ i))

{ι : Type u_5}
{σ : ι → Type u_7}
[(i : ι) → TopologicalSpace (σ i)]
{i : ι}


/-- If `f` is locally integrable and `g` is continuous with compact support,
then `f • g` is integrable. -/
theorem LocallyIntegrable.integrable_smul_right_of_hasCompactSupport
    [NormedSpace ℝ E] [OpensMeasurableSpace X] [T2Space X] {f : X → ℝ} (hf : LocallyIntegrable f μ)
    {g : X → E} (hg : Continuous g) (h'g : HasCompactSupport g) :
    Integrable (fun x ↦ f x • g x) μ

(hf : MeasureTheory.LocallyIntegrable f μ)

MeasureTheory.Integrable (fun x => f x • g x) μ


theorem compact_basis_nhds [LocallyCompactSpace X] (x : X) :
    (𝓝 x).HasBasis (fun s => s ∈ 𝓝 x ∧ IsCompact s) fun s => s

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


theorem Quiver.Hom.op_inj {X Y : C} :
    Function.Injective (Quiver.Hom.op : (X ⟶ Y) → (Opposite.op Y ⟶ Opposite.op X))


@[to_additive (attr := fun_prop)]
nonrec theorem ContinuousAt.const_smul (hg : ContinuousAt g b) (c : M) :
    ContinuousAt (fun x => c • g x) b

{M : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[SMul M α]
[ContinuousConstSMul M α]
[TopologicalSpace β]
{g : β → α}
{b : β}
(hg : ContinuousAt g b)
(c : M)


/-- The norm of `lsmul` equals 1 in any nontrivial normed group.

This is `ContinuousLinearMap.opNorm_lsmul_le` as an equality. -/
@[simp]
theorem opNorm_lsmul [NormedField 𝕜'] [NormedAlgebra 𝕜 𝕜'] [NormedSpace 𝕜' E]
    [IsScalarTower 𝕜 𝕜' E] [Nontrivial E] : ‖(lsmul 𝕜 𝕜' : 𝕜' →L[𝕜] E →L[𝕜] E)‖ = 1

(𝕜 : Type u_1)
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(𝕜' : Type u_3)
[NormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' E]
[IsScalarTower 𝕜 𝕜' E]
[Nontrivial E]


theorem weightedSMul_smul [NormedField 𝕜] [NormedSpace 𝕜 F] [SMulCommClass ℝ 𝕜 F] (c : 𝕜)
    (s : Set α) (x : F) : weightedSMul μ s (c • x) = c • weightedSMul μ s x

{α : Type u_1}
{F : Type u_3}
{𝕜 : Type u_4}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedField 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(c : 𝕜)
(s : Set α)
(x : F)

(MeasureTheory.weightedSMul μ s) (c • x) = c • (MeasureTheory.weightedSMul μ s) x


lemma measurableSet_memPartition [MeasurableSpace α] {t : ℕ → Set α}
    (ht : ∀ n, MeasurableSet (t n)) (n : ℕ) {s : Set α} (hs : s ∈ memPartition t n) :
    MeasurableSet s

{α : Type u_1}
[MeasurableSpace α]
{t : ℕ → Set α}
(ht : ∀ (n : ℕ), MeasurableSet (t n))
(n : ℕ)
{s : Set α}
(hs : s ∈ memPartition t n)


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

{α : Type u_2}
{β : Type u_3}
[Top α]
[Top β]
(f : TopHom α β)


@[simp]
theorem norm_eq_of_zero {x : ℝ} : ‖(x : AddCircle (0 : ℝ))‖ = |x|


lemma isClopen_ball : IsClopen (ball x r)

{X : Type u_1}
[PseudoMetricSpace X]
[IsUltrametricDist X]
(x : X)
(r : ℝ)


theorem SurjOn.union_union (h₁ : SurjOn f s₁ t₁) (h₂ : SurjOn f s₂ t₂) :
    SurjOn f (s₁ ∪ s₂) (t₁ ∪ t₂)

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


theorem arcsin_lt_iff_lt_sin' {x y : ℝ} (hy : y ∈ Ioc (-(π / 2)) (π / 2)) :
    arcsin x < y ↔ x < sin y


theorem support_single_subset : (single a b).support ⊆ {a}

{α : Type u_1}
{M : Type u_5}
[Zero M]
{a : α}
{b : M}


@[simp]
theorem num_zero : Rat.num 0 = 0


@[to_additive (attr := simp)]
theorem lift_apply_inr (f : M →* P) (g : N →* P) (x : N) : lift f g (inr x) = g x

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass N]
[AddMonoid P]
(f : M →+ P)
(g : N →+ P)
(x : N)

(AddMonoid.Coprod.lift f g) (AddMonoid.Coprod.inr x) = g x


/-- See also `Filter.bliminf_or_eq_inf`. -/
--@[simp] -- Porting note: simp_nf linter, lhs simplifies, added _aux simp versions below
theorem bliminf_or_le_inf : (bliminf u f fun x => p x ∨ q x) ≤ bliminf u f p ⊓ bliminf u f q

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : Filter β}
{p q : β → Prop}
{u : β → α}

(Filter.bliminf u f fun x => p x ∨ q x) ≤ Filter.bliminf u f p ⊓ Filter.bliminf u f q


/-- This applies to the sup norm of L1 norm. -/
@[local instance]
protected theorem linftyOpBoundedSMul
    [SeminormedRing R] [SeminormedAddCommGroup α] [Module R α] [BoundedSMul R α] :
    BoundedSMul R (Matrix m n α)

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


theorem get_push_lt (a : Array α) (x : α) (i : Nat) (h : i < a.size) :
    have : i < (a.push x).size := by simp [*, Nat.lt_succ_of_le, Nat.le_of_lt]
    (a.push x)[i] = a[i]

{α : Type u_1}
(a : Array α)
(x : α)
(i : Nat)
(h : i < a.size)


theorem reflTransGen_swap : ReflTransGen (swap r) a b ↔ ReflTransGen r b a

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

Relation.ReflTransGen (Function.swap r) a b ↔ Relation.ReflTransGen r b a


lemma comp_injective [Zero P] [Zero P'] (exact : Exact f g)
    (inj : Function.Injective g') (h0 : g' 0 = 0) :
    Exact f (g' ∘ g)

{M : Type u_2}
{N : Type u_4}
{P : Type u_6}
{P' : Type u_7}
{f : M → N}
{g : N → P}
(g' : P → P')
[Zero P]
[Zero P']
(exact : Function.Exact f g)
(inj : Function.Injective g')
(h0 : g' 0 = 0)


/-- Assume that a measure `μ` is `IsMulLeftInvariant`, that the action of `Γ` on `G` has a
measurable fundamental domain `s` with positive finite volume, and that there is a single measurable
set `V ⊆ G ⧸ Γ` along which the pullback of `μ` and `ν` agree (so the scaling is right). Then
`μ` satisfies `QuotientMeasureEqMeasurePreimage`. The main tool of the proof is the uniqueness of
left invariant measures, if normalized by a single positive finite-measured set. -/
@[to_additive
"Assume that a measure `μ` is `IsAddLeftInvariant`, that the action of `Γ` on `G` has a
measurable fundamental domain `s` with positive finite volume, and that there is a single measurable
set `V ⊆ G ⧸ Γ` along which the pullback of `μ` and `ν` agree (so the scaling is right). Then
`μ` satisfies `AddQuotientMeasureEqMeasurePreimage`. The main tool of the proof is the uniqueness of
left invariant measures, if normalized by a single positive finite-measured set."]
theorem MeasureTheory.Measure.IsMulLeftInvariant.quotientMeasureEqMeasurePreimage_of_set {s : Set G}
    (fund_dom_s : IsFundamentalDomain Γ.op s ν) {V : Set (G ⧸ Γ)}
    (meas_V : MeasurableSet V) (neZeroV : μ V ≠ 0) (hV : μ V = ν (π ⁻¹' V ∩ s))
    (neTopV : μ V ≠ ⊤) : QuotientMeasureEqMeasurePreimage ν μ

(fund_dom_s : MeasureTheory.IsFundamentalDomain (↥Γ.op) s ν)

(hV : μ V = ν (QuotientGroup.mk ⁻¹' V ∩ s))


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


@[simp]
lemma ev_refl (γ : OneCocycle G U) (i : I) ⦃T : C⦄ (a : T ⟶ U i) :
    γ.ev i i a a = 1

(γ : CategoryTheory.PresheafOfGroups.OneCocycle G U)


theorem iterate_derivative_zero {k : ℕ} : derivative^[k] (0 : R[X]) = 0


/-- The separable degree equals the degree of any separable contraction, i.e., it is unique. -/
theorem IsSeparableContraction.degree_eq [hF : ExpChar F q] (g : F[X])
    (hg : IsSeparableContraction q f g) : g.natDegree = hf.degree

(hf : Polynomial.HasSeparableContraction q f)

(hg : Polynomial.IsSeparableContraction q f g)


theorem card_union_le (s t : Finset α) : (s ∪ t).card ≤ s.card + t.card

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


@[simp]
theorem neg_inf (S T : Submodule R M) : -(S ⊓ T) = -S ⊓ -T

{R : Type u_2}
{M : Type u_3}
[Semiring R]
[AddCommGroup M]
[Module R M]
(S T : Submodule R M)


@[simp]
theorem coe_mkNormedAddGroupHom (f : V₁ →+ V₂) (C) (hC) : ⇑(f.mkNormedAddGroupHom C hC) = f

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(f : V₁ →+ V₂)
(C : ℝ)
(hC : ∀ (v : V₁), ‖f v‖ ≤ C * ‖v‖)


@[to_additive]
theorem setLIntegral_eq_tsum (h : IsFundamentalDomain G s μ) (f : α → ℝ≥0∞) (t : Set α) :
    ∫⁻ x in t, f x ∂μ = ∑' g : G, ∫⁻ x in t ∩ g • s, f x ∂μ

[MeasureTheory.SMulInvariantMeasure G α μ]

(h : MeasureTheory.IsFundamentalDomain G s μ)

(f : α → ℝ≥0∞)

∫⁻ (x : α) in t, f x ∂μ = ∑' (g : G), ∫⁻ (x : α) in t ∩ g • s, f x ∂μ


/-- Two group homomorphisms `G →* G'` are equal if and only if they agree on a generator of `G`. -/
@[to_additive
   "Two homomorphisms `G →+ G'` of additive groups are equal if and only if they agree
   on a generator of `G`."]
lemma MonoidHom.eq_iff_eq_on_generator (f₁ f₂ : G →* G') : f₁ = f₂ ↔ f₁ g = f₂ g

(hg : ∀ (x : G), x ∈ AddSubgroup.zmultiples g)


theorem ofHamming_inj {x y : Hamming β} : ofHamming x = ofHamming y ↔ x = y

{ι : Type u_2}
{β : ι → Type u_3}
{x y : Hamming β}

Hamming.ofHamming x = Hamming.ofHamming y ↔ x = y


/-- Left unitor for the vertical composition of oplax natural transformations. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
def leftUnitor (η : F ⟶ G) : 𝟙 F ≫ η ≅ η

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
{F G : CategoryTheory.OplaxFunctor B C}
(η : F ⟶ G)
(a : B)

(CategoryTheory.OplaxNatTrans.leftUnitor η).inv.app a = (CategoryTheory.Bicategory.leftUnitor (η.app a)).inv


theorem _root_.Function.Semiconj.filter_map {f : α → β} {ga : α → α} {gb : β → β}
    (h : Function.Semiconj f ga gb) : Function.Semiconj (map f) (map ga) (map gb)

{α : Type u}
{β : Type v}
{f : α → β}
{ga : α → α}
{gb : β → β}
(h : Function.Semiconj f ga gb)

Function.Semiconj (Filter.map f) (Filter.map ga) (Filter.map gb)


/-- 1 is of finite order in any monoid. -/
@[to_additive "0 is of finite order in any additive monoid."]
theorem isOfFinOrder_one : IsOfFinOrder (1 : G)


/-- This lemma is superceded by `MeasureTheory.tendstoInMeasure_of_tendsto_eLpNorm` where we
allow `p = ∞` and only require `AEStronglyMeasurable`. -/
theorem tendstoInMeasure_of_tendsto_eLpNorm_of_stronglyMeasurable (hp_ne_zero : p ≠ 0)
    (hp_ne_top : p ≠ ∞) (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g)
    {l : Filter ι} (hfg : Tendsto (fun n => eLpNorm (f n - g) p μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g

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

(hg : MeasureTheory.StronglyMeasurable g)

(hfg : Filter.Tendsto (fun n => MeasureTheory.eLpNorm (f n - g) p μ) l (𝓝 0))


@[simp]
lemma exists_apply_eq_apply2 {α β γ} {f : α → β → γ} {a : α} {b : β} : ∃ x y, f x y = f a b

{α : Sort u_3}
{β : Sort u_4}
{γ : Sort u_5}
{f : α → β → γ}
{a : α}
{b : β}


theorem setToFun_add_left (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C') (f : α → E) :
    setToFun μ (T + T') (hT.add hT') f = setToFun μ T hT f + setToFun μ T' hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

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

MeasureTheory.setToFun μ (T + T') ⋯ f = MeasureTheory.setToFun μ T hT f + MeasureTheory.setToFun μ T' hT' f


@[simp]
theorem rpow_one (x : ℝ≥0) : x ^ (1 : ℝ) = x


/-- The functor `Fin n ⥤ Fin (n + 1)` which sends `i` to `i.succ`. -/
@[simps]
def _root_.Fin.succFunctor (n : ℕ) : Fin n ⥤ Fin (n + 1)

(Fin.succFunctor n).map hij = CategoryTheory.homOfLE ⋯


/-- The composition of morphisms of snake inputs. -/
@[simps]
def comp (f : Hom S₁ S₂) (g : Hom S₂ S₃) : Hom S₁ S₃

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

(f.comp g).f₂ = CategoryTheory.CategoryStruct.comp f.f₂ g.f₂


theorem numeric_def {x : PGame} :
    Numeric x ↔
      (∀ i j, x.moveLeft i < x.moveRight j) ∧
        (∀ i, Numeric (x.moveLeft i)) ∧ ∀ j, Numeric (x.moveRight j)

x.Numeric ↔
  (∀ (i : x.LeftMoves) (j : x.RightMoves), x.moveLeft i < x.moveRight j) ∧
    (∀ (i : x.LeftMoves), (x.moveLeft i).Numeric) ∧ ∀ (j : x.RightMoves), (x.moveRight j).Numeric


/-- Universe lift functor for commutative groups. -/
@[to_additive (attr := simps)
  "Universe lift functor for additive commutative groups."]
def uliftFunctor : CommGrp.{u} ⥤ CommGrp.{max u v}

AddCommGrp.uliftFunctor.map f =
  AddCommGrp.ofHom (AddEquiv.ulift.symm.toAddMonoidHom.comp (AddMonoidHom.comp f AddEquiv.ulift.toAddMonoidHom))


@[aesop safe 20 (rule_sets := [Measurable])]
protected theorem add [AddMonoid β] [ContinuousAdd β] (hf : AEFinStronglyMeasurable f μ)
    (hg : AEFinStronglyMeasurable g μ) : AEFinStronglyMeasurable (f + g) μ

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)

(hg : MeasureTheory.AEFinStronglyMeasurable g μ)

MeasureTheory.AEFinStronglyMeasurable (f + g) μ


/-- The distance to a point's orthogonal projection is 0 iff it lies in the subspace. -/
theorem dist_orthogonalProjection_eq_zero_iff {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] {p : P} :
    dist p (orthogonalProjection s p) = 0 ↔ p ∈ s

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

dist p ↑((EuclideanGeometry.orthogonalProjection s) p) = 0 ↔ p ∈ s


/-- Rotating triangles gives an auto-equivalence on the category of triangles in `C`.
-/
@[simps]
def triangleRotation : Equivalence (Triangle C) (Triangle C)

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

(CategoryTheory.Pretriangulated.triangleRotation C).counitIso = CategoryTheory.Pretriangulated.invRotCompRot


/-- The (distinguished) triangle in the derived category of `C` given by a
short exact short complex in `C`. -/
@[simps!]
noncomputable def singleTriangle : Triangle (DerivedCategory C)

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

hS.singleTriangle.obj₃ = (DerivedCategory.singleFunctor C 0).obj S.X₃


/-- A nil vector maps to a nil list. -/
@[simp]
theorem toList_nil : toList nil = @List.nil α


theorem disjoint_cylinder_of_longestPrefix_lt {s : Set (∀ n, E n)} (hs : IsClosed s) {x : ∀ n, E n}
    (hx : x ∉ s) {n : ℕ} (hn : longestPrefix x s < n) : Disjoint s (cylinder x n)

{E : ℕ → Type u_1}
[(n : ℕ) → TopologicalSpace (E n)]
[∀ (n : ℕ), DiscreteTopology (E n)]
{s : Set ((n : ℕ) → E n)}
(hs : IsClosed s)
{x : (n : ℕ) → E n}
(hx : x ∉ s)
{n : ℕ}
(hn : PiNat.longestPrefix x s < n)


lemma top_mul_of_neg {x : EReal} (h : x < 0) : ⊤ * x = ⊥


theorem isBounded_ofBounded_iff (B : Set (Set α)) {empty_mem subset_mem union_mem sUnion_univ} :
    @IsBounded _ (ofBounded B empty_mem subset_mem union_mem sUnion_univ) s ↔ s ∈ B

{subset_mem : ∀ s₁ ∈ B, ∀ s₂ ⊆ s₁, s₂ ∈ B}

{union_mem : ∀ s₁ ∈ B, ∀ s₂ ∈ B, s₁ ∪ s₂ ∈ B}


@[simp]
theorem join_nil : join nil = (nil : Seq α)


theorem ContinuousWithinAt.congr_of_eventuallyEq {f f₁ : α → β} {s : Set α} {x : α}
    (h : ContinuousWithinAt f s x) (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) :
    ContinuousWithinAt f₁ s x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f f₁ : α → β}
{s : Set α}
{x : α}
(h : ContinuousWithinAt f s x)
(h₁ : f₁ =ᶠ[𝓝[s] x] f)
(hx : f₁ x = f x)


theorem zeroLocus_union (s s' : Set R) : zeroLocus (s ∪ s') = zeroLocus s ∩ zeroLocus s'

{R : Type u}
[CommSemiring R]
(s s' : Set R)

PrimeSpectrum.zeroLocus (s ∪ s') = PrimeSpectrum.zeroLocus s ∩ PrimeSpectrum.zeroLocus s'


lemma abv_mul (x y) : abv (x * y) = abv x * abv y

{S : Type u_5}
[OrderedSemiring S]
{R : Type u_6}
[Semiring R]
(abv : R → S)
[IsAbsoluteValue abv]
(x y : R)


theorem countP_of (x : α) : countP p (of x) = if p x then Multiplicative.ofAdd 1 else 1

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

(FreeMonoid.countP p) (FreeMonoid.of x) = if p x then Multiplicative.ofAdd 1 else 1


@[simps]
instance : TotalComplexShape c c c

{I : Type u_4}
[AddMonoid I]
(c : ComplexShape I)
[c.TensorSigns]

∀ (x : I × I), TotalComplexShape.ε₁ c c c x = 1


/-- A decreasing sequence of real numbers is summable on a residue class
if and only if it is summable. -/
lemma summable_indicator_mod_iff {m : ℕ} [NeZero m] {f : ℕ → ℝ} (hf : Antitone f) (k : ZMod m) :
    Summable ({n : ℕ | (n : ZMod m) = k}.indicator f) ↔ Summable f

Summable ({n | ↑n = k}.indicator f) ↔ Summable f


@[simp] theorem coe_refl : (Equiv.refl α : α → α) = id


theorem comp_dite {P : Prop} [Decidable P]
    {X Y Z : C} (f : X ⟶ Y) (g : P → (Y ⟶ Z)) (g' : ¬P → (Y ⟶ Z)) :
    (f ≫ if h : P then g h else g' h) = if h : P then f ≫ g h else f ≫ g' h

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{P : Prop}
[Decidable P]
{X Y Z : C}
(f : X ⟶ Y)
(g : P → (Y ⟶ Z))
(g' : ¬P → (Y ⟶ Z))

CategoryTheory.CategoryStruct.comp f (if h : P then g h else g' h) =
  if h : P then CategoryTheory.CategoryStruct.comp f (g h) else CategoryTheory.CategoryStruct.comp f (g' h)


{α : Type u_1}
[Preorder α]
{a b : α}
(h : a ⋖ b)


theorem infinite_iff_infinitesimal_inv {x : ℝ*} (h0 : x ≠ 0) : Infinite x ↔ Infinitesimal x⁻¹


theorem Directed.convex_iUnion {ι : Sort*} {s : ι → Set E} (hdir : Directed (· ⊆ ·) s)
    (hc : ∀ ⦃i : ι⦄, Convex 𝕜 (s i)) : Convex 𝕜 (⋃ i, s i)

(hdir : Directed (fun x x_1 => x ⊆ x_1) s)


@[simp]
private theorem fst_fFold_fFold (m₁ m₂ : M) (x : A × S f) :
    (fFold f m₁ (fFold f m₂ x)).fst = f.bilin m₁ m₂ * x.fst

(x : A × ↥(CliffordAlgebra.even.lift.S f))

(((CliffordAlgebra.even.lift.fFold f) m₁) (((CliffordAlgebra.even.lift.fFold f) m₂) x)).1 = (f.bilin m₁) m₂ * x.1


@[to_additive (attr := simp)]
theorem dist_div_left [Group G] [PseudoMetricSpace G] [IsometricSMul G G]
    [IsometricSMul Gᵐᵒᵖ G] (a b c : G) : dist (a / b) (a / c) = dist b c

{G : Type v}
[Group G]
[PseudoMetricSpace G]
[IsometricSMul G G]
[IsometricSMul Gᵐᵒᵖ G]
(a b c : G)


/-- 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))

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


/-- 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).hom.app X = (CategoryTheory.MonoidalCategory.rightUnitor X).hom


@[simp]
theorem mul_inv_cancel_right_of_invertible (B : Matrix m n α) [Invertible A] : B * A * A⁻¹ = B

{m : Type u}
{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
(B : Matrix m n α)
[Invertible A]


lemma add_liminf_le_liminf_add : (liminf u f) + (liminf v f) ≤ liminf (u + v) f

{α : Type u_2}
{f : Filter α}
{u v : α → EReal}

Filter.liminf u f + Filter.liminf v f ≤ Filter.liminf (u + v) f


@[simp]
theorem HomogeneousIdeal.mem_iff {I : HomogeneousIdeal 𝒜} {x : A} : x ∈ I.toIdeal ↔ x ∈ I

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[DecidableEq ι]
[AddMonoid ι]
[GradedRing 𝒜]
{I : HomogeneousIdeal 𝒜}
{x : A}


/-- Constructor for short complexes in `ModuleCat.{v} R` taking as inputs
linear maps `f` and `g` and the vanishing of their composition. -/
@[simps]
def moduleCatMk {X₁ X₂ X₃ : Type v} [AddCommGroup X₁] [AddCommGroup X₂] [AddCommGroup X₃]
    [Module R X₁] [Module R X₂] [Module R X₃] (f : X₁ →ₗ[R] X₂) (g : X₂ →ₗ[R] X₃)
    (hfg : g.comp f = 0) : ShortComplex (ModuleCat.{v} R)

{R : Type u}
[Ring R]
{X₁ X₂ X₃ : Type v}
[AddCommGroup X₁]
[AddCommGroup X₂]
[AddCommGroup X₃]
[Module R X₁]
[Module R X₂]
[Module R X₃]
(f : X₁ →ₗ[R] X₂)
(g : X₂ →ₗ[R] X₃)
(hfg : g ∘ₗ f = 0)

(CategoryTheory.ShortComplex.moduleCatMk f g hfg).X₂ = ModuleCat.of R X₂


theorem Bool.and_assoc (a b c : Bool) : (a && b && c) = (a && (b && c))


private theorem le_trans {d₁ d₂ d₃ : ManyOneDegree} : d₁ ≤ d₂ → d₂ ≤ d₃ → d₁ ≤ d₃

d₁ ≤ d₂ → d₂ ≤ d₃ → d₁ ≤ d₃


theorem ConcaveOn.left_le_of_le_right' (hf : ConcaveOn 𝕜 s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s)
    {a b : 𝕜} (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) (hfy : f (a • x + b • y) ≤ f y) :
    f x ≤ f (a • x + b • y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrderedCancelAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConcaveOn 𝕜 s f)
{x y : E}
(hx : x ∈ s)
(hy : y ∈ s)
{a b : 𝕜}
(ha : 0 < a)
(hb : 0 ≤ b)
(hab : a + b = 1)
(hfy : f (a • x + b • y) ≤ f y)


@[simp]
theorem coe_of (α : Type*) [HeytingAlgebra α] : ↥(of α) = α


lemma quasiIsoAt_iff_comp_right (φ : K ⟶ L) (φ' : L ⟶ M) (i : ι) [K.HasHomology i]
    [L.HasHomology i] [M.HasHomology i]
    [hφ' : QuasiIsoAt φ' i] :
    QuasiIsoAt (φ ≫ φ') i ↔ QuasiIsoAt φ i


theorem ofNat_congr {a b : Nat} (h : a = b) : (a : Int) = (b : Int)


lemma rightDerived_ext (G : D ⥤ H) (γ₁ γ₂ : RF ⟶ G)
    (hγ : α ≫ whiskerLeft L γ₁ = α ≫ whiskerLeft L γ₂) : γ₁ = γ₂

(hγ :
  CategoryTheory.CategoryStruct.comp α (CategoryTheory.whiskerLeft L γ₁) =
    CategoryTheory.CategoryStruct.comp α (CategoryTheory.whiskerLeft L γ₂))


@[to_additive (attr := simp)]
theorem op_top : (⊤ : Subgroup G).op = ⊤


theorem monotone_and {p q : α → Prop} (m_p : Monotone p) (m_q : Monotone q) :
    Monotone fun x => p x ∧ q x

{α : Type u}
[Preorder α]
{p q : α → Prop}
(m_p : Monotone p)
(m_q : Monotone q)


/-- A variant of `prod_range_succ` which pulls off the first term in the product rather than the
last. -/
@[to_additive
"A variant of `sum_range_succ` which pulls off the first term in the sum rather than the last."]
lemma prod_range_succ' (f : ℕ → M) (n : ℕ) :
    ((range n.succ).map f).prod = f 0 * ((range n).map fun i ↦ f i.succ).prod

{M : Type u_4}
[AddMonoid M]
(f : ℕ → M)
(n : ℕ)

(List.map f (List.range n.succ)).sum = f 0 + (List.map (fun i => f i.succ) (List.range n)).sum


/-- Consider a sigma-compact group acting continuously and transitively on a Baire space. Then
the orbit map is open. This is a version of the open mapping theorem, valid notably for the
action of a sigma-compact locally compact group on a locally compact space. -/
@[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a
Baire space. Then the orbit map is open. This is a version of the open mapping theorem, valid
notably for the action of a sigma-compact locally compact group on a locally compact space."]
theorem isOpenMap_smul_of_sigmaCompact (x : X) : IsOpenMap (fun (g : G) ↦ g • x)

{G : Type u_1}
{X : Type u_2}
[TopologicalSpace G]
[TopologicalSpace X]
[AddGroup G]
[TopologicalAddGroup G]
[AddAction G X]
[SigmaCompactSpace G]
[BaireSpace X]
[T2Space X]
[ContinuousVAdd G X]
[AddAction.IsPretransitive G X]
(x : X)


@[simp]
theorem destutter'_nil : destutter' R a [] = [a]

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


lemma strictAntiOn_one_add_smoothingFn : StrictAntiOn (fun (x : ℝ) => (1 : ℝ) + ε x) (Set.Ioi 1)

StrictAntiOn (fun x => 1 + AkraBazziRecurrence.smoothingFn x) (Set.Ioi 1)


/-- Heterobasic version of `TensorProduct.curry`:

Given a linear map `M ⊗[R] N →[A] P`, compose it with the canonical
bilinear map `M →[A] N →[R] M ⊗[R] N` to form a bilinear map `M →[A] N →[R] P`. -/
@[simps]
nonrec def curry (f : M ⊗[R] N →ₗ[A] P) : M →ₗ[A] N →ₗ[R] P

{R : Type uR}
{A : Type uA}
{M : Type uM}
{N : Type uN}
{P : Type uP}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
[Module A P]
[IsScalarTower R A P]
(f : TensorProduct R M N →ₗ[A] P)
(a : M)

(TensorProduct.AlgebraTensorModule.curry f) a = (TensorProduct.curry (↑R f)) a


@[simp]
theorem translate_inv_apply (x y : ℝ) : (translate <| Multiplicative.ofAdd x)⁻¹ y = -x + y

↑(CircleDeg1Lift.translate (Multiplicative.ofAdd x))⁻¹ y = -x + y


/-- The injection of `X` in the optimal coupling between `X` and `Y` is an isometry. -/
theorem isometry_optimalGHInjl : Isometry (optimalGHInjl X Y)

(X : Type u)
(Y : Type v)
[MetricSpace X]
[CompactSpace X]
[Nonempty X]
[MetricSpace Y]
[CompactSpace Y]
[Nonempty Y]

Isometry (GromovHausdorff.optimalGHInjl X Y)


theorem norm_eq_zero_iff_of_basis [IsDomain R] [IsDomain S] (b : Basis ι R S) {x : S} :
    Algebra.norm R x = 0 ↔ x = 0

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
{ι : Type w}
[Finite ι]
[IsDomain R]
[IsDomain S]
(b : Basis ι R S)
{x : S}


@[simp]
lemma map₂_id : YonedaCollection.map₂ F (𝟙 X) = id

{A : CategoryTheory.Functor Cᵒᵖ (Type v)}

{F : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v)}

CategoryTheory.OverPresheafAux.YonedaCollection.map₂ F (CategoryTheory.CategoryStruct.id X) = id


@[to_additive]
theorem prod_Ico_consecutive (f : ℕ → M) {m n k : ℕ} (hmn : m ≤ n) (hnk : n ≤ k) :
    ((∏ i ∈ Ico m n, f i) * ∏ i ∈ Ico n k, f i) = ∏ i ∈ Ico m k, f i

{M : Type u_2}
[CommMonoid M]
(f : ℕ → M)
{m n k : ℕ}
(hmn : m ≤ n)
(hnk : n ≤ k)

(∏ i ∈ Finset.Ico m n, f i) * ∏ i ∈ Finset.Ico n k, f i = ∏ i ∈ Finset.Ico m k, f i


@[simp]
theorem associator_inv_apply {X Y Z : Type u} {x : X} {y : Y} {z : Z} :
    ((α_ X Y Z).inv : X ⊗ Y ⊗ Z → (X ⊗ Y) ⊗ Z) (x, (y, z)) = ((x, y), z)


theorem addBottom_nth_snd (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    ((addBottom L).nth n).2 = L.nth n

(L : Turing.ListBlank ((k : K) → Option (Γ k)))

((Turing.TM2to1.addBottom L).nth n).2 = L.nth n


theorem uniqueDiffWithinAt_inter (ht : t ∈ 𝓝 x) :
    UniqueDiffWithinAt 𝕜 (s ∩ t) x ↔ UniqueDiffWithinAt 𝕜 s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s t : Set E}
(ht : t ∈ 𝓝 x)


theorem List.smul_sum {r : α} {l : List β} : r • l.sum = (l.map (r • ·)).sum

{α : Type u_1}
{β : Type u_2}
[AddMonoid β]
[DistribSMul α β]
{r : α}
{l : List β}

r • l.sum = (List.map (fun x => r • x) l).sum


@[simp]
lemma support_subgraphOfAdj {u v : V} (h : G.Adj u v) :
    (G.subgraphOfAdj h).support = {u , v}

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


theorem u_le_u_iff [Preorder α] [Preorder β] (gi : GaloisInsertion l u) {a b} : u a ≤ u b ↔ a ≤ b

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


/-- If `f : R ≃+* S` is a ring isomorphism and `I : Ideal R`,
  then `comap f (comap f.symm I) = I`. -/
@[simp]
theorem comap_of_equiv (I : Ideal R) (f : R ≃+* S) :
    (I.comap (f.symm : S →+* R)).comap (f : R →+* S) = I

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(I : Ideal R)
(f : R ≃+* S)

Ideal.comap (↑f) (Ideal.comap (↑f.symm) I) = I


@[simp]
theorem zero_leftMoves : LeftMoves 0 = PEmpty

SetTheory.PGame.LeftMoves 0 = PEmpty.{u_1 + 1}


theorem eval_rename (g : τ → R) (p : MvPolynomial σ R) : eval g (rename k p) = eval (g ∘ k) p

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
[CommSemiring R]
(k : σ → τ)
(g : τ → R)
(p : MvPolynomial σ R)

(MvPolynomial.eval g) ((MvPolynomial.rename k) p) = (MvPolynomial.eval (g ∘ k)) p


theorem mul_single_apply [AddGroup G] (f : k[G]) (r : k) (x y : G) :
    (f * single x r) y = f (y - x) * r

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

(f * AddMonoidAlgebra.single x r) y = f (y - x) * r


theorem setLIntegral_piecewise (a : α) (g : β → ℝ≥0∞) (t : Set β) :
    ∫⁻ b in t, g b ∂piecewise hs κ η a =
      if a ∈ s then ∫⁻ b in t, g b ∂κ a else ∫⁻ b in t, g b ∂η a

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ η : ProbabilityTheory.Kernel α β}
{s : Set α}
{hs : MeasurableSet s}
[DecidablePred fun x => x ∈ s]
(a : α)
(g : β → ℝ≥0∞)
(t : Set β)

∫⁻ (b : β) in t, g b ∂(ProbabilityTheory.Kernel.piecewise hs κ η) a =
  if a ∈ s then ∫⁻ (b : β) in t, g b ∂κ a else ∫⁻ (b : β) in t, g b ∂η a


/-- A morphism in `Type u` is an isomorphism if and only if it is bijective. -/
theorem isIso_iff_bijective {X Y : Type u} (f : X ⟶ Y) : IsIso f ↔ Function.Bijective f

CategoryTheory.IsIso f ↔ Function.Bijective f


theorem mul_pos_iff : 0 < a * b ↔ 0 < a ∧ 0 < b


@[simp, norm_cast, mono]
theorem cast_lt : (m : α) < n ↔ m < n

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


@[simp] theorem take_zero (l : List α) : l.take 0 = []


theorem Base.mem_of_insert_indep (hB : M.Base B) (heB : M.Indep (insert e B)) : e ∈ B

{α : Type u_1}
{M : Matroid α}
{B : Set α}
{e : α}
(hB : M.Base B)
(heB : M.Indep (insert e B))


theorem discreteTopology_subtype_iff {S : Set X} :
    DiscreteTopology S ↔ ∀ x ∈ S, 𝓝[≠] x ⊓ 𝓟 S = ⊥

{X : Type u}
[TopologicalSpace X]
{S : Set X}

DiscreteTopology ↑S ↔ ∀ x ∈ S, 𝓝[≠] x ⊓ 𝓟 S = ⊥


protected theorem Nontrivial.choose_snd_mem (hs : s.Nontrivial) : hs.choose.snd ∈ s

{α : Type u}
{s : Set α}
(hs : s.Nontrivial)


@[simp] lemma inv_nonneg : 0 ≤ a⁻¹ ↔ 0 ≤ a

{α : Type u_1}
[Semifield α]
[LinearOrder α]
[PosMulReflectLT α]
[ZeroLEOneClass α]
{a : α}

0 ≤ a⁻¹ ↔ 0 ≤ a


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

(CategoryTheory.ShortComplex.homologyFunctor C).obj S = S.homology


/-- The sum of a finite power series `p` admits `p` as a power series. -/
protected theorem FormalMultilinearSeries.hasFiniteFPowerSeriesOnBall_of_finite
    (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ} (hn : ∀ m, n ≤ m → p m = 0) :
    HasFiniteFPowerSeriesOnBall p.sum p 0 n ⊤

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{n : ℕ}
(hn : ∀ (m : ℕ), n ≤ m → p m = 0)


theorem mem_map {a : α} {s : Stream' α} : a ∈ s → f a ∈ map f s

{α : Type u}
{β : Type v}
(f : α → β)
{a : α}
{s : Stream' α}


/-- If two finite measures give the same mass to the whole space and coincide on a π-system made
of measurable sets, then they coincide on all sets in the σ-algebra generated by the π-system. -/
theorem ext_on_measurableSpace_of_generate_finite {α} (m₀ : MeasurableSpace α) {μ ν : Measure α}
    [IsFiniteMeasure μ] (C : Set (Set α)) (hμν : ∀ s ∈ C, μ s = ν s) {m : MeasurableSpace α}
    (h : m ≤ m₀) (hA : m = MeasurableSpace.generateFrom C) (hC : IsPiSystem C)
    (h_univ : μ Set.univ = ν Set.univ) {s : Set α} (hs : MeasurableSet[m] s) : μ s = ν s


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

ContMDiffAt I' I n (fun x => ∑ i ∈ t, f i x) x₀


/-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C

[CategoryTheory.LocallySmall.{w, v, u} C]

(CategoryTheory.ShrinkHoms.equivalence C).inverse.obj X = X.fromShrinkHoms


@[to_additive]
theorem nnnorm_le_mul_nnnorm_add (a b : E) : ‖a‖₊ ≤ ‖a * b‖₊ + ‖b‖₊

{E : Type u_6}
[SeminormedAddGroup E]
(a b : E)

‖a‖₊ ≤ ‖a + b‖₊ + ‖b‖₊


/-- `Submonoid.map` as a `MonoidWithZeroHom`, when applied to `AlgHom`s. -/
@[simps]
def mapHom {A'} [Semiring A'] [Algebra R A'] (f : A →ₐ[R] A') :
    Submodule R A →*₀ Submodule R A'

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
{A' : Type u_1}
[Semiring A']
[Algebra R A']
(f : A →ₐ[R] A')
(p : Submodule R A)

(Submodule.mapHom f) p = Submodule.map f.toLinearMap p


theorem exists_pos_ball [PseudoMetricSpace α] (x : α) (hμ : μ ≠ 0) :
    ∃ n : ℕ, 0 < μ (Metric.ball x n)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[PseudoMetricSpace α]
(x : α)
(hμ : μ ≠ 0)


@[to_additive]
lemma comp_right_injective (e : M ≃* N) : Injective fun f : P →* M ↦ (e : M →* N).comp f

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


theorem LinearIndependent.localization {ι : Type*} {b : ι → M} (hli : LinearIndependent R b) :
    LinearIndependent Rₛ b

{R : Type u_1}
(Rₛ : Type u_2)
[CommSemiring R]
(S : Submonoid R)
[CommSemiring Rₛ]
[Algebra R Rₛ]
[hT : IsLocalization S Rₛ]
{M : Type u_3}
[AddCommMonoid M]
[Module R M]
[Module Rₛ M]
[IsScalarTower R Rₛ M]
{ι : Type u_5}
{b : ι → M}
(hli : LinearIndependent R b)


@[simp] theorem isEmpty_eq (l : AssocList α β) : isEmpty l = l.toList.isEmpty

{α : Type u_1}
{β : Type u_2}
(l : Batteries.AssocList α β)


theorem copy_eq (S : NonUnitalSubring R) (s : Set R) (hs : s = ↑S) : S.copy s hs = S

{R : Type u}
[NonUnitalNonAssocRing R]
(S : NonUnitalSubring R)
(s : Set R)
(hs : s = ↑S)


protected theorem map_zero (f : M₁ →SL[σ₁₂] M₂) : f (0 : M₁) = 0

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


theorem comp_injective (h : N ↪[L] P) :
    Function.Injective (h.comp : (M ↪[L] N) →  (M ↪[L] P))

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{P : Type u_1}
[L.Structure P]
(h : L.Embedding N P)


/-- The span of every finite set of polynomials is contained in a `degreeLT n` for some `n`. -/
theorem span_of_finite_le_degreeLT {s : Set R[X]} (s_fin : s.Finite) :
    ∃ n : ℕ, Submodule.span R s ≤ degreeLT R n

{R : Type u}
[Semiring R]
{s : Set R[X]}
(s_fin : s.Finite)

∃ n, Submodule.span R s ≤ Polynomial.degreeLT R n


@[simp]
theorem csSup_Iio [NoMinOrder α] [DenselyOrdered α] : sSup (Iio a) = a

{α : Type u_1}
[ConditionallyCompleteLattice α]
{a : α}
[NoMinOrder α]
[DenselyOrdered α]


@[simp] theorem endofunctorMonoidalCategory_whiskerLeft_app
    {F H K : C ⥤ C} {β : H ⟶ K} (X : C) :
    (F ◁ β).app X = β.app (F.obj X)

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{F H K : CategoryTheory.Functor C C}
{β : H ⟶ K}
(X : C)

(CategoryTheory.MonoidalCategory.whiskerLeft F β).app X = β.app (F.obj X)


/-- Variant of `map_source`, stated for images of subsets of `source`. -/
lemma map_source'' : e '' e.source ⊆ e.target

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


theorem graph_comp {f : β → γ} {g : α → β} : graph (f ∘ g) = Rel.comp (graph g) (graph f)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : β → γ}
{g : α → β}

Function.graph (f ∘ g) = (Function.graph g).comp (Function.graph f)


@[simp]
lemma natCast_mem_slitPlane {n : ℕ} : ↑n ∈ slitPlane ↔ n ≠ 0


@[simp]
theorem cos_int_mul_two_pi (n : ℤ) : cos (n * (2 * π)) = 1


@[to_additive]
theorem mem_sSup_of_mem {S : Set (Subsemigroup M)} {s : Subsemigroup M} (hs : s ∈ S) :
    ∀ {x : M}, x ∈ s → x ∈ sSup S

{M : Type u_2}
[Add M]
{S : Set (AddSubsemigroup M)}
{s : AddSubsemigroup M}
(hs : s ∈ S)
{x : M}


/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains. -/
@[simps]
def prodEquiv : (A →ₙₐ[R] B) × (A →ₙₐ[R] C) ≃ (A →ₙₐ[R] B × C)

{R : Type u}
[Monoid R]
{A : Type v}
{B : Type w}
{C : Type w₁}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[NonUnitalNonAssocSemiring C]
[DistribMulAction R B]
[DistribMulAction R C]
(f : A →ₙₐ[R] B × C)

NonUnitalAlgHom.prodEquiv.symm f = ((NonUnitalAlgHom.fst R B C).comp f, (NonUnitalAlgHom.snd R B C).comp f)


/-- A finite family is affinely independent if and only if any affine
combinations (with sum of weights 1) that evaluate to the same point are equal. -/
theorem affineIndependent_iff_eq_of_fintype_affineCombination_eq [Fintype ι] (p : ι → P) :
    AffineIndependent k p ↔ ∀ w1 w2 : ι → k, ∑ i, w1 i = 1 → ∑ i, w2 i = 1 →
    Finset.univ.affineCombination k p w1 = Finset.univ.affineCombination k p w2 → w1 = w2

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{ι : Type u_4}
[Fintype ι]
(p : ι → P)

AffineIndependent k p ↔
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        (Finset.affineCombination k Finset.univ p) w1 = (Finset.affineCombination k Finset.univ p) w2 → w1 = w2


theorem jacobiSymNat.one_left (b : ℕ) : jacobiSymNat 1 b = 1

Mathlib.Meta.NormNum.jacobiSymNat 1 b = 1


@[simp]
theorem fst_sup [Sup α] [Sup β] (p q : α × β) : (p ⊔ q).fst = p.fst ⊔ q.fst

(α : Type u)
(β : Type v)
[Sup α]
[Sup β]
(p q : α × β)


@[simp]
theorem closure_subsemigroup_closure (s : Set R) : closure ↑(Subsemigroup.closure s) = closure s

{R : Type u}
[NonUnitalNonAssocSemiring R]
(s : Set R)

NonUnitalSubsemiring.closure ↑(Subsemigroup.closure s) = NonUnitalSubsemiring.closure s


@[simp]
theorem Biprod.ofComponents_comp {X₁ X₂ Y₁ Y₂ Z₁ Z₂ : C} (f₁₁ : X₁ ⟶ Y₁) (f₁₂ : X₁ ⟶ Y₂)
    (f₂₁ : X₂ ⟶ Y₁) (f₂₂ : X₂ ⟶ Y₂) (g₁₁ : Y₁ ⟶ Z₁) (g₁₂ : Y₁ ⟶ Z₂) (g₂₁ : Y₂ ⟶ Z₁)
    (g₂₂ : Y₂ ⟶ Z₂) :
    Biprod.ofComponents f₁₁ f₁₂ f₂₁ f₂₂ ≫ Biprod.ofComponents g₁₁ g₁₂ g₂₁ g₂₂ =
      Biprod.ofComponents (f₁₁ ≫ g₁₁ + f₁₂ ≫ g₂₁) (f₁₁ ≫ g₁₂ + f₁₂ ≫ g₂₂) (f₂₁ ≫ g₁₁ + f₂₂ ≫ g₂₁)
        (f₂₁ ≫ g₁₂ + f₂₂ ≫ g₂₂)

CategoryTheory.Biprod.ofComponents f₁₁ f₁₂ f₂₁ f₂₂ ≫ CategoryTheory.Biprod.ofComponents g₁₁ g₁₂ g₂₁ g₂₂ =
  CategoryTheory.Biprod.ofComponents (f₁₁ ≫ g₁₁ + f₁₂ ≫ g₂₁) (f₁₁ ≫ g₁₂ + f₁₂ ≫ g₂₂) (f₂₁ ≫ g₁₁ + f₂₂ ≫ g₂₁)
    (f₂₁ ≫ g₁₂ + f₂₂ ≫ g₂₂)


@[to_additive (attr := simp)]
theorem prod_inv_distrib : (∏ x ∈ s, (f x)⁻¹) = (∏ x ∈ s, f x)⁻¹

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f : α → β}
[DivisionCommMonoid β]


theorem condexp_smul (c : 𝕜) (f : α → F') : μ[c • f|m] =ᵐ[μ] c • μ[f|m]

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