theorem bounded_lt_Iio [Preorder α] (a : α) : Bounded (· < ·) (Iio a)

Set.Bounded (fun x x_1 => x < x_1) (Set.Iio a)


/-- The `last` element of a vector is the `head` of the `reverse` vector. -/
theorem reverse_get_zero {v : Vector α (n + 1)} : v.reverse.head = v.last

{n : ℕ}
{α : Type u_1}
{v : Mathlib.Vector α (n + 1)}


/-- The maximum degree in the graph is at least the degree of any particular vertex. -/
theorem degree_le_maxDegree [DecidableRel G.Adj] (v : V) : G.degree v ≤ G.maxDegree

{V : Type u_1}
(G : SimpleGraph V)
[Fintype V]
[DecidableRel G.Adj]
(v : V)


@[simp, fun_prop]
theorem Differentiable.add (hf : Differentiable 𝕜 f) (hg : Differentiable 𝕜 g) :
    Differentiable 𝕜 fun y => f y + g y

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
(hf : Differentiable 𝕜 f)
(hg : Differentiable 𝕜 g)


/-- The additive equivalence `Cochain K L n ≃+ Cochain (K⟦a⟧) L n'` when `n + a = n'` and
the category is `R`-linear. -/
@[simps!]
def leftShiftLinearEquiv (n a n' : ℤ) (hn : n + a = n') :
    Cochain K L n ≃ₗ[R] Cochain (K⟦a⟧) L n'

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(R : Type u_1)
[Ring R]
[CategoryTheory.Linear R C]
(K L : CochainComplex C ℤ)
(n a n' : ℤ)
(hn : n + a = n')

∀ (a_1 : CochainComplex.HomComplex.Cochain ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj K) L n'),
  (CochainComplex.HomComplex.Cochain.leftShiftLinearEquiv R K L n a n' hn).symm a_1 = a_1.leftUnshift n hn


theorem add_lt_add_right_coe {x y : EReal} (h : x < y) (z : ℝ) : x + z < y + z


@[to_additive]
lemma mulSupport_sup [SemilatticeSup M] (f g : α → M) :
    mulSupport (fun x ↦ f x ⊔ g x) ⊆ mulSupport f ∪ mulSupport g

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

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


protected theorem continuous (e : α ≃o β) : Continuous e

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[PartialOrder β]
[TopologicalSpace α]
[TopologicalSpace β]
[OrderTopology α]
[OrderTopology β]
(e : α ≃o β)


@[simp, norm_cast]
theorem cast_inj [LinearOrderedRing α] {m n : ZNum} : (m : α) = n ↔ m = n

{α : Type u_1}
[LinearOrderedRing α]
{m n : ZNum}


theorem le_opNNNorm : ‖f x‖₊ ≤ ‖f‖₊ * ‖x‖₊

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(f : E →SL[σ₁₂] F)
(x : E)

‖f x‖₊ ≤ ‖f‖₊ * ‖x‖₊


theorem BEx.elim {b : Prop} : (∃ x h, P x h) → (∀ a h, P a h → b) → b

{α : Sort u_1}
{p : α → Prop}
{P : (x : α) → p x → Prop}
{b : Prop}

(∃ x h, P x h) → (∀ (a : α) (h : p a), P a h → b) → b


/-- the ω-limit of a forward image of `s` is the same as the ω-limit of `s`. -/
@[simp]
theorem omegaLimit_image_eq (hf : ∀ t, Tendsto (· + t) f f) (t : τ) : ω f ϕ (ϕ t '' s) = ω f ϕ s

(hf : ∀ (t : τ), Filter.Tendsto (fun x => x + t) f f)

omegaLimit f ϕ.toFun (ϕ.toFun t '' s) = omegaLimit f ϕ.toFun s


@[simp]
theorem not_mem_empty (x : PSet.{u}) : x ∉ (∅ : PSet.{u})


/-- Assumes left covariance.
The lemma assuming right covariance is `Right.mul_lt_one_of_lt_of_le`. -/
@[to_additive Left.add_neg_of_neg_of_nonpos
      "Assumes left covariance.
      The lemma assuming right covariance is `Right.add_neg_of_neg_of_nonpos`."]
theorem Left.mul_lt_one_of_lt_of_le [CovariantClass α α (· * ·) (· ≤ ·)] {a b : α} (ha : a < 1)
    (hb : b ≤ 1) :
    a * b < 1

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


theorem drop_map (n : ℕ) (s : Stream' α) : drop n (map f s) = map f (drop n s)

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

Stream'.drop n (Stream'.map f s) = Stream'.map f (Stream'.drop n s)


@[simp]
lemma image_subtype_val_Iio_Ici {a : α} (b : Iio a) : Subtype.val '' Ici b = Ico b.1 a

{α : Type u_1}
[Preorder α]
{a : α}
(b : ↑(Set.Iio a))

Subtype.val '' Set.Ici b = Set.Ico (↑b) a


theorem toNat_eq_iff {n : ℕ} (hn : n ≠ 0) : toNat c = n ↔ c = n


lemma isNilpotent_toEnd_sub_algebraMap [IsNoetherian R M] (χ : L → R) (x : L) :
    _root_.IsNilpotent <| toEnd R L (weightSpace M χ) x - algebraMap R _ (χ x)

{R : Type u_2}
{L : Type u_3}
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[IsNoetherian R M]
(χ : L → R)
(x : L)

IsNilpotent
  ((LieModule.toEnd R L ↥↑(LieModule.weightSpace M χ)) x -
    (algebraMap R (Module.End R ↥↑(LieModule.weightSpace M χ))) (χ x))


theorem bernoulli_eq_bernoulli'_of_ne_one {n : ℕ} (hn : n ≠ 1) : bernoulli n = bernoulli' n


@[to_additive]
theorem uniformity_translate_mul (a : α) : ((𝓤 α).map fun x : α × α => (x.1 * a, x.2 * a)) = 𝓤 α

{α : Type u_1}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
(a : α)

Filter.map (fun x => (x.1 + a, x.2 + a)) (𝓤 α) = 𝓤 α


/-- If `μ` is a finite measure and the indicators of measurable sets `Aᵢ` tend pointwise to
the indicator of a set `A`, then the measures `μ Aᵢ` tend to the measure `μ A`. -/
lemma tendsto_measure_of_tendsto_indicator_of_isFiniteMeasure [NeBot L]
    (μ : Measure α) [IsFiniteMeasure μ] (As_mble : ∀ i, MeasurableSet (As i))
    (h_lim : ∀ x, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :
    Tendsto (fun i ↦ μ (As i)) L (𝓝 (μ A))

(As_mble : ∀ (i : ι), MeasurableSet (As i))

(h_lim : ∀ (x : α), ∀ᶠ (i : ι) in L, x ∈ As i ↔ x ∈ A)

Filter.Tendsto (fun i => μ (As i)) L (nhds (μ A))


/--
Given a family of elements `x` for the sieve `S` generated by a presieve `R`, if `x` is restricted
to `R` and then extended back up to `S`, the resulting extension equals `x`.
-/
@[simp]
theorem extend_restrict {x : FamilyOfElements P (generate R)} (t : x.Compatible) :
    (x.restrict (le_generate R)).sieveExtend = x

{P : CategoryTheory.Functor Cᵒᵖ (Type w)}

{x : CategoryTheory.Presieve.FamilyOfElements P (CategoryTheory.Sieve.generate R).arrows}

(CategoryTheory.Presieve.FamilyOfElements.restrict ⋯ x).sieveExtend = x


/-- The element in `Splitting.IndexSet Δ` attached to an epimorphism `f : Δ ⟶ Δ'`. -/
@[simps]
def mk {Δ Δ' : SimplexCategory} (f : Δ ⟶ Δ') [Epi f] : IndexSet (op Δ)

{Δ Δ' : SimplexCategory}
(f : Δ ⟶ Δ')
[CategoryTheory.Epi f]

(SimplicialObject.Splitting.IndexSet.mk f).fst = Opposite.op Δ'


theorem iIndepSets.piiUnionInter_of_not_mem {π : ι → Set (Set Ω)} {a : ι} {S : Finset ι}
    (hp_ind : iIndepSets π μ) (haS : a ∉ S) :
    IndepSets (piiUnionInter π S) (π a) μ

(hp_ind : ProbabilityTheory.iIndepSets π μ)

ProbabilityTheory.IndepSets (piiUnionInter π ↑S) (π a) μ


/-- The Mellin transform of a power function restricted to `Ioc 0 1`. -/
theorem hasMellin_cpow_Ioc (a : ℂ) {s : ℂ} (hs : 0 < re s + re a) :
    HasMellin (indicator (Ioc 0 1) (fun t => ↑t ^ a : ℝ → ℂ)) s (1 / (s + a))

HasMellin ((Set.Ioc 0 1).indicator fun t => ↑t ^ a) s (1 / (s + a))


@[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 =
    match x with
    | (p, q) => p + q


theorem leftInverse_symm (f : Equiv α β) : LeftInverse f.symm f


@[simp]
lemma fromRows_fromColumn_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromRows (fromColumns B₁₁ B₁₂) (fromColumns B₂₁ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂

{R : Type u_1}
{m₁ : Type u_3}
{m₂ : Type u_4}
{n₁ : Type u_6}
{n₂ : Type u_7}
(B₁₁ : Matrix m₁ n₁ R)
(B₁₂ : Matrix m₁ n₂ R)
(B₂₁ : Matrix m₂ n₁ R)
(B₂₂ : Matrix m₂ n₂ R)

(B₁₁.fromColumns B₁₂).fromRows (B₂₁.fromColumns B₂₂) = Matrix.fromBlocks B₁₁ B₁₂ B₂₁ B₂₂


@[simp]
theorem apply_one [DecidableEq R] (x : R) : (1 : RingNorm R) x = if x = 0 then 0 else 1

(R : Type u_2)
[NonUnitalRing R]
[DecidableEq R]
(x : R)


theorem univ_eq_zero_iff (m : OuterMeasure α) : m univ = 0 ↔ m = 0

{α : Type u_1}
(m : MeasureTheory.OuterMeasure α)


@[simp]
theorem coe_comap (s : NonUnitalSubring S) (f : F) : (s.comap f : Set R) = f ⁻¹' s

{F : Type w}
{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(s : NonUnitalSubring S)
(f : F)

↑(NonUnitalSubring.comap f s) = ⇑f ⁻¹' ↑s


lemma not_char_dvd (p : ℕ) [CharP R p] (k : ℕ) [h : NeZero (k : R)] : ¬p ∣ k

(R : Type u_1)
[AddMonoidWithOne R]
(p : ℕ)
[CharP R p]
(k : ℕ)
[h : NeZero ↑k]


theorem inclusion.toFun_eq_coe (s : SubMulAction M α) :
    s.inclusion.toFun = Subtype.val

{M : Type u_1}
{α : Type u_2}
[Monoid M]
[MulAction M α]
(s : SubMulAction M α)


theorem _root_.Function.Injective.sSameSide_map_iff {s : AffineSubspace R P} {x y : P}
    {f : P →ᵃ[R] P'} (hf : Function.Injective f) :
    (s.map f).SSameSide (f x) (f y) ↔ s.SSameSide x y

{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
{s : AffineSubspace R P}
{x y : P}
{f : P →ᵃ[R] P'}
(hf : Function.Injective ⇑f)

(AffineSubspace.map f s).SSameSide (f x) (f y) ↔ s.SSameSide x y


theorem one_shiftLeft (n : Nat) : 1 <<< n = 2 ^ n


theorem Function.Surjective.nonempty [h : Nonempty β] {f : α → β} (hf : Function.Surjective f) :
    Nonempty α

{α : Sort u_1}
{β : Sort u_2}
[h : Nonempty β]
{f : α → β}
(hf : Function.Surjective f)


theorem Trivialization.contMDiffWithinAt_iff {f : M → TotalSpace F E} {s : Set M} {x₀ : M}
    (he : f x₀ ∈ e.source) :
    ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
      ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
      ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (e (f x)).2) s x₀

[TopologicalSpace (Bundle.TotalSpace F E)]

{e : Trivialization F Bundle.TotalSpace.proj}

ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
  ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧ ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x => (↑e (f x)).2) s x₀


theorem IsClosed.trans (ht : IsClosed t) (hs : IsClosed s) : IsClosed (t : Set X)

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


theorem symm_piecewise (e e' : PartialEquiv α β) {s : Set α} {t : Set β} [∀ x, Decidable (x ∈ s)]
    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
    (e.piecewise e' s t H H').symm = e.symm.piecewise e'.symm t s H.symm H'.symm

{α : Type u_1}
{β : Type u_2}
(e e' : PartialEquiv α β)
{s : Set α}
{t : Set β}
[(x : α) → Decidable (x ∈ s)]
[(y : β) → Decidable (y ∈ t)]
(H : e.IsImage s t)
(H' : e'.IsImage s t)

(e.piecewise e' s t H H').symm = e.symm.piecewise e'.symm t s ⋯ ⋯


@[simp]
theorem coconeOfHom_homOfCocone (s : Cocone F) : coconeOfHom h (homOfCocone h s) = s

(h : CategoryTheory.coyoneda.obj (Opposite.op X) ⋙ CategoryTheory.uliftFunctor.{u₁, v₃} ≅ F.cocones)

CategoryTheory.Limits.IsColimit.OfNatIso.coconeOfHom h (CategoryTheory.Limits.IsColimit.OfNatIso.homOfCocone h s) = s


@[to_additive]
theorem prod_map_inv' (m : Multiset α) : (m.map Inv.inv).prod = m.prod⁻¹

{α : Type u_3}
[DivisionCommMonoid α]
(m : Multiset α)

(Multiset.map Inv.inv m).prod = m.prod⁻¹


/-- The property of a map function `f` which ensures the `map` operation is valid. -/
class IsMonotone (cmpα cmpβ) (f : α → β) : Prop where
  /-- If `x < y` then `f x < f y`. -/
  lt_mono : cmpLT cmpα x y → cmpLT cmpβ (f x) (f y)

[self : Batteries.RBSet.IsMonotone cmpα cmpβ f]

Batteries.RBNode.cmpLT cmpα x y → Batteries.RBNode.cmpLT cmpβ (f x) (f y)


theorem pi_update_of_not_mem [DecidableEq ι] (hi : i ∉ s) (f : ∀ j, α j) (a : α i)
    (t : ∀ j, α j → Set (β j)) : (s.pi fun j => t j (update f i a j)) = s.pi fun j => t j (f j)

{ι : Type u_1}
{α : ι → Type u_2}
{β : ι → Type u_3}
{s : Set ι}
{i : ι}
[DecidableEq ι]
(hi : i ∉ s)
(f : (j : ι) → α j)
(a : α i)
(t : (j : ι) → α j → Set (β j))

(s.pi fun j => t j (Function.update f i a j)) = s.pi fun j => t j (f j)


lemma cfcₙ_apply_of_not_and_and {f : R → R} (a : A)
    (ha : ¬ (p a ∧ ContinuousOn f (σₙ R a) ∧ f 0 = 0)) :
    cfcₙ f a = 0

(ha : ¬(p a ∧ ContinuousOn f (σₙ R a) ∧ f 0 = 0))


@[simp]
lemma Modification.comp_app' {X : B} {F G : OplaxFunctor B C} {α β γ : F ⟶ G}
    (m : α ⟶ β) (n : β ⟶ γ) : (m ≫ n).app X = m.app X ≫ n.app X

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
{X : B}
{F G : CategoryTheory.OplaxFunctor B C}
{α β γ : F ⟶ G}
(m : α ⟶ β)
(n : β ⟶ γ)

(CategoryTheory.CategoryStruct.comp m n).app X = CategoryTheory.CategoryStruct.comp (m.app X) (n.app X)


protected theorem HasStrictFDerivAt.prod (hf₁ : HasStrictFDerivAt f₁ f₁' x)
    (hf₂ : HasStrictFDerivAt f₂ f₂' x) :
    HasStrictFDerivAt (fun x => (f₁ x, f₂ x)) (f₁'.prod f₂') x

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


@[local simp]
theorem embeddingPiTangent_coe :
    ⇑f.embeddingPiTangent = fun x i => (f i x • extChartAt I (f.c i) x, f i x)

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
[T2Space M]
[hi : Fintype ι]
{s : Set M}
(f : SmoothBumpCovering ι I M s)

⇑f.embeddingPiTangent = fun x i => (↑(f.toFun i) x • ↑(extChartAt I (f.c i)) x, ↑(f.toFun i) x)


@[to_additive (attr := continuity, fun_prop)]
theorem Continuous.inv (hf : Continuous f) : Continuous fun x => (f x)⁻¹

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Neg G]
[ContinuousNeg G]
[TopologicalSpace α]
{f : α → G}
(hf : Continuous f)


/-- Linear map version of the map `toMultilinearMap` associating to a continuous multilinear map
the corresponding multilinear map. -/
@[simps]
def toMultilinearMapLinear : ContinuousMultilinearMap A M₁ M₂ →ₗ[R'] MultilinearMap A M₁ M₂

(self : ContinuousMultilinearMap A M₁ M₂)

ContinuousMultilinearMap.toMultilinearMapLinear self = self.toMultilinearMap


lemma isStableUnderProductsOfShape_of_isStableUnderFiniteProducts
    (J : Type) [Finite J] [W.IsStableUnderFiniteProducts] :
    W.IsStableUnderProductsOfShape J

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(W : CategoryTheory.MorphismProperty C)
(J : Type)
[Finite J]
[W.IsStableUnderFiniteProducts]


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

{C : Type u₂}
[CategoryTheory.Category.{v₂, u₂} C]
{D : Type u₃}
[CategoryTheory.Category.{v₃, u₃} D]
{E : Type u₄}
[CategoryTheory.Category.{v₄, u₄} E]

∀ {X Y : CategoryTheory.Functor (C × D) E} (T : X ⟶ Y) (X_1 : C) (Y_1 : D),
  ((CategoryTheory.curry.map T).app X_1).app Y_1 = T.app (X_1, Y_1)


theorem symmetric (i i' : B) : M i i' = M i' i

{B : Type u_1}
(M : CoxeterMatrix B)
(i i' : B)


theorem not_differentiableWithinAt_of_local_left_inverse_hasDerivWithinAt_zero {f g : 𝕜 → 𝕜} {a : 𝕜}
    {s t : Set 𝕜} (ha : a ∈ s) (hsu : UniqueDiffWithinAt 𝕜 s a) (hf : HasDerivWithinAt f 0 t (g a))
    (hst : MapsTo g s t) (hfg : f ∘ g =ᶠ[𝓝[s] a] id) : ¬DifferentiableWithinAt 𝕜 g s a

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{f g : 𝕜 → 𝕜}
{a : 𝕜}
{s t : Set 𝕜}
(ha : a ∈ s)
(hsu : UniqueDiffWithinAt 𝕜 s a)
(hf : HasDerivWithinAt f 0 t (g a))
(hst : Set.MapsTo g s t)
(hfg : f ∘ g =ᶠ[𝓝[s] a] id)


protected theorem continuousAt_const_mul {a b : ℝ≥0∞} (h : a ≠ ∞ ∨ b ≠ 0) :
    ContinuousAt (a * ·) b


@[simp, measurability]
protected lemma MeasurableSet.himp {s₁ s₂ : Set α} (h₁ : MeasurableSet s₁) (h₂ : MeasurableSet s₂) :
    MeasurableSet (s₁ ⇨ s₂)

{α : Type u_1}
{m : MeasurableSpace α}
{s₁ s₂ : Set α}
(h₁ : MeasurableSet s₁)
(h₂ : MeasurableSet s₂)


theorem tr_respects_aux₁ {k} (o q v) {S : List (Γ k)} {L : ListBlank (∀ k, Option (Γ k))}
    (hL : L.map (proj k) = ListBlank.mk (S.map some).reverse) (n) (H : n ≤ S.length) :
    Reaches₀ (TM1.step (tr M)) ⟨some (go k o q), v, Tape.mk' ∅ (addBottom L)⟩
      ⟨some (go k o q), v, (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L))⟩

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

(hL : Turing.ListBlank.map (Turing.proj k) L = Turing.ListBlank.mk (List.map some S).reverse)

Turing.Reaches₀ (Turing.TM1.step (Turing.TM2to1.tr M))
  { l := some (Turing.TM2to1.Λ'.go k o q), var := v, Tape := Turing.Tape.mk' ∅ (Turing.TM2to1.addBottom L) }
  { l := some (Turing.TM2to1.Λ'.go k o q), var := v,
    Tape := (Turing.Tape.move Turing.Dir.right)^[n] (Turing.Tape.mk' ∅ (Turing.TM2to1.addBottom L)) }


@[to_additive Filter.HasBasis.cobounded_of_norm]
lemma Filter.HasBasis.cobounded_of_norm' {ι : Sort*} {p : ι → Prop} {s : ι → Set ℝ}
    (h : HasBasis atTop p s) : HasBasis (cobounded E) p fun i ↦ norm ⁻¹' s i

{E : Type u_3}
[SeminormedAddGroup E]
{ι : Sort u_6}
{p : ι → Prop}
{s : ι → Set ℝ}
(h : Filter.atTop.HasBasis p s)

(Bornology.cobounded E).HasBasis p fun i => norm ⁻¹' s i


theorem ContinuousLinearMap.quasiMeasurePreserving (f : E →L[ℝ] E) (hf : f.det ≠ 0) :
    QuasiMeasurePreserving f μ μ

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(f : E →L[ℝ] E)
(hf : f.det ≠ 0)

MeasureTheory.Measure.QuasiMeasurePreserving (⇑f) μ μ


@[measurability, fun_prop]
theorem measurable_real_toNNReal : Measurable Real.toNNReal


/-- A topological space is path-connected if it is non-empty and every two points can be
joined by a continuous path. -/
class PathConnectedSpace (X : Type*) [TopologicalSpace X] : Prop where
  /-- A path-connected space must be nonempty. -/
  nonempty : Nonempty X
  /-- Any two points in a path-connected space must be joined by a continuous path. -/
  joined : ∀ x y : X, Joined x y

{X : Type u_4}
[TopologicalSpace X]
[self : PathConnectedSpace X]
(x y : X)


/-- If `f` is differentiable in a punctured neighborhood of `c`, `‖f x‖ → ∞` as `x → c` (more
formally, along the filter `𝓝[≠] c`), and `f' = O(g)` along `𝓝[≠] c`, where `f'` is the derivative
of `f`, then `g` is not interval integrable on any nontrivial interval `a..b` such that
`c ∈ [a, b]`. -/
theorem not_intervalIntegrable_of_tendsto_norm_atTop_of_deriv_isBigO_punctured {f : ℝ → E}
    {g : ℝ → F} {a b c : ℝ} (h_deriv : ∀ᶠ x in 𝓝[≠] c, DifferentiableAt ℝ f x)
    (h_infty : Tendsto (fun x => ‖f x‖) (𝓝[≠] c) atTop) (hg : deriv f =O[𝓝[≠] c] g) (hne : a ≠ b)
    (hc : c ∈ [[a, b]]) : ¬IntervalIntegrable g volume a b

(h_deriv : ∀ᶠ (x : ℝ) in 𝓝[≠] c, DifferentiableAt ℝ f x)

(h_infty : Filter.Tendsto (fun x => ‖f x‖) (𝓝[≠] c) Filter.atTop)

¬IntervalIntegrable g MeasureTheory.volume a b


theorem deriv_zero_of_not_differentiableAt (h : ¬DifferentiableAt 𝕜 f x) : deriv f x = 0

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
(h : ¬DifferentiableAt 𝕜 f x)


lemma disjoint_memPartition (f : ℕ → Set α) (n : ℕ) {u v : Set α}
    (hu : u ∈ memPartition f n) (hv : v ∈ memPartition f n) (huv : u ≠ v) :
    Disjoint u v

{α : Type u_1}
(f : ℕ → Set α)
(n : ℕ)
{u v : Set α}
(hu : u ∈ memPartition f n)
(hv : v ∈ memPartition f n)
(huv : u ≠ v)


@[simp]
theorem cylinder_empty (s : Finset ι) : cylinder s (∅ : Set (∀ i : s, α i)) = ∅

{ι : Type u_1}
{α : ι → Type u_2}
(s : Finset ι)


/-- If `M` and `N` are linearly disjoint, if one of `M` and `N` is flat, then for any family of
`R`-linearly independent elements `{ m_i }` of `M`, and any family of
`R`-linearly independent elements `{ n_j }` of `N`, the family `{ m_i * n_j }` in `S` is
also `R`-linearly independent. -/
theorem linearIndependent_mul_of_flat (H : M.LinearDisjoint N)
    (hf : Module.Flat R M ∨ Module.Flat R N)
    {κ ι : Type*} {m : κ → M} {n : ι → N} (hm : LinearIndependent R m)
    (hn : LinearIndependent R n) : LinearIndependent R fun (i : κ × ι) ↦ (m i.1).1 * (n i.2).1

(hf : Module.Flat R ↥M ∨ Module.Flat R ↥N)

LinearIndependent R fun i => ↑(m i.1) * ↑(n i.2)


@[simp]
theorem range_diag : (range fun x => (x, x)) = diagonal α

(Set.range fun x => (x, x)) = Set.diagonal α


/-- `{a}.min' _` is `a`. -/
@[simp]
theorem min'_singleton (a : α) : ({a} : Finset α).min' (singleton_nonempty _) = a


/-- The linear map from `⨂[𝕜] i, Eᵢ` to `ContinuousMultilinearMap 𝕜 E F →L[𝕜] F` sending
`x` in `⨂[𝕜] i, Eᵢ` to the map `f ↦ f.lift x`.
-/
@[simps!]
noncomputable def toDualContinuousMultilinearMap : (⨂[𝕜] i, E i) →ₗ[𝕜]
    ContinuousMultilinearMap 𝕜 E F →L[𝕜] F

[(i : ι) → SeminormedAddCommGroup (E i)]

∀ (a : ContinuousMultilinearMap 𝕜 E F),
  ((PiTensorProduct.toDualContinuousMultilinearMap F) x) a = (PiTensorProduct.lift a.toMultilinearMap) x


/-- Given a monoid homomorphism `g : M →* N` and a function `f : α → M`, the value of `g` at the
product of `f i` over `i ∈ s` equals the product of `g (f i)` over `s`. -/
@[to_additive
      "Given an additive monoid homomorphism `g : M →* N` and a function `f : α → M`, the
      value of `g` at the sum of `f i` over `i ∈ s` equals the sum of `g (f i)` over `s`."]
theorem MonoidHom.map_finprod_mem (f : α → M) (g : M →* N) (hs : s.Finite) :
    g (∏ᶠ j ∈ s, f j) = ∏ᶠ i ∈ s, g (f i)

{α : Type u_1}
{M : Type u_5}
{N : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
{s : Set α}
(f : α → M)
(g : M →+ N)
(hs : s.Finite)


theorem attach_cons (a : α) (m : Multiset α) :
    (a ::ₘ m).attach =
      ⟨a, mem_cons_self a m⟩ ::ₘ m.attach.map fun p => ⟨p.1, mem_cons_of_mem p.2⟩

(a ::ₘ m).attach = ⟨a, ⋯⟩ ::ₘ Multiset.map (fun p => ⟨↑p, ⋯⟩) m.attach


theorem toCircle_apply_mk (x : ℝ) : @toCircle T x = expMapCircle (2 * π / T * x)

AddCircle.toCircle ↑x = expMapCircle (2 * π / T * x)


/-- A base angle of an isosceles triangle with apex at the center of a circle is acute. -/
theorem abs_oangle_center_left_toReal_lt_pi_div_two {s : Sphere P} {p₁ p₂ : P} (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) : |(∡ s.center p₂ p₁).toReal| < π / 2

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


lemma isSupported_of_iso [K.IsSupported e] : L.IsSupported e


@[ext] theorem AddCommGroupWithOne.ext ⦃inst₁ inst₂ : AddCommGroupWithOne R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_one : (letI := inst₁; One.one : R) = (letI := inst₂; One.one)) :
    inst₁ = inst₂

{R : Type u}
⦃inst₁ inst₂ : AddCommGroupWithOne R⦄
(h_add : HAdd.hAdd = HAdd.hAdd)
(h_one : One.one = One.one)


@[to_additive]
lemma IsCompact.mul_closure_one_eq_closure {K : Set G} (hK : IsCompact K) :
    K * (closure {1} : Set G) = closure K

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{K : Set G}
(hK : IsCompact K)


@[simp] theorem ofBaseChange_tmul_one (Q : QuadraticForm R V) (z : A) :
    ofBaseChange A Q (z ⊗ₜ 1) = algebraMap _ _ z

{R : Type u_1}
(A : Type u_2)
{V : Type u_3}
[CommRing R]
[CommRing A]
[AddCommGroup V]
[Algebra R A]
[Module R V]
[Invertible 2]
(Q : QuadraticForm R V)
(z : A)

(CliffordAlgebra.ofBaseChange A Q) (z ⊗ₜ[R] 1) = (algebraMap A (CliffordAlgebra (QuadraticForm.baseChange A Q))) z


lemma isClosed_ball : IsClosed (closedBall x ε)

{α : Type u_2}
[PseudoMetricSpace α]
{x : α}
{ε : ℝ}


/-- Given a representation of a Lie algebra with distinguished `sl₂` triple, a vector is said to be
primitive if it is a simultaneous eigenvector for the action of both `h`, `e`, and the eigenvalue
for `e` is zero. -/
structure HasPrimitiveVectorWith (t : IsSl2Triple h e f) (m : M) (μ : R) : Prop where
  ne_zero : m ≠ 0
  lie_h : ⁅h, m⁆ = μ • m
  lie_e : ⁅e, m⁆ = 0

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{h e f : L}
{t : IsSl2Triple h e f}
{m : M}
{μ : R}
(self : t.HasPrimitiveVectorWith m μ)


theorem isAlgebraic_root (hf : f ≠ 0) : IsAlgebraic R (root f)

{R : Type u}
[CommRing R]
{f : R[X]}
(hf : f ≠ 0)


theorem isCompact_basicOpen (X : Scheme) {U : X.Opens} (hU : IsCompact (U : Set X))
    (f : Γ(X, U)) : IsCompact (X.basicOpen f : Set X)

(X : AlgebraicGeometry.Scheme)
{U : X.Opens}
(hU : IsCompact ↑U)
(f : ↑Γ(X, U))


/-- The type of bounded lattice homomorphisms from `α` to `β`. -/
structure BoundedLatticeHom (α β : Type*) [Lattice α] [Lattice β] [BoundedOrder α]
  [BoundedOrder β] extends LatticeHom α β where
  /-- A `BoundedLatticeHom` preserves the top element. -/
  map_top' : toFun ⊤ = ⊤
  /-- A `BoundedLatticeHom` preserves the bottom element. -/
  map_bot' : toFun ⊥ = ⊥

{α : Type u_7}
{β : Type u_8}
[Lattice α]
[Lattice β]
[BoundedOrder α]
[BoundedOrder β]
(self : BoundedLatticeHom α β)


@[simp]
theorem tail_transpose (A : Matrix m' (Fin n.succ) α) : vecTail (of.symm Aᵀ) = (vecTail ∘ A)ᵀ

{α : Type u}
{n : ℕ}
{m' : Type uₘ}
(A : Matrix m' (Fin n.succ) α)

Matrix.vecTail (Matrix.of.symm A.transpose) = Matrix.transpose (Matrix.vecTail ∘ A)


theorem natAbs_ne_zero {a : Int} : a.natAbs ≠ 0 ↔ a ≠ 0


theorem integrable_stoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
    (hu : ∀ n, Integrable (u n) μ) {N : ι} (hbdd : ∀ ω, τ ω ≤ N) :
    Integrable (stoppedValue u τ) μ

(hu : ∀ (n : ι), MeasureTheory.Integrable (u n) μ)

MeasureTheory.Integrable (MeasureTheory.stoppedValue u τ) μ


@[to_additive]
protected theorem Inseparable.smul {a b : M} {x y : X} (h₁ : Inseparable a b)
    (h₂ : Inseparable x y) : Inseparable (a • x) (b • y)

{M : Type u_1}
{X : Type u_2}
[TopologicalSpace M]
[TopologicalSpace X]
[VAdd M X]
[ContinuousVAdd M X]
{a b : M}
{x y : X}
(h₁ : Inseparable a b)
(h₂ : Inseparable x y)


{α : Type u_2}
[LinearOrderedSemifield α]


lemma sqrt_eq_iff_eq_sq : sqrt x = y ↔ x = y ^ 2


@[simp]
lemma div_ofNat_im (z : ℂ) (n : ℕ) [n.AtLeastTwo] :
    (z / no_index (OfNat.ofNat n)).im = z.im / OfNat.ofNat n

(z / OfNat.ofNat n).im = z.im / OfNat.ofNat n


@[to_additive (attr := simp, norm_cast)]
theorem coe_pow {M} [Monoid M] {A : Type*} [SetLike A M] [SubmonoidClass A M] {S : A} (x : S)
    (n : ℕ) : ↑(x ^ n) = (x : M) ^ n

{M : Type u_6}
[Monoid M]
{A : Type u_5}
[SetLike A M]
[SubmonoidClass A M]
{S : A}
(x : ↥S)
(n : ℕ)


@[simp]
theorem completionHom_val (X : UniformSpaceCat) (x) : (completionHom X) x = (x : Completion X)

(x : (CategoryTheory.forget UniformSpaceCat).obj X)

(CategoryTheory.forget UniformSpaceCat).map X.completionHom x = ↑((CategoryTheory.forget UniformSpaceCat).obj X) x


lemma closure_iUnion_congr (Xs Ys : ι → Set α) (h : ∀ i, M.closure (Xs i) = M.closure (Ys i)) :
    M.closure (⋃ i, Xs i) = M.closure (⋃ i, Ys i)

(h : ∀ (i : ι), M.closure (Xs i) = M.closure (Ys i))


@[to_additive (attr := simp, norm_cast)]
theorem coe_iInf {ι : Sort*} (f : ι → Con M) : ⇑(iInf f) = ⨅ i, ⇑(f i)

{M : Type u_1}
[Mul M]
{ι : Sort u_4}
(f : ι → Con M)


theorem coe_algebraMap_ofSubring {R : Type*} [CommRing R] (S : Subring R) :
    (algebraMap S R : S → R) = Subtype.val

{R : Type u_2}
[CommRing R]
(S : Subring R)


lemma count_bind [BEq β] (l : List α) (f : α → List β) (x : β) :
    count x (l.bind f) = sum (map (count x ∘ f) l)

{α : Type u_2}
{β : Type u_3}
[BEq β]
(l : List α)
(f : α → List β)
(x : β)

List.count x (l.bind f) = (List.map (List.count x ∘ f) l).sum


theorem IsChain.directedOn (H : IsChain r s) : DirectedOn r s

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
[IsRefl α r]
(H : IsChain r s)


theorem isLocalStructomorphOn_contDiffGroupoid_iff_aux {f : PartialHomeomorph M M'}
    (hf : LiftPropOn (contDiffGroupoid ⊤ I).IsLocalStructomorphWithinAt f f.source) :
    SmoothOn I I f f.source

(hf : ChartedSpace.LiftPropOn (contDiffGroupoid ⊤ I).IsLocalStructomorphWithinAt (↑f) f.source)


/-- A bicategory structure on the oplax functors between bicategories. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
instance OplaxFunctor.bicategory : Bicategory (OplaxFunctor B C)

{F G H : CategoryTheory.OplaxFunctor B C}

(CategoryTheory.Bicategory.associator η θ ι).inv.app a =
  (CategoryTheory.Bicategory.associator (η.app a) (θ.app a) (ι.app a)).inv


theorem EventuallyLE.countable_bInter {ι : Type*} {S : Set ι} (hS : S.Countable)
    {s t : ∀ i ∈ S, Set α} (h : ∀ i hi, s i hi ≤ᶠ[l] t i hi) :
    ⋂ i ∈ S, s i ‹_› ≤ᶠ[l] ⋂ i ∈ S, t i ‹_›

(h : ∀ (i : ι) (hi : i ∈ S), s i hi ≤ᶠ[l] t i hi)

⋂ i, ⋂ (h : i ∈ S), s i h ≤ᶠ[l] ⋂ i, ⋂ (h : i ∈ S), t i h


@[simp, nolint simpNF] -- Porting note: linter claims that LHS doesn't simplify. It does.
theorem tendsto_comp_val_Ioi_atTop [SemilatticeSup α] [NoMaxOrder α] {a : α} {f : α → β}
    {l : Filter β} : Tendsto (fun x : Ioi a => f x) atTop l ↔ Tendsto f atTop l

{α : Type u_3}
{β : Type u_4}
[SemilatticeSup α]
[NoMaxOrder α]
{a : α}
{f : α → β}
{l : Filter β}

Filter.Tendsto (fun x => f ↑x) Filter.atTop l ↔ Filter.Tendsto f Filter.atTop l


@[to_additive]
theorem IsCompact.closedBall_one_div (hs : IsCompact s) (hδ : 0 ≤ δ) :
    closedBall 1 δ / s = cthickening δ s⁻¹

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

Metric.closedBall 0 δ - s = Metric.cthickening δ (-s)


theorem Spec.locallyRingedSpaceMap_comp {R S T : CommRingCat.{u}} (f : R ⟶ S) (g : S ⟶ T) :
    Spec.locallyRingedSpaceMap (f ≫ g) =
      Spec.locallyRingedSpaceMap g ≫ Spec.locallyRingedSpaceMap f

{R S T : CommRingCat}
(f : R ⟶ S)
(g : S ⟶ T)

AlgebraicGeometry.Spec.locallyRingedSpaceMap (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.Spec.locallyRingedSpaceMap g)
    (AlgebraicGeometry.Spec.locallyRingedSpaceMap f)


@[simp]
theorem nodup_attach {s : Multiset α} : Nodup (attach s) ↔ Nodup s


theorem IsTerminal.subsingleton_to (hI : IsTerminal I) {A : C} : Subsingleton (I ⟶ A)

(hI : CategoryTheory.Limits.IsTerminal I)


@[rclike_simps]
theorem re_ofReal_mul (r : ℝ) (z : K) : re (↑r * z) = r * re z

{K : Type u_1}
[RCLike K]
(r : ℝ)
(z : K)


/-- Any topological space is homotopy equivalent to itself.
-/
@[simps!]
def refl (X : Type u) [TopologicalSpace X] : X ≃ₕ X

(X : Type u)
[TopologicalSpace X]
(a : X)

↑(ContinuousMap.HomotopyEquiv.refl X) a = a


/-- We can promote a type-level `Equiv` to
an equivalence between the corresponding `discrete` categories.
-/
@[simps]
def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ Discrete J

(CategoryTheory.Discrete.equivalence e).unitIso = CategoryTheory.Discrete.natIso fun i => CategoryTheory.eqToIso ⋯


theorem finMeasSupp_iff_support : f.FinMeasSupp μ ↔ μ (support f) < ∞

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

f.FinMeasSupp μ ↔ μ (Function.support ↑f) < ⊤


/-- For any compact subset `K ⊆ X`, there exist some bounded continuous nonnegative
functions f on X such that `f ≥ 1` on K. -/
theorem rieszContentAux_image_nonempty (K : Compacts X) :
    (Λ '' { f : X →ᵇ ℝ≥0 | ∀ x ∈ K, (1 : ℝ≥0) ≤ f x }).Nonempty

{X : Type u_1}
[TopologicalSpace X]
(Λ : (X →ᵇ ℝ≥0) →ₗ[ℝ≥0] ℝ≥0)
(K : TopologicalSpace.Compacts X)


theorem lowerCentralSeries_succ_eq_bot {n : ℕ} (h : lowerCentralSeries G n ≤ center G) :
    lowerCentralSeries G (n + 1) = ⊥

(h : lowerCentralSeries G n ≤ Subgroup.center G)


@[simp] theorem emptyOn_ground : (emptyOn α).E = ∅


theorem card_le_of_finset {α} (s : Finset α) : (s.card : Cardinal) ≤ #α


theorem mul_add_right_right : IsRelPrime x (z * x + y)

{R : Type u_1}
[CommRing R]
{x y : R}
(h : IsRelPrime x y)
(z : R)


@[ext]
lemma FirstObj.ext (z₁ z₂ : FirstObj P R) (h : ∀ (Y : C) (f : Y ⟶ X)
    (hf : R f), (Pi.π _ ⟨Y, f, hf⟩ : FirstObj P R ⟶ _) z₁ =
      (Pi.π _ ⟨Y, f, hf⟩ : FirstObj P R ⟶ _) z₂) : z₁ = z₂

{P : CategoryTheory.Functor Cᵒᵖ (Type (max v u))}

(z₁ z₂ : CategoryTheory.Equalizer.FirstObj P R)

(h :
  ∀ (Y : C) (f : Y ⟶ X) (hf : R f),
    CategoryTheory.Limits.Pi.π (fun f => P.obj (Opposite.op f.fst)) ⟨Y, ⟨f, hf⟩⟩ z₁ =
      CategoryTheory.Limits.Pi.π (fun f => P.obj (Opposite.op f.fst)) ⟨Y, ⟨f, hf⟩⟩ z₂)


lemma mul_inv_eq_one₀ (hb : b ≠ 0) : a * b⁻¹ = 1 ↔ a = b

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b : G₀}
(hb : b ≠ 0)


@[simp]
theorem trans_app {F G H : C ⥤ D} (α : F ≅ G) (β : G ≅ H) (X : C) :
    (α ≪≫ β).app X = α.app X ≪≫ β.app X

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


theorem span_singleton_mul_right_injective [IsDomain R] {x : R} (hx : x ≠ 0) :
    Function.Injective ((span {x} : Ideal R) * ·)

{R : Type u}
[CommSemiring R]
[IsDomain R]
{x : R}
(hx : x ≠ 0)

Function.Injective fun x_1 => Ideal.span {x} * x_1


theorem prod_subset_preimage_snd (s : Set α) (t : Set β) : s ×ˢ t ⊆ Prod.snd ⁻¹' t

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


theorem replicate_left_inj {a : α} {n m : ℕ} : replicate n a = replicate m a ↔ n = m

List.replicate n a = List.replicate m a ↔ n = m


@[simp]
theorem aroots_zero (S) [CommRing S] [IsDomain S] [Algebra T S] : (0 : T[X]).aroots S = 0

{T : Type w}
[CommRing T]
(S : Type u_1)
[CommRing S]
[IsDomain S]
[Algebra T S]


theorem sdiff_inf : a \ (b ⊓ c) = a \ b ⊔ a \ c

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


theorem inter_union_distrib_left (s t u : Finset α) : s ∩ (t ∪ u) = s ∩ t ∪ s ∩ u

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


theorem comul_comp_inl :
    comul ∘ₗ inl R A B = TensorProduct.map (.inl R A B) (.inl R A B) ∘ₗ comul

(R : Type u)
(A : Type v)
(B : Type w)
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R A]
[Module R B]
[Coalgebra R A]
[Coalgebra R B]

Coalgebra.comul ∘ₗ LinearMap.inl R A B =
  TensorProduct.map (LinearMap.inl R A B) (LinearMap.inl R A B) ∘ₗ Coalgebra.comul


theorem countP_le_of_le {s t} (h : s ≤ t) : countP p s ≤ countP p t

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

Multiset.countP p s ≤ Multiset.countP p t


/-- Functor translating a functor into the category of commutative monoid objects
to a commutative monoid object in the functor category
-/
@[simps!]
def inverse : (C ⥤ CommMon_ D) ⥤ CommMon_ (C ⥤ D)

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

(CategoryTheory.Monoidal.CommMonFunctorCategoryEquivalence.inverse.obj F).X.obj X =
  ((CommMon_.forget₂Mon_ D).obj (F.obj X)).X


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

{f : ι → Ω → β}

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

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


@[simp]
theorem compl_subset_compl : sᶜ ⊆ tᶜ ↔ t ⊆ s

sᶜ ⊆ tᶜ ↔ t ⊆ s


theorem lcm_dvd {s : Multiset α} {a : α} : s.lcm ∣ a ↔ ∀ b ∈ s, b ∣ a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Multiset α}
{a : α}


theorem algebraMap' (k : K) : (_root_.algebraMap K (K_hat R K) k).IsFiniteAdele

{R : Type u_1}
{K : Type u_2}
[CommRing R]
[IsDedekindDomain R]
[Field K]
[Algebra R K]
[IsFractionRing R K]
(k : K)

((algebraMap K (DedekindDomain.ProdAdicCompletions R K)) k).IsFiniteAdele


theorem ContMDiffOn.clm_precomp {f : M → F₁ →L[𝕜] F₂} {s : Set M}
    (hf : ContMDiffOn I 𝓘(𝕜, F₁ →L[𝕜] F₂) n f s) :
    ContMDiffOn I 𝓘(𝕜, (F₂ →L[𝕜] F₃) →L[𝕜] (F₁ →L[𝕜] F₃)) n
      (fun y ↦ (f y).precomp F₃ : M → (F₂ →L[𝕜] F₃) →L[𝕜] (F₁ →L[𝕜] F₃)) s

ContMDiffOn I 𝓘(𝕜, (F₂ →L[𝕜] F₃) →L[𝕜] F₁ →L[𝕜] F₃) n (fun y => ContinuousLinearMap.precomp F₃ (f y)) s


@[simp] theorem mul_emod_mul_of_pos
    {a : Int} (b c : Int) (H : 0 < a) : (a * b) % (a * c) = a * (b % c)


/-- (Impl) Construct the lifted cocone in `Coalgebra T` which will be colimiting. -/
@[simps]
def liftedCocone : Cocone D

(D : CategoryTheory.Functor J T.Coalgebra)

(c : CategoryTheory.Limits.Cocone (D.comp T.forget))

(CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCocone D c t).pt =
  CategoryTheory.Comonad.ForgetCreatesColimits'.coconePoint D c t


@[to_additive] lemma range_mul [Mul α] {ι : Sort*} (a : α) (f : ι → α) :
    range (fun i ↦ a * f i) = a • range f

{α : Type u_2}
[Add α]
{ι : Sort u_5}
(a : α)
(f : ι → α)

(Set.range fun i => a + f i) = a +ᵥ Set.range f


@[simp, norm_cast]
theorem toENNReal_coe_eq_iff : (m : ℝ≥0∞) = (n : ℝ≥0∞) ↔ m = n


theorem finBoolAlg_dual_comp_forget_to_finBddDistLat :
    FinBoolAlg.dual ⋙ forget₂ FinBoolAlg FinBddDistLat =
      forget₂ FinBoolAlg FinBddDistLat ⋙ FinBddDistLat.dual

FinBoolAlg.dual ⋙ CategoryTheory.forget₂ FinBoolAlg FinBddDistLat =
  CategoryTheory.forget₂ FinBoolAlg FinBddDistLat ⋙ FinBddDistLat.dual


theorem eval₂_mul_C : (p * C a).eval₂ f g = p.eval₂ f g * f a

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
{a : R}
[CommSemiring R]
[CommSemiring S₁]
{p : MvPolynomial σ R}
(f : R →+* S₁)
(g : σ → S₁)

MvPolynomial.eval₂ f g (p * MvPolynomial.C a) = MvPolynomial.eval₂ f g p * f a


theorem CompleteLattice.Independent.subtype_ne_bot_le_rank [Nontrivial R]
    {V : ι → Submodule R M} (hV : CompleteLattice.Independent V) :
    Cardinal.lift.{v} #{ i : ι // V i ≠ ⊥ } ≤ Cardinal.lift.{w} (Module.rank R M)

{R : Type u}
{M : Type v}
{ι : Type w}
[Ring R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
[Nontrivial R]
{V : ι → Submodule R M}
(hV : CompleteLattice.Independent V)

Cardinal.lift.{v, w} #{ i // V i ≠ ⊥ } ≤ Cardinal.lift.{w, v} (Module.rank R M)


theorem Periodic.image_Icc [LinearOrderedAddCommGroup α] [Archimedean α] (h : Periodic f c)
    (hc : 0 < c) (a : α) : f '' Icc a (a + c) = range f

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[LinearOrderedAddCommGroup α]
[Archimedean α]
(h : Function.Periodic f c)
(hc : 0 < c)
(a : α)


theorem mem_thickening_iff_exists_edist_lt {δ : ℝ} (E : Set α) (x : α) :
    x ∈ thickening δ E ↔ ∃ z ∈ E, edist x z < ENNReal.ofReal δ

{α : Type u}
[PseudoEMetricSpace α]
{δ : ℝ}
(E : Set α)
(x : α)

x ∈ Metric.thickening δ E ↔ ∃ z ∈ E, edist x z < ENNReal.ofReal δ


@[simp, norm_cast]
theorem log_natCast (b : ℕ) (n : ℕ) : log b (n : R) = Nat.log b n

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
(b n : ℕ)


theorem charmatrix_apply_natDegree [Nontrivial R] (i j : n) :
    (charmatrix M i j).natDegree = ite (i = j) 1 0

{R : Type u}
[CommRing R]
{n : Type v}
[DecidableEq n]
[Fintype n]
{M : Matrix n n R}
[Nontrivial R]
(i j : n)

(M.charmatrix i j).natDegree = if i = j then 1 else 0


@[simp, norm_cast]
theorem coe_min [LinearOrder α] (x y : α) : (↑(min x y) : WithTop α) = min (x : WithTop α) y

{α : Type u_1}
[LinearOrder α]
(x y : α)


/-- The following diagram is a pullback
```
X --f--> Z
|        |
id       id
v        v
X --f--> Z
```
-/
lemma id_vert (f : X ⟶ Z) : IsPullback f (𝟙 X) (𝟙 Z) f

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

CategoryTheory.IsPullback f (𝟙 X) (𝟙 Z) f


@[simp, norm_cast]
theorem coe_ringEquiv : ((e : A₁ ≃+* A₂) : A₁ → A₂) = e

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)


theorem emod_add_ediv : ∀ a b : Int, a % b + b * (a / b) = a


theorem insert_compl_insert (ha : a ∉ s) : insert a (insert a s)ᶜ = sᶜ

{α : Type u_1}
[Fintype α]
{s : Finset α}
[DecidableEq α]
{a : α}
(ha : a ∉ s)


theorem get_enum (l : List α) (i : Fin l.enum.length) :
    l.enum.get i = (i.1, l.get (i.cast enum_length))

{α : Type u_1}
(l : List α)
(i : Fin l.enum.length)

l.enum.get i = (↑i, l.get (Fin.cast ⋯ i))


theorem neg_pf [Neg α] (p : (a:α) = b) : -a = -b

{α : Type u_1}
{a b : α}
[Neg α]
(p : a = b)


@[to_additive]
theorem comap_sup_map_of_injective (S T : Subsemigroup M) : (S.map f ⊔ T.map f).comap f = S ⊔ T

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{f : AddHom M N}
(hf : Function.Injective ⇑f)
(S T : AddSubsemigroup M)

AddSubsemigroup.comap f (AddSubsemigroup.map f S ⊔ AddSubsemigroup.map f T) = S ⊔ T


@[simp]
theorem insert_fs (a : α) (b : α) (v : Vector3 α n) (i : Fin2 (n + 1)) :
    insert a (b :: v) (fs i) = b :: insert a v i

{α : Type u_1}
{n : ℕ}
(a b : α)
(v : Vector3 α n)
(i : Fin2 (n + 1))

Vector3.insert a (Vector3.cons b v) i.fs = Vector3.cons b (Vector3.insert a v i)


/-- The orthocenter lies in the affine span. -/
theorem orthocenter_mem_affineSpan (t : Triangle ℝ P) :
    t.orthocenter ∈ affineSpan ℝ (Set.range t.points)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(t : Affine.Triangle ℝ P)


theorem IsAdjointPair.comp {f' : M₁ →ₗ[R] M₂} {g' : M₂ →ₗ[R] M₁} (h : IsAdjointPair B B' f g)
    (h' : IsAdjointPair B' B'' f' g') : IsAdjointPair B B'' (f'.comp f) (g.comp g')

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
{M₂ : Type u_7}
{M₃ : Type u_8}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
[AddCommMonoid M₃]
[Module R M₃]
{I : R →+* R}
{B : M →ₗ[R] M →ₛₗ[I] M₃}
{B' : M₁ →ₗ[R] M₁ →ₛₗ[I] M₃}
{B'' : M₂ →ₗ[R] M₂ →ₛₗ[I] M₃}
{f : M →ₗ[R] M₁}
{g : M₁ →ₗ[R] M}
{f' : M₁ →ₗ[R] M₂}
{g' : M₂ →ₗ[R] M₁}
(h : B.IsAdjointPair B' f g)
(h' : B'.IsAdjointPair B'' f' g')


theorem rkPos_iff_empty_not_base : M.RkPos ↔ ¬M.Base ∅


@[to_additive nsmul_left_comm]
lemma pow_right_comm (a : M) (m n : ℕ) : (a ^ m) ^ n = (a ^ n) ^ m

{M : Type u_2}
[Monoid M]
(a : M)
(m n : ℕ)


lemma sheafComposeNatTrans_app_uniq (P : Cᵒᵖ ⥤ A)
    (α : G₂.obj (P ⋙ F) ⟶ (sheafCompose J F).obj (G₁.obj P))
    (hα : adj₂.unit.app (P ⋙ F) ≫ (sheafToPresheaf J B).map α =
        whiskerRight (adj₁.unit.app P) F) :
    α = (sheafComposeNatTrans J F adj₁ adj₂).app P

(J : CategoryTheory.GrothendieckTopology C)

{G₁ : CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ A) (CategoryTheory.Sheaf J A)}

(adj₁ : G₁ ⊣ CategoryTheory.sheafToPresheaf J A)

{G₂ : CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ B) (CategoryTheory.Sheaf J B)}

(adj₂ : G₂ ⊣ CategoryTheory.sheafToPresheaf J B)

(α : G₂.obj (P.comp F) ⟶ (CategoryTheory.sheafCompose J F).obj (G₁.obj P))

(hα :
  CategoryTheory.CategoryStruct.comp (adj₂.unit.app (P.comp F)) ((CategoryTheory.sheafToPresheaf J B).map α) =
    CategoryTheory.whiskerRight (adj₁.unit.app P) F)

α = (CategoryTheory.sheafComposeNatTrans J F adj₁ adj₂).app P


@[simp] theorem succ_eq_last_succ {n : Nat} (i : Fin n.succ) :
    i.succ = last (n + 1) ↔ i = last n

i.succ = Fin.last (n + 1) ↔ i = Fin.last n


@[simp]
theorem comp_id (f : X →ₑ[φ] Y) :
    f.comp (MulActionHom.id M) = f

{M : Type u_2}
{N : Type u_3}
{φ : M → N}
{X : Type u_5}
[SMul M X]
{Y : Type u_6}
[SMul N Y]
(f : X →ₑ[φ] Y)


theorem measurable_of_isOpen {f : δ → γ} (hf : ∀ s, IsOpen s → MeasurableSet (f ⁻¹' s)) :
    Measurable f

(hf : ∀ (s : Set γ), IsOpen s → MeasurableSet (f ⁻¹' s))


theorem mk_proj_snd (ex : x ∈ e.source) : (proj x, (e x).2) = e x

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
(e : Pretrivialization F proj)
{x : Z}
(ex : x ∈ e.source)


theorem coe_normalizer_eq_normalizer :
    (H.toLieSubmodule.normalizer : Submodule R L) = H.normalizer

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)


theorem TendstoLocallyUniformlyOn.mono (h : TendstoLocallyUniformlyOn F f p s) (h' : s' ⊆ s) :
    TendstoLocallyUniformlyOn F f p s'

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s s' : Set α}
{p : Filter ι}
[TopologicalSpace α]
(h : TendstoLocallyUniformlyOn F f p s)
(h' : s' ⊆ s)


theorem Finset.centerMass_pair (hne : i ≠ j) :
    ({i, j} : Finset ι).centerMass w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(i j : ι)
(w : ι → R)
(z : ι → E)
(hne : i ≠ j)

{i, j}.centerMass w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j


/-- ```
   0 -----0---> X
   |            |
   0           inl
   |            |
   v            v
   Y --inr--> X ⊞ Y
```
is a bicartesian square.
-/
theorem of_is_biproduct₂ {b : BinaryBicone X Y} (h : b.IsBilimit) :
    BicartesianSq (0 : 0 ⟶ X) (0 : 0 ⟶ Y) b.inl b.inr

{b : CategoryTheory.Limits.BinaryBicone X Y}

CategoryTheory.BicartesianSq 0 0 b.inl b.inr


/-- **Fundamental theorem of calculus-1**, strict differentiability in both endpoints.

If `f : ℝ → E` is integrable on `a..b` and `f` is continuous at `a` and `b`, then
`(u, v) ↦ ∫ x in u..v, f x` has derivative `(u, v) ↦ v • cb - u • ca` at `(a, b)` in the sense of
strict differentiability. -/
theorem integral_hasStrictFDerivAt (hf : IntervalIntegrable f volume a b)
    (hmeas_a : StronglyMeasurableAtFilter f (𝓝 a)) (hmeas_b : StronglyMeasurableAtFilter f (𝓝 b))
    (ha : ContinuousAt f a) (hb : ContinuousAt f b) :
    HasStrictFDerivAt (fun p : ℝ × ℝ => ∫ x in p.1..p.2, f x)
      ((snd ℝ ℝ ℝ).smulRight (f b) - (fst ℝ ℝ ℝ).smulRight (f a)) (a, b)

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas_a : StronglyMeasurableAtFilter f (𝓝 a) MeasureTheory.volume)

(hmeas_b : StronglyMeasurableAtFilter f (𝓝 b) MeasureTheory.volume)

HasStrictFDerivAt (fun p => ∫ (x : ℝ) in p.1 ..p.2, f x)
  ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight (f b) - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight (f a)) (a, b)


lemma Integrable.integral_eq_integral_Ioc_meas_le {f : α → ℝ} {M : ℝ}
    (f_intble : Integrable f μ) (f_nn : 0 ≤ᵐ[μ] f) (f_bdd : f ≤ᵐ[μ] (fun _ ↦ M)) :
    ∫ ω, f ω ∂μ = ∫ t in Ioc 0 M, ENNReal.toReal (μ {a : α | t ≤ f a})

(f_intble : MeasureTheory.Integrable f μ)

∫ (ω : α), f ω ∂μ = ∫ (t : ℝ) in Set.Ioc 0 M, (μ {a | t ≤ f a}).toReal


/-- `n`-times continuously differentiable diffeomorphism between `M` and `M'` with respect to `I`
and `I'`. -/
-- Porting note(#5171): was @[nolint has_nonempty_instance]
structure Diffeomorph extends M ≃ M' where
  protected contMDiff_toFun : ContMDiff I I' n toEquiv
  protected contMDiff_invFun : ContMDiff I' I n toEquiv.symm

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
{n : ℕ∞}
(self : M ≃ₘ^n⟮I, I'⟯ M')


theorem root_mul_left_of_isRoot (p : R[X]) {q : R[X]} : IsRoot q a → IsRoot (p * q) a

{R : Type u}
{a : R}
[CommSemiring R]
(p : R[X])
{q : R[X]}


@[simp]
lemma sup_divisors_id (n : ℕ) : n.divisors.sup id = n


theorem log_of_right_le_zero (b : ℕ) {r : R} (hr : r ≤ 0) : log b r = 0

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
(b : ℕ)
{r : R}
(hr : r ≤ 0)


theorem superpolynomialDecay_mul_const_iff [ContinuousMul β] {c : β} (hc0 : c ≠ 0) :
    (SuperpolynomialDecay l k fun n => f n * c) ↔ SuperpolynomialDecay l k f

{α : Type u_1}
{β : Type u_2}
(l : Filter α)
(k f : α → β)
[TopologicalSpace β]
[Field β]
[ContinuousMul β]
{c : β}
(hc0 : c ≠ 0)

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


@[to_additive]
theorem lift_of_comp_eq_map (f : α → β) : (lift fun x ↦ of (f x)) = map f

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

(FreeMonoid.lift fun x => FreeMonoid.of (f x)) = FreeMonoid.map f


@[simp]
theorem fork_pt : (fork F U).pt = F.obj (op (iSup U))

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasProducts C]
{X : TopCat}
(F : TopCat.Presheaf C X)
{ι : Type v'}
(U : ι → TopologicalSpace.Opens ↑X)

(TopCat.Presheaf.SheafConditionEqualizerProducts.fork F U).pt = F.obj (Opposite.op (iSup U))


/-- If a function is locally integrable, then it is integrable on any compact set. -/
theorem LocallyIntegrable.integrableOn_isCompact {k : Set X} (hf : LocallyIntegrable f μ)
    (hk : IsCompact k) : IntegrableOn f k μ

(hf : MeasureTheory.LocallyIntegrable f μ)


theorem hasSum_integral_iUnion {ι : Type*} [Countable ι] {s : ι → Set X}
    (hm : ∀ i, MeasurableSet (s i)) (hd : Pairwise (Disjoint on s))
    (hfi : IntegrableOn f (⋃ i, s i) μ) :
    HasSum (fun n => ∫ x in s n, f x ∂μ) (∫ x in ⋃ n, s n, f x ∂μ)

(hfi : MeasureTheory.IntegrableOn f (⋃ i, s i) μ)

HasSum (fun n => ∫ (x : X) in s n, f x ∂μ) (∫ (x : X) in ⋃ n, s n, f x ∂μ)


/-- Given a measure upstairs (i.e., on `α`), and a choice `s` of fundamental domain, there's always
an artificial way to generate a measure downstairs such that the pair satisfies the
`QuotientMeasureEqMeasurePreimage` typeclass. -/
@[to_additive]
lemma IsFundamentalDomain.quotientMeasureEqMeasurePreimage_quotientMeasure
    {s : Set α} (fund_dom_s : IsFundamentalDomain G s ν) :
    QuotientMeasureEqMeasurePreimage ν ((ν.restrict s).map π)

[MeasureTheory.VAddInvariantMeasure G α ν]

(fund_dom_s : MeasureTheory.IsAddFundamentalDomain G s ν)

MeasureTheory.AddQuotientMeasureEqMeasurePreimage ν
  (MeasureTheory.Measure.map (Quotient.mk (AddAction.orbitRel G α)) (ν.restrict s))


theorem filter_card_add_filter_neg_card_eq_card
    (p : α → Prop) [DecidablePred p] [∀ x, Decidable (¬p x)] :
    (s.filter p).card + (s.filter (fun a => ¬ p a)).card = s.card

{α : Type u_1}
{s : Finset α}
(p : α → Prop)
[DecidablePred p]
[(x : α) → Decidable ¬p x]

(Finset.filter p s).card + (Finset.filter (fun a => ¬p a) s).card = s.card


theorem normSq_nonneg (z : ℂ) : 0 ≤ normSq z


theorem Disjoint.left_le_of_le_sup_left (h : a ≤ c ⊔ b) (hd : Disjoint a c) : a ≤ b

{α : Type u_1}
[DistribLattice α]
[OrderBot α]
{a b c : α}
(h : a ≤ c ⊔ b)
(hd : Disjoint a c)


@[simp]
theorem coe_inv_coe' {c d : S.objs} (p : c ⟶ d) :
    (CategoryTheory.inv p).val = CategoryTheory.inv p.val

{C : Type u}
[CategoryTheory.Groupoid C]
(S : CategoryTheory.Subgroupoid C)
{c d : ↑S.objs}
(p : c ⟶ d)

↑(CategoryTheory.inv p) = CategoryTheory.inv ↑p


theorem derivative_C_mul_X_pow (a : R) (n : ℕ) :
    derivative (C a * X ^ n) = C (a * n) * X ^ (n - 1)

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

Polynomial.derivative (Polynomial.C a * Polynomial.X ^ n) = Polynomial.C (a * ↑n) * Polynomial.X ^ (n - 1)


theorem Ici_le_Ioi (a : α) : Ici a ≤ Ioi a


/-- If for any three points `x < y < z`, the slope of the secant line of `f : 𝕜 → 𝕜` on `[x, y]` is
strictly greater than the slope of the secant line of `f` on `[y, z]`, then `f` is strictly concave.
-/
theorem strictConcaveOn_of_slope_strict_anti_adjacent (hs : Convex 𝕜 s)
    (hf :
      ∀ {x y z : 𝕜},
        x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) < (f y - f x) / (y - x)) :
    StrictConcaveOn 𝕜 s f


/-- A flow on a topological space `α` by an additive topological
    monoid `τ` is a continuous monoid action of `τ` on `α`. -/
structure Flow (τ : Type*) [TopologicalSpace τ] [AddMonoid τ] [ContinuousAdd τ] (α : Type*)
  [TopologicalSpace α] where
  /-- The map `τ → α → α` underlying a flow of `τ` on `α`. -/
  toFun : τ → α → α
  cont' : Continuous (uncurry toFun)
  map_add' : ∀ t₁ t₂ x, toFun (t₁ + t₂) x = toFun t₁ (toFun t₂ x)
  map_zero' : ∀ x, toFun 0 x = x

{τ : Type u_1}
[TopologicalSpace τ]
[AddMonoid τ]
[ContinuousAdd τ]
{α : Type u_2}
[TopologicalSpace α]
(self : Flow τ α)
(t₁ t₂ : τ)
(x : α)

self.toFun (t₁ + t₂) x = self.toFun t₁ (self.toFun t₂ x)


theorem sup_typein_limit {o : Ordinal} (ho : ∀ a, a < o → succ a < o) :
    sup.{u, u} (typein ((· < ·) : o.out.α → o.out.α → Prop)) = o

{o : Ordinal.{u}}
(ho : ∀ a < o, Order.succ a < o)

Ordinal.sup (Ordinal.typein fun x x_1 => x < x_1) = o


@[to_additive]
theorem prod_sdiff_div_prod_sdiff :
    (∏ x ∈ s₂ \ s₁, f x) / ∏ x ∈ s₁ \ s₂, f x = (∏ x ∈ s₂, f x) / ∏ x ∈ s₁, f x

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[CommGroup β]
[DecidableEq α]


theorem Pi.uniformContinuous_postcomp' {β : ι → Type*} [∀ i, UniformSpace (β i)]
    {g : ∀ i, α i → β i} (hg : ∀ i, UniformContinuous (g i)) :
    UniformContinuous (fun (f : (∀ i, α i)) (i : ι) ↦ g i (f i))

(hg : ∀ (i : ι), UniformContinuous (g i))


@[simps! tensorObj tensorHom tensorUnit whiskerLeft whiskerRight associator]
instance prodMonoidal : MonoidalCategory (C₁ × C₂)

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

CategoryTheory.MonoidalCategory.tensorObj X Y =
  (CategoryTheory.MonoidalCategory.tensorObj X.1 Y.1, CategoryTheory.MonoidalCategory.tensorObj X.2 Y.2)


theorem differentiableAt_arcsin {x : ℝ} : DifferentiableAt ℝ arcsin x ↔ x ≠ -1 ∧ x ≠ 1

DifferentiableAt ℝ Real.arcsin x ↔ x ≠ -1 ∧ x ≠ 1


@[simp, norm_cast]
theorem withBotCoe_subset_iff {I J : WithBot (Box ι)} : (I : Set (ι → ℝ)) ⊆ J ↔ I ≤ J

{ι : Type u_1}
{I J : WithBot (BoxIntegral.Box ι)}

↑I ⊆ ↑J ↔ I ≤ J


/-- List.prod satisfies a specification of cartesian product on lists. -/
@[simp]
theorem pair_mem_product {xs : List α} {ys : List β} {x : α} {y : β} :
    (x, y) ∈ product xs ys ↔ x ∈ xs ∧ y ∈ ys

{α : Type u_1}
{β : Type u_2}
{xs : List α}
{ys : List β}
{x : α}
{y : β}

(x, y) ∈ xs.product ys ↔ x ∈ xs ∧ y ∈ ys


/--
Induction principle for set acting on submodules. To prove `P` holds for all `s • N`, it is enough
to prove:
- for all `r ∈ s` and `n ∈ N`, `P (r • n)`;
- for all `r` and `m ∈ s • N`, `P (r • n)`;
- for all `m₁, m₂`, `P m₁` and `P m₂` implies `P (m₁ + m₂)`;
- `P 0`.

To invoke this induction principle, use `induction x, hx using Submodule.set_smul_inductionOn` where
`x : M` and `hx : x ∈ s • N`
-/
@[elab_as_elim]
lemma set_smul_inductionOn {motive : (x : M) → (_ : x ∈ s • N) → Prop}
    (x : M)
    (hx : x ∈ s • N)
    (smul₀ : ∀ ⦃r : S⦄ ⦃n : M⦄ (mem₁ : r ∈ s) (mem₂ : n ∈ N),
      motive (r • n) (mem_set_smul_of_mem_mem mem₁ mem₂))
    (smul₁ : ∀ (r : R) ⦃m : M⦄ (mem : m ∈ s • N) ,
      motive m mem → motive (r • m) (Submodule.smul_mem _ r mem)) --
    (add : ∀ ⦃m₁ m₂ : M⦄ (mem₁ : m₁ ∈ s • N) (mem₂ : m₂ ∈ s • N),
      motive m₁ mem₁ → motive m₂ mem₂ → motive (m₁ + m₂) (Submodule.add_mem _ mem₁ mem₂))
    (zero : motive 0 (Submodule.zero_mem _)) :
    motive x hx

(smul₀ : ∀ ⦃r : S⦄ ⦃n : M⦄ (mem₁ : r ∈ s) (mem₂ : n ∈ N), motive (r • n) ⋯)

(smul₁ : ∀ (r : R) ⦃m : M⦄ (mem : m ∈ s • N), motive m mem → motive (r • m) ⋯)

(add : ∀ ⦃m₁ m₂ : M⦄ (mem₁ : m₁ ∈ s • N) (mem₂ : m₂ ∈ s • N), motive m₁ mem₁ → motive m₂ mem₂ → motive (m₁ + m₂) ⋯)


@[to_additive]
theorem map_eq (x) : f.map hy k (f.toMap x) = k.toMap (g x)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{g : M →* P}
{T : Submonoid P}
(hy : ∀ (y : ↥S), g ↑y ∈ T)
{Q : Type u_4}
[CommMonoid Q]
{k : T.LocalizationMap Q}
(x : M)

(f.map hy k) (f.toMap x) = k.toMap (g x)


@[simp]
lemma map_v (p q : ℤ) (hpq : p + n = q) : (z.map Φ).v p q hpq = Φ.map (z.v p q hpq)

(z : CochainComplex.HomComplex.Cochain K L n)


@[to_additive]
theorem prod_range_add (f : ℕ → β) (n m : ℕ) :
    (∏ x ∈ range (n + m), f x) = (∏ x ∈ range n, f x) * ∏ x ∈ range m, f (n + x)

{β : Type u_4}
[AddCommMonoid β]
(f : ℕ → β)
(n m : ℕ)

∑ x ∈ Finset.range (n + m), f x = ∑ x ∈ Finset.range n, f x + ∑ x ∈ Finset.range m, f (n + x)


/-- The **Ping-Pong-Lemma**.

Given a group action of `G` on `X` so that the `H i` acts in a specific way on disjoint subsets
`X i` we can prove that `lift f` is injective, and thus the image of `lift f` is isomorphic to the
free product of the `H i`.

Often the Ping-Pong-Lemma is stated with regard to subgroups `H i` that generate the whole group;
we generalize to arbitrary group homomorphisms `f i : H i →* G` and do not require the group to be
generated by the images.

Usually the Ping-Pong-Lemma requires that one group `H i` has at least three elements. This
condition is only needed if `# ι = 2`, and we accept `3 ≤ # ι` as an alternative.
-/
theorem lift_injective_of_ping_pong : Function.Injective (lift f)

(hcard : 3 ≤ Cardinal.mk ι ∨ ∃ i, 3 ≤ Cardinal.mk (H i))

(hXnonempty : ∀ (i : ι), (X i).Nonempty)

(hXdisj : Pairwise fun i j => Disjoint (X i) (X j))

(hpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → (f i) h • X j ⊆ X i)


theorem iff_not_exists_isMinBadSeq (rk : α → ℕ) {s : Set α} :
    s.PartiallyWellOrderedOn r ↔ ¬∃ f, IsBadSeq r s f ∧ ∀ n, IsMinBadSeq r rk s n f

{α : Type u_2}
{r : α → α → Prop}
(rk : α → ℕ)
{s : Set α}

s.PartiallyWellOrderedOn r ↔
  ¬∃ f, Set.PartiallyWellOrderedOn.IsBadSeq r s f ∧ ∀ (n : ℕ), Set.PartiallyWellOrderedOn.IsMinBadSeq r rk s n f


theorem SetCoe.ext_iff {s : Set α} {a b : s} : (↑a : α) = ↑b ↔ a = b


/-- `PartialEquivBEq α` says that the `BEq` implementation is a
partial equivalence relation, that is:
* it is symmetric: `a == b → b == a`
* it is transitive: `a == b → b == c → a == c`.
-/
class PartialEquivBEq (α) [BEq α] : Prop where
  /-- Symmetry for `BEq`. If `a == b` then `b == a`. -/
  symm : (a : α) == b → b == a
  /-- Transitivity for `BEq`. If `a == b` and `b == c` then `a == c`. -/
  trans : (a : α) == b → b == c → a == c

{α : Type u_1}
[BEq α]
[self : PartialEquivBEq α]
{a b c : α}

(a == b) = true → (b == c) = true → (a == c) = true


theorem isCompact_iff_totallyBounded_isComplete {s : Set α} :
    IsCompact s ↔ TotallyBounded s ∧ IsComplete s

{α : Type u}
[uniformSpace : UniformSpace α]
{s : Set α}


@[simp] theorem insert_erase (h : a ∈ s) : insert a (erase s a) = s

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


/-- Let `P` be a polynomial over `R`. If `P` is a unit, then all its coefficients are nilpotent,
except its constant term which is a unit.

See also `Polynomial.isUnit_iff_coeff_isUnit_isNilpotent`. -/
theorem coeff_isUnit_isNilpotent_of_isUnit (hunit : IsUnit P) :
    IsUnit (P.coeff 0) ∧ (∀ i, i ≠ 0 → IsNilpotent (P.coeff i))

{R : Type u_1}
[CommRing R]
{P : Polynomial R}
(hunit : IsUnit P)

IsUnit (P.coeff 0) ∧ ∀ (i : ℕ), i ≠ 0 → IsNilpotent (P.coeff i)


@[simp]
theorem natPred_succPNat (n : ℕ) : n.succPNat.natPred = n


private theorem add_aux_left (x1 x2 y : ℕ × K) (H : R K p x1 x2) :
    mk K p (x1.1 + y.1, (frobenius K p)^[y.1] x1.2 + (frobenius K p)^[x1.1] y.2) =
      mk K p (x2.1 + y.1, (frobenius K p)^[y.1] x2.2 + (frobenius K p)^[x2.1] y.2)

(K : Type u)
[CommRing K]
(p : ℕ)
[Fact (Nat.Prime p)]
[CharP K p]
(x1 x2 y : ℕ × K)
(H : PerfectClosure.R K p x1 x2)

PerfectClosure.mk K p (x1.1 + y.1, (⇑(frobenius K p))^[y.1] x1.2 + (⇑(frobenius K p))^[x1.1] y.2) =
  PerfectClosure.mk K p (x2.1 + y.1, (⇑(frobenius K p))^[y.1] x2.2 + (⇑(frobenius K p))^[x2.1] y.2)


@[to_additive (attr := simp)]
theorem pure_bind (f : α → FreeMagma β) (x) : pure x >>= f = f x

{α β : Type u}
(f : α → FreeMagma β)
(x : α)


/-- Two left invariant measures integrate in the same way continuous compactly supported functions,
up to the scalar `haarScalarFactor μ' μ`. See also
`measure_isMulInvariant_eq_smul_of_isCompact_closure`, which gives the same result for compact
sets, and `measure_isHaarMeasure_eq_smul_of_isOpen` for open sets. -/
@[to_additive integral_isAddLeftInvariant_eq_smul_of_hasCompactSupport
"Two left invariant measures integrate in the same way continuous compactly supported functions,
up to the scalar `addHaarScalarFactor μ' μ`. See also
`measure_isAddInvariant_eq_smul_of_isCompact_closure`, which gives the same result for compact
sets, and `measure_isAddHaarMeasure_eq_smul_of_isOpen` for open sets."]
theorem integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport
    (μ' μ : Measure G) [IsHaarMeasure μ] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ']
    {f : G → ℝ} (hf : Continuous f) (h'f : HasCompactSupport f) :
    ∫ x, f x ∂μ' = ∫ x, f x ∂(haarScalarFactor μ' μ • μ)

∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂μ'.haarScalarFactor μ • μ


@[simp]
theorem tendsto_lift₂_nhds {f : X → Y → α} {hf : ∀ a b c d, (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d}
    {x : X} {y : Y} {l : Filter α} :
    Tendsto (uncurry <| lift₂ f hf) (𝓝 (mk x, mk y)) l ↔ Tendsto (uncurry f) (𝓝 (x, y)) l

{hf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d}

Filter.Tendsto (Function.uncurry (SeparationQuotient.lift₂ f hf)) (𝓝 (SeparationQuotient.mk x, SeparationQuotient.mk y))
    l ↔
  Filter.Tendsto (Function.uncurry f) (𝓝 (x, y)) l


theorem IsCompact.exists_isLocalMin_mem_open [ClosedIicTopology α] {f : β → α} {s t : Set β}
    {z : β} (ht : IsCompact t) (hst : s ⊆ t) (hf : ContinuousOn f t) (hz : z ∈ t)
    (hfz : ∀ z' ∈ t \ s, f z < f z') (hs : IsOpen s) : ∃ x ∈ s, IsLocalMin f x

{α : Type u_2}
{β : Type u_3}
[LinearOrder α]
[TopologicalSpace α]
[TopologicalSpace β]
[ClosedIicTopology α]
{f : β → α}
{s t : Set β}
{z : β}
(ht : IsCompact t)
(hst : s ⊆ t)
(hf : ContinuousOn f t)
(hz : z ∈ t)
(hfz : ∀ z' ∈ t \ s, f z < f z')
(hs : IsOpen s)


theorem separable [IsGalois F E] (x : E) : IsSeparable F x

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
[IsGalois F E]
(x : E)


/--
An affine open cover of `X` consists of a family of open immersions into `X` from
spectra of rings.
-/
structure AffineOpenCover (X : Scheme.{u}) where
  /-- index set of an affine open cover of a scheme `X` -/
  J : Type v
  /-- the ring associated to a component of an affine open cover -/
  obj : J → CommRingCat.{u}
  /-- the embedding of subschemes to `X` -/
  map : ∀ j : J, Spec (obj j) ⟶ X
  /-- given a point of `x : X`, `f x` is the index of the subscheme which contains `x`  -/
  f : X → J
  /-- the subschemes covers `X` -/
  covers : ∀ x, x ∈ Set.range (map (f x)).1.base
  /-- the embedding of subschemes are open immersions -/
  IsOpen : ∀ x, IsOpenImmersion (map x) := by infer_instance

{X : AlgebraicGeometry.Scheme}
(self : X.AffineOpenCover)
(x : self.J)


theorem single_apply_mem (x) : single a b x ∈ ({0, b} : Set M)

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


@[to_additive]
theorem Function.Surjective.tprod_eq_tprod_of_hasProd_iff_hasProd {α' : Type*} [CommMonoid α']
    [TopologicalSpace α'] {e : α' → α} (hes : Function.Surjective e) (h1 : e 1 = 1) {f : β → α}
    {g : γ → α'} (h : ∀ {a}, HasProd f (e a) ↔ HasProd g a) : ∏' b, f b = e (∏' c, g c)

(h : ∀ {a : α'}, HasSum f (e a) ↔ HasSum g a)


/-- The negative of a `C^n` function within a domain at a point is `C^n` within this domain at
this point. -/
theorem ContDiffWithinAt.neg {s : Set E} {f : E → F} (hf : ContDiffWithinAt 𝕜 n f s x) :
    ContDiffWithinAt 𝕜 n (fun x => -f x) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{n : ℕ∞}
{s : Set E}
{f : E → F}
(hf : ContDiffWithinAt 𝕜 n f s x)


@[to_additive]
theorem one [One Y] : IsLocallyConstant (1 : X → Y)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[Zero Y]


theorem isMaximal_of_isIntegral_of_isMaximal_comap' (f : R →+* S) (hf : f.IsIntegral) (I : Ideal S)
    [I.IsPrime] (hI : IsMaximal (I.comap f)) : IsMaximal I

{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
(f : R →+* S)
(hf : f.IsIntegral)
(I : Ideal S)
[I.IsPrime]
(hI : (Ideal.comap f I).IsMaximal)


/-- The map `(x, y) ↦ (yx, x⁻¹)` is measure-preserving.
This is the function `S⁻¹RSR` in [Halmos, §59],
where `S` is the map `(x, y) ↦ (x, xy)` and `R` is `Prod.swap`. -/
@[to_additive measurePreserving_add_prod_neg
"The map `(x, y) ↦ (y + x, - x)` is measure-preserving."]
theorem measurePreserving_mul_prod_inv [IsMulLeftInvariant ν] :
    MeasurePreserving (fun z : G × G => (z.2 * z.1, z.1⁻¹)) (μ.prod ν) (μ.prod ν)

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ ν : MeasureTheory.Measure G)
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
[MeasurableInv G]
[μ.IsMulLeftInvariant]
[ν.IsMulLeftInvariant]

MeasureTheory.MeasurePreserving (fun z => (z.2 * z.1, z.1⁻¹)) (μ.prod ν) (μ.prod ν)


@[simp]
theorem Basis.coe_ofEquivFun [Finite ι] [DecidableEq ι] (e : M ≃ₗ[R] ι → R) :
    (Basis.ofEquivFun e : ι → M) = fun i => e.symm (Function.update 0 i 1)

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Finite ι]
[DecidableEq ι]
(e : M ≃ₗ[R] ι → R)

⇑(Basis.ofEquivFun e) = fun i => e.symm (Function.update 0 i 1)


theorem pullback_cone_of_left_condition : pullbackConeOfLeftFst f g ≫ f = Y.ofRestrict _ ≫ g

{X Y Z : AlgebraicGeometry.PresheafedSpace C}

[hf : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.pullbackConeOfLeftFst f g ≫ f = Y.ofRestrict ⋯ ≫ g


protected theorem naturality {α β} (f : α → F β) (x : List α) :
    η (List.traverse f x) = List.traverse (@η _ ∘ f) x

{F G : Type u → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative G]
[LawfulApplicative F]
(η : ApplicativeTransformation F G)
{α : Type u_1}
{β : Type u}
(f : α → F β)
(x : List α)

(fun {α} => η.app α) (List.traverse f x) = List.traverse ((fun {α} => η.app α) ∘ f) x


theorem eLpNorm_le_eLpNorm_of_exponent_le {p q : ℝ≥0∞} (hpq : p ≤ q) [IsProbabilityMeasure μ]
    (hf : AEStronglyMeasurable f μ) : eLpNorm f p μ ≤ eLpNorm f q μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.eLpNorm f p μ ≤ MeasureTheory.eLpNorm f q μ


theorem natDegree_eq_one_iff :
    (minpoly A x).natDegree = 1 ↔ x ∈ (algebraMap A B).range

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[Ring B]
[Algebra A B]
{x : B}
[Nontrivial B]


protected theorem Monotone.Ico (hf : Monotone f) (hg : Antitone g) :
    Antitone fun x => Ico (f x) (g x)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f g : α → β}
(hf : Monotone f)
(hg : Antitone g)


@[to_additive] lemma Antivary.div_right (h₁ : Antivary f g₁) (h₂ : Monovary f g₂) :
    Antivary f (g₁ / g₂)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommGroup α]
[LinearOrderedAddCommGroup β]
{f : ι → α}
{g₁ g₂ : ι → β}
(h₁ : Antivary f g₁)
(h₂ : Monovary f g₂)


@[simp]
lemma LSeries_add {f g : ℕ → ℂ} {s : ℂ} (hf : LSeriesSummable f s) (hg : LSeriesSummable g s) :
    LSeries (f + g) s = LSeries f s + LSeries g s


/-- Given a function `f : C → G` from a category to a group, we get a functor
    `C ⥤ G` sending any morphism `x ⟶ y` to `f y * (f x)⁻¹`. -/
@[simps]
def differenceFunctor (f : C → G) : C ⥤ SingleObj G

{G : Type u}
[Group G]
{C : Type v}
[CategoryTheory.Category.{w, v} C]
(f : C → G)

∀ (x : C), (CategoryTheory.SingleObj.differenceFunctor f).obj x = ()


theorem inner_smul_right (x y : E) (r : 𝕜) : ⟪x, r • y⟫ = r * ⟪x, y⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x y : E)
(r : 𝕜)


theorem le_of_lt_succ {a b : α} : a < succ b → a ≤ b

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


theorem frobenius_nnnorm_mul (A : Matrix l m α) (B : Matrix m n α) : ‖A * B‖₊ ≤ ‖A‖₊ * ‖B‖₊

{l : Type u_2}
{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype l]
[Fintype m]
[Fintype n]
[RCLike α]
(A : Matrix l m α)
(B : Matrix m n α)

‖A * B‖₊ ≤ ‖A‖₊ * ‖B‖₊


theorem Module.Baer.of_divisible [DivisibleBy A ℤ] : Module.Baer ℤ A

(A : Type u)
[AddCommGroup A]
[DivisibleBy A ℤ]


@[simp]
theorem convexHull_prod (s : Set E) (t : Set F) :
    convexHull R (s ×ˢ t) = convexHull R s ×ˢ convexHull R t

{R : Type u_1}
{E : Type u_3}
{F : Type u_4}
[LinearOrderedField R]
[AddCommGroup E]
[AddCommGroup F]
[Module R E]
[Module R F]
(s : Set E)
(t : Set F)

(convexHull R) (s ×ˢ t) = (convexHull R) s ×ˢ (convexHull R) t


lemma eq_desc (f : homotopyCofiber φ ⟶ K) (hc : ∀ j, ∃ i, c.Rel i j) :
    f = desc φ (inr φ ≫ f) (Homotopy.trans (Homotopy.ofEq (by simp))
      (((inrCompHomotopy φ hc).compRight f).trans (Homotopy.ofEq (by simp))))

(f : HomologicalComplex.homotopyCofiber φ ⟶ K)

f =
  HomologicalComplex.homotopyCofiber.desc φ (HomologicalComplex.homotopyCofiber.inr φ ≫ f)
    ((Homotopy.ofEq ⋯).trans
      (((HomologicalComplex.homotopyCofiber.inrCompHomotopy φ hc).compRight f).trans (Homotopy.ofEq ⋯)))


@[to_additive]
theorem mk_eq_mk {w₁ w₂ : FreeMonoid (M ⊕ N)} : mk w₁ = mk w₂ ↔ coprodCon M N w₁ w₂

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{w₁ w₂ : FreeAddMonoid (M ⊕ N)}

AddMonoid.Coprod.mk w₁ = AddMonoid.Coprod.mk w₂ ↔ (AddMonoid.coprodCon M N) w₁ w₂


theorem mul_ne_zero_of_pow_p_ne_zero {x y : ModP K v O hv p} (hx : x ^ p ≠ 0) (hy : y ^ p ≠ 0) :
    x * y ≠ 0

{K : Type u₁}
[Field K]
{v : Valuation K ℝ≥0}
{O : Type u₂}
[CommRing O]
[Algebra O K]
{hv : v.Integers O}
{p : ℕ}
[hp : Fact (Nat.Prime p)]
{x y : ModP K v O hv p}
(hx : x ^ p ≠ 0)
(hy : y ^ p ≠ 0)


@[to_additive]
theorem one_iff_ker_inv' {f : G → H} (hf : IsGroupHom f) (a b : G) : f a = f b ↔ f (a⁻¹ * b) = 1

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
{f : G → H}
(hf : IsAddGroupHom f)
(a b : G)


@[simp]
theorem preimage_sub_const_uIcc : (fun x => x - a) ⁻¹' [[b, c]] = [[b + a, c + a]]

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


@[simp]
theorem iterate_minimalPeriod : f^[minimalPeriod f x] x = x


theorem encard_exchange' (ha : a ∉ s) (hb : b ∈ s) : (insert a s \ {b}).encard = s.encard

{α : Type u_1}
{s : Set α}
{a b : α}
(ha : a ∉ s)
(hb : b ∈ s)


@[simp, norm_cast]
theorem ofReal_inj {z w : ℝ} : (z : ℂ) = w ↔ z = w


theorem setToL1SCLM_add_left' (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C') (hT'' : DominatedFinMeasAdditive μ T'' C'')
    (h_add : ∀ s, MeasurableSet s → μ s < ∞ → T'' s = T s + T' s) (f : α →₁ₛ[μ] E) :
    setToL1SCLM α E μ hT'' f = setToL1SCLM α E μ hT f + setToL1SCLM α E μ hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

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

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

(h_add : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → T'' s = T s + T' s)

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

(MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT'') f =
  (MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT) f + (MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT') f


theorem card_support_eq_three :
    f.support.card = 3 ↔
      ∃ (k m n : ℕ) (hkm : k < m) (hmn : m < n) (x y z : R) (hx : x ≠ 0) (hy : y ≠ 0) (hz : z ≠ 0),
        f = C x * X ^ k + C y * X ^ m + C z * X ^ n

f.support.card = 3 ↔
  ∃ k m n,
    ∃ (_ : k < m) (_ : m < n),
      ∃ x y z,
        ∃ (_ : x ≠ 0) (_ : y ≠ 0) (_ : z ≠ 0),
          f = Polynomial.C x * Polynomial.X ^ k + Polynomial.C y * Polynomial.X ^ m + Polynomial.C z * Polynomial.X ^ n


@[simp]
theorem eval₂Hom_map_hom [CommSemiring S₂] (f : R →+* S₁) (g : σ → S₂) (φ : S₁ →+* S₂)
    (p : MvPolynomial σ R) : eval₂Hom φ g (map f p) = eval₂Hom (φ.comp f) g p

{R : Type u}
{S₁ : Type v}
{S₂ : Type w}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
[CommSemiring S₂]
(f : R →+* S₁)
(g : σ → S₂)
(φ : S₁ →+* S₂)
(p : MvPolynomial σ R)

(MvPolynomial.eval₂Hom φ g) ((MvPolynomial.map f) p) = (MvPolynomial.eval₂Hom (φ.comp f) g) p


/-- If a continuous multilinear map in finitely many variables on normed spaces satisfies
the inequality `‖f m‖ ≤ C * ∏ i, ‖m i‖` on a shell `ε i / ‖c i‖ < ‖m i‖ < ε i` for some positive
numbers `ε i` and elements `c i : 𝕜`, `1 < ‖c i‖`, then it satisfies this inequality for all `m`. -/
theorem bound_of_shell_of_continuous (hfc : Continuous f)
    {ε : ι → ℝ} {C : ℝ} (hε : ∀ i, 0 < ε i) {c : ι → 𝕜} (hc : ∀ i, 1 < ‖c i‖)
    (hf : ∀ m : ∀ i, E i, (∀ i, ε i / ‖c i‖ ≤ ‖m i‖) → (∀ i, ‖m i‖ < ε i) → ‖f m‖ ≤ C * ∏ i, ‖m i‖)
    (m : ∀ i, E i) : ‖f m‖ ≤ C * ∏ i, ‖m i‖

[(i : ι) → SeminormedAddCommGroup (E i)]

(hf : ∀ (m : (i : ι) → E i), (∀ (i : ι), ε i / ‖c i‖ ≤ ‖m i‖) → (∀ (i : ι), ‖m i‖ < ε i) → ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖)


@[reassoc (attr := simp)]
lemma pullback.lift_fst {Z : CompHausLike P} (a : Z ⟶ X) (b : Z ⟶ Y) (w : a ≫ f = b ≫ g) :
    pullback.lift f g a b w ≫ pullback.fst f g = a

(w : CategoryTheory.CategoryStruct.comp a f = CategoryTheory.CategoryStruct.comp b g)

CategoryTheory.CategoryStruct.comp (CompHausLike.pullback.lift f g a b w) (CompHausLike.pullback.fst f g) = a


theorem scalar_commute (r : α) (hr : ∀ r', Commute r r') (M : Matrix n n α) :
    Commute (scalar n r) M

{n : Type u_3}
{α : Type v}
[Semiring α]
[DecidableEq n]
[Fintype n]
(r : α)
(hr : ∀ (r' : α), Commute r r')
(M : Matrix n n α)


@[to_additive (attr := simp) tendsto_norm_atTop_iff_cobounded]
lemma tendsto_norm_atTop_iff_cobounded' {f : α → E} {l : Filter α} :
    Tendsto (‖f ·‖) l atTop ↔ Tendsto f l (cobounded E)

{α : Type u_1}
{E : Type u_3}
[SeminormedAddGroup E]
{f : α → E}
{l : Filter α}

Filter.Tendsto (fun x => ‖f x‖) l Filter.atTop ↔ Filter.Tendsto f l (Bornology.cobounded E)


theorem Filter.EventuallyEq.derivWithin_eq (hs : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) :
    derivWithin f₁ s x = derivWithin f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : 𝕜 → F}
{x : 𝕜}
{s : Set 𝕜}
(hs : f₁ =ᶠ[𝓝[s] x] f)
(hx : f₁ x = f x)


/-- `DFinsupp.erase` as an `AddMonoidHom`. -/
@[simps]
def eraseAddHom (i : ι) : (Π₀ i, β i) →+ Π₀ i, β i

{ι : Type u}
(β : ι → Type v)
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
(i : ι)
(x : Π₀ (i : ι), β i)

(DFinsupp.eraseAddHom β i) x = DFinsupp.erase i x


/-- The layer cake formula / **Cavalieri's principle** / tail probability formula:

Let `f` be a non-negative measurable function on a measure space. Let `G` be an
increasing absolutely continuous function on the positive real line, vanishing at the origin,
with derivative `G' = g`. Then the integral of the composition `G ∘ f` can be written as
the integral over the positive real line of the "tail measures" `μ {ω | f(ω) ≥ t}` of `f`
weighted by `g`.

Roughly speaking, the statement is: `∫⁻ (G ∘ f) ∂μ = ∫⁻ t in 0..∞, g(t) * μ {ω | f(ω) ≥ t}`.

See `MeasureTheory.lintegral_comp_eq_lintegral_meas_lt_mul` for a version with sets of the form
`{ω | f(ω) > t}` instead. -/
theorem lintegral_comp_eq_lintegral_meas_le_mul (μ : Measure α) (f_nn : 0 ≤ᵐ[μ] f)
    (f_mble : AEMeasurable f μ) (g_intble : ∀ t > 0, IntervalIntegrable g volume 0 t)
    (g_nn : ∀ᵐ t ∂volume.restrict (Ioi 0), 0 ≤ g t) :
    ∫⁻ ω, ENNReal.ofReal (∫ t in (0)..f ω, g t) ∂μ =
      ∫⁻ t in Ioi 0, μ {a : α | t ≤ f a} * ENNReal.ofReal (g t)

(g_intble : ∀ t > 0, IntervalIntegrable g MeasureTheory.volume 0 t)

(g_nn : ∀ᵐ (t : ℝ) ∂MeasureTheory.volume.restrict (Set.Ioi 0), 0 ≤ g t)

∫⁻ (ω : α), ENNReal.ofReal (∫ (t : ℝ) in 0 ..f ω, g t) ∂μ =
  ∫⁻ (t : ℝ) in Set.Ioi 0, μ {a | t ≤ f a} * ENNReal.ofReal (g t)


/-- Two reduced words representing the same element of the `HNNExtension G A B φ` have the same
length corresponding list, with the same pattern of occurences of `t^1` and `t^(-1)`,
and also the `head` is in the same left coset of `toSubgroup A B (-u)`, where `u : ℤˣ`
is the exponent of the first occurence of `t` in the word. -/
theorem map_fst_eq_and_of_prod_eq {w₁ w₂ : ReducedWord G A B}
    (hprod : w₁.prod φ = w₂.prod φ) :
    w₁.toList.map Prod.fst = w₂.toList.map Prod.fst ∧
     ∀ u ∈ w₁.toList.head?.map Prod.fst,
      w₁.head⁻¹ * w₂.head ∈ toSubgroup A B (-u)

{w₁ w₂ : HNNExtension.NormalWord.ReducedWord G A B}

(hprod : HNNExtension.NormalWord.ReducedWord.prod φ w₁ = HNNExtension.NormalWord.ReducedWord.prod φ w₂)

List.map Prod.fst w₁.toList = List.map Prod.fst w₂.toList ∧
  ∀ u ∈ Option.map Prod.fst w₁.toList.head?, w₁.head⁻¹ * w₂.head ∈ HNNExtension.toSubgroup A B (-u)


@[to_additive lt_add_of_pos_right]
theorem lt_mul_of_one_lt_right' [CovariantClass α α (· * ·) (· < ·)] (a : α) {b : α} (h : 1 < b) :
    a < a * b

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


theorem antilipschitz (coercive : IsCoercive B) : ∃ C : ℝ≥0, 0 < C ∧ AntilipschitzWith C B♯

{V : Type u}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[CompleteSpace V]
{B : V →L[ℝ] V →L[ℝ] ℝ}
(coercive : IsCoercive B)

∃ C, 0 < C ∧ AntilipschitzWith C ⇑(InnerProductSpace.continuousLinearMapOfBilin B)


@[simp]
theorem toLex_le_toLex [LE α] [LE β] {a b : α ⊕ β} :
    toLex a ≤ toLex b ↔ Lex (· ≤ ·) (· ≤ ·) a b

{α : Type u_1}
{β : Type u_2}
[LE α]
[LE β]
{a b : α ⊕ β}

toLex a ≤ toLex b ↔ Sum.Lex (fun x x_1 => x ≤ x_1) (fun x x_1 => x ≤ x_1) a b


/-- Bundled structure registering a well order on a type. Ordinals will be defined as a quotient
of this type. -/
structure WellOrder : Type (u + 1) where
  /-- The underlying type of the order. -/
  α : Type u
  /-- The underlying relation of the order. -/
  r : α → α → Prop
  /-- The proposition that `r` is a well-ordering for `α`. -/
  wo : IsWellOrder α r


theorem posMulMono_iff_posMulStrictMono : PosMulMono α ↔ PosMulStrictMono α

{α : Type u_1}
[CancelMonoidWithZero α]
[PartialOrder α]


@[simp]
theorem disjSups_empty_right : s ○ ∅ = ∅

{α : Type u_2}
[DecidableEq α]
[SemilatticeSup α]
[OrderBot α]
[DecidableRel Disjoint]
{s : Finset α}


/-- The spectrum of a commutative ring, as a `SheafedSpace`.
-/
@[simps]
def Spec.sheafedSpaceObj (R : CommRingCat.{u}) : SheafedSpace CommRingCat

(AlgebraicGeometry.Spec.sheafedSpaceObj R).presheaf = (AlgebraicGeometry.Spec.structureSheaf ↑R).val


/-- Up to rotation, the contractible triangle `X ⟶ X ⟶ 0 ⟶ X⟦1⟧` for `X : Cᵒᵖ` corresponds
to the contractible triangle for `X.unop` in `C`. -/
@[simps!]
noncomputable def contractibleTriangleIso (X : Cᵒᵖ) :
    contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj
      (Opposite.op (contractibleTriangle X.unop).invRotate)

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

(CategoryTheory.Pretriangulated.Opposite.contractibleTriangleIso X).inv.hom₂ = CategoryTheory.CategoryStruct.id X


@[simp]
theorem coe_proj (i : ι) : ⇑(proj i : ((i : ι) → φ i) →ₗ[R] φ i) = Function.eval i

{R : Type u}
{ι : Type x}
[Semiring R]
{φ : ι → Type i}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(i : ι)


/-- `K` is contained in `Kᗮᗮ`. -/
theorem le_orthogonal_orthogonal : K ≤ Kᗮᗮ

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


/-- This is a simple version of the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the
  integral of a function `f` on `G` with respect to a right-invariant measure `μ` is equal to the
  integral over the quotient `G ⧸ Γ` of the automorphization of `f`. -/
@[to_additive "This is a simple version of the **Unfolding Trick**: Given a subgroup `Γ` of an
  additive  group `G`, the integral of a function `f` on `G` with respect to a right-invariant
  measure `μ` is equal to the integral over the quotient `G ⧸ Γ` of the automorphization of `f`."]
lemma QuotientGroup.integral_eq_integral_automorphize {E : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [μ.IsMulRightInvariant] {f : G → E}
    (hf₁ : Integrable f μ) (hf₂ : AEStronglyMeasurable (automorphize f) μ_𝓕) :
    ∫ x : G, f x ∂μ = ∫ x : G ⧸ Γ, automorphize f x ∂μ_𝓕

(h𝓕 : MeasureTheory.IsAddFundamentalDomain (↥Γ.op) 𝓕 μ)

(hf₂ :
  MeasureTheory.AEStronglyMeasurable (QuotientAddGroup.automorphize f)
    (MeasureTheory.Measure.map QuotientAddGroup.mk (μ.restrict 𝓕)))

∫ (x : G), f x ∂μ =
  ∫ (x : G ⧸ Γ), QuotientAddGroup.automorphize f x ∂MeasureTheory.Measure.map QuotientAddGroup.mk (μ.restrict 𝓕)


@[simp]
theorem cons_vec_bit1_eq_alt1 (x : α) (u : Fin n → α) (i : Fin (n + 1)) :
    vecCons x u ((i + i) + 1) = vecAlt1 rfl (vecAppend rfl (vecCons x u) (vecCons x u)) i

{α : Type u}
{n : ℕ}
(x : α)
(u : Fin n → α)
(i : Fin (n + 1))

Matrix.vecCons x u (i + i + 1) = Matrix.vecAlt1 ⋯ (Matrix.vecAppend ⋯ (Matrix.vecCons x u) (Matrix.vecCons x u)) i


protected theorem Infinite.prod_right (ht : t.Infinite) (hs : s.Nonempty) : (s ×ˢ t).Infinite

{α : Type u}
{β : Type v}
{s : Set α}
{t : Set β}
(ht : t.Infinite)
(hs : s.Nonempty)


/-- The pullback provided by `HasPullback f g` fits into an `IsPullback`. -/
theorem of_hasPullback (f : X ⟶ Z) (g : Y ⟶ Z) [HasPullback f g] :
    IsPullback (pullback.fst f g) (pullback.snd f g) f g

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

CategoryTheory.IsPullback (CategoryTheory.Limits.pullback.fst f g) (CategoryTheory.Limits.pullback.snd f g) f g


theorem trans_assoc (e₁ : P₁ ≃ᵃL[k] P₂) (e₂ : P₂ ≃ᵃL[k] P₃) (e₃ : P₃ ≃ᵃL[k] P₄) :
    (e₁.trans e₂).trans e₃ = e₁.trans (e₂.trans e₃)

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{P₃ : Type u_4}
{P₄ : Type u_5}
{V₁ : Type u_6}
{V₂ : Type u_7}
{V₃ : Type u_8}
{V₄ : Type u_9}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[AddCommGroup V₃]
[Module k V₃]
[AddTorsor V₃ P₃]
[AddCommGroup V₄]
[Module k V₄]
[AddTorsor V₄ P₄]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
[TopologicalSpace P₃]
[TopologicalSpace P₄]
(e₁ : P₁ ≃ᵃL[k] P₂)
(e₂ : P₂ ≃ᵃL[k] P₃)
(e₃ : P₃ ≃ᵃL[k] P₄)


lemma two_lt_of_ne : ∀ {n}, n ≠ 0 → n ≠ 1 → n ≠ 2 → 2 < n


/-- Pointwise `Singleton.singleton` bundled as a `Finsupp`. -/
@[simps]
def rangeSingleton (f : ι →₀ α) : ι →₀ Finset α

{ι : Type u_1}
{α : Type u_2}
[Zero α]
(f : ι →₀ α)
(i : ι)


/-- Representing an element of a ring's unit group as an element of the ring commutes with
    mapping this element to its additive inverse. -/
@[simp, norm_cast]
protected theorem val_neg (u : αˣ) : (↑(-u) : α) = -u

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


theorem div_mul_eq_mul_div₀ (a b c : G₀) : a / c * b = a * b / c

{G₀ : Type u_3}
[CommGroupWithZero G₀]
(a b c : G₀)


/-- Auxiliary construction for `CliffordAlgebra.contractLeft` -/
@[simps!]
def contractLeftAux (d : Module.Dual R M) :
    M →ₗ[R] CliffordAlgebra Q × CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(d : Module.Dual R M)
(a : M)

∀ (a_1 : CliffordAlgebra Q × CliffordAlgebra Q),
  ((CliffordAlgebra.contractLeftAux Q d) a) a_1 = d a • a_1.1 - (CliffordAlgebra.ι Q) a * a_1.2


/-- The orthogonal projection is self-adjoint. -/
theorem inner_orthogonalProjection_left_eq_right [HasOrthogonalProjection K] (u v : E) :
    ⟪↑(orthogonalProjection K u), v⟫ = ⟪u, orthogonalProjection K v⟫

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

⟪↑((orthogonalProjection K) u), v⟫_𝕜 = ⟪u, ↑((orthogonalProjection K) v)⟫_𝕜


@[simp]
theorem mul_unit_mem_iff_mem {x y : α} (hy : IsUnit y) : x * y ∈ I ↔ x ∈ I

{α : Type u}
[CommSemiring α]
(I : Ideal α)
{x y : α}
(hy : IsUnit y)


/-- Emetric diameter of the convex hull of a set `s` equals the emetric diameter of `s`. -/
@[simp]
theorem convexHull_ediam (s : Set E) : EMetric.diam (convexHull ℝ s) = EMetric.diam s

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

EMetric.diam ((convexHull ℝ) s) = EMetric.diam s


/-- If a function `f` is locally integrable on a set `s` in a second countable topological space,
then there exists a sequence of open sets `u n` covering `s` such that `f` is integrable on each
set `u n ∩ s`. -/
theorem LocallyIntegrableOn.exists_nat_integrableOn [SecondCountableTopology X]
    (hf : LocallyIntegrableOn f s μ) : ∃ u : ℕ → Set X,
    (∀ n, IsOpen (u n)) ∧ (s ⊆ ⋃ n, u n) ∧ (∀ n, IntegrableOn f (u n ∩ s) μ)

(hf : MeasureTheory.LocallyIntegrableOn f s μ)

∃ u, (∀ (n : ℕ), IsOpen (u n)) ∧ s ⊆ ⋃ n, u n ∧ ∀ (n : ℕ), MeasureTheory.IntegrableOn f (u n ∩ s) μ


theorem adjoin_eq (S : Subalgebra R A) : adjoin R ↑S = S

{R : Type uR}
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)


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

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


@[simp]
theorem cast_id' : (ZMod.cast : ZMod n → ZMod n) = id


/-- The binary fan whose point is `prod F G`. -/
@[simps!]
def binaryProductCone : BinaryFan F G

(F G : CategoryTheory.Functor C (Type w))

∀ {X Y : C} (f : X ⟶ Y) (a : F.obj X × G.obj X),
  (CategoryTheory.FunctorToTypes.binaryProductCone F G).pt.map f a = (F.map f a.1, G.map f a.2)


@[simp]
theorem cast_rfl : Sym.cast rfl s = s


@[norm_cast]
theorem coe_neg' (f : M →SL[σ₁₂] M₂) : ⇑(-f) = -f

{R : Type u_1}
[Ring R]
{R₂ : Type u_2}
[Ring R₂]
{M : Type u_4}
[TopologicalSpace M]
[AddCommGroup M]
{M₂ : Type u_5}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[TopologicalAddGroup M₂]
(f : M →SL[σ₁₂] M₂)


@[simp]
theorem mem_equalizer (φ ψ : F) (x : A) : x ∈ equalizer φ ψ ↔ φ x = ψ x

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
{F : Type u_4}
[FunLike F A B]
[AlgHomClass F R A B]
(φ ψ : F)
(x : A)


@[simp] theorem or_not_self : ∀ (x : Bool), (x || !x) = true


@[simp]
theorem integralBasis_repr_apply (x : (𝓞 K)) (i : Free.ChooseBasisIndex ℤ (𝓞 K)) :
    (integralBasis K).repr (algebraMap _ _ x) i =
      (algebraMap ℤ ℚ) ((RingOfIntegers.basis K).repr x i)

(i : Module.Free.ChooseBasisIndex ℤ (NumberField.RingOfIntegers K))

((NumberField.integralBasis K).repr ((algebraMap (NumberField.RingOfIntegers K) K) x)) i =
  (algebraMap ℤ ℚ) (((NumberField.RingOfIntegers.basis K).repr x) i)


@[simp]
theorem foldr_map (g : β → γ) (f : γ → α → α) (a : α) (l : t β) :
    foldr f a (g <$> l) = foldr (f ∘ g) a l

{α β γ : Type u}
{t : Type u → Type u}
[Traversable t]
[LawfulTraversable t]
(g : β → γ)
(f : γ → α → α)
(a : α)
(l : t β)

Traversable.foldr f a (g <$> l) = Traversable.foldr (f ∘ g) a l


theorem HasDerivAt.rpow_const (hf : HasDerivAt f f' x) (hx : f x ≠ 0 ∨ 1 ≤ p) :
    HasDerivAt (fun y => f y ^ p) (f' * p * f x ^ (p - 1)) x

{f : ℝ → ℝ}
{f' x p : ℝ}
(hf : HasDerivAt f f' x)
(hx : f x ≠ 0 ∨ 1 ≤ p)


@[continuity]
theorem Continuous.matrix_cramer [Fintype n] [DecidableEq n] [CommRing R] [TopologicalRing R]
    {A : X → Matrix n n R} {B : X → n → R} (hA : Continuous A) (hB : Continuous B) :
    Continuous fun x => cramer (A x) (B x)

{X : Type u_1}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[Fintype n]
[DecidableEq n]
[CommRing R]
[TopologicalRing R]
{A : X → Matrix n n R}
{B : X → n → R}
(hA : Continuous A)
(hB : Continuous B)


@[to_additive (attr := simp)]
theorem toTopologicalSpace_le {x y : GroupTopology α} :
    x.toTopologicalSpace ≤ y.toTopologicalSpace ↔ x ≤ y

{α : Type u}
[Group α]
{x y : GroupTopology α}


/-- If the submodule `P` has a finite basis,
`x ∈ P` iff it is a linear combination of basis vectors. -/
theorem Basis.mem_submodule_iff' [Fintype ι] {P : Submodule R M} (b : Basis ι R P) {x : M} :
    x ∈ P ↔ ∃ c : ι → R, x = ∑ i, c i • (b i : M)

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Fintype ι]
{P : Submodule R M}
(b : Basis ι R ↥P)
{x : M}


@[simp]
lemma equivPullbackObj_apply_fst (x : c.pt) : (equivPullbackObj hc x).1.1 = c.fst x

{c : CategoryTheory.Limits.PullbackCone f g}

(↑((CategoryTheory.Limits.PullbackCone.IsLimit.equivPullbackObj hc) x)).1 = c.fst x


@[simp]
theorem mem_mk (c : ℕ × ℕ) (cells) (isLowerSet) :
    c ∈ YoungDiagram.mk cells isLowerSet ↔ c ∈ cells

(c : ℕ × ℕ)
(cells : Finset (ℕ × ℕ))
(isLowerSet : IsLowerSet ↑cells)

c ∈ { cells := cells, isLowerSet := isLowerSet } ↔ c ∈ cells


theorem le_infDegree_mul (f g : R[A]) :
    f.infDegree D + g.infDegree D ≤ (f * g).infDegree D

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

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

AddMonoidAlgebra.infDegree (⇑D) f + AddMonoidAlgebra.infDegree (⇑D) g ≤ AddMonoidAlgebra.infDegree (⇑D) (f * g)


theorem map_sSup' (hf : LeftOrdContinuous f) (s : Set α) : f (sSup s) = sSup (f '' s)

{α : Type u}
{β : Type v}
[CompleteLattice α]
[CompleteLattice β]
{f : α → β}
(hf : LeftOrdContinuous f)
(s : Set α)


@[simp]
theorem fastGrowing_two : fastGrowing 2 = fun n => (2 ^ n) * n

ONote.fastGrowing 2 = fun n => 2 ^ n * n


/-- There are `⌊b / r⌋ - ⌊a / r⌋` multiples of `r` in `(a, b]`, if `a ≤ b`. -/
theorem Ioc_filter_dvd_card : ((Ioc a b).filter (r ∣ ·)).card =
    max (⌊b / (r : ℚ)⌋ - ⌊a / (r : ℚ)⌋) 0

↑(Finset.filter (fun x => r ∣ x) (Finset.Ioc a b)).card = max (⌊↑b / ↑r⌋ - ⌊↑a / ↑r⌋) 0


theorem smul_sum [Zero β] [AddCommMonoid M] [DistribSMul R M] {v : α →₀ β} {c : R} {h : α → β → M} :
    c • v.sum h = v.sum fun a b => c • h a b

{α : Type u_1}
{β : Type u_2}
{R : Type u_3}
{M : Type u_4}
[Zero β]
[AddCommMonoid M]
[DistribSMul R M]
{v : α →₀ β}
{c : R}
{h : α → β → M}


/-- The cosine of the sum of two angles in a possibly degenerate
triangle (where two given sides are nonzero), vector angle form. -/
theorem cos_angle_sub_add_angle_sub_rev_eq_neg_cos_angle {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    Real.cos (angle x (x - y) + angle y (y - x)) = -Real.cos (angle x y)

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}
(hx : x ≠ 0)
(hy : y ≠ 0)

Real.cos (InnerProductGeometry.angle x (x - y) + InnerProductGeometry.angle y (y - x)) =
  -Real.cos (InnerProductGeometry.angle x y)


theorem ne_self_iff_false (a : α) : a ≠ a ↔ False


@[simp]
theorem AddSubmonoid.coe_toNatSubmodule (S : AddSubmonoid M) :
    (AddSubmonoid.toNatSubmodule S : Set M) = S

{M : Type u_3}
[AddCommMonoid M]
(S : AddSubmonoid M)


@[simp]
theorem symm_toCoalgHom (e : A ≃ₗc[R] B) :
    ((e.symm : B →ₗc[R] A) : B →ₗ[R] A) = (e : A ≃ₗ[R] B).symm

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R A]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(e : A ≃ₗc[R] B)


theorem setOf_subset_eq_empty_iff (S : L[[α]].Theory) :
    { p : T.CompleteType α | S ⊆ ↑p } = ∅ ↔
      ¬((L.lhomWithConstants α).onTheory T ∪ S).IsSatisfiable

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
(S : L[[α]].Theory)

{p | S ⊆ ↑p} = ∅ ↔ ¬((L.lhomWithConstants α).onTheory T ∪ S).IsSatisfiable


/-- Given an integral domain `A` with field of fractions `K`,
and an injective ring hom `g : A →+* L` where `L` is a field,
the field hom induced from `K` to `L` maps `x` to `g x` for all
`x : A`. -/
@[simp]
theorem lift_algebraMap (hg : Injective g) (x) : lift hg (algebraMap A K x) = g x

{A : Type u_4}
[CommRing A]
[IsDomain A]
{K : Type u_5}
[Field K]
{L : Type u_7}
[Field L]
[Algebra A K]
[IsFractionRing A K]
{g : A →+* L}
(hg : Function.Injective ⇑g)
(x : A)

(IsFractionRing.lift hg) ((algebraMap A K) x) = g x


/-- Given `CommMonoid`s `M, P`, Localization maps `f : M →* N, k : P →* Q` for Submonoids
`S, T` respectively, and `g : M →* P` such that `g(S) ⊆ T`, `f x = f y` implies
`k (g x) = k (g y)`. -/
@[to_additive
    "Given `AddCommMonoid`s `M, P`, Localization maps `f : M →+ N, k : P →+ Q` for Submonoids
`S, T` respectively, and `g : M →+ P` such that `g(S) ⊆ T`, `f x = f y`
implies `k (g x) = k (g y)`."]
theorem comp_eq_of_eq {T : Submonoid P} {Q : Type*} [CommMonoid Q] (hg : ∀ y : S, g y ∈ T)
    (k : LocalizationMap T Q) {x y} (h : f.toMap x = f.toMap y) : k.toMap (g x) = k.toMap (g y)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{g : M →* P}
{T : Submonoid P}
{Q : Type u_4}
[CommMonoid Q]
(hg : ∀ (y : ↥S), g ↑y ∈ T)
(k : T.LocalizationMap Q)
{x y : M}
(h : f.toMap x = f.toMap y)


theorem tendsto_atTop_of_add_bdd_above_right (C) (hC : ∀ x, g x ≤ C) :
    Tendsto (fun x => f x + g x) l atTop → Tendsto f l atTop

{α : Type u_3}
{β : Type u_4}
[OrderedCancelAddCommMonoid β]
{l : Filter α}
{f g : α → β}
(C : β)
(hC : ∀ (x : α), g x ≤ C)

Filter.Tendsto (fun x => f x + g x) l Filter.atTop → Filter.Tendsto f l Filter.atTop


@[simp] theorem getMsb_or {x y : BitVec w} : (x ||| y).getMsb i = (x.getMsb i || y.getMsb i)


/-- The `StarAlgEquiv` onto the range corresponding to an injective `StarAlgHom`. -/
@[simps]
noncomputable def _root_.StarAlgEquiv.ofInjective (f : A →⋆ₐ[R] B)
    (hf : Function.Injective f) : A ≃⋆ₐ[R] f.range

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[Semiring B]
[Algebra R B]
[StarRing B]
[StarModule R B]
(f : A →⋆ₐ[R] B)
(hf : Function.Injective ⇑f)

∀ (a : ↥(↑f).range), (StarAlgEquiv.ofInjective f hf).symm a = (AlgEquiv.ofInjective (↑f) hf).invFun a


theorem nnnorm_changeOriginSeriesTerm_apply_le (k l : ℕ) (s : Finset (Fin (k + l)))
    (hs : s.card = l) (x y : E) :
    ‖p.changeOriginSeriesTerm k l s hs (fun _ => x) fun _ => y‖₊ ≤
      ‖p (k + l)‖₊ * ‖x‖₊ ^ l * ‖y‖₊ ^ k

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
(k l : ℕ)
(s : Finset (Fin (k + l)))
(hs : s.card = l)
(x y : E)

‖((p.changeOriginSeriesTerm k l s hs) fun x_1 => x) fun x => y‖₊ ≤ ‖p (k + l)‖₊ * ‖x‖₊ ^ l * ‖y‖₊ ^ k


theorem inv_one_add_tan_sq {x : ℂ} (hx : cos x ≠ 0) : (1 + tan x ^ 2)⁻¹ = cos x ^ 2

(1 + Complex.tan x ^ 2)⁻¹ = Complex.cos x ^ 2


@[simp, norm_cast]
theorem coe_le [Preorder β] {f g : α →ₛ β} : (f : α → β) ≤ g ↔ f ≤ g

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Preorder β]
{f g : MeasureTheory.SimpleFunc α β}

↑f ≤ ↑g ↔ f ≤ g


@[to_additive] lemma val_inv_unit' (h : IsUnit a) : ↑(h.unit'⁻¹) = a⁻¹

{α : Type u}
[DivisionMonoid α]
{a : α}
(h : IsUnit a)


/-- A function `f` from a measurable space to any type is called *simple*,
if every preimage `f ⁻¹' {x}` is measurable, and the range is finite. This structure bundles
a function with these properties. -/
structure SimpleFunc.{u, v} (α : Type u) [MeasurableSpace α] (β : Type v) where
  toFun : α → β
  measurableSet_fiber' : ∀ x, MeasurableSet (toFun ⁻¹' {x})
  finite_range' : (Set.range toFun).Finite

{α : Type u}
[MeasurableSpace α]
{β : Type v}
(self : MeasureTheory.SimpleFunc α β)
(x : β)


/-- In a noetherian integral domain which is not a field, every non-zero ideal contains a non-zero
  product of prime ideals; in a field, the whole ring is a non-zero ideal containing only 0 as
  product or prime ideals ([samuel, § 3.3, Lemma 3]) -/
theorem exists_primeSpectrum_prod_le_and_ne_bot_of_domain (h_fA : ¬IsField A) {I : Ideal A}
    (h_nzI : I ≠ ⊥) :
    ∃ Z : Multiset (PrimeSpectrum A),
      Multiset.prod (Z.map asIdeal) ≤ I ∧ Multiset.prod (Z.map asIdeal) ≠ ⊥

{A : Type u}
[CommRing A]
[IsDomain A]
[IsNoetherianRing A]
(h_fA : ¬IsField A)
{I : Ideal A}
(h_nzI : I ≠ ⊥)

∃ Z, (Multiset.map PrimeSpectrum.asIdeal Z).prod ≤ I ∧ (Multiset.map PrimeSpectrum.asIdeal Z).prod ≠ ⊥


@[simp] lemma rootSystem_pairing_apply (α β) : (rootSystem H).pairing β α = β.1 (coroot α.1)

{K : Type u_1}
{L : Type u_2}
[Field K]
[CharZero K]
[LieRing L]
[LieAlgebra K L]
[LieAlgebra.IsKilling K L]
[FiniteDimensional K L]
(H : LieSubalgebra K L)
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
(α β : { α // α.IsNonZero })

(LieAlgebra.IsKilling.rootSystem H).pairing β α = ↑β (LieAlgebra.IsKilling.coroot ↑α)


@[simp] theorem run'_eq [Monad m] (x : StateT σ m α) (s : σ) : run' x s = (·.1) <$> run x s

{m : Type u_1 → Type u_2}
{σ α : Type u_1}
[Monad m]
(x : StateT σ m α)
(s : σ)


@[to_additive (attr := simp)]
theorem coe_of_map_mul_inv {H : Type*} [Group H] (f : G → H)
    (map_div : ∀ a b : G, f (a * b⁻¹) = f a * (f b)⁻¹) :
  ↑(ofMapMulInv f map_div) = f

(map_div : ∀ (a b : G), f (a * b⁻¹) = f a * (f b)⁻¹)


/-- A generalization of the fixed point lemma for normal functions: any family of normal functions
    has an unbounded set of common fixed points. -/
theorem fp_bfamily_unbounded (H : ∀ i hi, IsNormal (f i hi)) :
    (⋂ (i) (hi), Function.fixedPoints (f i hi)).Unbounded (· < ·)

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

(H : ∀ (i : Ordinal.{u}) (hi : i < o), Ordinal.IsNormal (f i hi))

Set.Unbounded (fun x x_1 => x < x_1) (⋂ i, ⋂ (hi : i < o), Function.fixedPoints (f i hi))


/-- A natural isomorphism `L₁ ≅ L₂` induces an equivalence of categories
    `Comma L₁ R ≌ Comma L₂ R`. -/
@[simps!]
def mapLeftIso (i : L₁ ≅ L₂) : Comma L₁ R ≌ Comma L₂ R

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(R : CategoryTheory.Functor B T)
{L₁ L₂ : CategoryTheory.Functor A T}
(i : L₁ ≅ L₂)
(X : CategoryTheory.Comma L₁ R)

((CategoryTheory.Comma.mapLeftIso R i).functor.obj X).hom = CategoryTheory.CategoryStruct.comp (i.inv.app X.left) X.hom


@[to_additive (attr := simp)]
theorem _root_.MulEquiv.withOneCongr_symm (e : α ≃* β) :
    e.withOneCongr.symm = e.symm.withOneCongr

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


@[simp]
theorem congr_symm (e : M ≃ₗ[R] M') : (congr e).symm = congr e.symm

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{M' : Type u_7}
[AddCommMonoid M']
[Module R M']
(e : M ≃ₗ[R] M')

(LinearMap.BilinForm.congr e).symm = LinearMap.BilinForm.congr e.symm


theorem updateRow_submatrix_equiv [DecidableEq l] [DecidableEq m] (A : Matrix m n α) (i : l)
    (r : o → α) (e : l ≃ m) (f : o ≃ n) :
    updateRow (A.submatrix e f) i r = (A.updateRow (e i) fun j => r (f.symm j)).submatrix e f

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
[DecidableEq l]
[DecidableEq m]
(A : Matrix m n α)
(i : l)
(r : o → α)
(e : l ≃ m)
(f : o ≃ n)

(A.submatrix ⇑e ⇑f).updateRow i r = (A.updateRow (e i) fun j => r (f.symm j)).submatrix ⇑e ⇑f


@[simp, norm_cast]
theorem coe_compl (s : L.DefinableSet A α) :
    ((sᶜ : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M))ᶜ

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{A : Set M}
{α : Type u₁}
(s : L.DefinableSet A α)


theorem of_arrow_iso_left {A B A' B' X Y : C} {i : A ⟶ B} {i' : A' ⟶ B'}
    (e : Arrow.mk i ≅ Arrow.mk i') (p : X ⟶ Y) [hip : HasLiftingProperty i p] :
    HasLiftingProperty i' p

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

[hip : CategoryTheory.HasLiftingProperty i p]


theorem range_fst : (fst R S).rangeS = ⊤

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]


theorem chainHeight_union_eq (s t : Set α) (H : ∀ a ∈ s, ∀ b ∈ t, a < b) :
    (s ∪ t).chainHeight = s.chainHeight + t.chainHeight

{α : Type u_1}
[Preorder α]
(s t : Set α)
(H : ∀ a ∈ s, ∀ b ∈ t, a < b)


theorem preimage_subset {f : α ↪ β} {s : Finset β} {t : Finset α} (hs : s ⊆ t.map f) :
    s.preimage f f.injective.injOn ⊆ t

{α : Type u}
{β : Type v}
{f : α ↪ β}
{s : Finset β}
{t : Finset α}
(hs : s ⊆ Finset.map f t)


@[simp]
theorem isBigO_pi {ι : Type*} [Fintype ι] {E' : ι → Type*} [∀ i, NormedAddCommGroup (E' i)]
    {f : α → ∀ i, E' i} : f =O[l] g' ↔ ∀ i, (fun x => f x i) =O[l] g'

{α : Type u_1}
{F' : Type u_7}
[SeminormedAddCommGroup F']
{g' : α → F'}
{l : Filter α}
{ι : Type u_17}
[Fintype ι]
{E' : ι → Type u_18}
[(i : ι) → NormedAddCommGroup (E' i)]
{f : α → (i : ι) → E' i}

f =O[l] g' ↔ ∀ (i : ι), (fun x => f x i) =O[l] g'


@[simp]
theorem some_apply [Zero M] (f : Option α →₀ M) (a : α) : f.some a = f (Option.some a)

{α : Type u_1}
{M : Type u_5}
[Zero M]
(f : Option α →₀ M)
(a : α)


/-- Given two families of generators `S[X] → T` and `R[Y] → S`,
we may constuct the family of generators `R[X, Y] → T`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def comp (Q : Generators S T) (P : Generators R S) : Generators R T

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


theorem rpow_inv_natCast_pow (hx : 0 ≤ x) (hn : n ≠ 0) : (x ^ (n⁻¹ : ℝ)) ^ n = x