theorem restrict_comm (hs : MeasurableSet s) :
    (μ.restrict t).restrict s = (μ.restrict s).restrict t

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(hs : MeasurableSet s)


@[reassoc]
theorem uncurry_natural_right (f : X ⟶ A ⟹ Y) (g : Y ⟶ Y') :
    uncurry (f ≫ (exp _).map g) = uncurry f ≫ g

CategoryTheory.CartesianClosed.uncurry (CategoryTheory.CategoryStruct.comp f ((CategoryTheory.exp A).map g)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.CartesianClosed.uncurry f) g


@[simp]
theorem toDual_total_left (f : ι →₀ R) (i : ι) :
    b.toDual (Finsupp.total ι M R b f) (b i) = f i

{R : Type uR}
{M : Type uM}
{ι : Type uι}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[DecidableEq ι]
(b : Basis ι R M)
(f : ι →₀ R)
(i : ι)

(b.toDual ((Finsupp.total ι M R ⇑b) f)) (b i) = f i


/-- Pull an opposite subgroup back to a subgroup along `MulOpposite.op`-/
@[to_additive (attr := simps)
"Pull an opposite additive subgroup back to an additive subgroup along `AddOpposite.op`"]
protected def unop (H : Subgroup Gᵐᵒᵖ) : Subgroup G

{G : Type u_2}
[AddGroup G]
(H : AddSubgroup Gᵃᵒᵖ)


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

{E : Type u_1}
{F : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{c x : E → F}
{R : E → ℝ}
{s : Set E}
(hc : DifferentiableOn ℝ c s)
(hR : DifferentiableOn ℝ R s)
(hx : DifferentiableOn ℝ x s)
(hne : ∀ a ∈ s, x a ≠ c a)

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


@[to_additive]
lemma prod_induction
    (p : M → Prop) (hom : ∀ a b, p a → p b → p (a * b)) (unit : p 1) (base : ∀ x ∈ l, p x) :
    p l.prod

(hom : ∀ (a b : M), p a → p b → p (a + b))


@[simp]
theorem preimage_diff (f : α → β) (s t : Set β) : f ⁻¹' (s \ t) = f ⁻¹' s \ f ⁻¹' t

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


/-- The translation of a strictly convex set is also strictly convex. -/
theorem StrictConvex.vadd (hs : StrictConvex 𝕜 s) (x : E) : StrictConvex 𝕜 (x +ᵥ s)

{𝕜 : Type u_1}
{E : Type u_3}
[OrderedSemiring 𝕜]
[TopologicalSpace E]
[AddCommGroup E]
[Module 𝕜 E]
[ContinuousAdd E]
{s : Set E}
(hs : StrictConvex 𝕜 s)
(x : E)


@[simp]
lemma absorbs_neg_neg {s t : Set E} : Absorbs M (-s) (-t) ↔ Absorbs M s t

{M : Type u_1}
{E : Type u_2}
[Monoid M]
[AddGroup E]
[DistribMulAction M E]
[Bornology M]
{s t : Set E}


/-- The multiplicative equivalence between the type of units of `M` and the submonoid of unit
elements of `M`. -/
@[to_additive (attr := simps!) " The additive equivalence between the type of additive units of `M`
  and the additive submonoid whose elements are the additive units of `M`. "]
noncomputable def unitsTypeEquivIsUnitSubmonoid [Monoid M] : Mˣ ≃* IsUnit.submonoid M

{M : Type u_1}
[Monoid M]
(x : ↥(IsUnit.submonoid M))

↑(Submonoid.unitsTypeEquivIsUnitSubmonoid.symm x) = ↑x


/-- The range of `(m * · + k)` on natural numbers is the set of elements `≥ k` in the
residue class of `k` mod `m`. -/
lemma Nat.range_mul_add (m k : ℕ) :
    Set.range (fun n : ℕ ↦ m * n + k) = {n : ℕ | (n : ZMod m) = k ∧ k ≤ n}

(Set.range fun n => m * n + k) = {n | ↑n = ↑k ∧ k ≤ n}


theorem HasFDerivWithinAt.uniqueDiffWithinAt_of_continuousLinearEquiv {x : E} (e' : E ≃L[𝕜] F)
    (h : HasFDerivWithinAt f (e' : E →L[𝕜] F) s x) (hs : UniqueDiffWithinAt 𝕜 s x) :
    UniqueDiffWithinAt 𝕜 (f '' s) (f x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
{x : E}
(e' : E ≃L[𝕜] F)
(h : HasFDerivWithinAt f (↑e') s x)
(hs : UniqueDiffWithinAt 𝕜 s x)


@[simp]
theorem sup_zero : (0 : Multiset α).sup = ⊥

{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]


protected theorem add_nonpos {a b : Int} (ha : a ≤ 0) (hb : b ≤ 0) : a + b ≤ 0


@[simp]
theorem zero_power {a : Cardinal} : a ≠ 0 → (0 : Cardinal) ^ a = 0


@[to_additive (attr := simp)]
theorem smul_neBot_iff : (f • g).NeBot ↔ f.NeBot ∧ g.NeBot

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{f : Filter α}
{g : Filter β}


/-- The equalizer morphism in any limit cone is a monomorphism. -/
theorem mono_of_isLimit_fork {c : Fork f g} (i : IsLimit c) : Mono (Fork.ι c)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
{f g : X ⟶ Y}
{c : CategoryTheory.Limits.Fork f g}
(i : CategoryTheory.Limits.IsLimit c)


/-- The subfield generated by a set includes the set. -/
@[simp, aesop safe 20 apply (rule_sets := [SetLike])]
theorem subset_closure {s : Set K} : s ⊆ closure s

{K : Type u}
[DivisionRing K]
{s : Set K}


/-- Base-changing the vector space of a clifford algebra is isomorphic as an A-algebra to
base-changing the clifford algebra itself; <|Cℓ(A ⊗_R V, Q_A) ≅ A ⊗_R Cℓ(V, Q)<|.

This is `CliffordAlgebra.toBaseChange` and `CliffordAlgebra.ofBaseChange` as an equivalence. -/
@[simps!]
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def equivBaseChange (Q : QuadraticForm R V) :
    CliffordAlgebra (Q.baseChange A) ≃ₐ[A] A ⊗[R] CliffordAlgebra Q

{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)
(a : A ⊗[R] CliffordAlgebra Q)

(CliffordAlgebra.equivBaseChange A Q).symm a = (CliffordAlgebra.ofBaseChange A Q) a


theorem splits_of_splits_id {f : K[X]} : Splits (RingHom.id K) f → Splits i f

{K : Type v}
{L : Type w}
[Field K]
[Field L]
(i : K →+* L)
{f : K[X]}

Polynomial.Splits (RingHom.id K) f → Polynomial.Splits i f


/-- Constructor for objects of the category `Functor.RightExtension L F`. -/
@[simps!]
def RightExtension.mk (F' : D ⥤ H) {L : C ⥤ D} {F : C ⥤ H} (α : L ⋙ F' ⟶ F) :
    RightExtension L F

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_7, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_9, u_5} D]
(F' : CategoryTheory.Functor D H)
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
(α : L.comp F' ⟶ F)

(CategoryTheory.Functor.RightExtension.mk F' α).left = F'


/-- An inner product space is a vector space with an additional operation called inner product.
The norm could be derived from the inner product, instead we require the existence of a norm and
the fact that `‖x‖^2 = re ⟪x, x⟫` to be able to put instances on `𝕂` or product
spaces.

To construct a norm from an inner product, see `InnerProductSpace.ofCore`.
-/
class InnerProductSpace (𝕜 : Type*) (E : Type*) [RCLike 𝕜] [NormedAddCommGroup E] extends
  NormedSpace 𝕜 E, Inner 𝕜 E where
  /-- The inner product induces the norm. -/
  norm_sq_eq_inner : ∀ x : E, ‖x‖ ^ 2 = re (inner x x)
  /-- The inner product is *hermitian*, taking the `conj` swaps the arguments. -/
  conj_symm : ∀ x y, conj (inner y x) = inner x y
  /-- The inner product is additive in the first coordinate. -/
  add_left : ∀ x y z, inner (x + y) z = inner x z + inner y z
  /-- The inner product is conjugate linear in the first coordinate. -/
  smul_left : ∀ x y r, inner (r • x) y = conj r * inner x y

{𝕜 : Type u_4}
{E : Type u_5}
[RCLike 𝕜]
[NormedAddCommGroup E]
[self : InnerProductSpace 𝕜 E]
(x : E)


/-- A number field is a field which has characteristic zero and is finite
dimensional over ℚ. -/
class NumberField (K : Type*) [Field K] : Prop where
  [to_charZero : CharZero K]
  [to_finiteDimensional : FiniteDimensional ℚ K]

{K : Type u_1}
[Field K]
[self : NumberField K]


/-- The pigeonhole principle for finitely many pigeons counted by weight, strict inequality version:
if the total weight of a finite set of pigeons is less than `n • b`, they are sorted into some
pigeonholes, and for all but `n` pigeonholes the total weight of the pigeons there is nonnegative,
then for at least one of these `n` pigeonholes, the total weight of the pigeons in this pigeonhole
is less than `b`. -/
theorem exists_sum_fiber_lt_of_sum_fiber_nonneg_of_sum_lt_nsmul
    (ht : ∀ y ∉ t, (0 : M) ≤ ∑ x ∈ s.filter fun x => f x = y, w x)
    (hb : ∑ x ∈ s, w x < t.card • b) : ∃ y ∈ t, ∑ x ∈ s.filter fun x => f x = y, w x < b

(ht : ∀ y ∉ t, 0 ≤ ∑ x ∈ Finset.filter (fun x => f x = y) s, w x)

∃ y ∈ t, ∑ x ∈ Finset.filter (fun x => f x = y) s, w x < b


/-- Build an isomorphism in the category `MagmaCat` from a `MulEquiv` between `Mul`s. -/
@[to_additive (attr := simps)
      "Build an isomorphism in the category `AddMagmaCat` from an `AddEquiv` between `Add`s."]
def MulEquiv.toMagmaCatIso (e : X ≃* Y) : MagmaCat.of X ≅ MagmaCat.of Y

{X Y : Type u}
[Add X]
[Add Y]
(e : X ≃+ Y)

∀ (a : X), e.toAddMagmaCatIso.hom a = e.toFun a


theorem comp_measurable [TopologicalSpace β] {_ : MeasurableSpace α} {_ : MeasurableSpace γ}
    {f : α → β} {g : γ → α} (hf : StronglyMeasurable f) (hg : Measurable g) :
    StronglyMeasurable (f ∘ g)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace β]

∀ {x : MeasurableSpace α} {x_1 : MeasurableSpace γ} {f : α → β} {g : γ → α},
  MeasureTheory.StronglyMeasurable f → Measurable g → MeasureTheory.StronglyMeasurable (f ∘ g)


@[simp] theorem sum_nil : Nat.sum [] = 0


theorem StarConvex.openSegment_subset (h : StarConvex 𝕜 x s) {y : E} (hy : y ∈ s) :
    openSegment 𝕜 x y ⊆ s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{x : E}
{s : Set E}
(h : StarConvex 𝕜 x s)
{y : E}
(hy : y ∈ s)


/-- Two closed sets are at zero Hausdorff edistance if and only if they coincide. -/
theorem hausdorffEdist_zero_iff_eq_of_closed (hs : IsClosed s) (ht : IsClosed t) :
    hausdorffEdist s t = 0 ↔ s = t

{α : Type u}
[PseudoEMetricSpace α]
{s t : Set α}
(hs : IsClosed s)
(ht : IsClosed t)


@[to_additive (attr := simp)]
theorem smul_comp [SMul R M] [ContinuousConstSMul R M] (r : R) (f : C(β, M)) (g : C(α, β)) :
    (r • f).comp g = r • f.comp g

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{R : Type u_3}
{M : Type u_5}
[TopologicalSpace M]
[SMul R M]
[ContinuousConstSMul R M]
(r : R)
(f : C(β, M))
(g : C(α, β))


/-- Constant functions are locally Lipschitz. -/
protected lemma const (b : β) : LocallyLipschitz (fun _ : α ↦ b)

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(b : β)


@[to_additive]
theorem TendstoUniformlyOnFilter.div (hf : TendstoUniformlyOnFilter f g l l')
    (hf' : TendstoUniformlyOnFilter f' g' l l') : TendstoUniformlyOnFilter (f / f') (g / g') l l'


theorem mem_sSup_of_mem {S : Set (Ideal R)} {s : Ideal R} (hs : s ∈ S) :
    ∀ {x : R}, x ∈ s → x ∈ sSup S

{R : Type u}
[Semiring R]
{S : Set (Ideal R)}
{s : Ideal R}
(hs : s ∈ S)
{x : R}


@[simp, norm_cast]
theorem coe_const (x : β) : (const x : ℕ → β) = Function.const ℕ x

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
(x : β)

↑(CauSeq.const abv x) = Function.const ℕ x


/-- Let `f` be a function continuous on a convex (or, equivalently, connected) subset `D`
of the real line. If `f` is differentiable on the interior of `D` and `f' < C`, then
`f` grows slower than `C * x` on `D`, i.e., `f y - f x < C * (y - x)` whenever `x, y ∈ D`,
`x < y`. -/
theorem Convex.image_sub_lt_mul_sub_of_deriv_lt {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ}
    (hf : ContinuousOn f D) (hf' : DifferentiableOn ℝ f (interior D)) {C}
    (lt_hf' : ∀ x ∈ interior D, deriv f x < C) (x : ℝ) (hx : x ∈ D) (y : ℝ) (hy : y ∈ D)
    (hxy : x < y) : f y - f x < C * (y - x)


@[simp, nolint simpNF]
theorem cmpLE_toDual [LE α] [@DecidableRel α (· ≤ ·)] (x y : α) :
    cmpLE (toDual x) (toDual y) = cmpLE y x

{α : Type u_1}
[LE α]
[DecidableRel fun x x_1 => x ≤ x_1]
(x y : α)

cmpLE (OrderDual.toDual x) (OrderDual.toDual y) = cmpLE y x


/-- The projection from a fiber bundle with a nonempty fiber to its base is a quotient
map. -/
theorem quotientMap_proj [Nonempty F] : QuotientMap (π F E)

[TopologicalSpace (Bundle.TotalSpace F E)]


@[to_additive (attr := simp)]
theorem traverse_mul' :
    Function.comp (traverse F) ∘ (HMul.hMul : FreeMagma α → FreeMagma α → FreeMagma α) = fun x y ↦
      (· * ·) <$> traverse F x <*> traverse F y

{α β : Type u}
{m : Type u → Type u}
[Applicative m]
(F : α → m β)

Function.comp (traverse F) ∘ HAdd.hAdd = fun x y =>
  Seq.seq ((fun x x_1 => x + x_1) <$> traverse F x) fun x => traverse F y


/-- **Tietze extension theorem** for `TietzeExtension` spaces. Let `e` be a closed embedding of a
nonempty topological space `X₁` into a normal topological space `X`. Let `f` be a continuous
function on `X₁` with values in a `TietzeExtension` space `Y`. Then there exists a
continuous function `g : C(X, Y)` such that `g ∘ e = f`.

This version is provided for convenience and backwards compatibility. Here the composition is
phrased in terms of bare functions. -/
theorem ContinuousMap.exists_extension' (f : C(X₁, Y)) : ∃ (g : C(X, Y)), g ∘ e = f

{X₁ : Type u₁}
[TopologicalSpace X₁]
{X : Type u}
[TopologicalSpace X]
[NormalSpace X]
{e : X₁ → X}
(he : ClosedEmbedding e)
{Y : Type v}
[TopologicalSpace Y]
[TietzeExtension Y]
(f : C(X₁, Y))


/-- The δ-thickening of the complement of the δ-thickening of a set is contained in the complement
of the set. -/
lemma thickening_compl_thickening_self_subset_compl (δ : ℝ) (E : Set α) :
    thickening δ (thickening δ E)ᶜ ⊆ Eᶜ

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

Metric.thickening δ (Metric.thickening δ E)ᶜ ⊆ Eᶜ


@[simp]
theorem id_map {C : Cat} {X Y : C} (f : X ⟶ Y) : (𝟙 C : C ⥤ C).map f = f

{C : CategoryTheory.Cat}
{X Y : ↑C}
(f : X ⟶ Y)

(CategoryTheory.CategoryStruct.id C).map f = f


@[simp]
theorem Icc_inl_inr : Icc (inl a₁) (inr b₂) = ∅

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

Finset.Icc (Sum.inl a₁) (Sum.inr b₂) = ∅


theorem smaller_mono {o₁ o₂ : Ordinal} (h : o₁ ≤ o₂) : smaller C o₁ ⊆ smaller C o₂

{I : Type u}
[LinearOrder I]
[IsWellOrder I fun x x_1 => x < x_1]
(C : Set (I → Bool))
{o₁ o₂ : Ordinal.{u}}
(h : o₁ ≤ o₂)

Profinite.NobelingProof.GoodProducts.smaller C o₁ ⊆ Profinite.NobelingProof.GoodProducts.smaller C o₂


@[simp]
lemma coeffs_one_of_nontrivial [Nontrivial R] : coeffs (1 : MvPolynomial σ R) = {1}

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
[Nontrivial R]


lemma eq_sqrt : a = sqrt n ↔ a * a ≤ n ∧ n < (a + 1) * (a + 1)

a = n.sqrt ↔ a * a ≤ n ∧ n < (a + 1) * (a + 1)


@[simp]
theorem ofReal_pos {p : ℝ} : 0 < ENNReal.ofReal p ↔ 0 < p


theorem _root_.associates_irreducible_iff_prime [DecompositionMonoid α] {p : Associates α} :
    Irreducible p ↔ Prime p

{α : Type u_1}
[CancelCommMonoidWithZero α]
[DecompositionMonoid α]
{p : Associates α}


theorem restrict_apply (f : α →ₛ β) {s : Set α} (hs : MeasurableSet s) (a) :
    restrict f s a = indicator s f a

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Zero β]
(f : MeasureTheory.SimpleFunc α β)
{s : Set α}
(hs : MeasurableSet s)
(a : α)


theorem ptendsto_nhds {f : Y →. X} {l : Filter Y} {x : X} :
    PTendsto f l (𝓝 x) ↔ ∀ s, IsOpen s → x ∈ s → f.core s ∈ l

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{f : Y →. X}
{l : Filter Y}
{x : X}

Filter.PTendsto f l (𝓝 x) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → f.core s ∈ l


/-- The equivalence between `Bipointed` and itself induced by `Prod.swap` both ways. -/
@[simps!]
def swapEquiv : Bipointed ≌ Bipointed

(a : ((Bipointed.swap ⋙ Bipointed.swap).obj X).X)

(Bipointed.swapEquiv.counitIso.hom.app X).toFun a = a


/-- The identity of `ℝ` as a Stieltjes function, used to construct Lebesgue measure. -/
@[simps]
protected def id : StieltjesFunction


/-- `comap` preserves equivalence. -/
theorem comap {S : Type*} [Ring S] (f : S →+* R) (h : v₁.IsEquiv v₂) :
    (v₁.comap f).IsEquiv (v₂.comap f)

{R : Type u_3}
{Γ₀ : Type u_4}
{Γ'₀ : Type u_5}
[Ring R]
[LinearOrderedCommMonoidWithZero Γ₀]
[LinearOrderedCommMonoidWithZero Γ'₀]
{v₁ : Valuation R Γ₀}
{v₂ : Valuation R Γ'₀}
{S : Type u_7}
[Ring S]
(f : S →+* R)
(h : v₁.IsEquiv v₂)

(Valuation.comap f v₁).IsEquiv (Valuation.comap f v₂)


theorem map_sInf_subset_fixedPoints_le (A : Set α) (hA : A ⊆ fixedPoints f) :
    f (sInf A) ≤ sInf A

{α : Type u}
[CompleteLattice α]
(f : α →o α)
(A : Set α)
(hA : A ⊆ Function.fixedPoints ⇑f)


@[simp, fun_prop]
theorem DifferentiableAt.sum (h : ∀ i ∈ u, DifferentiableAt 𝕜 (A i) x) :
    DifferentiableAt 𝕜 (fun y => ∑ i ∈ u, A i y) x


/-- In a topological space with second countable topology, if `f` is a function that sends each
point `x` to a neighborhood of `x`, then for some countable set `s`, the neighborhoods `f x`,
`x ∈ s`, cover the whole space. -/
theorem countable_cover_nhds [SecondCountableTopology α] {f : α → Set α} (hf : ∀ x, f x ∈ 𝓝 x) :
    ∃ s : Set α, s.Countable ∧ ⋃ x ∈ s, f x = univ

{α : Type u}
[t : TopologicalSpace α]
[SecondCountableTopology α]
{f : α → Set α}
(hf : ∀ (x : α), f x ∈ 𝓝 x)

∃ s, s.Countable ∧ ⋃ x ∈ s, f x = Set.univ


/-- If `C` has all limits of diagrams `pair X Y`, then it has all binary products -/
theorem hasBinaryProducts_of_hasLimit_pair [∀ {X Y : C}, HasLimit (pair X Y)] :
    HasBinaryProducts C

[∀ {X Y : C}, CategoryTheory.Limits.HasLimit (CategoryTheory.Limits.pair X Y)]


theorem merge_loop (s : α → α → Bool) (l r t) :
    merge.loop s l r t = reverseAux t (merge s l r)

{α : Type u_1}
(s : α → α → Bool)
(l r t : List α)

List.merge.loop s l r t = t.reverseAux (List.merge s l r)


theorem map_le_iff_le_comap {f : P₁ →ᵃ[k] P₂} {s : AffineSubspace k P₁} {t : AffineSubspace k P₂} :
    s.map f ≤ t ↔ s ≤ t.comap f

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
{f : P₁ →ᵃ[k] P₂}
{s : AffineSubspace k P₁}
{t : AffineSubspace k P₂}

AffineSubspace.map f s ≤ t ↔ s ≤ AffineSubspace.comap f t


@[simp]
theorem uIcc_prod_uIcc (a₁ a₂ : α) (b₁ b₂ : β) :
    [[a₁, a₂]] ×ˢ [[b₁, b₂]] = [[(a₁, b₁), (a₂, b₂)]]

{α : Type u_1}
{β : Type u_2}
[Lattice α]
[Lattice β]
(a₁ a₂ : α)
(b₁ b₂ : β)

Set.uIcc a₁ a₂ ×ˢ Set.uIcc b₁ b₂ = Set.uIcc (a₁, b₁) (a₂, b₂)


theorem Finset.centerMass_smul : (t.centerMass w fun i => c • z i) = c • t.centerMass w z

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(c : R)
(t : Finset ι)
{w : ι → R}
(z : ι → E)


theorem IsHenstock.disjUnion (h₁ : IsHenstock π₁) (h₂ : IsHenstock π₂)
    (h : Disjoint π₁.iUnion π₂.iUnion) : IsHenstock (π₁.disjUnion π₂ h)

{π₁ π₂ : BoxIntegral.TaggedPrepartition I}


@[simp]
theorem affineSegment_const_vadd_image (x y : P) (v : V) :
    (v +ᵥ ·) '' affineSegment R x y = affineSegment R (v +ᵥ x) (v +ᵥ y)

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

(fun x => v +ᵥ x) '' affineSegment R x y = affineSegment R (v +ᵥ x) (v +ᵥ y)


/-- The Grothendieck construction applied to a functor to `Type`
(thought of as a functor to `Cat` by realising a type as a discrete category)
is the same as the 'category of elements' construction.
-/
-- See porting note on grothendieckTypeToCatInverse.
-- We just want to turn off grothendieckTypeToCat_inverse_map_fiber_down_down,
-- so have to list the complement here for `@[simps]`.
@[simps! functor_obj_fst functor_obj_snd functor_map_coe inverse_obj_base inverse_obj_fiber_as
  inverse_map_base unitIso_hom_app_base unitIso_hom_app_fiber unitIso_inv_app_base
  unitIso_inv_app_fiber counitIso_hom_app_coe counitIso_inv_app_coe]
def grothendieckTypeToCat : Grothendieck (G ⋙ typeToCat) ≌ G.Elements

(X : CategoryTheory.Grothendieck (G.comp CategoryTheory.typeToCat))

((CategoryTheory.Grothendieck.grothendieckTypeToCat G).unitIso.inv.app X).base = CategoryTheory.CategoryStruct.id X.base


theorem erase_add_right_neg {a : α} {s : Multiset α} (t) :
    a ∉ s → (s + t).erase a = s + t.erase a

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


@[to_additive (attr := simp)]
theorem inv_mul_eq_one {a : α} : ↑u⁻¹ * a = 1 ↔ ↑u = a

{α : Type u}
[AddMonoid α]
{u : AddUnits α}
{a : α}


@[simp]
theorem toHomeomorph_toEquiv (h : M ≃ₘ^n⟮I, J⟯ N) : h.toHomeomorph.toEquiv = h.toEquiv

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{G : Type u_7}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_11}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
(h : M ≃ₘ^n⟮I, J⟯ N)


theorem Eq.congr_right {x y z : α} (h : x = y) : z = x ↔ z = y


theorem Iio_subset_Iic_self : Iio a ⊆ Iic a


/-- The nerve of a category, as a functor `Cat ⥤ SSet` -/
@[simps]
def nerveFunctor : Cat ⥤ SSet

∀ {X Y : CategoryTheory.Cat} (F : X ⟶ Y) (Δ : SimplexCategoryᵒᵖ)
  (a : CategoryTheory.ComposableArrows (↑X) (Opposite.unop Δ).len),
  (CategoryTheory.nerveFunctor.map F).app Δ a =
    (CategoryTheory.Functor.mapComposableArrows F (Opposite.unop Δ).len).obj a


theorem ContMDiffOn.of_le (hf : ContMDiffOn I I' n f s) (le : m ≤ n) : ContMDiffOn I I' m f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{s : Set M}
{m n : ℕ∞}
(hf : ContMDiffOn I I' n f s)
(le : m ≤ n)


@[simp]
theorem augmentTruncate_inv_f_zero (C : ChainComplex V ℕ) :
    (augmentTruncate C).inv.f 0 = 𝟙 (C.X 0)


theorem Submodule.IsPrincipal.of_comap (f : M →ₗ[R] N) (hf : Function.Surjective f)
    (S : Submodule R N) [hI : IsPrincipal (S.comap f)] : IsPrincipal S

[hI : (Submodule.comap f S).IsPrincipal]


theorem cons_head?_tail : ∀ {l : List α} {a : α}, a ∈ head? l → a :: tail l = l


@[simp]
theorem tmulEquiv_symm_apply (a : ι ⊕ ι₂ → M) :
    (tmulEquiv (ι := ι) (ι₂ := ι₂) R M).symm (⨂ₜ[R] i, a i) =
    (⨂ₜ[R] i, a (Sum.inl i)) ⊗ₜ[R] ⨂ₜ[R] i, a (Sum.inr i)

{ι : Type u_1}
{ι₂ : Type u_2}
(R : Type u_4)
[CommSemiring R]
(M : Type u_8)
[AddCommMonoid M]
[Module R M]
(a : ι ⊕ ι₂ → M)

(PiTensorProduct.tmulEquiv R M).symm ((PiTensorProduct.tprod R) fun i => a i) =
  ((PiTensorProduct.tprod R) fun i => a (Sum.inl i)) ⊗ₜ[R] (PiTensorProduct.tprod R) fun i => a (Sum.inr i)


theorem hasFiniteIntegral_congr {f g : α → β} (h : f =ᵐ[μ] g) :
    HasFiniteIntegral f μ ↔ HasFiniteIntegral g μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f g : α → β}
(h : f =ᵐ[μ] g)

MeasureTheory.HasFiniteIntegral f μ ↔ MeasureTheory.HasFiniteIntegral g μ


theorem exists_norm_lt_one : ∃ x : α, 0 < ‖x‖ ∧ ‖x‖ < 1

(α : Type u_1)
[NontriviallyNormedField α]


@[mono]
theorem toENNReal_strictMono : StrictMono ((↑) : ℕ∞ → ℝ≥0∞)


@[simp]
theorem erase_ne {a a' : α} {f : α →₀ M} (h : a' ≠ a) : (f.erase a) a' = f a'

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


theorem mem_cylinder_firstDiff (x y : ∀ n, E n) : x ∈ cylinder y (firstDiff x y)

{E : ℕ → Type u_1}
(x y : (n : ℕ) → E n)

x ∈ PiNat.cylinder y (PiNat.firstDiff x y)


@[simp]
lemma map_map (P : MorphismProperty C) (F : C ⥤ D) {E : Type*} [Category E] (G : D ⥤ E) :
    (P.map F).map G = P.map (F ⋙ G)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u_1}
[CategoryTheory.Category.{u_3, u_1} D]
(P : CategoryTheory.MorphismProperty C)
(F : C ⥤ D)
{E : Type u_2}
[CategoryTheory.Category.{u_4, u_2} E]
(G : D ⥤ E)


@[to_additive]
theorem to_append_iff : Red L (L₁ ++ L₂) ↔ ∃ L₃ L₄, L = L₃ ++ L₄ ∧ Red L₃ L₁ ∧ Red L₄ L₂

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

FreeAddGroup.Red L (L₁ ++ L₂) ↔ ∃ L₃ L₄, L = L₃ ++ L₄ ∧ FreeAddGroup.Red L₃ L₁ ∧ FreeAddGroup.Red L₄ L₂


@[measurability]
theorem measurableSet_eq_fun {m : MeasurableSpace α} {E} [MeasurableSpace E] [AddGroup E]
    [MeasurableSingletonClass E] [MeasurableSub₂ E] {f g : α → E} (hf : Measurable f)
    (hg : Measurable g) : MeasurableSet { x | f x = g x }

{α : Type u_3}
{m : MeasurableSpace α}
{E : Type u_4}
[MeasurableSpace E]
[AddGroup E]
[MeasurableSingletonClass E]
[MeasurableSub₂ E]
{f g : α → E}
(hf : Measurable f)
(hg : Measurable g)


theorem iInf_sup_eq_top {s : Finset ι} {J : ι → Ideal R} (h : ∀ i, i ∈ s → J i ⊔ I = ⊤) :
    (⨅ i ∈ s, J i) ⊔ I = ⊤

{R : Type u}
{ι : Type u_1}
[CommSemiring R]
{I : Ideal R}
{s : Finset ι}
{J : ι → Ideal R}
(h : ∀ i ∈ s, J i ⊔ I = ⊤)


theorem hasLineDerivAt_zero : HasLineDerivAt 𝕜 f 0 x 0

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{x : E}


/-- The sum of `x ^ i` as `x` ranges over the units of a finite field of cardinality `q`
is equal to `0` unless `(q - 1) ∣ i`, in which case the sum is `q - 1`. -/
theorem sum_pow_units [DecidableEq K] (i : ℕ) :
    (∑ x : Kˣ, (x ^ i : K)) = if q - 1 ∣ i then -1 else 0

(K : Type u_1)
[Field K]
[Fintype K]
[DecidableEq K]
(i : ℕ)

∑ x : Kˣ, ↑x ^ i = if q - 1 ∣ i then -1 else 0


/-- The data needed to induce a `MonoidalCategory` via the functor `F`; namely, pre-existing
definitions of `⊗`, `𝟙_`, `▷`, `◁` that are preserved by `F`.
-/
structure InducingFunctorData [MonoidalCategoryStruct D] (F : D ⥤ C) where
  /-- Analogous to `CategoryTheory.LaxMonoidalFunctor.μIso` -/
  μIso : ∀ X Y,
    F.obj X ⊗ F.obj Y ≅ F.obj (X ⊗ Y)
  whiskerLeft_eq : ∀ (X : D) {Y₁ Y₂ : D} (f : Y₁ ⟶ Y₂),
    F.map (X ◁ f) = (μIso _ _).inv ≫ (F.obj X ◁ F.map f) ≫ (μIso _ _).hom := by
    aesop_cat
  whiskerRight_eq : ∀ {X₁ X₂ : D} (f : X₁ ⟶ X₂) (Y : D),
    F.map (f ▷ Y) = (μIso _ _).inv ≫ (F.map f ▷ F.obj Y) ≫ (μIso _ _).hom := by
    aesop_cat
  tensorHom_eq : ∀ {X₁ Y₁ X₂ Y₂ : D} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂),
    F.map (f ⊗ g) = (μIso _ _).inv ≫ (F.map f ⊗ F.map g) ≫ (μIso _ _).hom := by
    aesop_cat
  /-- Analogous to `CategoryTheory.LaxMonoidalFunctor.εIso` -/
  εIso : 𝟙_ _ ≅ F.obj (𝟙_ _)
  associator_eq : ∀ X Y Z : D,
    F.map (α_ X Y Z).hom =
      (((μIso _ _).symm ≪≫ ((μIso _ _).symm ⊗ .refl _))
        ≪≫ α_ (F.obj X) (F.obj Y) (F.obj Z)
        ≪≫ ((.refl _ ⊗ μIso _ _) ≪≫ μIso _ _)).hom := by
    aesop_cat
  leftUnitor_eq : ∀ X : D,
    F.map (λ_ X).hom =
      (((μIso _ _).symm ≪≫ (εIso.symm ⊗ .refl _)) ≪≫ λ_ (F.obj X)).hom := by
    aesop_cat
  rightUnitor_eq : ∀ X : D,
    F.map (ρ_ X).hom =
      (((μIso _ _).symm ≪≫ (.refl _ ⊗ εIso.symm)) ≪≫ ρ_ (F.obj X)).hom := by
    aesop_cat

(self : CategoryTheory.Monoidal.InducingFunctorData F)

F.map (λ_ X).hom =
  (((self.μIso (𝟙_ D) X).symm ≪≫ (self.εIso.symm ⊗ CategoryTheory.Iso.refl (F.obj X))) ≪≫ λ_ (F.obj X)).hom


/-- `α →*o β` is the type of functions `α → β` that preserve the `OrderedCommMonoid` structure.

`OrderMonoidHom` is also used for ordered group homomorphisms.

When possible, instead of parametrizing results over `(f : α →*o β)`,
you should parametrize over `(F : Type*) [OrderMonoidHomClass F α β] (f : F)`.

When you extend this structure, make sure to extend `OrderMonoidHomClass`. -/
@[to_additive]
structure OrderMonoidHom (α β : Type*) [Preorder α] [Preorder β] [MulOneClass α]
  [MulOneClass β] extends α →* β where
  /-- An `OrderMonoidHom` is a monotone function. -/
  monotone' : Monotone toFun

{α : Type u_6}
{β : Type u_7}
[Preorder α]
[Preorder β]
[MulOneClass α]
[MulOneClass β]
(self : α →*o β)


/-- A product of copies of a topological space can be split as the binary product of one copy and
  the product of all the remaining copies. -/
@[simps!]
def funSplitAt : (ι → Y) ≃ₜ Y × ({ j // j ≠ i } → Y)

(Y : Type u_2)
[TopologicalSpace Y]
{ι : Type u_6}
[DecidableEq ι]
(i : ι)
(f : (j : ι) → (fun a => Y) j)

(Homeomorph.funSplitAt Y i) f = (f i, fun j => f ↑j)


/-- Convert a `Bicone` over a function on `WalkingPair` to a BinaryBicone. -/
@[simps]
def toBinaryBiconeFunctor {X Y : C} : Bicone (pairFunction X Y) ⥤ BinaryBicone X Y

(b : CategoryTheory.Limits.Bicone (CategoryTheory.Limits.pairFunction X Y))

(CategoryTheory.Limits.Bicone.toBinaryBiconeFunctor.obj b).fst = b.π CategoryTheory.Limits.WalkingPair.left


theorem a_of_eq (h : P.toPoly = Q.toPoly) : P.a = Q.a

{R : Type u_1}
{P Q : Cubic R}
[Semiring R]
(h : P.toPoly = Q.toPoly)


/-- Given f : Y ⟶ X, we have an equivalence between (T/X)/f and T/Y -/
@[simps]
def iteratedSliceEquiv : Over f ≌ Over f.left

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X : T}
(f : CategoryTheory.Over X)


theorem update_injective (f : ∀ a, β a) (a' : α) : Injective (update f a')

{α : Sort u}
{β : α → Sort v}
[DecidableEq α]
(f : (a : α) → β a)
(a' : α)

Function.Injective (Function.update f a')


lemma norm_smul_basis (p q : R[X]) :
    Algebra.norm R[X] (p • (1 : W.CoordinateRing) + q • mk W Y) =
      p ^ 2 - p * q * (C W.a₁ * X + C W.a₃) -
        q ^ 2 * (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
(p q : R[X])

(Algebra.norm R[X]) (p • 1 + q • (WeierstrassCurve.Affine.CoordinateRing.mk W) Y) =
  p ^ 2 - p * q * (Polynomial.C W.a₁ * Polynomial.X + Polynomial.C W.a₃) -
    q ^ 2 *
      (Polynomial.X ^ 3 + Polynomial.C W.a₂ * Polynomial.X ^ 2 + Polynomial.C W.a₄ * Polynomial.X + Polynomial.C W.a₆)


theorem unbounded_le_of_forall_exists_lt [Preorder α] (h : ∀ a, ∃ b ∈ s, a < b) :
    Unbounded (· ≤ ·) s

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


@[to_additive]
theorem isClosedMap_inv : IsClosedMap (Inv.inv : G → G)

(G : Type w)
[TopologicalSpace G]
[InvolutiveNeg G]
[ContinuousNeg G]


theorem finite_of_encard_le_coe {k : ℕ} (h : s.encard ≤ k) : s.Finite

{α : Type u_1}
{s : Set α}
{k : ℕ}
(h : s.encard ≤ ↑k)


/-- The edges are contained in the simplex. -/
lemma segment_single_subset_stdSimplex (i j : ι) :
    ([Pi.single i 1 -[𝕜] Pi.single j 1] : Set (ι → 𝕜)) ⊆ stdSimplex 𝕜 ι

(𝕜 : Type u_1)
{ι : Type u_5}
[OrderedSemiring 𝕜]
[Fintype ι]
[DecidableEq ι]
(i j : ι)

[Pi.single i 1-[𝕜]Pi.single j 1] ⊆ stdSimplex 𝕜 ι


@[to_additive]
theorem coinduced_continuous {α β : Type*} [t : TopologicalSpace α] [Group β] (f : α → β) :
    Continuous[t, (coinduced f).toTopologicalSpace] f

{α : Type u_1}
{β : Type u_2}
[t : TopologicalSpace α]
[Group β]
(f : α → β)


lemma div_le_div_right_of_nonneg {a a' b : EReal} (h : 0 ≤ b) (h' : a ≤ a') :
    a / b ≤ a' / b


theorem balancedCore_nonempty_iff : (balancedCore 𝕜 s).Nonempty ↔ (0 : E) ∈ s

{𝕜 : Type u_1}
{E : Type u_2}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}


lemma exists_eq_of_iSup_eq_of_not_isSuccLimit
    {ι : Type u} (f : ι → Cardinal.{v}) (ω : Cardinal.{v})
    (hω : ¬ Order.IsSuccLimit ω)
    (h : ⨆ i : ι, f i = ω) : ∃ i, f i = ω

{ι : Type u}
(f : ι → Cardinal.{v})
(ω : Cardinal.{v})
(hω : ¬Order.IsSuccLimit ω)
(h : ⨆ i, f i = ω)


@[to_additive (attr := simp)]
lemma inv_op_smul_set_distrib (a : α) (s : Set α) : (op a • s)⁻¹ = a⁻¹ • s⁻¹

{α : Type u_2}
[Group α]
(a : α)
(s : Set α)


@[ext]
theorem ext ⦃f g : α →+* β⦄ : (∀ x, f x = g x) → f = g

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β} ⦃f g : α →+* β⦄, (∀ (x_2 : α), f x_2 = g x_2) → f = g


/-- Add extra prefix to context-free rewriting. -/
lemma Rewrites.append_left {r : ContextFreeRule T N} {v w : List (Symbol T N)}
    (hvw : r.Rewrites v w) (p : List (Symbol T N)) : r.Rewrites (p ++ v) (p ++ w)

{T : Type uT}
{N : Type uN}
{r : ContextFreeRule T N}
{v w : List (Symbol T N)}
(hvw : r.Rewrites v w)
(p : List (Symbol T N))


/-- `b.coord i` is the linear function giving the `i`'th coordinate of a vector
with respect to the basis `b`.

`b.coord i` is an element of the dual space. In particular, for
finite-dimensional spaces it is the `ι`th basis vector of the dual space.
-/
@[simps!]
def coord : M →ₗ[R] R

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(i : ι)


@[to_additive (attr := simp)]
theorem prod_toMultiset [CommMonoid α] (f : α →₀ ℕ) :
    f.toMultiset.prod = f.prod fun a n => a ^ n

{α : Type u_1}
[CommMonoid α]
(f : α →₀ ℕ)

(Finsupp.toMultiset f).prod = f.prod fun a n => a ^ n


theorem IsLocalExtr.on (h : IsLocalExtr f a) (s) : IsLocalExtrOn f s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{a : α}
(h : IsLocalExtr f a)
(s : Set α)


/-- A self-map preserving a finite measure is conservative: if `μ s ≠ 0`, then at least one point
`x ∈ s` comes back to `s` under iterations of `f`. Actually, a.e. point of `s` comes back to `s`
infinitely many times, see `MeasureTheory.MeasurePreserving.conservative` and theorems about
`MeasureTheory.Conservative`. -/
theorem exists_mem_iterate_mem [IsFiniteMeasure μ] (hf : MeasurePreserving f μ μ)
    (hs : NullMeasurableSet s μ) (hs' : μ s ≠ 0) : ∃ x ∈ s, ∃ m ≠ 0, f^[m] x ∈ s

(hf : MeasureTheory.MeasurePreserving f μ μ)

(hs : MeasureTheory.NullMeasurableSet s μ)


theorem iff_algebraMap_injective [CommRing R] [Ring A] [IsDomain A] [Algebra R A] :
    NoZeroSMulDivisors R A ↔ Function.Injective (algebraMap R A)

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[Ring A]
[IsDomain A]
[Algebra R A]

NoZeroSMulDivisors R A ↔ Function.Injective ⇑(algebraMap R A)


lemma det_one_add_X_smul (M : Matrix n n R) :
    det (1 + (X : R[X]) • M.map C) =
      (1 : R[X]) + trace M • X + (det (1 + (X : R[X]) • M.map C)).divX.divX * X ^ 2

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

(1 + Polynomial.X • M.map ⇑Polynomial.C).det =
  1 + M.trace • Polynomial.X + (1 + Polynomial.X • M.map ⇑Polynomial.C).det.divX.divX * Polynomial.X ^ 2


theorem algebraMap_apply (x : R) : algebraMap R A x = algebraMap S A (algebraMap R S x)

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

(algebraMap R A) x = (algebraMap S A) ((algebraMap R S) x)


theorem min_le_of_left_le : a ≤ c → min a b ≤ c

{α : Type u}
[LinearOrder α]
{a b c : α}


theorem HasOrthogonalRows.transpose_hasOrthogonalCols [Fintype n] (h : A.HasOrthogonalRows) :
    Aᵀ.HasOrthogonalCols

{α : Type u_1}
{n : Type u_2}
{m : Type u_3}
[Mul α]
[AddCommMonoid α]
{A : Matrix m n α}
[Fintype n]
(h : A.HasOrthogonalRows)


/-- If two rings are isomorphic, and the second doesn't have zero divisors,
then so does the first. -/
protected theorem noZeroDivisors {A : Type*} (B : Type*) [MulZeroClass A] [MulZeroClass B]
    [NoZeroDivisors B] (e : A ≃* B) : NoZeroDivisors A

{A : Type u_7}
(B : Type u_8)
[MulZeroClass A]
[MulZeroClass B]
[NoZeroDivisors B]
(e : A ≃* B)


@[simp]
theorem sumCongr_one_swap {α β : Type*} [DecidableEq α] [DecidableEq β] (i j : β) :
    sumCongr (1 : Perm α) (Equiv.swap i j) = Equiv.swap (Sum.inr i) (Sum.inr j)

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[DecidableEq β]
(i j : β)

Equiv.Perm.sumCongr 1 (Equiv.swap i j) = Equiv.swap (Sum.inr i) (Sum.inr j)


lemma orthogonal_top (hB : B.Nondegenerate) (hB₀ : B.IsRefl) :
    B.orthogonal ⊤ = ⊥

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
(hB : B.Nondegenerate)
(hB₀ : B.IsRefl)


theorem core_mono {s t : Set β} (h : s ⊆ t) : f.core s ⊆ f.core t

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


lemma rpow_intCast_mul (hx : 0 ≤ x) (n : ℤ) (z : ℝ) : x ^ (n * z) = (x ^ n) ^ z


/-- Induction principle for `W` -/
theorem w_ind {α : TypeVec n} {C : P.W α → Prop}
    (ih : ∀ (a : P.A) (f' : P.drop.B a ⟹ α) (f : P.last.B a → P.W α),
        (∀ i, C (f i)) → C (P.wMk a f' f)) :
    ∀ x, C x

(ih :
  ∀ (a : P.A) (f' : (P.drop.B a).Arrow α) (f : P.last.B a → P.W α), (∀ (i : P.last.B a), C (f i)) → C (P.wMk a f' f))


protected theorem chartAt (p : TM) :
    chartAt (ModelProd H E) p =
      ((tangentBundleCore I M).toFiberBundleCore.localTriv (achart H p.1)).toPartialHomeomorph ≫ₕ
        (chartAt H p.1).prod (PartialHomeomorph.refl E)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_4}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(M : Type u_6)
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
(p : TangentBundle I M)

chartAt (ModelProd H E) p =
  ((tangentBundleCore I M).toFiberBundleCore.localTriv (achart H p.proj)).toPartialHomeomorph ≫ₕ
    (chartAt H p.proj).prod (PartialHomeomorph.refl E)


@[simp]
theorem none_ne_some (x : α) : none ≠ some x


@[mono]
theorem pimage_mono (h : s ⊆ t) : s.pimage f ⊆ t.pimage f

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f : α →. β}
[(x : α) → Decidable (f x).Dom]
{s t : Finset α}
(h : s ⊆ t)


@[simp]
theorem zero_negPart : (0 : JordanDecomposition α).negPart = 0

MeasureTheory.JordanDecomposition.negPart 0 = 0


theorem getLast?_append {l₁ l₂ : List α} {x : α} (h : x ∈ l₂.getLast?) :
    x ∈ (l₁ ++ l₂).getLast?

{α : Type u}
{l₁ l₂ : List α}
{x : α}
(h : x ∈ l₂.getLast?)


@[simp]
theorem subrel_val (r : α → α → Prop) (p : Set α) {a b} : Subrel r p a b ↔ r a.1 b.1

{α : Type u_1}
(r : α → α → Prop)
(p : Set α)
{a b : ↑p}


theorem div_lt_iff {a b r : ℝ≥0} (hr : r ≠ 0) : a / r < b ↔ a < b * r


@[to_additive le_neg]
theorem le_inv' : a ≤ b⁻¹ ↔ b ≤ a⁻¹

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

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

a ≤ b⁻¹ ↔ b ≤ a⁻¹


@[simp]
theorem mem_bagInter {a : α} : ∀ {l₁ l₂ : List α}, a ∈ l₁.bagInter l₂ ↔ a ∈ l₁ ∧ a ∈ l₂

{α : Type u_1}
[DecidableEq α]
{a : α}
{l₁ l₂ : List α}


theorem comp_eq_snd_compProd (η : Kernel β γ) [IsSFiniteKernel η] (κ : Kernel α β)
    [IsSFiniteKernel κ] : η ∘ₖ κ = snd (κ ⊗ₖ prodMkLeft α η)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_4}
{mγ : MeasurableSpace γ}
(η : ProbabilityTheory.Kernel β γ)
[ProbabilityTheory.IsSFiniteKernel η]
(κ : ProbabilityTheory.Kernel α β)
[ProbabilityTheory.IsSFiniteKernel κ]

η.comp κ = (κ.compProd (ProbabilityTheory.Kernel.prodMkLeft α η)).snd


/-- A random variable that `HasPDF` is quasi-measure preserving. -/
theorem HasPDF.quasiMeasurePreserving_of_measurable (X : Ω → E) (ℙ : Measure Ω) (μ : Measure E)
    [HasPDF X ℙ μ] (h : Measurable X) : QuasiMeasurePreserving X ℙ μ

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]

∀ {x : MeasurableSpace Ω} (X : Ω → E) (ℙ : MeasureTheory.Measure Ω) (μ : MeasureTheory.Measure E)
  [inst : MeasureTheory.HasPDF X ℙ μ], Measurable X → MeasureTheory.Measure.QuasiMeasurePreserving X ℙ μ


theorem apply {α : Sort u} {r : α → α → Prop} (wf : WellFounded r) (a : α) : Acc r a


@[mono]
theorem toSubsemigroup_strictMono :
    StrictMono (toSubsemigroup : NonUnitalSubring R → Subsemigroup R)


@[simp]
theorem neg_re (z : ℤ√d) : (-z).re = -z.re


theorem StructureGroupoid.id_mem (G : StructureGroupoid H) : PartialHomeomorph.refl H ∈ G

{H : Type u}
[TopologicalSpace H]
(G : StructureGroupoid H)


@[simp]
theorem Ideal.radical_minimalPrimes : I.radical.minimalPrimes = I.minimalPrimes

{R : Type u_1}
[CommSemiring R]
{I : Ideal R}


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

{M : Type u}
⦃m₁ m₂ : LeftCancelMonoid M⦄
(h_mul : HMul.hMul = HMul.hMul)


protected theorem continuous : Continuous e

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


/-- The functor `StructuredArrow L R ⥤ StructuredArrow L' R'` that is deduced from
a natural transformation `R ⋙ G ⟶ F ⋙ R'` and a morphism `L' ⟶ G.obj L.` -/
@[simps!]
def map₂ : StructuredArrow L R ⥤ StructuredArrow L' R'

{X Y : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit L) R}

((CategoryTheory.StructuredArrow.map₂ α β).map φ).left = CategoryTheory.CategoryStruct.id X.left


protected theorem HasBasis.biInf_mem [CompleteLattice β] {f : Set α → β} (h : HasBasis l p s)
    (hf : Monotone f) : ⨅ t ∈ l, f t = ⨅ (i) (_ : p i), f (s i)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
[CompleteLattice β]
{f : Set α → β}
(h : l.HasBasis p s)
(hf : Monotone f)

⨅ t ∈ l, f t = ⨅ i, ⨅ (_ : p i), f (s i)


/-- If `x ∈ closure s` and `y ∈ interior s`, then the segment `(x, y]` is included in `interior s`.
-/
theorem Convex.add_smul_sub_mem_interior' {s : Set E} (hs : Convex 𝕜 s) {x y : E}
    (hx : x ∈ closure s) (hy : y ∈ interior s) {t : 𝕜} (ht : t ∈ Ioc (0 : 𝕜) 1) :
    x + t • (y - x) ∈ interior s

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)
{x y : E}
(hx : x ∈ closure s)
(hy : y ∈ interior s)
{t : 𝕜}
(ht : t ∈ Set.Ioc 0 1)


lemma ιMapObjOrZero_eq (h : p i = j) : X.ιMapObjOrZero p i j = X.ιMapObj p i j h


@[to_additive]
theorem map_id_apply (h : N ≤ Subgroup.comap (MonoidHom.id _) N := (Subgroup.comap_id N).le) (x) :
    map N N (MonoidHom.id _) h x = x

(h : N ≤ AddSubgroup.comap (AddMonoidHom.id G) N := ⋯)

(QuotientAddGroup.map N N (AddMonoidHom.id G) h) x = x


@[simp]
theorem frontier_Icc [NoMinOrder α] [NoMaxOrder α] {a b : α} (h : a ≤ b) :
    frontier (Icc a b) = {a, b}

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[NoMinOrder α]
[NoMaxOrder α]
{a b : α}
(h : a ≤ b)


@[simp]
theorem mem_extendScalars : x ∈ extendScalars h ↔ x ∈ E

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
{F E : IntermediateField K L}
(h : F ≤ E)
{x : L}

x ∈ IntermediateField.extendScalars h ↔ x ∈ E


lemma succ_div_of_not_dvd (hba : ¬b ∣ a + 1) : (a + 1) / b = a / b


theorem Commute.zpow_zpow {A B : M} (h : Commute A B) (m n : ℤ) : Commute (A ^ m) (B ^ n)

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
{A B : Matrix n' n' R}
(h : Commute A B)
(m n : ℤ)


theorem cos_sub_cos : cos x - cos y = -2 * sin ((x + y) / 2) * sin ((x - y) / 2)

Complex.cos x - Complex.cos y = -2 * Complex.sin ((x + y) / 2) * Complex.sin ((x - y) / 2)


@[simp]
theorem transitionMap_mk {m n : ℕ} (hmn : m ≤ n) (x : M) :
    transitionMap I M hmn
      (Submodule.Quotient.mk (p := (I ^ n • ⊤ : Submodule R M)) x) =
      Submodule.Quotient.mk (p := (I ^ m • ⊤ : Submodule R M)) x

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(M : Type u_2)
[AddCommGroup M]
[Module R M]
{m n : ℕ}
(hmn : m ≤ n)
(x : M)

(AdicCompletion.transitionMap I M hmn) (Submodule.Quotient.mk x) = Submodule.Quotient.mk x


@[simp, norm_cast]
theorem coe_top : ((⊤ : LowerSet α) : Set α) = univ


@[to_additive (attr := simp)]
theorem prod_append : (l₁ ++ l₂).prod = l₁.prod * l₂.prod

{M : Type u_4}
[AddMonoid M]
{l₁ l₂ : List M}


/-- A bounded convergence theorem for a finite measure:
If bounded continuous non-negative functions are uniformly bounded by a constant and tend to a
limit, then their integrals against the finite measure tend to the integral of the limit.
This formulation assumes:
 * the functions tend to a limit along a countably generated filter;
 * the limit is in the almost everywhere sense;
 * boundedness holds almost everywhere;
 * integration is `MeasureTheory.lintegral`, i.e., the functions and their integrals are
   `ℝ≥0∞`-valued.
-/
theorem tendsto_lintegral_nn_filter_of_le_const {ι : Type*} {L : Filter ι} [L.IsCountablyGenerated]
    (μ : Measure Ω) [IsFiniteMeasure μ] {fs : ι → Ω →ᵇ ℝ≥0} {c : ℝ≥0}
    (fs_le_const : ∀ᶠ i in L, ∀ᵐ ω : Ω ∂μ, fs i ω ≤ c) {f : Ω → ℝ≥0}
    (fs_lim : ∀ᵐ ω : Ω ∂μ, Tendsto (fun i ↦ fs i ω) L (𝓝 (f ω))) :
    Tendsto (fun i ↦ ∫⁻ ω, fs i ω ∂μ) L (𝓝 (∫⁻ ω, f ω ∂μ))

{fs : ι → Ω →ᵇ ℝ≥0}

(fs_le_const : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, (fs i) ω ≤ c)

(fs_lim : ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun i => (fs i) ω) L (𝓝 (f ω)))

Filter.Tendsto (fun i => ∫⁻ (ω : Ω), ↑((fs i) ω) ∂μ) L (𝓝 (∫⁻ (ω : Ω), ↑(f ω) ∂μ))


lemma ConcaveOn.smul_convexOn (hf : ConcaveOn 𝕜 s f) (hg : ConvexOn 𝕜 s g)
    (hf₀ : ∀ ⦃x⦄, x ∈ s → 0 ≤ f x) (hg₀ : ∀ ⦃x⦄, x ∈ s → g x ≤ 0) (hfg : MonovaryOn f g s) :
    ConvexOn 𝕜 s (f • g)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[LinearOrderedCommRing 𝕜]
[LinearOrderedCommRing E]
[LinearOrderedAddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
[Module E F]
[IsScalarTower 𝕜 E F]
[SMulCommClass 𝕜 E F]
[OrderedSMul 𝕜 E]
[OrderedSMul 𝕜 F]
[OrderedSMul E F]
{s : Set 𝕜}
{f : 𝕜 → E}
{g : 𝕜 → F}
(hf : ConcaveOn 𝕜 s f)
(hg : ConvexOn 𝕜 s g)
(hf₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → 0 ≤ f x)
(hg₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → g x ≤ 0)
(hfg : MonovaryOn f g s)


/-- A `nil` vector maps to a `nil` vector. -/
@[simp]
theorem map_nil (f : α → β) : map f nil = nil

Mathlib.Vector.map f Mathlib.Vector.nil = Mathlib.Vector.nil


@[simp]
theorem trace_sub (A B : Matrix n n R) : trace (A - B) = trace A - trace B

{n : Type u_3}
{R : Type u_6}
[Fintype n]
[AddCommGroup R]
(A B : Matrix n n R)


protected theorem sub_add_eq_max (a b : Nat) : a - b + b = max a b


@[simp]
theorem Ioc_mem_nhds_iff [NoMaxOrder α] {a b x : α} : Ioc a b ∈ 𝓝 x ↔ x ∈ Ioo a b

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[NoMaxOrder α]
{a b x : α}


theorem dimH_subsingleton {s : Set X} (h : s.Subsingleton) : dimH s = 0

{X : Type u_2}
[EMetricSpace X]
{s : Set X}
(h : s.Subsingleton)


@[simp] lemma op_mul [Mul α] (a b : α) : op (a * b) = op a * op b

AddOpposite.op (a * b) = AddOpposite.op a * AddOpposite.op b


theorem fst_sum {ι} [AddCommMonoid R] [AddCommMonoid M] (s : Finset ι) (f : ι → tsze R M) :
    (∑ i ∈ s, f i).fst = ∑ i ∈ s, (f i).fst

{R : Type u}
{M : Type v}
{ι : Type u_3}
[AddCommMonoid R]
[AddCommMonoid M]
(s : Finset ι)
(f : ι → tsze R M)


theorem sym_filterNe_mem {m : Sym α n} (a : α) (h : m ∈ s.sym n) :
    (m.filterNe a).2 ∈ (Finset.erase s a).sym (n - (m.filterNe a).1)

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{n : ℕ}
{m : Sym α n}
(a : α)
(h : m ∈ s.sym n)

(Sym.filterNe a m).snd ∈ (s.erase a).sym (n - ↑(Sym.filterNe a m).fst)


/-- The filter of left neighborhoods has a basis of closed intervals. -/
theorem nhdsWithin_Iic_basis_Icc [NoMinOrder α] [DenselyOrdered α] {a : α} :
    (𝓝[≤] a).HasBasis (· < a) (Icc · a)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[NoMinOrder α]
[DenselyOrdered α]
{a : α}

(𝓝[≤] a).HasBasis (fun x => x < a) fun x => Set.Icc x a


/-- To construct an isomorphism of coalgebras, it suffices to give an isomorphism of the Vs which
commutes with the structure morphisms.
-/
@[simps]
def isoMk (h : V₀.1 ≅ V₁.1) (w : V₀.str ≫ F.map h.hom = h.hom ≫ V₁.str := by aesop_cat) :
    V₀ ≅ V₁

{V₀ V₁ : CategoryTheory.Endofunctor.Coalgebra F}

(w : CategoryTheory.CategoryStruct.comp V₀.str (F.map h.hom) = CategoryTheory.CategoryStruct.comp h.hom V₁.str := by
  aesop_cat)

(CategoryTheory.Endofunctor.Coalgebra.isoMk h w).inv.f = h.inv


theorem injective_toCircle (hT : T ≠ 0) : Function.Injective (@toCircle T)


theorem gcd_map_mul (a : α) (s : Multiset α) : (s.map (a * ·)).gcd = normalize a * s.gcd

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

(Multiset.map (fun x => a * x) s).gcd = normalize a * s.gcd


@[reassoc (attr := simp)]
theorem isoPullback_hom_snd (h : IsPullback fst snd f g) [HasPullback f g] :
    h.isoPullback.hom ≫ pullback.snd _ _ = snd

(h : CategoryTheory.IsPullback fst snd f g)

h.isoPullback.hom ≫ CategoryTheory.Limits.pullback.snd f g = snd


@[measurability]
protected theorem AddCircle.measurable_mk' {a : ℝ} :
    Measurable (β := AddCircle a) ((↑) : ℝ → AddCircle a)


theorem cast_factorial : (a ! : S) = (ascPochhammer S a).eval 1

↑a ! = Polynomial.eval 1 (ascPochhammer S a)


theorem nhds_eq_order [OrderTopology α] (a : α) :
    𝓝 a = (⨅ b ∈ Iio a, 𝓟 (Ioi b)) ⊓ ⨅ b ∈ Ioi a, 𝓟 (Iio b)

{α : Type u}
[TopologicalSpace α]
[Preorder α]
[OrderTopology α]
(a : α)

𝓝 a = (⨅ b ∈ Set.Iio a, 𝓟 (Set.Ioi b)) ⊓ ⨅ b ∈ Set.Ioi a, 𝓟 (Set.Iio b)


@[simp]
theorem toMultiset_eq_nil {s : Cycle α} : s.toMultiset = 0 ↔ s = Cycle.nil


theorem ord_proj_le {n : ℕ} (p : ℕ) (hn : n ≠ 0) : ord_proj[p] n ≤ n


lemma natAbs_add_of_nonpos {a b : Int} (ha : a ≤ 0) (hb : b ≤ 0) :
    natAbs (a + b) = natAbs a + natAbs b


lemma Y_ne_negY_of_Y_ne' [NoZeroDivisors R] {P Q : Fin 3 → R} (hP : W'.Equation P)
    (hQ : W'.Equation Q) (hx : P x * Q z ^ 2 = Q x * P z ^ 2)
    (hy : P y * Q z ^ 3 ≠ W'.negY Q * P z ^ 3) : P y ≠ W'.negY P


/-- If for all `θ : ℝⁿ`, `‖f (torusMap c R θ)‖` is less than or equal to a constant `C : ℝ`, then
`‖∯ x in T(c, R), f x‖` is less than or equal to `(2 * π)^n * (∏ i, |R i|) * C`-/
theorem norm_torusIntegral_le_of_norm_le_const {C : ℝ} (hf : ∀ θ, ‖f (torusMap c R θ)‖ ≤ C) :
    ‖∯ x in T(c, R), f x‖ ≤ ((2 * π) ^ (n : ℕ) * ∏ i, |R i|) * C

(hf : ∀ (θ : Fin n → ℝ), ‖f (torusMap c R θ)‖ ≤ C)

‖∯ (x : Fin n → ℂ) in T(c, R), f x‖ ≤ ((2 * π) ^ n * ∏ i : Fin n, |R i|) * C


theorem tendsto_norm_inverse_nhdsWithin_0_atTop {𝕜 : Type*} [NormedDivisionRing 𝕜] :
    Tendsto (fun x : 𝕜 ↦ ‖x⁻¹‖) (𝓝[≠] 0) atTop

Filter.Tendsto (fun x => ‖x⁻¹‖) (𝓝[≠] 0) Filter.atTop


lemma GrowsPolynomially.const_mul {f : ℝ → ℝ} {c : ℝ} (hf : GrowsPolynomially f) :
    GrowsPolynomially fun x => c * f x

(hf : AkraBazziRecurrence.GrowsPolynomially f)

AkraBazziRecurrence.GrowsPolynomially fun x => c * f x


@[simp]
theorem congr_refl (he : G'.map (MulEquiv.refl G : G →* G) = G' := Subgroup.map_id G') :
    congr G' G' (MulEquiv.refl G) he = MulEquiv.refl (G ⧸ G')

(he : Subgroup.map (↑(MulEquiv.refl G)) G' = G' := ⋯)

QuotientGroup.congr G' G' (MulEquiv.refl G) he = MulEquiv.refl (G ⧸ G')


@[simp]
protected theorem polarCoord_symm_apply (p : ℝ × ℝ) :
    Complex.polarCoord.symm p = p.1 * (Real.cos p.2 + Real.sin p.2 * Complex.I)

↑Complex.polarCoord.symm p = ↑p.1 * (↑(Real.cos p.2) + ↑(Real.sin p.2) * Complex.I)


theorem mul_generator_self_inv {R₁ : Type*} [CommRing R₁] [Algebra R₁ K] [IsLocalization R₁⁰ K]
    (I : FractionalIdeal R₁⁰ K) [Submodule.IsPrincipal (I : Submodule R₁ K)] (h : I ≠ 0) :
    I * spanSingleton _ (generator (I : Submodule R₁ K))⁻¹ = 1

(K : Type u_3)
[Field K]
{R₁ : Type u_6}
[CommRing R₁]
[Algebra R₁ K]
[IsLocalization R₁⁰ K]
(I : FractionalIdeal R₁⁰ K)
[(↑I).IsPrincipal]
(h : I ≠ 0)

I * FractionalIdeal.spanSingleton R₁⁰ (Submodule.IsPrincipal.generator ↑I)⁻¹ = 1


@[simp]
theorem equalizer.fork_ι : (equalizer.fork f g).ι = equalizer.ι f g

(CategoryTheory.Limits.equalizer.fork f g).ι = CategoryTheory.Limits.equalizer.ι f g


lemma IsMeasurableRatCDF.tendsto_atBot_zero {f : α → ℚ → ℝ} (hf : IsMeasurableRatCDF f) (a : α) :
    Tendsto (f a) atBot (𝓝 0)

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)


theorem mod_lcm (hn : a ≡ b [MOD n]) (hm : a ≡ b [MOD m]) : a ≡ b [MOD lcm n m]

{m n a b : ℕ}
(hn : a ≡ b [MOD n])
(hm : a ≡ b [MOD m])


@[simp]
theorem coe_pi {ι' : Type*} {N : ι' → Type*} [∀ i, AddCommMonoid (N i)] [∀ i, Module R (N i)]
    (f : ∀ i, M [⋀^ι]→ₗ[R] N i) :
    (pi f : MultilinearMap R (fun _ : ι => M) (∀ i, N i)) = MultilinearMap.pi fun a => f a

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{ι : Type u_7}
{ι' : Type u_10}
{N : ι' → Type u_11}
[(i : ι') → AddCommMonoid (N i)]
[(i : ι') → Module R (N i)]
(f : (i : ι') → M [⋀^ι]→ₗ[R] N i)

↑(AlternatingMap.pi f) = MultilinearMap.pi fun a => ↑(f a)


theorem ofNat_succ (n : Nat) : (succ n : Int) = n + 1


theorem tendsto_ceil_atTop : Tendsto (ceil : α → ℤ) atTop atTop

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

Filter.Tendsto Int.ceil Filter.atTop Filter.atTop


@[simp, mfld_simps]
theorem refl_toPartialHomeomorph :
    (Homeomorph.refl X).toPartialHomeomorph = PartialHomeomorph.refl X


@[to_additive] -- Porting note: was `@[simp]`
theorem integrable_comp_div_left (f : G → F) [IsInvInvariant μ] [IsMulLeftInvariant μ] (g : G) :
    Integrable (fun t => f (g / t)) μ ↔ Integrable f μ

{G : Type u_4}
{F : Type u_6}
[MeasurableSpace G]
[NormedAddCommGroup F]
{μ : MeasureTheory.Measure G}
[AddGroup G]
[MeasurableAdd G]
[MeasurableNeg G]
(f : G → F)
[μ.IsNegInvariant]
[μ.IsAddLeftInvariant]
(g : G)

MeasureTheory.Integrable (fun t => f (g - t)) μ ↔ MeasureTheory.Integrable f μ


lemma not_injective_uncountable_countable [Uncountable α] [Countable β] (f : α → β) :
    ¬Injective f

{α : Sort u}
{β : Sort v}
[Uncountable α]
[Countable β]
(f : α → β)


theorem _root_.Set.LeftInvOn.filter_map_Iic {f : α → β} {g : β → α} (hfg : LeftInvOn g f s) :
    LeftInvOn (map g) (map f) (Iic <| 𝓟 s)

{α : Type u}
{β : Type v}
{s : Set α}
{f : α → β}
{g : β → α}
(hfg : Set.LeftInvOn g f s)

Set.LeftInvOn (Filter.map g) (Filter.map f) (Set.Iic (𝓟 s))


theorem supDegree_prod_le {R A B : Type*} [CommSemiring R] [AddCommMonoid A] [AddCommMonoid B]
    [SemilatticeSup B] [OrderBot B]
    [CovariantClass B B (· + ·) (· ≤ ·)] [CovariantClass B B (Function.swap (· + ·)) (· ≤ ·)]
    {D : A → B} (hzero : D 0 = 0) (hadd : ∀ a1 a2, D (a1 + a2) = D a1 + D a2)
    {ι} {s : Finset ι} {f : ι → R[A]} :
    (∏ i ∈ s, f i).supDegree D ≤ ∑ i ∈ s, (f i).supDegree D

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

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

AddMonoidAlgebra.supDegree D (∏ i ∈ s, f i) ≤ ∑ i ∈ s, AddMonoidAlgebra.supDegree D (f i)


/-- The inclusion of locally-constant functions into continuous functions as a multiplicative
monoid hom. -/
@[to_additive (attr := simps)
"The inclusion of locally-constant functions into continuous functions as an additive monoid hom."]
def toContinuousMapMonoidHom [Monoid Y] [ContinuousMul Y] : LocallyConstant X Y →* C(X, Y)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[Monoid Y]
[ContinuousMul Y]
(f : LocallyConstant X Y)

LocallyConstant.toContinuousMapMonoidHom f = ↑f


@[simp]
theorem cells_bot : (⊥ : YoungDiagram).cells = ∅


lemma LSeries.convolution_congr {R : Type*} [Semiring R] {f f' g g' : ℕ → R}
    (hf : ∀ {n}, n ≠ 0 → f n = f' n) (hg : ∀ {n}, n ≠ 0 → g n = g' n) :
    f ⍟ g = f' ⍟ g'

{R : Type u_1}
[Semiring R]
{f f' g g' : ℕ → R}
(hf : ∀ {n : ℕ}, n ≠ 0 → f n = f' n)
(hg : ∀ {n : ℕ}, n ≠ 0 → g n = g' n)


private theorem primitive_element_inf_aux_of_finite_intermediateField
    [Finite (IntermediateField F E)] : ∃ γ : E, F⟮α, β⟯ = F⟮γ⟯

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

∃ γ, F⟮α, β⟯ = F⟮γ⟯


/-- Lifts a magma homomorphism `α → β` to a semigroup homomorphism `Magma.AssocQuotient α → β`
given a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts an additive magma homomorphism `α → β` to an
additive semigroup homomorphism `AddMagma.AssocQuotient α → β` given an additive semigroup `β`."]
def lift : (α →ₙ* β) ≃ (AssocQuotient α →ₙ* β)

(f : AddHom (AddMagma.FreeAddSemigroup α) β)

AddMagma.FreeAddSemigroup.lift.symm f = f.comp AddMagma.FreeAddSemigroup.of


lemma uzpow_coe_nat (s : ℤˣ) (n : ℕ) [n.AtLeastTwo] :
    s ^ (no_index (OfNat.ofNat n : R)) = s ^ (no_index (OfNat.ofNat n : ℕ))

{R : Type u_1}
[CommSemiring R]
[Module R (Additive ℤˣ)]
(s : ℤˣ)
(n : ℕ)
[n.AtLeastTwo]


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

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{f : G → H}
(hf : IsGroupHom f)
{a b : G}
(h : f a = f b)


@[simp]
theorem comp_map (F : C ⥤ D) (G : D ⥤ E) {X Y : C} (f : X ⟶ Y) :
    (F ⋙ G).map f = G.map (F.map f)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
(F : CategoryTheory.Functor C D)
(G : CategoryTheory.Functor D E)
{X Y : C}
(f : X ⟶ Y)


lemma eventually_mapsTo {f : C(X, Y)} (hK : IsCompact K) (hU : IsOpen U) (h : MapsTo f K U) :
    ∀ᶠ g : C(X, Y) in 𝓝 f, MapsTo g K U

{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{K : Set X}
{U : Set Y}
{f : C(X, Y)}
(hK : IsCompact K)
(hU : IsOpen U)
(h : Set.MapsTo (⇑f) K U)

∀ᶠ (g : C(X, Y)) in 𝓝 f, Set.MapsTo (⇑g) K U


theorem if_pos {c : Prop} {h : Decidable c} (hc : c) {α : Sort u} {t e : α} : (ite c t e) = t


theorem Nodup.union [DecidableEq α] (l₁ : List α) (h : Nodup l₂) : (l₁ ∪ l₂).Nodup

{α : Type u}
{l₂ : List α}
[DecidableEq α]
(l₁ : List α)
(h : l₂.Nodup)


theorem splits_of_algHom {f : R[X]} (h : Splits (algebraMap R K) f) (e : K →ₐ[R] L) :
    Splits (algebraMap R L) f

(h : Polynomial.Splits (algebraMap R K) f)


lemma krullDim_eq_top_of_infiniteDimensionalOrder [InfiniteDimensionalOrder α] :
    krullDim α = ⊤

{α : Type u_1}
[Preorder α]
[InfiniteDimensionalOrder α]


@[to_additive even_iff_exists_two_nsmul]
lemma isSquare_iff_exists_sq (m : α) : IsSquare m ↔ ∃ c, m = c ^ 2


/-- Coercion is an `AddMonoidHom`. -/
@[simps]
def toMeasureAddMonoidHom : FiniteMeasure Ω →+ Measure Ω

∀ (a : MeasureTheory.FiniteMeasure Ω), MeasureTheory.FiniteMeasure.toMeasureAddMonoidHom a = ↑a


theorem mirror_eq_iff : p.mirror = q ↔ p = q.mirror

{R : Type u_1}
[Semiring R]
{p q : Polynomial R}


@[to_additive]
theorem div_div_div_comm : a / b / (c / d) = a / c / (b / d)

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


protected theorem max [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι} (hτ : IsStoppingTime f τ)
    (hπ : IsStoppingTime f π) : IsStoppingTime f fun ω => max (τ ω) (π ω)

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ π : Ω → ι}
(hτ : MeasureTheory.IsStoppingTime f τ)
(hπ : MeasureTheory.IsStoppingTime f π)

MeasureTheory.IsStoppingTime f fun ω => max (τ ω) (π ω)


/-- Basic hypothesis to talk about a topological additive monoid or a topological additive
semigroup. A topological additive monoid over `M`, for example, is obtained by requiring both the
instances `AddMonoid M` and `ContinuousAdd M`.

Continuity in only the left/right argument can be stated using
`ContinuousConstVAdd α α`/`ContinuousConstVAdd αᵐᵒᵖ α`. -/
class ContinuousAdd (M : Type u) [TopologicalSpace M] [Add M] : Prop where
  continuous_add : Continuous fun p : M × M => p.1 + p.2

{M : Type u}
[TopologicalSpace M]
[Add M]
[self : ContinuousAdd M]


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

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

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


@[to_additive]
theorem self_ne_mul_left : b ≠ a * b ↔ a ≠ 1

{M : Type u}
[RightCancelMonoid M]
{a b : M}


theorem unop_surjective : Function.Surjective (unop : αᵒᵖ → α)


theorem _root_.IsUnit.det_zpow {A : M} (h : IsUnit A.det) (n : ℤ) : IsUnit (A ^ n).det

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
{A : Matrix n' n' R}
(h : IsUnit A.det)
(n : ℤ)


/-- Two morphisms out of a colimit are equal if their compositions with
  each cocone morphism are equal. -/
theorem hom_ext (h : IsColimit t) {W : C} {f f' : t.pt ⟶ W}
    (w : ∀ j, t.ι.app j ≫ f = t.ι.app j ≫ f') : f = f'

(w : ∀ (j : J), t.ι.app j ≫ f = t.ι.app j ≫ f')


@[reassoc]
lemma comm_app (a : A) (X : C) :
    (F₁.commShiftIso a).hom.app X ≫ (τ.app X)⟦a⟧' =
      τ.app (X⟦a⟧) ≫ (F₂.commShiftIso a).hom.app X

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_7, u_1} C]
[CategoryTheory.Category.{u_6, u_2} D]
{F₁ F₂ : CategoryTheory.Functor C D}
(τ : F₁ ⟶ F₂)
{A : Type u_5}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[CategoryTheory.HasShift D A]
[F₁.CommShift A]
[F₂.CommShift A]
[CategoryTheory.NatTrans.CommShift τ A]
(a : A)
(X : C)

CategoryTheory.CategoryStruct.comp ((F₁.commShiftIso a).hom.app X) ((CategoryTheory.shiftFunctor D a).map (τ.app X)) =
  CategoryTheory.CategoryStruct.comp (τ.app ((CategoryTheory.shiftFunctor C a).obj X)) ((F₂.commShiftIso a).hom.app X)


/-- The first projection functor `ShortComplex C ⥤ C`. -/
@[simps]
def π₁ : ShortComplex C ⥤ C

∀ {X Y : CategoryTheory.ShortComplex C} (f : X ⟶ Y), CategoryTheory.ShortComplex.π₁.map f = f.τ₁


/-- Bundles a substructure satisfying the Tarski-Vaught test as an elementary substructure. -/
@[simps]
def toElementarySubstructure (S : L.Substructure M)
    (htv :
      ∀ (n : ℕ) (φ : L.BoundedFormula Empty (n + 1)) (x : Fin n → S) (a : M),
        φ.Realize default (Fin.snoc ((↑) ∘ x) a : _ → M) →
          ∃ b : S, φ.Realize default (Fin.snoc ((↑) ∘ x) b : _ → M)) :
    L.ElementarySubstructure M

(htv :
  ∀ (n : ℕ) (φ : L.BoundedFormula Empty (n + 1)) (x : Fin n → ↥S) (a : M),
    φ.Realize default (Fin.snoc (Subtype.val ∘ x) a) → ∃ b, φ.Realize default (Fin.snoc (Subtype.val ∘ x) ↑b))


theorem msb_truncate (x : BitVec w) : (x.truncate (k + 1)).msb = x.getLsb k

(BitVec.truncate (k + 1) x).msb = x.getLsb k


theorem mem_nonZeroDivisors_of_leadingCoeff {p : R[X]} (h : p.leadingCoeff ∈ R⁰) : p ∈ R[X]⁰

(h : p.leadingCoeff ∈ nonZeroDivisors R)


@[to_additive (attr := simp, norm_cast) coe_pos]
theorem one_lt_coe [LT α] : 1 < (a : WithBot α) ↔ 1 < a


/-- Identity map is a relation isomorphism. -/
@[refl, simps! apply]
protected def refl (r : α → α → Prop) : r ≃r r

{α : Type u_1}
(r : α → α → Prop)
(a : α)


/-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ)

(CochainComplex.mappingCone.triangleRotateShortComplex φ).X₁ = (CochainComplex.mappingCone.triangle φ).rotate.obj₁


theorem ssubset_of_ssubset_of_subset {s₁ s₂ s₃ : Finset α} (hs₁s₂ : s₁ ⊂ s₂) (hs₂s₃ : s₂ ⊆ s₃) :
    s₁ ⊂ s₃

{α : Type u_1}
{s₁ s₂ s₃ : Finset α}
(hs₁s₂ : s₁ ⊂ s₂)
(hs₂s₃ : s₂ ⊆ s₃)


/-- The group of `AffineEquiv`s are equivalent to the group of units of `AffineMap`.

This is the affine version of `LinearMap.GeneralLinearGroup.generalLinearEquiv`. -/
@[simps]
def equivUnitsAffineMap : (P₁ ≃ᵃ[k] P₁) ≃* (P₁ →ᵃ[k] P₁)ˣ

{k : Type u_1}
{P₁ : Type u_2}
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(u : (P₁ →ᵃ[k] P₁)ˣ)

(AffineEquiv.equivUnitsAffineMap.symm u).linear =
  (LinearMap.GeneralLinearGroup.generalLinearEquiv k V₁) ((Units.map AffineMap.linearHom) u)


theorem norm_iteratedFDerivWithin_clm_apply_const {f : E → F →L[𝕜] G} {c : F} {s : Set E} {x : E}
    {N : ℕ∞} {n : ℕ} (hf : ContDiffOn 𝕜 N f s) (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) (hn : ↑n ≤ N) :
    ‖iteratedFDerivWithin 𝕜 n (fun y : E => (f y) c) s x‖ ≤
      ‖c‖ * ‖iteratedFDerivWithin 𝕜 n f s x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F →L[𝕜] G}
{c : F}
{s : Set E}
{x : E}
{N : ℕ∞}
{n : ℕ}
(hf : ContDiffOn 𝕜 N f s)
(hs : UniqueDiffOn 𝕜 s)
(hx : x ∈ s)
(hn : ↑n ≤ N)

‖iteratedFDerivWithin 𝕜 n (fun y => (f y) c) s x‖ ≤ ‖c‖ * ‖iteratedFDerivWithin 𝕜 n f s x‖


@[simp]
theorem EuclideanSpace.nndist_single_same (i : ι) (a b : 𝕜) :
    nndist (EuclideanSpace.single i (a : 𝕜)) (EuclideanSpace.single i (b : 𝕜)) = nndist a b

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
[DecidableEq ι]
[Fintype ι]
(i : ι)
(a b : 𝕜)

nndist (EuclideanSpace.single i a) (EuclideanSpace.single i b) = nndist a b


@[to_additive (attr := measurability)]
theorem measurable_leOnePart : Measurable (leOnePart : α → α)

{α : Type u_1}
[Lattice α]
[Group α]
[MeasurableSpace α]
[MeasurableSup α]
[MeasurableInv α]


theorem Matrix.mulVec_injective_iff {R : Type*} [CommRing R] {M : Matrix m n R} :
    Function.Injective M.mulVec ↔ LinearIndependent R (fun i ↦ Mᵀ i)

{m : Type u_4}
{n : Type u_5}
[Fintype n]
{R : Type u_6}
[CommRing R]
{M : Matrix m n R}

Function.Injective M.mulVec ↔ LinearIndependent R fun i => Mᵀ i


@[to_additive]
theorem noncommProd_add (s t : Multiset α) (comm) :
    noncommProd (s + t) comm =
      noncommProd s (comm.mono <| subset_of_le <| s.le_add_right t) *
        noncommProd t (comm.mono <| subset_of_le <| t.le_add_left s)

(comm : {x | x ∈ s + t}.Pairwise Commute)

(s + t).noncommProd comm = s.noncommProd ⋯ * t.noncommProd ⋯


theorem inversion_surjective (c : P) {R : ℝ} (hR : R ≠ 0) : Surjective (inversion c R)

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

Function.Surjective (EuclideanGeometry.inversion c R)


theorem _root_.Set.Finite.eventually_cofinite_nmem {s : Set α} (hs : s.Finite) :
    ∀ᶠ x in cofinite, x ∉ s

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


/-- Product of two infinites sums indexed by arbitrary types.
    See also `tsum_mul_tsum` if `f` and `g` are *not* absolutely summable. -/
theorem tsum_mul_tsum_of_summable_norm [CompleteSpace R] {f : ι → R} {g : ι' → R}
    (hf : Summable fun x => ‖f x‖) (hg : Summable fun x => ‖g x‖) :
    ((∑' x, f x) * ∑' y, g y) = ∑' z : ι × ι', f z.1 * g z.2

{R : Type u_1}
{ι : Type u_2}
{ι' : Type u_3}
[NormedRing R]
[CompleteSpace R]
{f : ι → R}
{g : ι' → R}
(hf : Summable fun x => ‖f x‖)
(hg : Summable fun x => ‖g x‖)


@[simp]
theorem truncate_comp_lift : (WittVector.truncate n).comp (lift _ f_compat) = f n

{f : (k : ℕ) → S →+* TruncatedWittVector p k R}

(f_compat : ∀ (k₁ k₂ : ℕ) (hk : k₁ ≤ k₂), (TruncatedWittVector.truncate hk).comp (f k₂) = f k₁)

(WittVector.truncate n).comp (WittVector.lift f f_compat) = f n


theorem aecover_Ico_of_Ioo (ha : Tendsto a l (𝓝 A)) (hb : Tendsto b l (𝓝 B)) :
    AECover (μ.restrict <| Ico A B) l fun i => Ioo (a i) (b i)

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
[OpensMeasurableSpace α]
{a b : ι → α}
{A B : α}
[MeasureTheory.NoAtoms μ]
(ha : Filter.Tendsto a l (𝓝 A))
(hb : Filter.Tendsto b l (𝓝 B))

MeasureTheory.AECover (μ.restrict (Set.Ico A B)) l fun i => Set.Ioo (a i) (b i)


/-- Replacing the first point by one on the same line does not change twice the oriented angle. -/
theorem _root_.Collinear.two_zsmul_oangle_eq_left {p₁ p₁' p₂ p₃ : P}
    (h : Collinear ℝ ({p₁, p₂, p₁'} : Set P)) (hp₁p₂ : p₁ ≠ p₂) (hp₁'p₂ : p₁' ≠ p₂) :
    (2 : ℤ) • ∡ p₁ p₂ p₃ = (2 : ℤ) • ∡ p₁' p₂ p₃

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

2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₁' p₂ p₃


/-- `algHomOfDvd` sends `AdjoinRoot.root p` to `AdjoinRoot.root q`. -/
theorem algHomOfDvd_apply_root {p q : K[X]} (hpq : q ∣ p) :
    algHomOfDvd hpq (root p) = root q

{K : Type u_1}
[Field K]
{p q : K[X]}
(hpq : q ∣ p)

(AdjoinRoot.algHomOfDvd hpq) (AdjoinRoot.root p) = AdjoinRoot.root q


@[simp] theorem reverse_prefix : reverse l₁ <+: reverse l₂ ↔ l₁ <:+ l₂

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.reverse <+: l₂.reverse ↔ l₁ <:+ l₂


/-- The natural isomorphism between two functors out of the walking pair, specified by its
components. -/
@[simps!]
def mapPairIso (f : F.obj ⟨left⟩ ≅ G.obj ⟨left⟩) (g : F.obj ⟨right⟩ ≅ G.obj ⟨right⟩) : F ≅ G

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

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

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

(X : CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair)

(CategoryTheory.Limits.mapPairIso f g).inv.app X = (CategoryTheory.Limits.WalkingPair.rec f g X.as).inv


@[to_additive (attr := simp)]
protected theorem Commute.map [MulHomClass F M N] (h : Commute x y) (f : F) : Commute (f x) (f y)

{F : Type u_1}
{M : Type u_2}
{N : Type u_3}
[Mul M]
[Mul N]
{x y : M}
[FunLike F M N]
[MulHomClass F M N]
(h : Commute x y)
(f : F)


/-- The separable degree of a polynomial is smaller than its degree. -/
theorem natSepDegree_le_natDegree : f.natSepDegree ≤ f.natDegree


theorem Real.sInf_smul_of_nonneg (ha : 0 ≤ a) (s : Set ℝ) : sInf (a • s) = a • sInf s

{α : Type u_2}
[LinearOrderedField α]
[MulActionWithZero α ℝ]
[OrderedSMul α ℝ]
{a : α}
(ha : 0 ≤ a)
(s : Set ℝ)


theorem StrictConcaveOn.add_concaveOn (hf : StrictConcaveOn 𝕜 s f) (hg : ConcaveOn 𝕜 s g) :
    StrictConcaveOn 𝕜 s (f + g)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedCancelAddCommMonoid β]
[SMul 𝕜 E]
[DistribMulAction 𝕜 β]
{s : Set E}
{f g : E → β}
(hf : StrictConcaveOn 𝕜 s f)
(hg : ConcaveOn 𝕜 s g)


theorem eigenvectorUnitary_mulVec (j : n) :
    eigenvectorUnitary hA *ᵥ Pi.single j 1 = ⇑(hA.eigenvectorBasis j)

{𝕜 : Type u_1}
[RCLike 𝕜]
{n : Type u_2}
[Fintype n]
{A : Matrix n n 𝕜}
[DecidableEq n]
(hA : A.IsHermitian)
(j : n)

(↑hA.eigenvectorUnitary).mulVec (Pi.single j 1) = (WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis j)


theorem image_tan_Ioo : tan '' Ioo (-(π / 2)) (π / 2) = univ

Real.tan '' Set.Ioo (-(Real.pi / 2)) (Real.pi / 2) = Set.univ


theorem IsUpperSet.inter (hs : IsUpperSet s) (ht : IsUpperSet t) : IsUpperSet (s ∩ t)

{α : Type u_1}
[LE α]
{s t : Set α}
(hs : IsUpperSet s)
(ht : IsUpperSet t)


/-- `lift φ` is the only prefunctor extending `φ` and preserving reverses. -/
theorem lift_unique [HasReverse V'] (φ : V ⥤q V') (Φ : Symmetrify V ⥤q V') (hΦ : (of ⋙q Φ) = φ)
    (hΦinv : ∀ {X Y : Symmetrify V} (f : X ⟶ Y),
      Φ.map (Quiver.reverse f) = Quiver.reverse (Φ.map f)) :
    Φ = Symmetrify.lift φ

(hΦinv : ∀ {X Y : Quiver.Symmetrify V} (f : X ⟶ Y), Φ.map (Quiver.reverse f) = Quiver.reverse (Φ.map f))


theorem factorization_eq_zero_of_not_dvd {n p : ℕ} (h : ¬p ∣ n) : n.factorization p = 0


theorem monotone_mul_left_of_nonneg [PosMulMono α]
    (ha : 0 ≤ a) : Monotone fun x => a * x

{α : Type u}
[Semiring α]
[Preorder α]
{a : α}
[PosMulMono α]
(ha : 0 ≤ a)


@[simp]
theorem toDual_inf [Inf α] (a b : α) : toDual (a ⊓ b) = toDual a ⊔ toDual b

OrderDual.toDual (a ⊓ b) = OrderDual.toDual a ⊔ OrderDual.toDual b


theorem smul_ne_zero_iff : c • x ≠ 0 ↔ c ≠ 0 ∧ x ≠ 0

{R : Type u_2}
{M : Type u_5}
[Zero R]
[Zero M]
[SMulWithZero R M]
[NoZeroSMulDivisors R M]
{c : R}
{x : M}


theorem descFactorial_lt_pow {n : ℕ} (hn : 1 ≤ n) : ∀ {k : ℕ}, 2 ≤ k → n.descFactorial k < n ^ k


@[simp]
theorem ListBlank.cons_bind {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (a : Γ) (l : ListBlank Γ)
    (f : Γ → List Γ') (hf) : (l.cons a).bind f hf = (l.bind f hf).append (f a)

(hf : ∃ n, f default = List.replicate n default)

(Turing.ListBlank.cons a l).bind f hf = Turing.ListBlank.append (f a) (l.bind f hf)


@[simp, norm_cast]
theorem val_zero : ((0 : s) : R) = 0

{R : Type u}
[NonUnitalNonAssocRing R]
(s : NonUnitalSubring R)


theorem prime_mul_iff {a b : ℕ} : Nat.Prime (a * b) ↔ a.Prime ∧ b = 1 ∨ b.Prime ∧ a = 1

Nat.Prime (a * b) ↔ Nat.Prime a ∧ b = 1 ∨ Nat.Prime b ∧ a = 1


theorem omega_le_of_isLimit {o} (h : IsLimit o) : ω ≤ o


theorem isPrime_of_mem_or_compl_mem [IsProper I] (h : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I) : IsPrime I

{P : Type u_1}
[BooleanAlgebra P]
{I : Order.Ideal P}
[I.IsProper]
(h : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I)


theorem exp_transpose (A : Matrix m m 𝔸) : exp 𝕂 Aᵀ = (exp 𝕂 A)ᵀ

(𝕂 : Type u_1)
{m : Type u_2}
{𝔸 : Type u_6}
[Fintype m]
[DecidableEq m]
[Field 𝕂]
[CommRing 𝔸]
[TopologicalSpace 𝔸]
[TopologicalRing 𝔸]
[Algebra 𝕂 𝔸]
[T2Space 𝔸]
(A : Matrix m m 𝔸)

NormedSpace.exp 𝕂 Aᵀ = (NormedSpace.exp 𝕂 A)ᵀ


@[simp]
lemma const_down_toOrderHom (n : ℕ) (k : Fin (n+1)) (m : SimplexCategoryᵒᵖ) :
    (const n k m).down.toOrderHom = OrderHom.const _ k

(n : ℕ)
(k : Fin (n + 1))
(m : SimplexCategoryᵒᵖ)

SimplexCategory.Hom.toOrderHom (SSet.standardSimplex.const n k m).down =
  (OrderHom.const (Fin ((Opposite.unop m).len + 1))) k


/-- A topological space is discrete if every set is open, that is,
  its topology equals the discrete topology `⊥`. -/
class DiscreteTopology (α : Type*) [t : TopologicalSpace α] : Prop where
  /-- The `TopologicalSpace` structure on a type with discrete topology is equal to `⊥`. -/
  eq_bot : t = ⊥

{α : Type u_2}
[t : TopologicalSpace α]
[self : DiscreteTopology α]


@[elementwise (attr := simp)]
theorem coequalizerIso_π_comp_hom :
    coequalizer.π f g ≫ (coequalizerIso f g).hom = Quot.mk (CoequalizerRel f g)

CategoryTheory.Limits.coequalizer.π f g ≫ (CategoryTheory.Limits.Types.coequalizerIso f g).hom =
  Quot.mk (CategoryTheory.Limits.Types.CoequalizerRel f g)


@[to_additive]
theorem inv_subset : s⁻¹ ⊆ t ↔ s ⊆ t⁻¹

{α : Type u_2}
[InvolutiveNeg α]
{s t : Set α}


@[to_additive (attr := simp)]
theorem map_mul' (f : α → β) (x y : FreeSemigroup α) : f <$> (x * y) = f <$> x * f <$> y

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


/-- **Tietze extension theorem** for real-valued bounded continuous maps, a version for a closed
embedding and a bounded continuous function that takes values in a non-trivial closed interval.
See also `exists_extension_forall_mem_of_closedEmbedding` for a more general statement that works
for any interval (finite or infinite, open or closed).

If `e : X → Y` is a closed embedding and `f : X →ᵇ ℝ` is a bounded continuous function such that
`f x ∈ [a, b]` for all `x`, where `a ≤ b`, then there exists a bounded continuous function
`g : Y →ᵇ ℝ` such that `g y ∈ [a, b]` for all `y` and `g ∘ e = f`. -/
theorem exists_extension_forall_mem_Icc_of_closedEmbedding (f : X →ᵇ ℝ) {a b : ℝ} {e : X → Y}
    (hf : ∀ x, f x ∈ Icc a b) (hle : a ≤ b) (he : ClosedEmbedding e) :
    ∃ g : Y →ᵇ ℝ, (∀ y, g y ∈ Icc a b) ∧ g ∘ e = f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[NormalSpace Y]
(f : X →ᵇ ℝ)
{a b : ℝ}
{e : X → Y}
(hf : ∀ (x : X), f x ∈ Set.Icc a b)
(hle : a ≤ b)
(he : ClosedEmbedding e)

∃ g, (∀ (y : Y), g y ∈ Set.Icc a b) ∧ ⇑g ∘ e = ⇑f


theorem continuous_sup_dom {t₁ t₂ : TopologicalSpace α} {t₃ : TopologicalSpace β} :
    Continuous[t₁ ⊔ t₂, t₃] f ↔ Continuous[t₁, t₃] f ∧ Continuous[t₂, t₃] f

{α : Type u}
{β : Type v}
{f : α → β}
{t₁ t₂ : TopologicalSpace α}
{t₃ : TopologicalSpace β}

Continuous f ↔ Continuous f ∧ Continuous f


theorem extension₂_coe_coe (hf : UniformContinuous₂ f) (a : α) (b : β) :
    Completion.extension₂ f a b = f a b

{α : Type u_1}
[UniformSpace α]
{β : Type u_2}
[UniformSpace β]
{γ : Type u_3}
[UniformSpace γ]
{f : α → β → γ}
[T0Space γ]
(hf : UniformContinuous₂ f)
(a : α)
(b : β)

UniformSpace.Completion.extension₂ f (↑α a) (↑β b) = f a b


@[simp] theorem mul_def {a b : Int} : Int.mul a b = a * b


lemma exponentialPDF_of_nonneg {r x : ℝ} (hx : 0 ≤ x) :
    exponentialPDF r x = ENNReal.ofReal (r * rexp (-(r * x)))

ProbabilityTheory.exponentialPDF r x = ENNReal.ofReal (r * rexp (-(r * x)))


theorem lift'_cong (hh : ∀ s ∈ f, h₁ s = h₂ s) : f.lift' h₁ = f.lift' h₂

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{h₁ h₂ : Set α → Set β}
(hh : ∀ s ∈ f, h₁ s = h₂ s)


theorem traceMatrix_of_matrix_mulVec [Fintype κ] (b : κ → B) (P : Matrix κ κ A) :
    traceMatrix A (P.map (algebraMap A B) *ᵥ b) = P * traceMatrix A b * Pᵀ

{κ : Type w}
{A : Type u}
{B : Type v}
[CommRing A]
[CommRing B]
[Algebra A B]
[Fintype κ]
(b : κ → B)
(P : Matrix κ κ A)

Algebra.traceMatrix A (P.map ⇑(algebraMap A B) *ᵥ b) = P * Algebra.traceMatrix A b * Pᵀ


theorem span_lt_top_of_card_lt_finrank {s : Set M} [Fintype s]
    (card_lt : s.toFinset.card < finrank R M) : span R s < ⊤

(card_lt : s.toFinset.card < FiniteDimensional.finrank R M)


@[to_additive (attr := simp)]
theorem mulSupport_mulIndicator :
    Function.mulSupport (s.mulIndicator f) = s ∩ Function.mulSupport f

{α : Type u_1}
{M : Type u_4}
[Zero M]
{s : Set α}
{f : α → M}

Function.support (s.indicator f) = s ∩ Function.support f


theorem minimalPeriod_eq_zero_of_nmem_periodicPts (hx : x ∉ periodicPts f) :
    minimalPeriod f x = 0

{α : Type u_1}
{f : α → α}
{x : α}
(hx : x ∉ Function.periodicPts f)


/-- A continuous function on a compact space has automatically compact support. This is not an
instance to avoid type class loops. -/
lemma of_compactSpace (G : Type*) [FunLike G α β]
    [ContinuousMapClass G α β] [CompactSpace α] : CompactlySupportedContinuousMapClass G α β

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Zero β]
[TopologicalSpace β]
(G : Type u_5)
[FunLike G α β]
[ContinuousMapClass G α β]
[CompactSpace α]


/-- Given a smooth manifold modelled on a finite dimensional space `E`,
`f : SmoothBumpFunction I M` is a smooth function on `M` such that in the extended chart `e` at
`f.c`:

* `f x = 1` in the closed ball of radius `f.rIn` centered at `f.c`;
* `f x = 0` outside of the ball of radius `f.rOut` centered at `f.c`;
* `0 ≤ f x ≤ 1` for all `x`.

The structure contains data required to construct a function with these properties. The function is
available as `⇑f` or `f x`. Formal statements of the properties listed above involve some
(pre)images under `extChartAt I f.c` and are given as lemmas in the `SmoothBumpFunction`
namespace. -/
structure SmoothBumpFunction (c : M) extends ContDiffBump (extChartAt I c c) where
  closedBall_subset : closedBall (extChartAt I c c) rOut ∩ range I ⊆ (extChartAt I c).target

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{c : M}
(self : SmoothBumpFunction I c)

Metric.closedBall (↑(extChartAt I c) c) self.rOut ∩ Set.range ↑I ⊆ (extChartAt I c).target


/-- The generator of the kernel of the unique homomorphism ℕ → R for a semiring R.

*Warning*: for a semiring `R`, `CharP R 0` and `CharZero R` need not coincide.
* `CharP R 0` asks that only `0 : ℕ` maps to `0 : R` under the map `ℕ → R`;
* `CharZero R` requires an injection `ℕ ↪ R`.

For instance, endowing `{0, 1}` with addition given by `max` (i.e. `1` is absorbing), shows that
`CharZero {0, 1}` does not hold and yet `CharP {0, 1} 0` does.
This example is formalized in `Counterexamples/CharPZeroNeCharZero.lean`.
-/
@[mk_iff]
class _root_.CharP : Prop where
  cast_eq_zero_iff' : ∀ x : ℕ, (x : R) = 0 ↔ p ∣ x

{R : Type u_1}
[AddMonoidWithOne R]
{p : ℕ}
[self : CharP R p]
(x : ℕ)


theorem isCycle_formPerm (s : Cycle α) (h : Nodup s) (hn : Nontrivial s) :
    IsCycle (formPerm s h)

{α : Type u_1}
[DecidableEq α]
(s : Cycle α)
(h : s.Nodup)
(hn : s.Nontrivial)


theorem CliqueFree.not_farFromTriangleFree (hG : G.CliqueFree 3) (hε : 0 < ε) :
    ¬G.FarFromTriangleFree ε

{α : Type u_1}
{𝕜 : Type u_3}
[LinearOrderedField 𝕜]
{G : SimpleGraph α}
{ε : 𝕜}
[Fintype α]
[DecidableRel G.Adj]
[Nonempty α]
(hG : G.CliqueFree 3)
(hε : 0 < ε)


@[to_additive]
theorem torsionMulEquiv_apply (tG : IsTorsion G) (a : torsion G) :
    tG.torsionMulEquiv a = MulEquiv.submonoidCongr tG.torsion_eq_top a

{G : Type u_1}
[CommMonoid G]
(tG : Monoid.IsTorsion G)
(a : ↥(CommMonoid.torsion G))

tG.torsionMulEquiv a = ↑((MulEquiv.submonoidCongr ⋯) a)


theorem unique_continuousLinearEquivOfBilin (coercive : IsCoercive B) {v f : V}
    (is_lax_milgram : ∀ w, ⟪f, w⟫_ℝ = B v w) : f = coercive.continuousLinearEquivOfBilin v

(is_lax_milgram : ∀ (w : V), ⟪f, w⟫_ℝ = (B v) w)


@[reassoc]
theorem adjointify_η_ε (X : C) :
    F.map ((adjointifyη η ε).hom.app X) ≫ ε.hom.app (F.obj X) = 𝟙 (F.obj X)

(η : CategoryTheory.Functor.id C ≅ F.comp G)

(ε : G.comp F ≅ CategoryTheory.Functor.id D)

CategoryTheory.CategoryStruct.comp (F.map ((CategoryTheory.Equivalence.adjointifyη η ε).hom.app X))
    (ε.hom.app (F.obj X)) =
  CategoryTheory.CategoryStruct.id (F.obj X)


protected theorem le_of_add_le_add_right : a ≠ ∞ → b + a ≤ c + a → b ≤ c


theorem monomial_left_injective {r : R} (hr : r ≠ 0) :
    Function.Injective fun s : σ →₀ ℕ => monomial s r

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{r : R}
(hr : r ≠ 0)

Function.Injective fun s => (MvPolynomial.monomial s) r


/-- The L-series of the constant sequence `1` and of the Möbius function are inverses. -/
lemma LSeries_one_mul_Lseries_moebius {s : ℂ} (hs : 1 < s.re) : L 1 s * L ↗μ s = 1

L 1 s * L (fun n => ↑(ArithmeticFunction.moebius n)) s = 1


@[simp]
theorem Monotone.functor_obj {f : X → Y} (h : Monotone f) : h.functor.obj = f

{X : Type u}
{Y : Type v}
[Preorder X]
[Preorder Y]
{f : X → Y}
(h : Monotone f)


theorem monic_mul_leadingCoeff_inv {p : K[X]} (h : p ≠ 0) : Monic (p * C (leadingCoeff p)⁻¹)

{K : Type u_1}
[DivisionRing K]
{p : K[X]}
(h : p ≠ 0)

(p * Polynomial.C p.leadingCoeff⁻¹).Monic


theorem coe_injective : Injective Real.toEReal


/-- The restriction of a sheafed space `X` to the top subspace is isomorphic to `X` itself.
-/
@[simps! hom inv]
def restrictTopIso (X : SheafedSpace C) : X.restrict (Opens.openEmbedding ⊤) ≅ X

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


@[simp]
theorem log_pow (x : ℝ) (n : ℕ) : log (x ^ n) = n * log x


/-- Analogous construction of `FiberBundleCore` for vector bundles. This
construction gives a way to construct vector bundles from a structure registering how
trivialization changes act on fibers. -/
structure VectorBundleCore (ι : Type*) where
  baseSet : ι → Set B
  isOpen_baseSet : ∀ i, IsOpen (baseSet i)
  indexAt : B → ι
  mem_baseSet_at : ∀ x, x ∈ baseSet (indexAt x)
  coordChange : ι → ι → B → F →L[R] F
  coordChange_self : ∀ i, ∀ x ∈ baseSet i, ∀ v, coordChange i i x v = v
  continuousOn_coordChange : ∀ i j, ContinuousOn (coordChange i j) (baseSet i ∩ baseSet j)
  coordChange_comp : ∀ i j k, ∀ x ∈ baseSet i ∩ baseSet j ∩ baseSet k, ∀ v,
    (coordChange j k x) (coordChange i j x v) = coordChange i k x v

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(self : VectorBundleCore R B F ι)
(i j : ι)

ContinuousOn (self.coordChange i j) (self.baseSet i ∩ self.baseSet j)


protected theorem min [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι} (hτ : IsStoppingTime f τ)
    (hπ : IsStoppingTime f π) : IsStoppingTime f fun ω => min (τ ω) (π ω)

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ π : Ω → ι}
(hτ : MeasureTheory.IsStoppingTime f τ)
(hπ : MeasureTheory.IsStoppingTime f π)

MeasureTheory.IsStoppingTime f fun ω => min (τ ω) (π ω)


theorem le_seq {f : Filter (α → β)} {g : Filter α} {h : Filter β}
    (hh : ∀ t ∈ f, ∀ u ∈ g, Set.seq t u ∈ h) : h ≤ seq f g

{α : Type u}
{β : Type v}
{f : Filter (α → β)}
{g : Filter α}
{h : Filter β}
(hh : ∀ t ∈ f, ∀ u ∈ g, t.seq u ∈ h)


@[to_additive]
lemma surjective_smul (x : α) : Surjective fun c : M ↦ c • x

(M : Type u_1)
{α : Type u_7}
[VAdd M α]
[AddAction.IsPretransitive M α]
(x : α)


theorem singularPart_add (μ₁ μ₂ ν : Measure α) [HaveLebesgueDecomposition μ₁ ν]
    [HaveLebesgueDecomposition μ₂ ν] :
    (μ₁ + μ₂).singularPart ν = μ₁.singularPart ν + μ₂.singularPart ν

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


@[simp]
theorem image_id [DecidableEq α] : s.image id = s

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


@[simp]
lemma isoClosure_isoClosure (P : MorphismProperty C) :
    P.isoClosure.isoClosure = P.isoClosure

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


theorem sups_union_left : (s₁ ∪ s₂) ⊻ t = s₁ ⊻ t ∪ s₂ ⊻ t

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


/-- If an initial object `I` exists in a CCC then it is a strict initial object,
i.e. any morphism to `I` is an iso.
This actually shows a slightly stronger version: any morphism to an initial object from an
exponentiable object is an isomorphism.
-/
theorem strict_initial {I : C} (t : IsInitial I) (f : A ⟶ I) : IsIso f


theorem true_iff_false : (True ↔ False) ↔ False


theorem selfAdjointPart_comp_subtype_skewAdjoint :
    (selfAdjointPart R).comp (skewAdjoint.submodule R A).subtype = 0

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

selfAdjointPart R ∘ₗ (skewAdjoint.submodule R A).subtype = 0


theorem reindexLinearEquiv_comp (e₁ : m ≃ m') (e₂ : n ≃ n') (e₁' : m' ≃ m'') (e₂' : n' ≃ n'') :
    reindexLinearEquiv R A e₁' e₂' ∘ reindexLinearEquiv R A e₁ e₂ =
      reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂')

{m : Type u_2}
{n : Type u_3}
{m' : Type u_6}
{n' : Type u_7}
{m'' : Type u_9}
{n'' : Type u_10}
(R : Type u_11)
(A : Type u_12)
[Semiring R]
[AddCommMonoid A]
[Module R A]
(e₁ : m ≃ m')
(e₂ : n ≃ n')
(e₁' : m' ≃ m'')
(e₂' : n' ≃ n'')

⇑(Matrix.reindexLinearEquiv R A e₁' e₂') ∘ ⇑(Matrix.reindexLinearEquiv R A e₁ e₂) =
  ⇑(Matrix.reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂'))


lemma coe_comp {X Y Z : CommSemiRingCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f


@[to_additive]
theorem minimalPeriod_eq_card [Fintype (orbit (zpowers a) b)] :
    minimalPeriod (a • ·) b = Fintype.card (orbit (zpowers a) b)

[Fintype ↑(AddAction.orbit (↥(AddSubgroup.zmultiples a)) b)]

Function.minimalPeriod (fun x => a +ᵥ x) b = Fintype.card ↑(AddAction.orbit (↥(AddSubgroup.zmultiples a)) b)


@[simp]
theorem Differentiable.cexp (hc : Differentiable 𝕜 f) :
    Differentiable 𝕜 fun x => Complex.exp (f x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[NormedAlgebra 𝕜 ℂ]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : E → ℂ}
(hc : Differentiable 𝕜 f)


/-- Let `p` be a prime in the Dedekind domain `R` and `S` be an integral extension of `R`,
then the localization `Sₚ` of `S` at `p` is a PID. -/
theorem IsDedekindDomain.isPrincipalIdealRing_localization_over_prime [IsDomain S] :
    IsPrincipalIdealRing Sₚ

[IsLocalization (Algebra.algebraMapSubmonoid S p.primeCompl) Sₚ]


theorem derivWithin_zpow (hxs : UniqueDiffWithinAt 𝕜 s x) (h : x ≠ 0 ∨ 0 ≤ m) :
    derivWithin (fun x => x ^ m) s x = (m : 𝕜) * x ^ (m - 1)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{m : ℤ}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(h : x ≠ 0 ∨ 0 ≤ m)

derivWithin (fun x => x ^ m) s x = ↑m * x ^ (m - 1)


@[simp] theorem Matrix.vecMulLinear_apply [Fintype m] (M : Matrix m n R) (x : m → R) :
    M.vecMulLinear x = x ᵥ* M

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


nonrec theorem ContinuousWithinAt.vsub {f g : α → P} {x : α} {s : Set α}
    (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g s x) :
    ContinuousWithinAt (f -ᵥ g) s x

{α : Type u_1}
{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[TopologicalSpace α]
{f g : α → P}
{x : α}
{s : Set α}
(hf : ContinuousWithinAt f s x)
(hg : ContinuousWithinAt g s x)


theorem continuous_circleTransformDeriv {R : ℝ} (hR : 0 < R) {f : ℂ → E} {z w : ℂ}
    (hf : ContinuousOn f (sphere z R)) (hw : w ∈ ball z R) :
    Continuous (circleTransformDeriv R z w f)

(hf : ContinuousOn f (Metric.sphere z R))

Continuous (Complex.circleTransformDeriv R z w f)


@[simp]
theorem aevalTower_ofId : aevalTower (Algebra.ofId S A') = aeval

{S : Type v}
{A' : Type u_1}
[CommSemiring A']
[CommSemiring S]
[Algebra S A']

Polynomial.aevalTower (Algebra.ofId S A') = Polynomial.aeval


/-- The negated addition of two nonsingular affine points in `W` on a sloped line is nonsingular. -/
lemma nonsingular_negAdd {x₁ x₂ y₁ y₂ : F} (h₁ : W.Nonsingular x₁ y₁) (h₂ : W.Nonsingular x₂ y₂)
    (hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂) : W.Nonsingular
      (W.addX x₁ x₂ <| W.slope x₁ x₂ y₁ y₂) (W.negAddY x₁ x₂ y₁ <| W.slope x₁ x₂ y₁ y₂)

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x₁ x₂ y₁ y₂ : F}
(h₁ : W.Nonsingular x₁ y₁)
(h₂ : W.Nonsingular x₂ y₂)
(hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂)

W.Nonsingular (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) (W.negAddY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂))


theorem uniformity_prod_eq_prod [UniformSpace α] [UniformSpace β] :
    𝓤 (α × β) = map (fun p : (α × α) × β × β => ((p.1.1, p.2.1), (p.1.2, p.2.2))) (𝓤 α ×ˢ 𝓤 β)

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


@[simp]
theorem support_neg : (-p).support = p.support

{R : Type u}
(σ : Type u_1)
[CommRing R]
{p : MvPolynomial σ R}


theorem mem_Ici_of_Ioi (h : x ∈ Ioi a) : x ∈ Ici a

{α : Type u_1}
[Preorder α]
{a x : α}
(h : x ∈ Set.Ioi a)


@[simp]
theorem countable_iUnion_iff [Countable ι] {t : ι → Set α} :
    (⋃ i, t i).Countable ↔ ∀ i, (t i).Countable

{α : Type u}
{ι : Sort x}
[Countable ι]
{t : ι → Set α}

(⋃ i, t i).Countable ↔ ∀ (i : ι), (t i).Countable


lemma lt_iff_exists_filter_lt :
    toColex s < toColex t ↔ ∃ w ∈ t \ s, s.filter (w < ·) = t.filter (w < ·)

{α : Type u_1}
[LinearOrder α]
{s t : Finset α}

{ ofColex := s } < { ofColex := t } ↔ ∃ w ∈ t \ s, Finset.filter (fun x => w < x) s = Finset.filter (fun x => w < x) t


@[to_additive isBounded_iff_forall_norm_le]
lemma isBounded_iff_forall_norm_le' : Bornology.IsBounded s ↔ ∃ C, ∀ x ∈ s, ‖x‖ ≤ C

{E : Type u_3}
[SeminormedGroup E]
{s : Set E}


@[simp]
theorem range_filter_eq {n m : ℕ} : (range n).filter (· = m) = if m < n then {m} else ∅

Finset.filter (fun x => x = m) (Finset.range n) = if m < n then {m} else ∅


@[simp]
theorem natDegree_of_a_ne_zero' (ha : a ≠ 0) : (toPoly ⟨a, b, c, d⟩).natDegree = 3

{R : Type u_1}
{a b c d : R}
[Semiring R]
(ha : a ≠ 0)

{ a := a, b := b, c := c, d := d }.toPoly.natDegree = 3


theorem support_eq : Function.support f = Metric.ball c f.rOut

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[HasContDiffBump E]
{c : E}
(f : ContDiffBump c)

Function.support ↑f = Metric.ball c f.rOut


lemma Algebra.intNorm_eq_of_isLocalization (x : B) :
    algebraMap A Aₘ (Algebra.intNorm A B x) = Algebra.intNorm Aₘ Bₘ (algebraMap B Bₘ x)

[IsLocalization (Algebra.algebraMapSubmonoid B M) Bₘ]

[Algebra.IsSeparable (FractionRing A) (FractionRing B)]

[Algebra.IsSeparable (FractionRing Aₘ) (FractionRing Bₘ)]

(algebraMap A Aₘ) ((Algebra.intNorm A B) x) = (Algebra.intNorm Aₘ Bₘ) ((algebraMap B Bₘ) x)


@[to_additive]
theorem measure_zero_of_invariant (h : IsFundamentalDomain G s μ) (t : Set α)
    (ht : ∀ g : G, g • t = t) (hts : μ (t ∩ s) = 0) : μ t = 0

[MeasureTheory.VAddInvariantMeasure G α μ]

(h : MeasureTheory.IsAddFundamentalDomain G s μ)


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


@[simp]
theorem Quiver.starEquivCostar_symm_apply {u v : U} (e : u ⟶ v) :
    (Quiver.starEquivCostar v).symm (Quiver.Costar.mk e) = Quiver.Star.mk (reverse e)

{U : Type u_1}
[Quiver U]
[Quiver.HasInvolutiveReverse U]
{u v : U}
(e : u ⟶ v)

(Quiver.starEquivCostar v).symm (Quiver.Costar.mk e) = Quiver.Star.mk (Quiver.reverse e)


theorem swapTrue_mem_C1 (f : π (C1 C ho) (ord I · < o)) :
    SwapTrue o f.val ∈ C1 C ho

(hsC : Profinite.NobelingProof.contained C (Order.succ o))

(ho : o < Ordinal.type fun x x_1 => x < x_1)

(f : ↑(Profinite.NobelingProof.π (Profinite.NobelingProof.C1 C ho) fun x => Profinite.NobelingProof.ord I x < o))

Profinite.NobelingProof.SwapTrue o ↑f ∈ Profinite.NobelingProof.C1 C ho


@[to_additive]
theorem sound (U : Set (G ⧸ N)) (g : N.op) :
    g • (mk' N) ⁻¹' U = (mk' N) ⁻¹' U

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]
(U : Set (G ⧸ N))
(g : ↥N.op)

g • ⇑(QuotientGroup.mk' N) ⁻¹' U = ⇑(QuotientGroup.mk' N) ⁻¹' U


theorem exists_locallyConstant_finite_aux {α : Type*} [Finite α] (hC : IsLimit C)
    (f : LocallyConstant C.pt α) : ∃ (j : J) (g : LocallyConstant (F.obj j) (α → Fin 2)),
      (f.map fun a b => if a = b then (0 : Fin 2) else 1) = g.comap (C.π.app _)

{F : CategoryTheory.Functor J Profinite}

∃ j g, LocallyConstant.map (fun a b => if a = b then 0 else 1) f = LocallyConstant.comap (C.π.app j) g


theorem mem_addGroupFilterBasis_iff {V : Set A} :
    V ∈ hB.toRingFilterBasis.toAddGroupFilterBasis ↔ ∃ i, V = B i

{A : Type u_1}
{ι : Type u_2}
[Ring A]
[Nonempty ι]
{B : ι → AddSubgroup A}
(hB : RingSubgroupsBasis B)
{V : Set A}

V ∈ RingFilterBasis.toAddGroupFilterBasis ↔ ∃ i, V = ↑(B i)


theorem foldl_hom (f : α₁ → α₂) (g₁ : α₁ → β → α₁) (g₂ : α₂ → β → α₂) (l : List β) (init : α₁)
    (H : ∀ x y, g₂ (f x) y = f (g₁ x y)) : l.foldl g₂ (f init) = f (l.foldl g₁ init)

(f : α₁ → α₂)

(g₁ : α₁ → β → α₁)

(g₂ : α₂ → β → α₂)

(H : ∀ (x : α₁) (y : β), g₂ (f x) y = f (g₁ x y))

List.foldl g₂ (f init) l = f (List.foldl g₁ init l)


theorem map_comp : map σ (g.comp f) = (map σ g).comp (map σ f)

{σ : Type u_1}
{R : Type u_2}
{S : Type u_3}
{T : Type u_4}
[Semiring R]
[Semiring S]
[Semiring T]
(f : R →+* S)
(g : S →+* T)

MvPowerSeries.map σ (g.comp f) = (MvPowerSeries.map σ g).comp (MvPowerSeries.map σ f)


theorem IsBigO.eq_zero_of_norm_pow {f : E'' → F''} {x₀ : E''} {n : ℕ}
    (h : f =O[𝓝 x₀] fun x => ‖x - x₀‖ ^ n) (hn : n ≠ 0) : f x₀ = 0

{E'' : Type u_9}
{F'' : Type u_10}
[NormedAddCommGroup E'']
[NormedAddCommGroup F'']
{f : E'' → F''}
{x₀ : E''}
{n : ℕ}
(h : f =O[𝓝 x₀] fun x => ‖x - x₀‖ ^ n)
(hn : n ≠ 0)


@[simp]
theorem QuotientAddGroup.equivIcoMod_zero (a : α) :
    QuotientAddGroup.equivIcoMod hp a 0 = ⟨toIcoMod hp a 0, toIcoMod_mem_Ico hp a _⟩

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

(QuotientAddGroup.equivIcoMod hp a) 0 = ⟨toIcoMod hp a 0, ⋯⟩


@[simp]
theorem symm_hom (α : X ≅ Y) : α.symm.hom = α.inv

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


theorem condexpIndL1_of_measurableSet_of_measure_ne_top (hs : MeasurableSet s) (hμs : μ s ≠ ∞)
    (x : G) : condexpIndL1 hm μ s x = condexpIndL1Fin hm hs hμs x

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[NormedSpace ℝ G]
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
(x : G)

MeasureTheory.condexpIndL1 hm μ s x = MeasureTheory.condexpIndL1Fin hm hs hμs x


/-- For a primitive Dirichlet character `χ`, the Fourier transform of `χ` is a constant multiple
of `χ⁻¹` (and the constant is essentially the Gauss sum). -/
lemma fourierTransform_eq_inv_mul_gaussSum (k : ZMod N) (hχ : IsPrimitive χ) :
    𝓕 χ k = χ⁻¹ (-k) * gaussSum χ stdAddChar

{N : ℕ}
[NeZero N]
(χ : DirichletCharacter ℂ N)
(k : ZMod N)
(hχ : χ.IsPrimitive)

𝓕 (⇑χ) k = χ⁻¹ (-k) * gaussSum χ ZMod.stdAddChar


@[simp] theorem shiftRight_zero : n >>> 0 = n


theorem continuousAt_sign_of_pos {a : α} (h : 0 < a) : ContinuousAt SignType.sign a

{α : Type u_1}
[Zero α]
[TopologicalSpace α]
[PartialOrder α]
[DecidableRel fun x x_1 => x < x_1]
[OrderTopology α]
{a : α}
(h : 0 < a)


theorem subset_singleton_iff_eq {s : Set α} {x : α} : s ⊆ {x} ↔ s = ∅ ∨ s = {x}


@[simp]
theorem coprime_pow_right_iff {n : ℕ} (hn : 0 < n) (a b : ℕ) :
    Nat.Coprime a (b ^ n) ↔ Nat.Coprime a b


/-- Given a cocone `c` over `F`, we can interpret the legs of `c` as costructured arrows
    `F.obj - ⟶ c.pt`. -/
@[simps]
def Cocone.toCostructuredArrow {F : J ⥤ C} (c : Cocone F) : J ⥤ CostructuredArrow F c.pt

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : CategoryTheory.Functor J C}
(c : CategoryTheory.Limits.Cocone F)

∀ {X Y : J} (f : X ⟶ Y), c.toCostructuredArrow.map f = CategoryTheory.CostructuredArrow.homMk f ⋯


/-- The equivalence between `ℕ` and `Finset ℕ` that maps `∑ i in s, 2^i` to `s`. -/
@[simps] def equivBitIndices : ℕ ≃ Finset ℕ

Finset.equivBitIndices n = n.bitIndices.toFinset


/-- If the `R`-integral element `a : S` has coordinates `< y` with respect to some basis `b`,
its norm is strictly less than `normBound abv b * y ^ dim S`. -/
theorem norm_lt {T : Type*} [LinearOrderedRing T] (a : S) {y : T}
    (hy : ∀ k, (abv (bS.repr a k) : T) < y) :
    (abv (Algebra.norm R a) : T) < normBound abv bS * y ^ Fintype.card ι

(hy : ∀ (k : ι), ↑(abv ((bS.repr a) k)) < y)

↑(abv ((Algebra.norm R) a)) < ↑(ClassGroup.normBound abv bS) * y ^ Fintype.card ι


theorem eval_πs_image {l : Products I} {o : Ordinal}
    (hl : ∀ i ∈ l.val, ord I i < o) : eval C '' { m | m < l } =
    (πs C o) '' (eval (π C (ord I · < o)) '' { m | m < l })

{l : Profinite.NobelingProof.Products I}

(hl : ∀ i ∈ ↑l, Profinite.NobelingProof.ord I i < o)

Profinite.NobelingProof.Products.eval C '' {m | m < l} =
  ⇑(Profinite.NobelingProof.πs C o) ''
    (Profinite.NobelingProof.Products.eval (Profinite.NobelingProof.π C fun x => Profinite.NobelingProof.ord I x < o) ''
      {m | m < l})


@[to_additive (attr := simp)]
theorem haar_singleton [TopologicalGroup G] [BorelSpace G] (g : G) : μ {g} = μ {(1 : G)}

{G : Type u_2}
[MeasurableSpace G]
[AddGroup G]
[TopologicalSpace G]
(μ : MeasureTheory.Measure G)
[μ.IsAddHaarMeasure]
[TopologicalAddGroup G]
[BorelSpace G]
(g : G)


/-- `Finsupp.split` is an additive equivalence between `(Σ i, η i) →₀ N` and `Π₀ i, (η i →₀ N)`. -/
@[simps]
def sigmaFinsuppAddEquivDFinsupp [AddZeroClass N] : ((Σi, η i) →₀ N) ≃+ Π₀ i, η i →₀ N

{ι : Type u_1}
{η : ι → Type u_4}
{N : Type u_5}
[AddZeroClass N]
(a : (i : ι) × η i →₀ N)

sigmaFinsuppAddEquivDFinsupp a = sigmaFinsuppEquivDFinsupp a


/-- Given a Lie module `M` of a Lie algebra `L` with coefficients in `R`, if a function `χ : L → R`
has a simultaneous generalized eigenvector for the action of `L` then it has a simultaneous true
eigenvector, provided `M` is Noetherian and has linear weights. -/
lemma exists_forall_lie_eq_smul [IsNoetherian R M] (χ : Weight R L M) :
    ∃ m : M, m ≠ 0 ∧ ∀ x : L, ⁅x, m⁆ = χ x • m

(R : Type u_1)
(L : Type u_2)
(M : Type u_3)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[LieModule.LinearWeights R L M]
[IsNoetherian R M]
(χ : LieModule.Weight R L M)

∃ m, m ≠ 0 ∧ ∀ (x : L), ⁅x, m⁆ = χ x • m


theorem finitaryExtensive_of_reflective
    [HasFiniteCoproducts D] [HasPullbacksOfInclusions D] [FinitaryExtensive C]
    {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Gr.Full] [Gr.Faithful]
    [∀ X Y (f : X ⟶ Gl.obj Y), HasPullback (Gr.map f) (adj.unit.app Y)]
    [∀ X Y (f : X ⟶ Gl.obj Y), PreservesLimit (cospan (Gr.map f) (adj.unit.app Y)) Gl]
    [PreservesPullbacksOfInclusions Gl] :
    FinitaryExtensive D

[∀ (X : D) (Y : C) (f : X ⟶ Gl.obj Y), CategoryTheory.Limits.HasPullback (Gr.map f) (adj.unit.app Y)]

[(X : D) →
    (Y : C) →
      (f : X ⟶ Gl.obj Y) →
        CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan (Gr.map f) (adj.unit.app Y)) Gl]


@[to_additive (attr := simp)] lemma op_toSubmonoid (H : Subgroup G) :
    H.op.toSubmonoid = H.toSubmonoid.op

{G : Type u_2}
[AddGroup G]
(H : AddSubgroup G)


@[simp]
theorem preimage_Ici (e : α ≃o β) (b : β) : e ⁻¹' Ici b = Ici (e.symm b)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ≃o β)
(b : β)


theorem rank_reindex [Fintype m] (e₁ e₂ : m ≃ n) (A : Matrix m m R) :
    rank (reindex e₁ e₂ A) = rank A

{m : Type u_2}
{n : Type u_3}
{R : Type u_5}
[Fintype n]
[CommRing R]
[Fintype m]
(e₁ e₂ : m ≃ n)
(A : Matrix m m R)

((Matrix.reindex e₁ e₂) A).rank = A.rank


@[simp]
theorem cycleOf_apply_apply_zpow_self (f : Perm α) [DecidableRel f.SameCycle] (x : α) (k : ℤ) :
    cycleOf f x ((f ^ k) x) = (f ^ (k + 1) : Perm α) x

{α : Type u_2}
(f : Equiv.Perm α)
[DecidableRel f.SameCycle]
(x : α)
(k : ℤ)


/-- The inner product between a multiple of a `π / 2` rotation of a vector and a multiple of
that vector is zero. -/
@[simp]
theorem inner_smul_rotation_pi_div_two_smul_left (x : V) (r₁ r₂ : ℝ) :
    ⟪r₁ • o.rotation (π / 2 : ℝ) x, r₂ • x⟫ = 0

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

⟪r₁ • (o.rotation ↑(π / 2)) x, r₂ • x⟫_ℝ = 0


lemma factors_eq : ∀ n : ℕ, normalizedFactors n = n.primeFactorsList

UniqueFactorizationMonoid.normalizedFactors n = ↑n.primeFactorsList