@[to_additive (attr := simp, nolint simpNF) zmultiples_equiv_zmultiples_apply]
theorem zpowersEquivZPowers_apply (h : orderOf x = orderOf y) (n : ℕ) :
    zpowersEquivZPowers h ⟨x ^ n, n, zpow_natCast x n⟩ = ⟨y ^ n, n, zpow_natCast y n⟩

{G : Type u_1}
[Group G]
[Finite G]
{x y : G}
(h : orderOf x = orderOf y)
(n : ℕ)

(zpowersEquivZPowers h) ⟨x ^ n, ⋯⟩ = ⟨y ^ n, ⋯⟩


@[to_additive]
theorem prod_bool [CommMonoid α] (f : Bool → α) : ∏ b, f b = f true * f false

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


theorem setLIntegral_mono' {s : Set α} {f g : α → ℝ≥0∞} (hs : MeasurableSet s)
    (hfg : ∀ x ∈ s, f x ≤ g x) : ∫⁻ x in s, f x ∂μ ≤ ∫⁻ x in s, g x ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{f g : α → ℝ≥0∞}
(hs : MeasurableSet s)
(hfg : ∀ x ∈ s, f x ≤ g x)

∫⁻ (x : α) in s, f x ∂μ ≤ ∫⁻ (x : α) in s, g x ∂μ


theorem sub_one_mul_sum_div_pow_eq_sub_sum_digits {p : ℕ}
    (L : List ℕ) {h_nonempty} (h_ne_zero : L.getLast h_nonempty ≠ 0) (h_lt : ∀ l ∈ L, l < p) :
    (p - 1) * ∑ i ∈ range L.length, (ofDigits p L) / p ^ i.succ = (ofDigits p L) - L.sum

{p : ℕ}
(L : List ℕ)
{h_nonempty : L ≠ []}
(h_ne_zero : L.getLast h_nonempty ≠ 0)
(h_lt : ∀ l ∈ L, l < p)

(p - 1) * ∑ i ∈ Finset.range L.length, Nat.ofDigits p L / p ^ i.succ = Nat.ofDigits p L - L.sum


/-- Given a chain complex `X` and an object `Y`, this is the cochain complex
which in degree `i` consists of the module of morphisms `X.X i ⟶ Y`. -/
@[simps! X d]
def ChainComplex.linearYonedaObj {α : Type*} [AddRightCancelSemigroup α] [One α]
    (X : ChainComplex C α) (A : Type*) [Ring A] [Linear A C] (Y : C) :
    CochainComplex (ModuleCat A) α

{C : Type u_2}
[CategoryTheory.Category.{u_5, u_2} C]
[CategoryTheory.Abelian C]
{α : Type u_3}
[AddRightCancelSemigroup α]
[One α]
(X : ChainComplex C α)
(A : Type u_4)
[Ring A]
[CategoryTheory.Linear A C]
(Y : C)
(i j : α)

(X.linearYonedaObj A Y).d i j = ModuleCat.ofHom (CategoryTheory.Linear.leftComp A Y (X.d j i))


{Ω : Type u_1}
{m : MeasurableSpace Ω}
(μ : MeasureTheory.Measure Ω)


@[simp]
theorem compSL_apply (f : F →SL[σ₂₃] G) (g : E →SL[σ₁₂] F) : compSL E F G σ₁₂ σ₂₃ f g = f.comp g

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
{E : Type u_4}
{F : Type u_6}
{G : Type u_8}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[SeminormedAddCommGroup G]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NontriviallyNormedField 𝕜₃]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
[NormedSpace 𝕜₃ G]
{σ₁₂ : 𝕜 →+* 𝕜₂}
{σ₂₃ : 𝕜₂ →+* 𝕜₃}
{σ₁₃ : 𝕜 →+* 𝕜₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomIsometric σ₂₃]
[RingHomIsometric σ₁₃]
[RingHomIsometric σ₁₂]
(f : F →SL[σ₂₃] G)
(g : E →SL[σ₁₂] F)

((ContinuousLinearMap.compSL E F G σ₁₂ σ₂₃) f) g = f.comp g


/-- If a function `f` tends to infinity along a filter, then `f` divided by a positive
constant also tends to infinity. -/
theorem Tendsto.atTop_div_const (hr : 0 < r) (hf : Tendsto f l atTop) :
    Tendsto (fun x => f x / r) l atTop

{α : Type u_3}
{β : Type u_4}
[LinearOrderedSemifield α]
{l : Filter β}
{f : β → α}
{r : α}
(hr : 0 < r)
(hf : Filter.Tendsto f l Filter.atTop)

Filter.Tendsto (fun x => f x / r) l Filter.atTop


@[to_additive]
theorem apply_abs_le_mul_of_one_le {β : Type*} [MulOneClass β] [Preorder β]
    [CovariantClass β β (· * ·) (· ≤ ·)] [CovariantClass β β (swap (· * ·)) (· ≤ ·)] {f : α → β}
    (h : ∀ x, 1 ≤ f x) (a : α) : f |a| ≤ f a * f (-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]


@[to_additive (attr := measurability)]
theorem List.aemeasurable_prod (l : List (α → M)) (hl : ∀ f ∈ l, AEMeasurable f μ) :
    AEMeasurable (fun x => (l.map fun f : α → M => f x).prod) μ

{M : Type u_2}
{α : Type u_3}
[AddMonoid M]
[MeasurableSpace M]
[MeasurableAdd₂ M]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(l : List (α → M))
(hl : ∀ f ∈ l, AEMeasurable f μ)

AEMeasurable (fun x => (List.map (fun f => f x) l).sum) μ


@[simp, norm_cast]
theorem zero_apply (i) : (0 : CauSeq β abv) i = 0

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


@[simp]
lemma apply_toDual_symm_apply {B : BilinForm K V} {hB : B.Nondegenerate}
    (f : Module.Dual K V) (v : V) :
    B ((B.toDual hB).symm f) v = f v

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
{B : LinearMap.BilinForm K V}
{hB : B.Nondegenerate}
(f : Module.Dual K V)
(v : V)


/-- The antidiagonal of `0` is the list `[(0, 0)]` -/
@[simp]
theorem antidiagonal_zero : antidiagonal 0 = {(0, 0)}


theorem choice_mem_aux (h : ∅ ∉ x) (y : ZFSet.{u}) (yx : y ∈ x) :
    (Classical.epsilon fun z : ZFSet.{u} => z ∈ y) ∈ y

(x : ZFSet)
(h : ∅ ∉ x)
(y : ZFSet)
(yx : y ∈ x)


lemma singleton_isClosed (a : α) : IsClosed ({a} : Set α)

{α : Type u_1}
[PartialOrder α]
[TopologicalSpace α]
[Topology.IsLawson α]
(a : α)


lemma comp_map {a : M} (f : ShiftedHom X Y a) (F : C ⥤ D) [F.CommShift M]
    (G : D ⥤ E) [G.CommShift M] : f.map (F ⋙ G) = (f.map F).map G

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
{D : Type u_2}
[CategoryTheory.Category.{u_6, u_2} D]
{E : Type u_3}
[CategoryTheory.Category.{u_7, u_3} E]
{M : Type u_4}
[AddMonoid M]
[CategoryTheory.HasShift C M]
[CategoryTheory.HasShift D M]
[CategoryTheory.HasShift E M]
{X Y : C}
{a : M}
(f : CategoryTheory.ShiftedHom X Y a)
(F : CategoryTheory.Functor C D)
[F.CommShift M]
(G : CategoryTheory.Functor D E)
[G.CommShift M]


/-- A small set of surreals is bounded above. -/
lemma bddAbove_of_small (s : Set Surreal.{u}) [Small.{u} s] : BddAbove s


@[to_additive]
protected theorem mul_le_iff_le_one_left [MulOneClass α] [i : IsSymmOp α α (· * ·)]
    [CovariantClass α α (· * ·) (· ≤ ·)] {a b : α} (ha : MulLECancellable a) :
    b * a ≤ a ↔ b ≤ 1

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


theorem val_add {n : ℕ} [NeZero n] (a b : ZMod n) : (a + b).val = (a.val + b.val) % n


@[to_additive (attr := elab_as_elim, cases_eliminator, induction_eliminator)]
protected theorem ind {β : X[S⁻¹] → Prop}
    (c : ∀ (r : X) (s : S), β (r /ₒ s)) : ∀ q, β q

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[MulAction R X]
{β : OreLocalization S X → Prop}
(c : ∀ (r : X) (s : ↥S), β (r /ₒ s))
(q : OreLocalization S X)


theorem dist_t₀_le (t : Icc v.tMin v.tMax) : dist t v.t₀ ≤ v.tDist

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(v : PicardLindelof E)
(t : ↑(Set.Icc v.tMin v.tMax))


lemma rightShift_v (a n' : ℤ) (hn' : n' + a = n) (p q : ℤ) (hpq : p + n' = q)
    (p' : ℤ) (hp' : p + n = p') :
    (γ.rightShift a n' hn').v p q hpq = γ.v p p' hp' ≫
      (L.shiftFunctorObjXIso a q p' (by rw [← hp', ← hpq, ← hn', add_assoc])).inv

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

(γ.rightShift a n' hn').v p q hpq = γ.v p p' hp' ≫ (L.shiftFunctorObjXIso a q p' ⋯).inv


theorem rfind_spec {p : ℕ →. Bool} {n : ℕ} (h : n ∈ rfind p) : true ∈ p n

{p : ℕ →. Bool}
{n : ℕ}
(h : n ∈ Nat.rfind p)


@[to_additive (attr := simp)]
theorem measurable_inv_iff {G : Type*} [Group G] [MeasurableSpace G] [MeasurableInv G]
    {f : α → G} : (Measurable fun x => (f x)⁻¹) ↔ Measurable f

{α : Type u_3}
{m : MeasurableSpace α}
{G : Type u_4}
[AddGroup G]
[MeasurableSpace G]
[MeasurableNeg G]
{f : α → G}

(Measurable fun x => -f x) ↔ Measurable f


lemma sum_range_succ_mul_sum_range_succ (m n : ℕ) (f g : ℕ → α) :
    (∑ i ∈ range (m + 1), f i) * ∑ i ∈ range (n + 1), g i =
      (∑ i ∈ range m, f i) * ∑ i ∈ range n, g i +
        f m * ∑ i ∈ range n, g i + (∑ i ∈ range m, f i) * g n + f m * g n

{α : Type u_2}
[NonUnitalNonAssocSemiring α]
(m n : ℕ)
(f g : ℕ → α)

(∑ i ∈ Finset.range (m + 1), f i) * ∑ i ∈ Finset.range (n + 1), g i =
  (∑ i ∈ Finset.range m, f i) * ∑ i ∈ Finset.range n, g i + f m * ∑ i ∈ Finset.range n, g i +
      (∑ i ∈ Finset.range m, f i) * g n +
    f m * g n


@[simp]
theorem dotProduct_smul [SMulCommClass R α α] (x : R) (v w : m → α) :
    v ⬝ᵥ x • w = x • (v ⬝ᵥ w)

{m : Type u_2}
{R : Type u_7}
{α : Type v}
[Fintype m]
[Monoid R]
[Mul α]
[AddCommMonoid α]
[DistribMulAction R α]
[SMulCommClass R α α]
(x : R)
(v w : m → α)


lemma even_or_odd' (n : ℕ) : ∃ k, n = 2 * k ∨ n = 2 * k + 1


theorem mul_le_mul_of_nonpos_right [ExistsAddOfLE α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (h : b ≤ a) (hc : c ≤ 0) : a * c ≤ b * c

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

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


@[simp]
theorem mem_bind_iff {f : Part α} {g : α → Part β} {b} : b ∈ f.bind g ↔ ∃ a ∈ f, b ∈ g a

{α : Type u_1}
{β : Type u_2}
{f : Part α}
{g : α → Part β}
{b : β}


@[simp]
theorem wbtw_one_zero_iff {x : R} : Wbtw R 1 x 0 ↔ x ∈ Set.Icc (0 : R) 1


@[deprecated map_finsupp_sum (since := "2024-06-26")]
protected theorem map_finsupp_sum {α : Type*} [Zero α] {ι : Type*} (f : ι →₀ α) (g : ι → α → A) :
    φ (f.sum g) = f.sum fun i a => φ (g i a)

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(φ : A →ₐ[R] B)
{α : Type u_1}
[Zero α]
{ι : Type u_2}
(f : ι →₀ α)
(g : ι → α → A)


theorem Continuous.upperSemicontinuous {f : α → γ} (h : Continuous f) : UpperSemicontinuous f

{α : Type u_1}
[TopologicalSpace α]
{γ : Type u_3}
[LinearOrder γ]
[TopologicalSpace γ]
[OrderTopology γ]
{f : α → γ}
(h : Continuous f)


@[simp] theorem map_reverse (f : α → β) (l : List α) : l.reverse.map f = (l.map f).reverse

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

List.map f l.reverse = (List.map f l).reverse


/-- Given a ring filter basis on a commutative ring `R`, define a compatibility condition
on a family of submodules of an `R`-module `M`. This compatibility condition allows to get
a topological module structure. -/
structure RingFilterBasis.SubmodulesBasis (BR : RingFilterBasis R) (B : ι → Submodule R M) :
    Prop where
  /-- Condition for `B` to be a filter basis on `M`. -/
  inter : ∀ i j, ∃ k, B k ≤ B i ⊓ B j
  /-- For any element `m : M` and any set `B i` in the submodule basis on `M`,
    there is a `U` in the ring filter basis on `R` such that `U * m` is in `B i`. -/
  smul : ∀ (m : M) (i : ι), ∃ U ∈ BR, U ⊆ (· • m) ⁻¹' B i

{ι : Type u_1}
{R : Type u_2}
[CommRing R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
{BR : RingFilterBasis R}
{B : ι → Submodule R M}
(self : BR.SubmodulesBasis B)
(m : M)
(i : ι)

∃ U ∈ BR, U ⊆ (fun x => x • m) ⁻¹' ↑(B i)


/-- Shows that
$\sum_{k = 0}^{n - 1} (e^{X})^k = \sum_{p = 0}^{\infty} \sum_{k = 0}^{n - 1} \frac{k^p}{p!}X^p$. -/
theorem exp_pow_sum [Algebra ℚ A] (n : ℕ) :
    ((Finset.range n).sum fun k => exp A ^ k) =
      PowerSeries.mk fun p => (Finset.range n).sum
        fun k => (k ^ p : A) * algebraMap ℚ A p.factorial⁻¹

{A : Type u_1}
[CommRing A]
[Algebra ℚ A]
(n : ℕ)

∑ k ∈ Finset.range n, PowerSeries.exp A ^ k =
  PowerSeries.mk fun p => ∑ k ∈ Finset.range n, ↑k ^ p * (algebraMap ℚ A) (↑p.factorial)⁻¹


theorem Fin.circulant_isSymm_iff : ∀ {n} {v : Fin n → α}, (circulant v).IsSymm ↔ ∀ i, v (-i) = v i

(Matrix.circulant v).IsSymm ↔ ∀ (i : Fin n), v (-i) = v i


@[to_additive]
protected lemma div_eq_div_iff (hb : IsUnit b) (hd : IsUnit d) :
    a / b = c / d ↔ a * d = c * b

{α : Type u}
[DivisionCommMonoid α]
{a b c d : α}
(hb : IsUnit b)
(hd : IsUnit d)


@[simp]
theorem refl_trans (f : α ≃. β) : (PEquiv.refl α).trans f = f


/-- Symmetric statement to `Filter.map₂_map_left_anticomm`. -/
theorem map_map₂_antidistrib_left {n : γ → δ} {m' : β' → α → δ} {n' : β → β'}
    (h_antidistrib : ∀ a b, n (m a b) = m' (n' b) a) : (map₂ m f g).map n = map₂ m' (g.map n') f

{m : α → β → γ}

(h_antidistrib : ∀ (a : α) (b : β), n (m a b) = m' (n' b) a)

Filter.map n (Filter.map₂ m f g) = Filter.map₂ m' (Filter.map n' g) f


@[simp]
theorem ContinuousMultilinearMap.fin0_apply_norm (f : G[×0]→L[𝕜] G') {x : Fin 0 → G} :
    ‖f x‖ = ‖f‖

(f : ContinuousMultilinearMap 𝕜 (fun i => G) G')


theorem Injective.sum_map {f : α → β} {g : α' → β'} (hf : Injective f) (hg : Injective g) :
    Injective (Sum.map f g)

{α : Type u}
{α' : Type w}
{β : Type v}
{β' : Type x}
{f : α → β}
{g : α' → β'}
(hf : Function.Injective f)
(hg : Function.Injective g)


@[simp] theorem utf8ByteSize.go_eq : utf8ByteSize.go = utf8Len


/-- The L-series of a Dirichlet character converges absolutely at `s` if `re s > 1`. -/
lemma LSeriesSummable_of_one_lt_re {N : ℕ} (χ : DirichletCharacter ℂ N) {s : ℂ} (hs : 1 < s.re) :
    LSeriesSummable ↗χ s


@[simp, reassoc]
lemma comp_hom₁ {X Y Z : Triangle C} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).hom₁ = f.hom₁ ≫ g.hom₁

{X Y Z : CategoryTheory.Pretriangulated.Triangle C}


theorem type_le_iff {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] : type r ≤ type s ↔ Nonempty (r ≼i s)

{α β : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
[IsWellOrder β s]

Ordinal.type r ≤ Ordinal.type s ↔ Nonempty (r ≼i s)


@[simp]
theorem rotationAux_apply (θ : Real.Angle) (x : V) :
    o.rotationAux θ x = Real.Angle.cos θ • x + Real.Angle.sin θ • J x

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

(o.rotationAux θ) x = θ.cos • x + θ.sin • o.rightAngleRotation x


@[measurability]
theorem _root_.MeasurableEmbedding.stronglyMeasurable_extend {f : α → β} {g : α → γ} {g' : γ → β}
    {mα : MeasurableSpace α} {mγ : MeasurableSpace γ} [TopologicalSpace β]
    (hg : MeasurableEmbedding g) (hf : StronglyMeasurable f) (hg' : StronglyMeasurable g') :
    StronglyMeasurable (Function.extend g f g')

(hf : MeasureTheory.StronglyMeasurable f)

(hg' : MeasureTheory.StronglyMeasurable g')

MeasureTheory.StronglyMeasurable (Function.extend g f g')


@[to_additive]
theorem norm_mk_le : norm (mk L₁) ≤ L₁.length

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


@[simp]
theorem one_apply (x : M) : (1 : Module.End R M) x = x

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(x : M)


theorem generateFrom_union_isOpen (a b : TopologicalSpace α) :
    generateFrom ({ s | IsOpen[a] s } ∪ { s | IsOpen[b] s }) = a ⊓ b

TopologicalSpace.generateFrom ({s | IsOpen s} ∪ {s | IsOpen s}) = a ⊓ b


protected lemma Nontrivial.erase_nonempty (hs : s.Nontrivial) : (s.erase a).Nonempty

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a : α}
(hs : s.Nontrivial)


/-- See `add_tsub_le_assoc` for an inequality. -/
theorem add_tsub_assoc_of_le (h : c ≤ b) (a : α) : a + b - c = a + (b - c)

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

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


theorem ind {β : Trunc α → Prop} : (∀ a : α, β (mk a)) → ∀ q : Trunc α, β q

(∀ (a : α), β (Trunc.mk a)) → ∀ (q : Trunc α), β q


/-- The Law of Quadratic Reciprocity for the Jacobi symbol: if `a` and `b` are natural numbers
with `a` odd and `b % 4 = 1`, then `J(a | b) = J(b | a)`. -/
theorem quadratic_reciprocity_one_mod_four' {a b : ℕ} (ha : Odd a) (hb : b % 4 = 1) :
    J(a | b) = J(b | a)


theorem closure_coe_completion_v_lt {γ : Γ₀ˣ} :
    closure ((↑) '' { x : K | v x < (γ : Γ₀) }) =
    { x : hat K | extensionValuation x < (γ : Γ₀) }

{K : Type u_1}
[Field K]
{Γ₀ : Type u_2}
[LinearOrderedCommGroupWithZero Γ₀]
[hv : Valued K Γ₀]
{γ : Γ₀ˣ}

closure (↑K '' {x | Valued.v x < ↑γ}) = {x | Valued.extensionValuation x < ↑γ}


@[simp] theorem Bool.beq_to_eq (a b : Bool) :
  (a == b) = (a = b)


theorem blimsup_eq_limsup_subtype {f : Filter β} {u : β → α} {p : β → Prop} :
    blimsup u f p = limsup (u ∘ ((↑) : { x | p x } → β)) (comap (↑) f)

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

Filter.blimsup u f p = Filter.limsup (u ∘ Subtype.val) (Filter.comap Subtype.val f)


@[to_additive] lemma inv_inf (a b : α) : (a ⊓ b)⁻¹ = a⁻¹ ⊔ b⁻¹

[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)⁻¹ = a⁻¹ ⊔ b⁻¹


lemma Cotangent.map_comp (f : Hom P P') (g : Hom P' P'') :
    Cotangent.map (g.comp f) = (map g).restrictScalars S ∘ₗ map f

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}
{R' : Type u_1}
{S' : Type u_2}
[CommRing R']
[CommRing S']
[Algebra R' S']
{P' : Algebra.Generators R' S'}
[Algebra R R']
[Algebra S S']
[Algebra R S']
[IsScalarTower R R' S']
[IsScalarTower R S S']
{R'' : Type u_4}
{S'' : Type u_5}
[CommRing R'']
[CommRing S'']
[Algebra R'' S'']
(P'' : Algebra.Generators R'' S'')
[Algebra R R'']
[Algebra S S'']
[Algebra R S'']
[IsScalarTower R R'' S'']
[IsScalarTower R S S'']
[Algebra R' R'']
[Algebra S' S'']
[Algebra R' S'']
[IsScalarTower R' R'' S'']
[IsScalarTower R' S' S'']
[IsScalarTower R R' R'']
[IsScalarTower S S' S'']
(f : P.Hom P')
(g : P'.Hom P'')

Algebra.Generators.Cotangent.map (g.comp f) =
  ↑S (Algebra.Generators.Cotangent.map g) ∘ₗ Algebra.Generators.Cotangent.map f


/-- A bijection between terms with constants and terms with extra variables. -/
@[simps]
def constantsVarsEquiv : L[[γ]].Term α ≃ L.Term (γ ⊕ α)

{L : FirstOrder.Language}
{α : Type u'}
{γ : Type u_3}

∀ (a : L.Term (γ ⊕ α)), FirstOrder.Language.Term.constantsVarsEquiv.symm a = a.varsToConstants


@[reassoc]
lemma pullback.condition : pullback.fst f g ≫ f = pullback.snd f g ≫ g

{X Y B : LightProfinite}
(f : X ⟶ B)
(g : Y ⟶ B)

CategoryTheory.CategoryStruct.comp (LightProfinite.pullback.fst f g) f =
  CategoryTheory.CategoryStruct.comp (LightProfinite.pullback.snd f g) g


@[to_additive (attr := simp)]
theorem mul_inv_le_iff_le_mul : a * b⁻¹ ≤ c ↔ a ≤ c * b


@[simp]
theorem sumArrowEquivProdArrow_symm_apply_inl (f : α → γ) (g : β → γ) (a : α) :
    ((sumArrowEquivProdArrow α β γ).symm (f, g)) (inl a) = f a

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

(Equiv.sumArrowEquivProdArrow α β γ).symm (f, g) (Sum.inl a) = f a


/-- The composition of two based functors. -/
@[simps]
def comp {𝒵 : BasedCategory.{v₄, u₄} 𝒮} (F : 𝒳 ⥤ᵇ 𝒴) (G : 𝒴 ⥤ᵇ 𝒵) : 𝒳 ⥤ᵇ 𝒵

{𝒮 : Type u₁}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
{𝒳 : CategoryTheory.BasedCategory 𝒮}
{𝒴 : CategoryTheory.BasedCategory 𝒮}
{𝒵 : CategoryTheory.BasedCategory 𝒮}
(F : CategoryTheory.BasedFunctor 𝒳 𝒴)
(G : CategoryTheory.BasedFunctor 𝒴 𝒵)

(F.comp G).toFunctor = F.comp G.toFunctor


theorem monotone (hS : S ≤ S') : K⟮S,n⟯ ≤ K⟮S',n⟯

{S S' : Set (IsDedekindDomain.HeightOneSpectrum R)}


@[to_additive (attr := simp)]
theorem ofLex_one [One α] : (ofLex 1 : α) = 1


@[simp]
theorem lanLiftCompIsoWhisker_inv_right :
    (lanLiftCompIsoWhisker f g h).inv.right = (isKan f g h).desc (lanLiftLeftLift f (h ≫ g))

[CategoryTheory.Bicategory.LanLift.CommuteWith f g h]

(CategoryTheory.Bicategory.LanLift.CommuteWith.lanLiftCompIsoWhisker f g h).inv.right =
  (CategoryTheory.Bicategory.LanLift.CommuteWith.isKan f g h).desc
    (CategoryTheory.Bicategory.lanLiftLeftLift f (CategoryTheory.CategoryStruct.comp h g))


theorem ofNat_natAbs (a : Int) : (a.natAbs : Int) = if 0 ≤ a then a else -a


/-- The cartesian product of two lax monoidal functors is lax monoidal. -/
@[simps]
def prod : LaxMonoidalFunctor (B × D) (C × E)

(F : CategoryTheory.LaxMonoidalFunctor B C)

(G : CategoryTheory.LaxMonoidalFunctor D E)


theorem Subperm.erase {l₁ l₂ : List α} (a : α) (h : l₁ <+~ l₂) : l₁.erase a <+~ l₂.erase a

{α : Type u_1}
[DecidableEq α]
{l₁ l₂ : List α}
(a : α)
(h : l₁ <+~ l₂)


@[to_additive]
theorem IsClosed.mul_left_of_isCompact (ht : IsClosed t) (hs : IsCompact s) : IsClosed (s * t)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{s t : Set G}
(ht : IsClosed t)
(hs : IsCompact s)


theorem mem_argmax_iff :
    m ∈ argmax f l ↔
      m ∈ l ∧ (∀ a ∈ l, f a ≤ f m) ∧ ∀ a ∈ l, f m ≤ f a → l.indexOf m ≤ l.indexOf a

{α : Type u_1}
{β : Type u_2}
[LinearOrder β]
{f : α → β}
{l : List α}
{m : α}
[DecidableEq α]

m ∈ List.argmax f l ↔
  m ∈ l ∧ (∀ (a : α), a ∈ l → f a ≤ f m) ∧ ∀ (a : α), a ∈ l → f m ≤ f a → List.indexOf m l ≤ List.indexOf a l


theorem not_isBoundedUnder_of_tendsto_atBot [Preorder β] [NoMinOrder β] {f : α → β} {l : Filter α}
    [l.NeBot] (hf : Tendsto f l atBot) : ¬IsBoundedUnder (· ≥ ·) l f

{α : Type u_1}
{β : Type u_2}
[Preorder β]
[NoMinOrder β]
{f : α → β}
{l : Filter α}
[l.NeBot]
(hf : Filter.Tendsto f l Filter.atBot)

¬Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) l f


theorem integral_comp_neg : (∫ x in a..b, f (-x)) = ∫ x in -b..-a, f x

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ℝ}
(f : ℝ → E)

∫ (x : ℝ) in a..b, f (-x) = ∫ (x : ℝ) in -b..-a, f x


/-- If `f` has a formal Taylor series `p` up to order `1` on `{x} ∪ s`, where `s` is a convex set,
then `f` is Lipschitz in a neighborhood of `x` within `s`. -/
theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F}
    {p : E → FormalMultilinearSeries ℝ E F} {s : Set E} {x : E}
    (hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex ℝ s) :
    ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t


@[simp]
theorem range_zmultiplesHom (a : A) : (zmultiplesHom A a).range = zmultiples a

((zmultiplesHom A) a).range = AddSubgroup.zmultiples a


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

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


theorem preimage_mk_closure : mk ⁻¹' closure t = closure (mk ⁻¹' t)

{X : Type u_1}
[TopologicalSpace X]
{t : Set (SeparationQuotient X)}

SeparationQuotient.mk ⁻¹' closure t = closure (SeparationQuotient.mk ⁻¹' t)


theorem suffixLevenshtein_eq_tails_map (xs ys) :
    (suffixLevenshtein C xs ys).1 = xs.tails.map fun xs' => levenshtein C xs' ys

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

(suffixLevenshtein C xs ys).val = List.map (fun xs' => levenshtein C xs' ys) xs.tails


@[simp]
theorem ListBlank.map_cons {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : PointedMap Γ Γ')
    (l : ListBlank Γ) (a : Γ) : (l.cons a).map f = (l.map f).cons (f a)

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Turing.PointedMap Γ Γ')
(l : Turing.ListBlank Γ)
(a : Γ)

Turing.ListBlank.map f (Turing.ListBlank.cons a l) = Turing.ListBlank.cons (f.f a) (Turing.ListBlank.map f l)


theorem uIcc_eq_finset_subtype : uIcc a b = (uIcc (a : ℕ) b).fin n

Finset.uIcc a b = Finset.fin n (Finset.uIcc ↑a ↑b)


@[simp]
theorem grade_lt_grade_iff : grade 𝕆 a < grade 𝕆 b ↔ a < b

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


theorem memℒp_stoppedProcess [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
    (hu : ∀ n, Memℒp (u n) p μ) (n : ι) : Memℒp (stoppedProcess u τ n) p μ

(hu : ∀ (n : ι), MeasureTheory.Memℒp (u n) p μ)

MeasureTheory.Memℒp (MeasureTheory.stoppedProcess u τ n) p μ


protected theorem lt_iff_le_not_le {a b : Int} : a < b ↔ a ≤ b ∧ ¬b ≤ a


theorem zero_rpow_le_one (x : ℝ) : (0 : ℝ) ^ x ≤ 1


/-- Given a category `C` equipped with a Grothendieck topology `J` and a concrete category `A`,
this property holds if a morphism in `Cᵒᵖ ⥤ A` satisfies `J.W` (i.e. becomes an iso after
sheafification) iff it is both locally injective and locally surjective. -/
class WEqualsLocallyBijective : Prop where
  iff {X Y : Cᵒᵖ ⥤ A} (f : X ⟶ Y) :
    J.W f ↔ Presheaf.IsLocallyInjective J f ∧ Presheaf.IsLocallySurjective J f

{J : CategoryTheory.GrothendieckTopology C}

J.W f ↔ CategoryTheory.Presheaf.IsLocallyInjective J f ∧ CategoryTheory.Presheaf.IsLocallySurjective J f


@[simp]
theorem sdiff_inter_self_right (s t : Finset α) : s \ (t ∩ s) = s \ t

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


lemma fourierIntegral_eq' (f : V → E) (w : V) :
    𝓕 f w = ∫ v, Complex.exp ((↑(-2 * π * ⟪v, w⟫) * Complex.I)) • f v

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MeasurableSpace V]
[BorelSpace V]
[FiniteDimensional ℝ V]
(f : V → E)
(w : V)

Real.fourierIntegral f w = ∫ (v : V), Complex.exp (↑(-2 * π * ⟪v, w⟫_ℝ) * Complex.I) • f v


@[simp]
theorem congToClass_empty : congToClass ∅ = ∅


theorem integral_condCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (x : ℝ) :
    ∫ a, condCDF ρ a x ∂ρ.fst = (ρ (univ ×ˢ Iic x)).toReal

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
[MeasureTheory.IsFiniteMeasure ρ]
(x : ℝ)

∫ (a : α), ↑(ProbabilityTheory.condCDF ρ a) x ∂ρ.fst = (ρ (Set.univ ×ˢ Set.Iic x)).toReal


/-- If some left-translate of a function negates it, then the integral of the function with respect
to a left-invariant measure is 0. -/
@[to_additive
      "If some left-translate of a function negates it, then the integral of the function with
      respect to a left-invariant measure is 0."]
theorem integral_eq_zero_of_mul_left_eq_neg [IsMulLeftInvariant μ] (hf' : ∀ x, f (g * x) = -f x) :
    ∫ x, f x ∂μ = 0

{G : Type u_4}
{E : Type u_5}
[MeasurableSpace G]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure G}
{f : G → E}
{g : G}
[Group G]
[MeasurableMul G]
[μ.IsMulLeftInvariant]
(hf' : ∀ (x : G), f (g * x) = -f x)


@[to_additive]
theorem oreDiv_eq_iff {r₁ r₂ : X} {s₁ s₂ : S} :
    r₁ /ₒ s₁ = r₂ /ₒ s₂ ↔ ∃ (u : S) (v : R), u • r₂ = v • r₁ ∧ u * s₂ = v * s₁

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[MulAction R X]
{r₁ r₂ : X}
{s₁ s₂ : ↥S}

r₁ /ₒ s₁ = r₂ /ₒ s₂ ↔ ∃ u v, u • r₂ = v • r₁ ∧ ↑u * ↑s₂ = v * ↑s₁


@[to_additive] theorem range_eq (f : G ∗ H →* K) :
    MonoidHom.range f = MonoidHom.range (f.comp inl) ⊔ MonoidHom.range (f.comp inr)

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{K : Type u_3}
[Group K]
(f : Monoid.Coprod G H →* K)

f.range = (f.comp Monoid.Coprod.inl).range ⊔ (f.comp Monoid.Coprod.inr).range


@[simp]
theorem sup'_singleton {b : β} : ({b} : Finset β).sup' (singleton_nonempty _) f = f b

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


private lemma adic_exact : Function.Exact (map I (LinearMap.ker f).subtype) (map I f)

{R : Type u}
[CommRing R]
(I : Ideal R)
(M : Type u)
[AddCommGroup M]
[Module R M]
[IsNoetherianRing R]
{ι : Type}
[Fintype ι]
(f : (ι → R) →ₗ[R] M)
(hf : Function.Surjective ⇑f)

Function.Exact ⇑(AdicCompletion.map I (LinearMap.ker f).subtype) ⇑(AdicCompletion.map I f)


/-- Convex **Jensen's inequality**, `Finset.sum` version. -/
theorem ConvexOn.map_sum_le (hf : ConvexOn 𝕜 s f) (h₀ : ∀ i ∈ t, 0 ≤ w i) (h₁ : ∑ i ∈ t, w i = 1)
    (hmem : ∀ i ∈ t, p i ∈ s) : f (∑ i ∈ t, w i • p i) ≤ ∑ i ∈ t, w i • f (p i)

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


/-- Along a mono that is not an iso, the cardinality of the fiber strictly increases. -/
lemma lt_card_fiber_of_mono_of_notIso {X Y : C} (f : X ⟶ Y) [Mono f]
    (h : ¬ IsIso f) : Nat.card (F.obj X) < Nat.card (F.obj Y)

(F : CategoryTheory.Functor C FintypeCat)

Nat.card ↑(F.obj X) < Nat.card ↑(F.obj Y)


theorem accessible {z : α} (ac : Acc r z) : Acc (TC r) z

{α : Sort u}
{r : α → α → Prop}
{z : α}
(ac : Acc r z)


@[simp]
theorem iterate_id (n : ℕ) : (id : α → α)^[n] = id


@[simp]
theorem quotQuotEquivQuotOfLE_symm_comp_mkₐ (h : I ≤ J) :
    AlgHom.comp (↑(quotQuotEquivQuotOfLEₐ R h).symm) (Quotient.mkₐ R J) = quotQuotMkₐ R I J

(R : Type u)
{A : Type u_1}
[CommSemiring R]
[CommRing A]
[Algebra R A]
{I J : Ideal A}
(h : I ≤ J)

(↑(DoubleQuot.quotQuotEquivQuotOfLEₐ R h).symm).comp (Ideal.Quotient.mkₐ R J) = DoubleQuot.quotQuotMkₐ R I J


lemma BijOn.perm_zpow (hf : BijOn f s s) : ∀ n : ℤ, BijOn (f ^ n) s s

{α : Type u_1}
{f : Equiv.Perm α}
{s : Set α}
(hf : Set.BijOn (⇑f) s s)
(n : ℤ)


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

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

MeasureTheory.MeasurePreserving (fun z => (z.2 + z.1, -z.1)) (μ.prod ν) (μ.prod ν)


/-- For a bounded set `s : Set ℝ`, its `EMetric.diam` is equal to `sSup s - sInf s` reinterpreted as
`ℝ≥0∞`. -/
theorem ediam_eq {s : Set ℝ} (h : Bornology.IsBounded s) :
    EMetric.diam s = ENNReal.ofReal (sSup s - sInf s)


theorem lift_unique (g : M →ₗ[R] M'') (h : ∀ x : S, IsUnit ((algebraMap R (Module.End R M'')) x))
    (l : M' →ₗ[R] M'') (hl : l.comp f = g) : lift S f g h = l

(h : ∀ (x : ↥S), IsUnit ((algebraMap R (Module.End R M'')) ↑x))


theorem HasStrictFDerivAt.const_rpow (hf : HasStrictFDerivAt f f' x) (hc : 0 < c) :
    HasStrictFDerivAt (fun x => c ^ f x) ((c ^ f x * Real.log c) • f') x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{f' : E →L[ℝ] ℝ}
{x : E}
{c : ℝ}
(hf : HasStrictFDerivAt f f' x)
(hc : 0 < c)


theorem dist_vadd_vadd_le (v v' : V) (p p' : P) :
    dist (v +ᵥ p) (v' +ᵥ p') ≤ dist v v' + dist p p'

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


theorem image_symm (h : X ≃ₜ Y) : image h.symm = preimage h

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)


theorem SupIrred.finset_sup_eq (ha : SupIrred a) (h : s.sup f = a) : ∃ i ∈ s, f i = a

{ι : Type u_1}
{α : Type u_2}
[SemilatticeSup α]
{a : α}
[OrderBot α]
{s : Finset ι}
{f : ι → α}
(ha : SupIrred a)
(h : s.sup f = a)


lemma Continuous.finset_sup' (hne : s.Nonempty) (hs : ∀ i ∈ s, Continuous (f i)) :
    Continuous (s.sup' hne f)

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeSup L]
[ContinuousSup L]
{s : Finset ι}
{f : ι → X → L}
(hne : s.Nonempty)
(hs : ∀ i ∈ s, Continuous (f i))


theorem imp_intro {α β : Prop} (h : α) : β → α


/-- **Rearrangement Inequality**: Pointwise multiplication of `f` and `g` is maximized when `f` and
`g` monovary together. Stated by permuting the entries of `f`. -/
theorem Monovary.sum_comp_perm_mul_le_sum_mul (hfg : Monovary f g) :
    ∑ i, f (σ i) * g i ≤ ∑ i, f i * g i

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{σ : Equiv.Perm ι}
{f g : ι → α}
[Fintype ι]
(hfg : Monovary f g)

∑ i : ι, f (σ i) * g i ≤ ∑ i : ι, f i * g i


@[simp]
theorem mem_infs : c ∈ s ⊼ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊓ b = c

{α : Type u_2}
[SemilatticeInf α]
{s t : Set α}
{c : α}


protected theorem lt_sup {r : α → α → Prop} (wf : WellFounded r) {s : Set α} (h : Bounded r s) {x}
    (hx : x ∈ s) : r x (wf.sup s h)

{α : Type u_1}
{r : α → α → Prop}
(wf : WellFounded r)
{s : Set α}
(h : Set.Bounded r s)
{x : α}
(hx : x ∈ s)


theorem isReduced_of_injective [MonoidWithZero R] [MonoidWithZero S] {F : Type*}
    [FunLike F R S] [MonoidWithZeroHomClass F R S]
    (f : F) (hf : Function.Injective f) [IsReduced S] :
    IsReduced R

{R : Type u_1}
{S : Type u_2}
[MonoidWithZero R]
[MonoidWithZero S]
{F : Type u_3}
[FunLike F R S]
[MonoidWithZeroHomClass F R S]
(f : F)
(hf : Function.Injective ⇑f)
[IsReduced S]


theorem ContDiffWithinAt.div [CompleteSpace 𝕜] {f g : E → 𝕜} {n} (hf : ContDiffWithinAt 𝕜 n f s x)
    (hg : ContDiffWithinAt 𝕜 n g s x) (hx : g x ≠ 0) :
    ContDiffWithinAt 𝕜 n (fun x => f x / g x) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{x : E}
[CompleteSpace 𝕜]
{f g : E → 𝕜}
{n : ℕ∞}
(hf : ContDiffWithinAt 𝕜 n f s x)
(hg : ContDiffWithinAt 𝕜 n g s x)
(hx : g x ≠ 0)


theorem hasEqualizer_of_common_retraction [HasCoreflexiveEqualizers C] {A B : C} {f g : A ⟶ B}
    (r : B ⟶ A) (fr : f ≫ r = 𝟙 _) (gr : g ≫ r = 𝟙 _) : HasEqualizer f g

(fr : CategoryTheory.CategoryStruct.comp f r = CategoryTheory.CategoryStruct.id A)

(gr : CategoryTheory.CategoryStruct.comp g r = CategoryTheory.CategoryStruct.id A)


theorem normalClosure_eq_iSup_adjoin [Algebra K L] [IsScalarTower F K L] [Normal F L] :
    normalClosure F K L = ⨆ x : K, adjoin F ((minpoly F x).rootSet L)

(F : Type u_1)
(K : Type u_2)
(L : Type u_3)
[Field F]
[Field K]
[Field L]
[Algebra F K]
[Algebra F L]
[Algebra K L]
[IsScalarTower F K L]
[Normal F L]

normalClosure F K L = ⨆ x, IntermediateField.adjoin F ((minpoly F x).rootSet L)


theorem div_eq_zero_of_lt {a b : Int} (H1 : 0 ≤ a) (H2 : a < b) : a.div b = 0


theorem Fin.circulant_injective : ∀ n, Injective fun v : Fin n → α => circulant v

Function.Injective fun v => Matrix.circulant v


theorem right_inv' (e : α ≃ β) : Function.RightInverse e.symm e


@[simp] theorem zero_mkRat (n) : mkRat 0 n = 0


@[simp]
theorem repeat_apply {α : Type*} (a : Fin n → α) (i : Fin (m * n)) :
    Fin.repeat m a i = a i.modNat

{m n : ℕ}
{α : Type u_1}
(a : Fin n → α)
(i : Fin (m * n))


theorem mk_smul (c : R) (p q : K[X]) : RatFunc.mk (c • p) q = c • RatFunc.mk p q

{K : Type u}
[CommRing K]
{R : Type u_1}
[IsDomain K]
[Monoid R]
[DistribMulAction R K[X]]
[IsScalarTower R K[X] K[X]]
(c : R)
(p q : K[X])


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

∀ {X_1 Y_1 : CategoryTheory.Limits.Bicone (CategoryTheory.Limits.pairFunction X Y)} (f : X_1 ⟶ Y_1),
  (CategoryTheory.Limits.Bicone.toBinaryBiconeFunctor.map f).hom = f.hom


@[simp]
theorem sigmaUncurry_single [∀ i j, Zero (δ i j)] [DecidableEq ι] [∀ i, DecidableEq (α i)]
    (i) (j : α i) (x : δ i j) :
    sigmaUncurry (single i (single j x : Π₀ j : α i, δ i j)) = single ⟨i, j⟩ (by exact x)

{ι : Type u}
{α : ι → Type u_2}
{δ : (i : ι) → α i → Type v}
[(i : ι) → (j : α i) → Zero (δ i j)]
[DecidableEq ι]
[(i : ι) → DecidableEq (α i)]
(i : ι)
(j : α i)
(x : δ i j)

(DFinsupp.single i (DFinsupp.single j x)).sigmaUncurry = DFinsupp.single ⟨i, j⟩ x


theorem toReal_sInf (s : Set ℝ≥0∞) (hf : ∀ r ∈ s, r ≠ ∞) :
    (sInf s).toReal = sInf (ENNReal.toReal '' s)


@[fun_prop]
theorem hasStrictFDerivAt_list_prod' [Fintype ι] {l : List ι} {x : ι → 𝔸} :
    HasStrictFDerivAt (𝕜 := 𝕜) (fun x ↦ (l.map x).prod)
      (∑ i : Fin l.length, ((l.take i).map x).prod •
        smulRight (proj (l.get i)) ((l.drop (.succ i)).map x).prod) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{ι : Type u_6}
{𝔸 : Type u_7}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
[Fintype ι]
{l : List ι}
{x : ι → 𝔸}

HasStrictFDerivAt (fun x => (List.map x l).prod)
  (∑ i : Fin l.length,
    (List.map x (List.take (↑i) l)).prod •
      (ContinuousLinearMap.proj (l.get i)).smulRight (List.map x (List.drop (↑i).succ l)).prod)
  x


theorem has_bind_eq_bind {β} (c : Computation α) (f : α → Computation β) : c >>= f = bind c f

{α β : Type u}
(c : Computation α)
(f : α → Computation β)


/-- Implementation of `CommMon_.equivLaxBraidedFunctorPUnit`. -/
@[simps]
def laxBraidedToCommMon : LaxBraidedFunctor (Discrete PUnit.{u + 1}) C ⥤ CommMon_ C

(F : CategoryTheory.LaxBraidedFunctor (CategoryTheory.Discrete PUnit.{u + 1}) C)

(CommMon_.EquivLaxBraidedFunctorPUnit.laxBraidedToCommMon C).obj F =
  F.mapCommMon.obj (CommMon_.trivial (CategoryTheory.Discrete PUnit.{u + 1}))


theorem isPreconnected_setOf_sSameSide (s : AffineSubspace ℝ P) (x : P) :
    IsPreconnected { y | s.SSameSide x y }

{V : Type u_2}
{P : Type u_4}
[SeminormedAddCommGroup V]
[NormedSpace ℝ V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(s : AffineSubspace ℝ P)
(x : P)


theorem LinearMap.toMatrix₂_comp (B : M₁ →ₗ[R] M₂ →ₗ[R] R) (f : M₁' →ₗ[R] M₁) :
    LinearMap.toMatrix₂ b₁' b₂ (B.comp f) =
      (toMatrix b₁' b₁ f)ᵀ * LinearMap.toMatrix₂ b₁ b₂ B

{R : Type u_1}
{M₁ : Type u_7}
{M₂ : Type u_8}
{M₁' : Type u_9}
{n : Type u_12}
{m : Type u_13}
{n' : Type u_14}
[CommSemiring R]
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
[DecidableEq n]
[Fintype n]
[DecidableEq m]
[Fintype m]
(b₁ : Basis n R M₁)
(b₂ : Basis m R M₂)
[AddCommMonoid M₁']
[Module R M₁']
(b₁' : Basis n' R M₁')
[Fintype n']
[DecidableEq n']
(B : M₁ →ₗ[R] M₂ →ₗ[R] R)
(f : M₁' →ₗ[R] M₁)

(LinearMap.toMatrix₂ b₁' b₂) (B ∘ₗ f) = ((LinearMap.toMatrix b₁' b₁) f)ᵀ * (LinearMap.toMatrix₂ b₁ b₂) B


@[simp]
theorem multicofork_ι_app_right' (b) :
    colimit.ι (MultispanIndex.multispan I) (WalkingMultispan.right b) = π I b

(I : CategoryTheory.Limits.MultispanIndex C)

CategoryTheory.Limits.colimit.ι I.multispan (CategoryTheory.Limits.WalkingMultispan.right b) =
  CategoryTheory.Limits.Multicoequalizer.π I b


@[simp]
theorem add_modEq_left : a + b ≡ a [PMOD p] ↔ b ≡ 0 [PMOD p]

{α : Type u_1}
[AddCommGroup α]
{p a b : α}


theorem iUnion_def : π.iUnion = ⋃ J ∈ π, ↑J

{ι : Type u_1}
{I : BoxIntegral.Box ι}
(π : BoxIntegral.TaggedPrepartition I)


/-- The fundamental property of the adjoint. -/
theorem adjoint_inner_right (A : E →L[𝕜] F) (x : E) (y : F) : ⟪x, (A†) y⟫ = ⟪A x, y⟫

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

⟪x, (ContinuousLinearMap.adjoint A) y⟫_𝕜 = ⟪A x, y⟫_𝕜


@[simp]
theorem card_pi (f : Π₀ i, Finset (α i)) : f.pi.card = f.prod fun i => (f i).card

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


/-- If for some `n`, `m ^ n • a = a`, then `period m a ≤ n`. -/
@[to_additive "If for some `n`, `(n • m) +ᵥ a = a`, then `period m a ≤ n`."]
theorem period_le_of_fixed {m : M} {a : α} {n : ℕ} (n_pos : 0 < n) (fixed : m ^ n • a = a) :
    period m a ≤ n

{α : Type v}
{M : Type u}
[AddMonoid M]
[AddAction M α]
{m : M}
{a : α}
{n : ℕ}
(n_pos : 0 < n)
(fixed : n • m +ᵥ a = a)


lemma Icc_subset_uIcc : Icc a b ⊆ [[a, b]]


@[to_additive]
lemma prod_dite_of_true {p : α → Prop} {_ : DecidablePred p} (h : ∀ i ∈ s, p i) (f : ∀ i, p i → β)
    (g : ∀ i, ¬ p i → β) :
    ∏ i ∈ s, (if hi : p i then f i hi else g i hi) = ∏ i : s, f i.1 (h _ i.2)

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
[CommMonoid β]
{p : α → Prop}

∀ {x : DecidablePred p} (h : ∀ i ∈ s, p i) (f : (i : α) → p i → β) (g : (i : α) → ¬p i → β),
  (∏ i ∈ s, if hi : p i then f i hi else g i hi) = ∏ i : { x // x ∈ s }, f ↑i ⋯


lemma baseChange_addX (x₁ x₂ L : A) :
    (W.baseChange B).toAffine.addX (f x₁) (f x₂) (f L) =
      f ((W.baseChange A).toAffine.addX x₁ x₂ L)

{R : Type r}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type s}
[CommRing S]
[Algebra R S]
{A : Type u}
[CommRing A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
{B : Type v}
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
(f : A →ₐ[S] B)
(x₁ x₂ L : A)

(WeierstrassCurve.baseChange W B).toAffine.addX (f x₁) (f x₂) (f L) =
  f ((WeierstrassCurve.baseChange W A).toAffine.addX x₁ x₂ L)


@[simp]
theorem other_spec' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : s(a, Mem.other' h) = z

{α : Type u_1}
[DecidableEq α]
{a : α}
{z : Sym2 α}
(h : a ∈ z)


lemma schnirelmannDensity_setOf_modeq_one {m : ℕ} :
    schnirelmannDensity {n | n ≡ 1 [MOD m]} = (m⁻¹ : ℝ)

schnirelmannDensity {n | n ≡ 1 [MOD m]} = (↑m)⁻¹


theorem map_le_of_map_zero (x : ℝ) : f x ≤ f 0 + ⌈x⌉


@[simp] theorem zero_re : (0 : ℍ[R]).re = 0


theorem ext_inner_left {x y : E} (h : ∀ v, ⟪v, x⟫ = ⟪v, y⟫) : x = y

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{x y : E}
(h : ∀ (v : E), ⟪v, x⟫_𝕜 = ⟪v, y⟫_𝕜)


theorem prefix_take_iff {x y : List α} {n : ℕ} : x <+: y.take n ↔ x <+: y ∧ x.length ≤ n

x <+: List.take n y ↔ x <+: y ∧ x.length ≤ n


theorem Disjoint.eq_bot : Disjoint a b → a ⊓ b = ⊥

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{a b : α}


@[simp]
theorem Quotient.mkₐ_eq_mk (I : Ideal A) : ⇑(Quotient.mkₐ R₁ I) = Quotient.mk I

(R₁ : Type u_1)
{A : Type u_3}
[CommSemiring R₁]
[CommRing A]
[Algebra R₁ A]
(I : Ideal A)

⇑(Ideal.Quotient.mkₐ R₁ I) = ⇑(Ideal.Quotient.mk I)


@[simp]
theorem coe_orderIsoMultiset_symm [DecidableEq ι] :
    ⇑(@orderIsoMultiset ι).symm = Multiset.toFinsupp


@[simp] lemma ceilDiv_apply (f : ι →₀ β) (a : α) (i : ι) : (f ⌈/⌉ a) i = f i ⌈/⌉ a

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[CeilDiv α β]
(f : ι →₀ β)
(a : α)
(i : ι)


theorem mul_le_right {x y : I} : x * y ≤ y


theorem Countable.exists_cycleOn (hs : s.Countable) :
    ∃ f : Perm α, f.IsCycleOn s ∧ { x | f x ≠ x } ⊆ s

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


@[simp, deprecated le_top "Don't mix Option and WithTop" (since := "2024-05-27")]
theorem le_none {a : WithTop α} : @LE.le (WithTop α) _ a none


@[to_additive (attr := simp)]
lemma orderOf_mk (a : G) (ha) : orderOf (⟨a, ha⟩ : H) = orderOf a

{G : Type u_1}
[Group G]
{H : Subgroup G}
(a : G)
(ha : a ∈ H)


theorem rootMultiplicity_sub_one_le_derivative_rootMultiplicity_of_ne_zero
    (p : R[X]) (t : R) (hnezero : derivative p ≠ 0) :
    p.rootMultiplicity t - 1 ≤ p.derivative.rootMultiplicity t

{R : Type u}
[CommRing R]
(p : R[X])
(t : R)
(hnezero : Polynomial.derivative p ≠ 0)

Polynomial.rootMultiplicity t p - 1 ≤ Polynomial.rootMultiplicity t (Polynomial.derivative p)


theorem Iio_def (a : α) : { x | x < a } = Iio a


@[simp]
theorem mul_transvection_apply_same (a : n) (c : R) (M : Matrix n n R) :
    (M * transvection i j c) a j = M a j + c * M a i

{n : Type u_1}
{R : Type u₂}
[DecidableEq n]
[CommRing R]
(i j : n)
[Fintype n]
(a : n)
(c : R)
(M : Matrix n n R)

(M * Matrix.transvection i j c) a j = M a j + c * M a i


lemma Module.Injective.extension_property
    (f : P →ₗ[R] P') (hf : Function.Injective f)
    (g : P →ₗ[R] M) : ∃ h : P' →ₗ[R] M, h ∘ₗ f = g

(R : Type uR)
[Ring R]
[Small.{uM, uR} R]
(M : Type uM)
[AddCommGroup M]
[Module R M]
[inj : Module.Injective R M]
(P : Type uP)
[AddCommGroup P]
[Module R P]
(P' : Type uP')
[AddCommGroup P']
[Module R P']
(f : P →ₗ[R] P')
(hf : Function.Injective ⇑f)
(g : P →ₗ[R] M)


@[simp] lemma intCast_mul_intCast_mul (h : SemiconjBy a x y) (m n : ℤ) :
    SemiconjBy (m * a) (n * x) (n * y)

{α : Type u_3}
[Ring α]
{a x y : α}
(h : SemiconjBy a x y)
(m n : ℤ)


theorem mdifferentiableWithinAt_iff {f : M → M'} {s : Set M} {x : M} :
    MDifferentiableWithinAt I I' f s x ↔
      ContinuousWithinAt f s x ∧
        DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I' x f)
          ((extChartAt I x).target ∩ (extChartAt I x).symm ⁻¹' s) ((extChartAt I x) x)

{𝕜 : 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}
{x : M}

MDifferentiableWithinAt I I' f s x ↔
  ContinuousWithinAt f s x ∧
    DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I' x f) ((extChartAt I x).target ∩ ↑(extChartAt I x).symm ⁻¹' s)
      (↑(extChartAt I x) x)


@[simp] lemma sublist_singleton {l : List α} {a : α} : l <+ [a] ↔ l = [] ∨ l = [a]


@[simp]
theorem realize_noBotOrder [h : NoBotOrder M] : M ⊨ Language.order.noBotOrderSentence


theorem isOpenPosMeasure_smul {c : ℝ≥0∞} (h : c ≠ 0) : IsOpenPosMeasure (c • μ)

{X : Type u_1}
[TopologicalSpace X]
{m : MeasurableSpace X}
(μ : MeasureTheory.Measure X)
[μ.IsOpenPosMeasure]
{c : ℝ≥0∞}
(h : c ≠ 0)


@[simp]
theorem finSumFinEquiv_apply_left (i : Fin m) :
    (finSumFinEquiv (Sum.inl i) : Fin (m + n)) = Fin.castAdd n i

finSumFinEquiv (Sum.inl i) = Fin.castAdd n i


@[to_additive (attr := simp, norm_cast)]
theorem coe_iInf {ι : Sort*} {S : ι → Subsemigroup M} : (↑(⨅ i, S i) : Set M) = ⋂ i, S i

{M : Type u_1}
[Add M]
{ι : Sort u_4}
{S : ι → AddSubsemigroup M}


protected theorem mdifferentiable (s : Cₛ^∞⟮I; F, V⟯) :
    MDifferentiable I (I.prod 𝓘(𝕜, F)) fun x => TotalSpace.mk' F x (s x : V x)

[TopologicalSpace (Bundle.TotalSpace F V)]

MDifferentiable I (I.prod 𝓘(𝕜, F)) fun x => Bundle.TotalSpace.mk' F x (s x)


theorem interior_pi_set {I : Set ι} (hI : I.Finite) {s : ∀ i, Set (π i)} :
    interior (pi I s) = I.pi fun i => interior (s i)

{ι : Type u_5}
{π : ι → Type u_6}
[T : (i : ι) → TopologicalSpace (π i)]
{I : Set ι}
(hI : I.Finite)
{s : (i : ι) → Set (π i)}

interior (I.pi s) = I.pi fun i => interior (s i)


theorem Lex.mono_left (hr : ∀ a b, r₁ a b → r₂ a b) (h : Lex r₁ s x y) : Lex r₂ s x y

∀ {α : Type u_1} {r₁ r₂ : α → α → Prop} {β : Type u_2} {s : β → β → Prop} {x y : α ⊕ β},
  (∀ (a b : α), r₁ a b → r₂ a b) → Sum.Lex r₁ s x y → Sum.Lex r₂ s x y


theorem sin_sub_pi_div_two (x : ℝ) : sin (x - π / 2) = -cos x

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


@[simp]
theorem splitAt_eq_take_drop (n : ℕ) (l : List α) : splitAt n l = (take n l, drop n l)

List.splitAt n l = (List.take n l, List.drop n l)


lemma Functor.Elements.ext {F : C ⥤ Type w} (x y : F.Elements) (h₁ : x.fst = y.fst)
    (h₂ : F.map (eqToHom h₁) x.snd = y.snd) : x = y

(h₂ : F.map (CategoryTheory.eqToHom h₁) x.snd = y.snd)


theorem vne_of_ne (h : i ≠ j) : i.val ≠ j.val


@[to_additive]
theorem StrictMono.inv (hf : StrictMono f) : StrictAnti fun x => (f x)⁻¹

[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]


theorem comap_comap (S : StarSubalgebra R C) (g : B →⋆ₐ[R] C) (f : A →⋆ₐ[R] B) :
    (S.comap g).comap f = S.comap (g.comp f)

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
{C : Type u_5}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[Semiring B]
[StarRing B]
[Algebra R B]
[StarModule R B]
[Semiring C]
[StarRing C]
[Algebra R C]
[StarModule R C]
(S : StarSubalgebra R C)
(g : B →⋆ₐ[R] C)
(f : A →⋆ₐ[R] B)

StarSubalgebra.comap f (StarSubalgebra.comap g S) = StarSubalgebra.comap (g.comp f) S


theorem inv {f : E → 𝕜} (hf : DiffContOnCl 𝕜 f s) (h₀ : ∀ x ∈ closure s, f x ≠ 0) :
    DiffContOnCl 𝕜 f⁻¹ s

{𝕜 : Type u_1}
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{f : E → 𝕜}
(hf : DiffContOnCl 𝕜 f s)
(h₀ : ∀ x ∈ closure s, f x ≠ 0)


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

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


@[to_additive rightAddCoset_eq_iff]
theorem rightCoset_eq_iff {x y : α} : op x • (s : Set α) = op y • s ↔ y * x⁻¹ ∈ s

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

AddOpposite.op x +ᵥ ↑s = AddOpposite.op y +ᵥ ↑s ↔ y + -x ∈ s


theorem HasFDerivAt.of_nmem_tsupport (h : x ∉ tsupport f) :
    HasFDerivAt f (0 : E →L[𝕜] F) x

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


@[simp]
theorem reverse.commutes (r : R) :
    reverse (algebraMap R (CliffordAlgebra Q) r) = algebraMap R _ r

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
(r : R)

CliffordAlgebra.reverse ((algebraMap R (CliffordAlgebra Q)) r) = (algebraMap R (CliffordAlgebra Q)) r


/-- The functor `LeftExtension L' F ⥤ LeftExtension L F`
induced by a natural transformation `L' ⟶ L ⋙ G'`. -/
@[simps!]
def LeftExtension.postcomp₁ (f : L' ⟶ L ⋙ G) (F : C ⥤ H) :
    LeftExtension L' F ⥤ LeftExtension L F

{X Y : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit F) ((CategoryTheory.whiskeringLeft C D' H).obj L')}

∀ (X_1 : D), ((CategoryTheory.Functor.LeftExtension.postcomp₁ G f F).map φ).right.app X_1 = φ.right.app (G.obj X_1)


lemma Module.injective_iff_ulift_injective :
    Module.Injective R M ↔ Module.Injective R (ULift.{v'} M)

(R : Type u)
[Ring R]
(M : Type v)
[AddCommGroup M]
[Module R M]
[Small.{v, u} R]

Module.Injective R M ↔ Module.Injective R (ULift.{v', v} M)


theorem abs_cpow_of_ne_zero {z : ℂ} (hz : z ≠ 0) (w : ℂ) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w)

Complex.abs (z ^ w) = Complex.abs z ^ w.re / rexp (z.arg * w.im)


lemma completedHurwitzZetaEven_eq (a : UnitAddCircle) (s : ℂ) :
    completedHurwitzZetaEven a s =
    completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s - 1 / (1 - s)

HurwitzZeta.completedHurwitzZetaEven a s =
  HurwitzZeta.completedHurwitzZetaEven₀ a s - (if a = 0 then 1 else 0) / s - 1 / (1 - s)


/-- The orthocenter equals the Monge point. -/
theorem orthocenter_eq_mongePoint (t : Triangle ℝ P) : t.orthocenter = t.mongePoint

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

t.orthocenter = Affine.Simplex.mongePoint t


@[simp]
theorem coeff_X_mul (p : R[X]) (n : ℕ) : coeff (X * p) (n + 1) = coeff p n

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

(Polynomial.X * p).coeff (n + 1) = p.coeff n


theorem max_def [LinearOrder β] (x y : β*) : max x y = map₂ max x y

{α : Type u}
{β : Type v}
{φ : Ultrafilter α}
[LinearOrder β]
(x y : (↑φ).Germ β)


protected theorem denseInducing (hp_ne_top : p ≠ ∞) :
    DenseInducing ((↑) : Lp.simpleFunc E p μ → Lp E p μ)

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[Fact (1 ≤ p)]
(hp_ne_top : p ≠ ⊤)


@[to_additive]
theorem mul_def [Mul β] (x y : α) :
    letI := Equiv.mul e
    x * y = e.symm (e x * e y)

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


@[to_additive]
theorem iff_existsUnique (aA : a0 ∈ A) (bB : b0 ∈ B) :
    UniqueMul A B a0 b0 ↔ ∃! ab, ab ∈ A ×ˢ B ∧ ab.1 * ab.2 = a0 * b0

{G : Type u_1}
[Mul G]
{A B : Finset G}
{a0 b0 : G}
(aA : a0 ∈ A)
(bB : b0 ∈ B)


lemma left_deriv_le_slope (hfc : ConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableWithinAt ℝ f (Iio y) y) :
    derivWithin f (Iio y) y ≤ slope f x y

(hfd : DifferentiableWithinAt ℝ f (Set.Iio y) y)

derivWithin f (Set.Iio y) y ≤ slope f x y


/-- Let `I` be a fractional ideal of `K`. Assume that `B : ℝ` is such that
`minkowskiBound K I < volume (convexBodySum K B)` where `convexBodySum K B` is the set of points
`x` such that `∑ w real, ‖x w‖ + 2 * ∑ w complex, ‖x w‖ ≤ B` (see `convexBodySum_volume` for
the computation of this volume), then there exists a nonzero algebraic number `a` in `I` such
that `|Norm a| < (B / d) ^ d` where `d` is the degree of `K`. -/
theorem exists_ne_zero_mem_ideal_of_norm_le {B : ℝ}
    (h : (minkowskiBound K I) ≤ volume (convexBodySum K B)) :
    ∃ a ∈ (I : FractionalIdeal (𝓞 K)⁰ K), a ≠ 0 ∧
      |Algebra.norm ℚ (a : K)| ≤ (B / finrank ℚ K) ^ finrank ℚ K

(I : (FractionalIdeal (nonZeroDivisors (NumberField.RingOfIntegers K)) K)ˣ)

(h :
  NumberField.mixedEmbedding.minkowskiBound K I ≤ MeasureTheory.volume (NumberField.mixedEmbedding.convexBodySum K B))

∃ a ∈ ↑I, a ≠ 0 ∧ ↑|(Algebra.norm ℚ) a| ≤ (B / ↑(FiniteDimensional.finrank ℚ K)) ^ FiniteDimensional.finrank ℚ K


theorem chain_pmap_of_chain {S : β → β → Prop} {p : α → Prop} {f : ∀ a, p a → β}
    (H : ∀ a b ha hb, R a b → S (f a ha) (f b hb)) {a : α} {l : List α} (hl₁ : Chain R a l)
    (ha : p a) (hl₂ : ∀ a ∈ l, p a) : Chain S (f a ha) (List.pmap f l hl₂)

(H : ∀ (a b : α) (ha : p a) (hb : p b), R a b → S (f a ha) (f b hb))

List.Chain S (f a ha) (List.pmap f l hl₂)


theorem Ioo_eq_range' : Ioo a b = ⟨List.range' (a + 1) (b - a - 1), List.nodup_range' _ _⟩

Finset.Ioo a b = { val := ↑(List.range' (a + 1) (b - a - 1)), nodup := ⋯ }


/-- To bound the Hausdorff measure of a set, one may use coverings with maximum diameter tending
to `0`, indexed by any sequence of finite types. -/
theorem hausdorffMeasure_le_liminf_sum {β : Type*} {ι : β → Type*} [∀ n, Fintype (ι n)]
    (d : ℝ) (s : Set X) {l : Filter β} (r : β → ℝ≥0∞) (hr : Tendsto r l (𝓝 0))
    (t : ∀ n : β, ι n → Set X) (ht : ∀ᶠ n in l, ∀ i, diam (t n i) ≤ r n)
    (hst : ∀ᶠ n in l, s ⊆ ⋃ i, t n i) : μH[d] s ≤ liminf (fun n => ∑ i, diam (t n i) ^ d) l

(r : β → ℝ≥0∞)

(ht : ∀ᶠ (n : β) in l, ∀ (i : ι n), EMetric.diam (t n i) ≤ r n)

μH[d] s ≤ Filter.liminf (fun n => ∑ i : ι n, EMetric.diam (t n i) ^ d) l


/-- The Weierstrass curve mapped over a ring homomorphism `φ : R →+* A`. -/
@[simps]
def map : WeierstrassCurve A

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
{A : Type v}
[CommRing A]
(φ : R →+* A)


theorem coord_norm' {x : E} (h : x ≠ 0) : ‖(‖x‖ : 𝕜) • coord 𝕜 x h‖ = 1

(𝕜 : Type v)
[RCLike 𝕜]
{E : Type u}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
(h : x ≠ 0)

‖↑‖x‖ • ContinuousLinearEquiv.coord 𝕜 x h‖ = 1


theorem map_mono {S₁ S₂ : NonUnitalStarSubalgebra R A} {f : F} :
    S₁ ≤ S₂ → (map f S₁ : NonUnitalStarSubalgebra R B) ≤ map f S₂

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
{S₁ S₂ : NonUnitalStarSubalgebra R A}
{f : F}

S₁ ≤ S₂ → NonUnitalStarSubalgebra.map f S₁ ≤ NonUnitalStarSubalgebra.map f S₂


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

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


theorem Gamma_nonneg_of_nonneg {s : ℝ} (hs : 0 ≤ s) : 0 ≤ Gamma s


@[simp]
theorem image_preimage (h : X ≃ₜ Y) (s : Set Y) : h '' (h ⁻¹' s) = s

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)
(s : Set Y)


/-- 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 φ).right = F.map φ.right


/-- The map between edge sets induced by a homomorphism.
The underlying map on edges is given by `Sym2.map`. -/
@[simps]
def mapEdgeSet (e : G.edgeSet) : G'.edgeSet

{V : Type u_1}
{W : Type u_2}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G →g G')
(e : ↑G.edgeSet)


/-- If `p` is a prime and `n` is `s`-factored, then every product `p^e * n`
is `s ∪ {p}`-factored. -/
lemma pow_mul_mem_factoredNumbers {s : Finset ℕ} {p n : ℕ} (hp : p.Prime) (e : ℕ)
    (hn : n ∈ factoredNumbers s) :
    p ^ e * n ∈ factoredNumbers (insert p s)

{s : Finset ℕ}
{p n : ℕ}
(hp : Nat.Prime p)
(e : ℕ)
(hn : n ∈ Nat.factoredNumbers s)

p ^ e * n ∈ Nat.factoredNumbers (insert p s)


/-- This lemma is superceded by `MeasureTheory.Memℒp.integral_indicator_norm_ge_nonneg_le`
which does not require measurability. -/
theorem Memℒp.integral_indicator_norm_ge_nonneg_le_of_meas (hf : Memℒp f 1 μ)
    (hmeas : StronglyMeasurable f) {ε : ℝ} (hε : 0 < ε) :
    ∃ M : ℝ, 0 ≤ M ∧ (∫⁻ x, ‖{ x | M ≤ ‖f x‖₊ }.indicator f x‖₊ ∂μ) ≤ ENNReal.ofReal ε

(hmeas : MeasureTheory.StronglyMeasurable f)

∃ M, 0 ≤ M ∧ ∫⁻ (x : α), ↑‖{x | M ≤ ↑‖f x‖₊}.indicator f x‖₊ ∂μ ≤ ENNReal.ofReal ε


protected theorem hasFiniteFPowerSeriesOnBall :
    HasFiniteFPowerSeriesOnBall f f.toFormalMultilinearSeries 0 (Fintype.card ι + 1) ⊤

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{ι : Type u_2}
{E : ι → Type u_3}
[(i : ι) → NormedAddCommGroup (E i)]
[(i : ι) → NormedSpace 𝕜 (E i)]
[Fintype ι]
(f : ContinuousMultilinearMap 𝕜 E F)

HasFiniteFPowerSeriesOnBall (⇑f) f.toFormalMultilinearSeries 0 (Fintype.card ι + 1) ⊤


@[simp]
theorem restrictScalars_neg (f : M →ₗ[S] N) : (-f).restrictScalars R = -f.restrictScalars R

{R : Type u_17}
{S : Type u_18}
{M : Type u_19}
{N : Type u_20}
[Semiring R]
[Semiring S]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[Module S M]
[Module S N]
[LinearMap.CompatibleSMul M N R S]
(f : M →ₗ[S] N)


@[simp]
lemma toNNReal_eq_natCast {r : ℝ} {n : ℕ} (hn : n ≠ 0) : r.toNNReal = n ↔ r = n


@[simp]
theorem cast_refl {i} (h : i = i) : cast R M h = LinearEquiv.refl _ _

(R : Type u_1)
(M : Type u_2)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{i : ℕ}
(h : i = i)

TensorPower.cast R M h = LinearEquiv.refl R (⨂[R]^i M)


@[simp] lemma toMeasure_map (ν : ProbabilityMeasure Ω) {f : Ω → Ω'} (hf : AEMeasurable f ν) :
    (ν.map hf).toMeasure = ν.toMeasure.map f

(ν : MeasureTheory.ProbabilityMeasure Ω)

↑(ν.map hf) = MeasureTheory.Measure.map f ↑ν


theorem comp_right_differentiableOn_iff {f : F → G} {s : Set F} :
    DifferentiableOn 𝕜 (f ∘ iso) (iso ⁻¹' s) ↔ DifferentiableOn 𝕜 f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(iso : E ≃L[𝕜] F)
{f : F → G}
{s : Set F}

DifferentiableOn 𝕜 (f ∘ ⇑iso) (⇑iso ⁻¹' s) ↔ DifferentiableOn 𝕜 f s


/-- A closure operator on the preorder `α` is a monotone function which is extensive (every `x`
is less than its closure) and idempotent. -/
structure ClosureOperator [Preorder α] extends α →o α where
  /-- An element is less than or equal its closure -/
  le_closure' : ∀ x, x ≤ toFun x
  /-- Closures are idempotent -/
  idempotent' : ∀ x, toFun (toFun x) = toFun x
  /-- Predicate for an element to be closed.

  By default, this is defined as `c.IsClosed x := (c x = x)` (see `isClosed_iff`).
  We allow an override to fix definitional equalities. -/
  IsClosed (x : α) : Prop := toFun x = x
  isClosed_iff {x : α} : IsClosed x ↔ toFun x = x := by aesop

{α : Type u_1}
[Preorder α]
(self : ClosureOperator α)
{x : α}


theorem Lan.existsUnique [HasLeftKanExtension f g] (s : LeftExtension f g) :
    ∃! τ, lanUnit f g ≫ f ◁ τ = s.unit

(s : CategoryTheory.Bicategory.LeftExtension f g)

∃! τ,
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.lanUnit f g)
      (CategoryTheory.Bicategory.whiskerLeft f τ) =
    s.unit


@[simp]
theorem sum_monomial_eq : ∀ p : R[X], (p.sum fun n a => monomial n a) = p

(p.sum fun n a => (Polynomial.monomial n) a) = p


protected lemma sq_eq_sq_iff_eq_or_eq_neg {a b : Rˣ} : a ^ 2 = b ^ 2 ↔ a = b ∨ a = -b

{R : Type x}
[CommRing R]
[NoZeroDivisors R]
{a b : Rˣ}


theorem zeroLocus_iSup {ι : Sort*} (I : ι → Ideal R) :
    zeroLocus ((⨆ i, I i : Ideal R) : Set R) = ⋂ i, zeroLocus (I i)

{R : Type u}
[CommSemiring R]
{ι : Sort u_1}
(I : ι → Ideal R)

PrimeSpectrum.zeroLocus ↑(⨆ i, I i) = ⋂ i, PrimeSpectrum.zeroLocus ↑(I i)


@[to_additive Iic_add_Iic_subset]
theorem Iic_mul_Iic_subset' [LocallyFiniteOrderBot α] (a b : α) : Iic a * Iic b ⊆ Iic (a * b)

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

[CovariantClass α α (Function.swap HAdd.hAdd) LE.le]

Finset.Iic a + Finset.Iic b ⊆ Finset.Iic (a + b)


theorem zmultiplesQuotientStabilizerEquiv_symm_apply (n : ZMod (minimalPeriod (a +ᵥ ·) b)) :
    (zmultiplesQuotientStabilizerEquiv a b).symm n =
      (cast n : ℤ) • (⟨a, mem_zmultiples a⟩ : zmultiples a)

(n : ZMod (Function.minimalPeriod (fun x => a +ᵥ x) b))

(AddAction.zmultiplesQuotientStabilizerEquiv a b).symm n = n.cast • ↑⟨a, ⋯⟩


@[simp]
theorem functor_map_id (F : Discrete J ⥤ C) {j : Discrete J} (f : j ⟶ j) :
    F.map f = 𝟙 (F.obj j)

(F : CategoryTheory.Functor (CategoryTheory.Discrete J) C)

F.map f = CategoryTheory.CategoryStruct.id (F.obj j)


theorem StableUnderBaseChange.universally_eq {P : MorphismProperty C}
    (hP : P.StableUnderBaseChange) : P.universally = P

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


@[to_additive]
theorem coeFn_mul (f g : α →ₘ[μ] γ) : ⇑(f * g) =ᵐ[μ] f * g

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace γ]
[Add γ]
[ContinuousAdd γ]
(f g : α →ₘ[μ] γ)


/-- Elements of finite order are of finite order in submonoids. -/
@[to_additive "Elements of finite order are of finite order in submonoids."]
theorem Submonoid.isOfFinOrder_coe {H : Submonoid G} {x : H} :
    IsOfFinOrder (x : G) ↔ IsOfFinOrder x

{G : Type u_1}
[Monoid G]
{H : Submonoid G}
{x : ↥H}


protected theorem mk_one (h : ∀ x y, dist (f x) (f y) ≤ dist x y) : LipschitzWith 1 f

(h : ∀ (x y : α), dist (f x) (f y) ≤ dist x y)


/-- Reinterpret `Additive G ≃+ H` as `G ≃* Multiplicative H`. -/
@[simps]
def AddEquiv.toMultiplicative' [MulOneClass G] [AddZeroClass H] :
    Additive G ≃+ H ≃ (G ≃* Multiplicative H)

{G : Type u_1}
{H : Type u_2}
[MulOneClass G]
[AddZeroClass H]
(f : Additive G ≃+ H)
(a : Multiplicative H)

(AddEquiv.toMultiplicative' f).symm a = (AddMonoidHom.toMultiplicative'' f.symm.toAddMonoidHom) a


protected nonrec theorem ContinuousAt.nhds (h : ContinuousAt f x) : ContinuousAt (𝓝 ∘ f) x

{X : Type u_4}
{Y : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{x : X}
(h : ContinuousAt f x)


@[reassoc (attr := simp)]
lemma associator_hom_snd_fst (X Y Z : C) :
    (α_ X Y Z).hom ≫ snd _ _ ≫ fst _ _ = fst _ _ ≫ snd _ _

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).hom
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.ChosenFiniteProducts.snd X (CategoryTheory.MonoidalCategory.tensorObj Y Z))
      (CategoryTheory.ChosenFiniteProducts.fst Y Z)) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.ChosenFiniteProducts.fst (CategoryTheory.MonoidalCategory.tensorObj X Y) Z)
    (CategoryTheory.ChosenFiniteProducts.snd X Y)


/-- A completion of `α` is the data of a complete separated uniform space (from the same universe)
and a map from `α` with dense range and inducing the original uniform structure on `α`. -/
structure AbstractCompletion (α : Type u) [UniformSpace α] where
  /-- The underlying space of the completion. -/
  space : Type u
  /-- A map from a space to its completion. -/
  coe : α → space
  /-- The completion carries a uniform structure. -/
  uniformStruct : UniformSpace space
  /-- The completion is complete. -/
  complete : CompleteSpace space
  /-- The completion is a T₀ space. -/
  separation : T0Space space
  /-- The map into the completion is uniform-inducing. -/
  uniformInducing : UniformInducing coe
  /-- The map into the completion has dense range. -/
  dense : DenseRange coe

{α : Type u}
[UniformSpace α]
(self : AbstractCompletion α)


/-- The exponential characteristic is unique. -/
theorem ExpChar.eq {p q : ℕ} (hp : ExpChar R p) (hq : ExpChar R q) : p = q

{R : Type u}
[Semiring R]
{p q : ℕ}
(hp : ExpChar R p)
(hq : ExpChar R q)


lemma inv_def' (q : ℚ) : q⁻¹ = q.den /. q.num


theorem rfindOpt_dom {α} {f : ℕ → Option α} : (rfindOpt f).Dom ↔ ∃ n a, a ∈ f n


@[to_additive]
theorem lcm_orderOf_eq_exponent [Fintype G] : (Finset.univ : Finset G).lcm orderOf = exponent G

Finset.univ.lcm orderOf = Monoid.exponent G


theorem degree_X_pow_add_C {n : ℕ} (hn : 0 < n) (a : R) : degree ((X : R[X]) ^ n + C a) = n

{R : Type u}
[Nontrivial R]
[Semiring R]
{n : ℕ}
(hn : 0 < n)
(a : R)

(Polynomial.X ^ n + Polynomial.C a).degree = ↑n


@[simp]
theorem nondegenerate_toMatrix'_iff {B : BilinForm R₃ (ι → R₃)} :
    B.toMatrix'.Nondegenerate (m := ι) ↔ B.Nondegenerate

{R₃ : Type u_7}
[CommRing R₃]
{ι : Type u_12}
[DecidableEq ι]
[Fintype ι]
{B : LinearMap.BilinForm R₃ (ι → R₃)}

(LinearMap.BilinForm.toMatrix' B).Nondegenerate ↔ B.Nondegenerate


@[simp]
theorem comap_top (f : K →+* L) : (⊤ : Subfield L).comap f = ⊤

{K : Type u}
{L : Type v}
[DivisionRing K]
[DivisionRing L]
(f : K →+* L)


theorem subset_conjugatesOfSet : s ⊆ conjugatesOfSet s


@[to_additive]
theorem iIndepFun.indepFun_finset_prod_of_not_mem (hf_Indep : iIndepFun (fun _ ↦ m) f κ μ)
    (hf_meas : ∀ i, Measurable (f i)) {s : Finset ι} {i : ι} (hi : i ∉ s) :
    IndepFun (∏ j ∈ s, f j) (f i) κ μ

{f : ι → Ω → β}

(hf_Indep : ProbabilityTheory.Kernel.iIndepFun (fun x => m) f κ μ)

ProbabilityTheory.Kernel.IndepFun (∏ j ∈ s, f j) (f i) κ μ


/-- An angle in a right-angled triangle expressed using `arcsin`, version subtracting vectors. -/
theorem angle_sub_eq_arcsin_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x ≠ 0 ∨ y ≠ 0) :
    angle x (x - y) = Real.arcsin (‖y‖ / ‖x - y‖)

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}
(h : ⟪x, y⟫_ℝ = 0)
(h0 : x ≠ 0 ∨ y ≠ 0)

InnerProductGeometry.angle x (x - y) = Real.arcsin (‖y‖ / ‖x - y‖)


theorem isLittleO_id_const {c : F''} (hc : c ≠ 0) : (fun x : E'' => x) =o[𝓝 0] fun _x => c

{E'' : Type u_9}
{F'' : Type u_10}
[NormedAddCommGroup E'']
[NormedAddCommGroup F'']
{c : F''}
(hc : c ≠ 0)


/-- Constructor for short complexes in `ModuleCat.{v} R` taking as inputs
morphisms `f` and `g` and the assumption `LinearMap.range f ≤ LinearMap.ker g`. -/
@[simps]
def moduleCatMkOfKerLERange {X₁ X₂ X₃ : ModuleCat.{v} R} (f : X₁ ⟶ X₂) (g : X₂ ⟶ X₃)
    (hfg : LinearMap.range f ≤ LinearMap.ker g) : ShortComplex (ModuleCat.{v} R)

(CategoryTheory.ShortComplex.moduleCatMkOfKerLERange f g hfg).X₁ = X₁


@[simp]
theorem grade_self (a : α) : grade α a = a


private lemma zeckendorf_aux (hm : 0 < m) : m - fib (greatestFib m) < m


@[simp]
theorem lift_ofNat (n : ℕ) [n.AtLeastTwo] :
    lift.{u, v} (no_index (OfNat.ofNat n)) = OfNat.ofNat n

Ordinal.lift.{u, v} (OfNat.ofNat n) = OfNat.ofNat n


theorem MDifferentiableAt.prod_mk {f : M → M'} {g : M → M''} (hf : MDifferentiableAt I I' f x)
    (hg : MDifferentiableAt I I'' g x) :
    MDifferentiableAt I (I'.prod I'') (fun x => (f x, g x)) x

{𝕜 : 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']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{x : M}
{f : M → M'}
{g : M → M''}
(hf : MDifferentiableAt I I' f x)
(hg : MDifferentiableAt I I'' g x)


/-- Adding an edge increases the clique number by at most one. -/
protected theorem CliqueFree.sup_edge (h : G.CliqueFree n) (v w : α) :
    (G ⊔ edge v w).CliqueFree (n + 1)

{α : Type u_1}
{G : SimpleGraph α}
{n : ℕ}
(h : G.CliqueFree n)
(v w : α)

(G ⊔ SimpleGraph.edge v w).CliqueFree (n + 1)


@[simp]
theorem coprod.desc_inl_inr {X Y : C} [HasBinaryCoproduct X Y] :
    coprod.desc coprod.inl coprod.inr = 𝟙 (X ⨿ Y)

CategoryTheory.Limits.coprod.desc CategoryTheory.Limits.coprod.inl CategoryTheory.Limits.coprod.inr = 𝟙 (X ⨿ Y)


/-- Every polynomial splits in the field extension `f : K →+* k` if `K` is algebraically closed.

See also `IsAlgClosed.splits_codomain` for the case where `k` is algebraically closed.
-/
theorem IsAlgClosed.splits_domain {k K : Type*} [Field k] [IsAlgClosed k] [Field K] {f : k →+* K}
    (p : k[X]) : p.Splits f

{k : Type u_1}
{K : Type u_2}
[Field k]
[IsAlgClosed k]
[Field K]
{f : k →+* K}
(p : k[X])


@[simp] lemma closure_inter_ground (M : Matroid α) (X : Set α) :
    M.closure (X ∩ M.E) = M.closure X

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


theorem card_image_of_injOn [DecidableEq β] (H : Set.InjOn f s) : (s.image f).card = s.card

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{f : α → β}
[DecidableEq β]
(H : Set.InjOn f ↑s)


@[deprecated mono_cast (since := "2024-02-10")]
theorem cast_le_cast {a b : ℕ} (h : a ≤ b) : (a : α) ≤ b

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


@[simp]
theorem mem_toFinmap {a : α} {s : AList β} : a ∈ toFinmap s ↔ a ∈ s

{α : Type u}
{β : α → Type v}
{a : α}
{s : AList β}

a ∈ ⟦s⟧ ↔ a ∈ s


theorem prime_rename_iff (s : Set σ) {p : MvPolynomial s R} :
    Prime (rename ((↑) : s → σ) p) ↔ Prime (p : MvPolynomial s R)

{R : Type u}
{σ : Type v}
[CommRing R]
(s : Set σ)
{p : MvPolynomial (↑s) R}

Prime ((MvPolynomial.rename Subtype.val) p) ↔ Prime p


theorem nnnorm_equiv_symm_one {β} [SeminormedAddCommGroup β] (hp : p ≠ ∞) [One β] :
    ‖(WithLp.equiv p (ι → β)).symm 1‖₊ =
      (Fintype.card ι : ℝ≥0) ^ (1 / p).toReal * ‖(1 : β)‖₊

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

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


theorem testBit_lor : ∀ m n k, testBit (m ||| n) k = (testBit m k || testBit n k)

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


theorem mul_rpow_of_ne_zero {x y : ℝ≥0∞} (hx : x ≠ 0) (hy : y ≠ 0) (z : ℝ) :
    (x * y) ^ z = x ^ z * y ^ z


/-- Let `E` be a linear subspace in a real vector space.
If `E` has codimension at least two, its complement is ample. -/
theorem of_one_lt_codim [TopologicalAddGroup F] [ContinuousSMul ℝ F] {E : Submodule ℝ F}
    (hcodim : 1 < Module.rank ℝ (F ⧸ E)) :
    AmpleSet (Eᶜ : Set F)

{F : Type u_1}
[AddCommGroup F]
[Module ℝ F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousSMul ℝ F]
{E : Submodule ℝ F}
(hcodim : 1 < Module.rank ℝ (F ⧸ E))


theorem disjoint_nhdsSet_nhds : Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s

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


@[simp]
theorem sourceHomeomorphBaseSetProd_apply (p : e.source) :
    e.sourceHomeomorphBaseSetProd p = (⟨proj p, e.mem_source.mp p.2⟩, (e p).2)

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
(p : ↑e.source)

e.sourceHomeomorphBaseSetProd p = (⟨proj ↑p, ⋯⟩, (↑e ↑p).2)


@[to_additive]
theorem ball_one_mul_singleton : ball 1 δ * {x} = ball x δ

{E : Type u_1}
[SeminormedCommGroup E]
(δ : ℝ)
(x : E)


lemma Even.sub_odd (ha : Even a) (hb : Odd b) : Odd (a - b)

{α : Type u_2}
[Ring α]
{a b : α}
(ha : Even a)
(hb : Odd b)


theorem findIdx_get?_eq_get_of_exists {xs : List α} (h : ∃ x ∈ xs, p x) :
    xs.get? (xs.findIdx p) = some (xs.get ⟨xs.findIdx p, xs.findIdx_lt_length_of_exists h⟩)

{α : Type u_1}
{p : α → Bool}
{xs : List α}
(h : ∃ x, x ∈ xs ∧ p x = true)

xs.get? (List.findIdx p xs) = some (xs.get ⟨List.findIdx p xs, ⋯⟩)


@[to_additive (attr := continuity, fun_prop)]
theorem continuous_finset_prod {f : ι → X → M} (s : Finset ι) :
    (∀ i ∈ s, Continuous (f i)) → Continuous fun a => ∏ i ∈ s, f i a

{ι : Type u_1}
{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[AddCommMonoid M]
[ContinuousAdd M]
{f : ι → X → M}
(s : Finset ι)

(∀ i ∈ s, Continuous (f i)) → Continuous fun a => ∑ i ∈ s, f i a


theorem disjoint_sum_left {a : Multiset α} {i : Multiset (Multiset α)} :
    Multiset.Disjoint i.sum a ↔ ∀ b ∈ i, Multiset.Disjoint b a

{α : Type u_3}
{a : Multiset α}
{i : Multiset (Multiset α)}

i.sum.Disjoint a ↔ ∀ b ∈ i, b.Disjoint a


theorem isCoatomic_of_isAtomic_of_complementedLattice_of_isModular [IsAtomic α] :
    IsCoatomic α

{α : Type u_2}
[Lattice α]
[BoundedOrder α]
[IsModularLattice α]
[ComplementedLattice α]
[IsAtomic α]


theorem lintegral_fintype [MeasurableSingletonClass α] [Fintype α] (f : α → ℝ≥0∞) :
    ∫⁻ x, f x ∂μ = ∑ x, f x * μ {x}

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasurableSingletonClass α]
[Fintype α]
(f : α → ℝ≥0∞)

∫⁻ (x : α), f x ∂μ = ∑ x : α, f x * μ {x}


@[simp]
theorem sdiff_top (a : α) : a \ ⊤ = ⊥

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


/-- The fundamental property of the operator norm of a continuous multilinear map:
`‖f m‖` is bounded by `‖f‖` times the product of the `‖m i‖`. -/
theorem le_opNorm : ‖f m‖ ≤ ‖f‖ * ∏ i, ‖m i‖

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

‖f m‖ ≤ ‖f‖ * ∏ i : ι, ‖m i‖


theorem map_lt_sum {ι : Type*} {s : Finset ι} {f : ι → R} {g : Γ₀} (hg : g ≠ ⊤)
    (hf : ∀ i ∈ s, g < v (f i)) : g < v (∑ i ∈ s, f i)

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
(v : AddValuation R Γ₀)
{ι : Type u_6}
{s : Finset ι}
{f : ι → R}
{g : Γ₀}
(hg : g ≠ ⊤)
(hf : ∀ i ∈ s, g < v (f i))


/-- An intermediate field of `E / F` is contained in the separable closure of `F` in `E`
if all of its elements are separable over `F`. -/
theorem le_separableClosure' {L : IntermediateField F E} (hs : ∀ x : L, IsSeparable F x) :
    L ≤ separableClosure F E

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
{L : IntermediateField F E}
(hs : ∀ (x : ↥L), IsSeparable F x)


theorem map_iSup {ι : Sort*} (f : R →+* S) (s : ι → Subring R) :
    (iSup s).map f = ⨆ i, (s i).map f

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
{ι : Sort u_1}
(f : R →+* S)
(s : ι → Subring R)

Subring.map f (iSup s) = ⨆ i, Subring.map f (s i)


/-- The duality equivalence `WalkingCospanᵒᵖ ≌ WalkingSpan` -/
@[simps!]
def walkingCospanOpEquiv : WalkingCospanᵒᵖ ≌ WalkingSpan

(X : (CategoryTheory.Limits.WidePullbackShape CategoryTheory.Limits.WalkingPair)ᵒᵖ)

CategoryTheory.Limits.walkingCospanOpEquiv.unitIso.hom.app X = 𝟙 X


@[simp]
theorem mk_pow (x : ℕ × K) (n : ℕ) : mk K p x ^ n = mk K p (x.1, x.2 ^ n)

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

PerfectClosure.mk K p x ^ n = PerfectClosure.mk K p (x.1, x.2 ^ n)


/-- Inserting a smaller numeric left option into a numeric game results in a numeric game. -/
theorem insertLeft_numeric {x x' : PGame} (x_num : x.Numeric) (x'_num : x'.Numeric)
    (h : x' ≤ x) : (insertLeft x x').Numeric

{x x' : SetTheory.PGame}
(x_num : x.Numeric)
(x'_num : x'.Numeric)
(h : x' ≤ x)


theorem Disjoint.disjoint_cycleFactorsFinset {f g : Perm α} (h : Disjoint f g) :
    _root_.Disjoint (cycleFactorsFinset f) (cycleFactorsFinset g)

{α : Type u_2}
[DecidableEq α]
[Fintype α]
{f g : Equiv.Perm α}
(h : f.Disjoint g)


lemma eventuallyle (z : ℂ) (hB : BddAbove ((norm ∘ f) '' (verticalClosedStrip 0 1)))
    (hd : DiffContOnCl ℂ f (verticalStrip 0 1)) (hz : z ∈ verticalStrip 0 1) :
    (fun _ : ℝ ↦ ‖f z‖) ≤ᶠ[𝓝[>] 0]
    (fun ε ↦ ‖((ε + sSupNormIm f 0) ^ (1 - z) * (ε + sSupNormIm f 1) ^ z : ℂ)‖)

(hB : BddAbove (norm ∘ f '' Complex.HadamardThreeLines.verticalClosedStrip 0 1))

(hd : DiffContOnCl ℂ f (Complex.HadamardThreeLines.verticalStrip 0 1))

(hz : z ∈ Complex.HadamardThreeLines.verticalStrip 0 1)

(fun x => ‖f z‖) ≤ᶠ[𝓝[>] 0] fun ε =>
  ‖(↑ε + ↑(Complex.HadamardThreeLines.sSupNormIm f 0)) ^ (1 - z) *
      (↑ε + ↑(Complex.HadamardThreeLines.sSupNormIm f 1)) ^ z‖


/-- The closed thickening `Metric.cthickening δ E` with a fixed thickening radius `δ` is
an increasing function of the subset `E`. -/
theorem cthickening_subset_of_subset (δ : ℝ) {E₁ E₂ : Set α} (h : E₁ ⊆ E₂) :
    cthickening δ E₁ ⊆ cthickening δ E₂

{α : Type u}
[PseudoEMetricSpace α]
(δ : ℝ)
{E₁ E₂ : Set α}
(h : E₁ ⊆ E₂)

Metric.cthickening δ E₁ ⊆ Metric.cthickening δ E₂


@[to_additive]
theorem tendsto_finset_prod {f : ι → α → M} {x : Filter α} {a : ι → M} (s : Finset ι) :
    (∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) →
      Tendsto (fun b => ∏ c ∈ s, f c b) x (𝓝 (∏ c ∈ s, a c))

{ι : Type u_1}
{α : Type u_2}
{M : Type u_3}
[TopologicalSpace M]
[CommMonoid M]
[ContinuousMul M]
{f : ι → α → M}
{x : Filter α}
{a : ι → M}
(s : Finset ι)

(∀ i ∈ s, Filter.Tendsto (f i) x (𝓝 (a i))) → Filter.Tendsto (fun b => ∏ c ∈ s, f c b) x (𝓝 (∏ c ∈ s, a c))


theorem isImage_source_target : e.IsImage e.source e.target

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)


@[simp]
lemma natTrans_app {F G : (Σi, C i) ⥤ D} (h : ∀ i : I, incl i ⋙ F ⟶ incl i ⋙ G) (i : I)
    (X : C i) : (natTrans h).app ⟨i, X⟩ = (h i).app X

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

{F G : CategoryTheory.Functor ((i : I) × C i) D}

(h : (i : I) → (CategoryTheory.Sigma.incl i).comp F ⟶ (CategoryTheory.Sigma.incl i).comp G)

(CategoryTheory.Sigma.natTrans h).app ⟨i, X⟩ = (h i).app X


@[to_additive (attr := simp)]
theorem mulIndicator_eq_one' : mulIndicator s f = 1 ↔ Disjoint (mulSupport f) s

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

s.mulIndicator f = 1 ↔ Disjoint (Function.mulSupport f) s


/-- A singleton `{a}` is accessible under `CutExpand r` if `a` is accessible under `r`,
  assuming `r` is irreflexive. -/
theorem _root_.Acc.cutExpand [IsIrrefl α r] {a : α} (hacc : Acc r a) : Acc (CutExpand r) {a}

{α : Type u_1}
{r : α → α → Prop}
[IsIrrefl α r]
{a : α}
(hacc : Acc r a)


theorem restrict_apply_eq_zero (ht : MeasurableSet t) : μ.restrict s t = 0 ↔ μ (t ∩ s) = 0

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


/-- A surjective continuous linear map between Banach spaces admits a (possibly nonlinear)
controlled right inverse. In general, it is not possible to ensure that such a right inverse
is linear (take for instance the map from `E` to `E/F` where `F` is a closed subspace of `E`
without a closed complement. Then it doesn't have a continuous linear right inverse.) -/
noncomputable irreducible_def nonlinearRightInverseOfSurjective (f : E →SL[σ] F)
  (hsurj : LinearMap.range f = ⊤) : NonlinearRightInverse f

{𝕜 : Type u_5}
{𝕜' : Type u_6}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{σ' : 𝕜' →+* 𝕜}
[RingHomInvPair σ σ']
[RingHomIsometric σ]
[RingHomIsometric σ']
{E : Type u_7}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_8}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
[CompleteSpace F]
[CompleteSpace E]
(f : E →SL[σ] F)
(hsurj : LinearMap.range f = ⊤)

f.nonlinearRightInverseOfSurjective hsurj = Classical.choose ⋯


theorem Nat.cast_withTop (n : ℕ) :  Nat.cast n = WithTop.some n


theorem inducedOuterMeasure_eq' {s : Set α} (hs : P s) : inducedOuterMeasure m P0 m0 s = m s hs

(PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i))

(msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) ⋯ ≤ ∑' (i : ℕ), m (f i) ⋯)

(m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂)

(MeasureTheory.inducedOuterMeasure m P0 m0) s = m s hs


/-- GCD monoid: a `CancelCommMonoidWithZero` with `gcd` (greatest common divisor) and
`lcm` (least common multiple) operations, determined up to a unit. The type class focuses on `gcd`
and we derive the corresponding `lcm` facts from `gcd`.
-/
class GCDMonoid (α : Type*) [CancelCommMonoidWithZero α] where
  /-- The greatest common divisor between two elements. -/
  gcd : α → α → α
  /-- The least common multiple between two elements. -/
  lcm : α → α → α
  /-- The GCD is a divisor of the first element. -/
  gcd_dvd_left : ∀ a b, gcd a b ∣ a
  /-- The GCD is a divisor of the second element. -/
  gcd_dvd_right : ∀ a b, gcd a b ∣ b
  /-- Any common divisor of both elements is a divisor of the GCD. -/
  dvd_gcd : ∀ {a b c}, a ∣ c → a ∣ b → a ∣ gcd c b
  /-- The product of two elements is `Associated` with the product of their GCD and LCM. -/
  gcd_mul_lcm : ∀ a b, Associated (gcd a b * lcm a b) (a * b)
  /-- `0` is left-absorbing. -/
  lcm_zero_left : ∀ a, lcm 0 a = 0
  /-- `0` is right-absorbing. -/
  lcm_zero_right : ∀ a, lcm a 0 = 0

{α : Type u_2}
[CancelCommMonoidWithZero α]
[self : GCDMonoid α]
(a b : α)


@[simp]
theorem cospan_map_inr {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    (cospan f g).map WalkingCospan.Hom.inr = g

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

(CategoryTheory.Limits.cospan f g).map CategoryTheory.Limits.WalkingCospan.Hom.inr = g


theorem ground_nonempty (M : Matroid α) [M.Nonempty] : M.E.Nonempty

{α : Type u_1}
(M : Matroid α)
[M.Nonempty]


theorem SetIndependent.mono {t : Set α} (hst : t ⊆ s) : SetIndependent t

{α : Type u_1}
[CompleteLattice α]
{s : Set α}
(hs : CompleteLattice.SetIndependent s)
{t : Set α}
(hst : t ⊆ s)


@[reassoc]
lemma stalkSpecializes_stalkMap (x x' : X) (h : x ⤳ x') :
    Y.presheaf.stalkSpecializes (f.val.base.map_specializes h) ≫ f.stalkMap x =
      f.stalkMap x' ≫ X.presheaf.stalkSpecializes h

{X Y : AlgebraicGeometry.LocallyRingedSpace}

Y.presheaf.stalkSpecializes ⋯ ≫ AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap f x =
  AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap f x' ≫ X.presheaf.stalkSpecializes h


/-- A sum version of **Vieta's formula** for `Multiset`: the product of the linear terms `X + λ`
where `λ` runs through a multiset `s` is equal to a linear combination of the symmetric functions
`esymm s` of the `λ`'s . -/
theorem prod_X_add_C_eq_sum_esymm (s : Multiset R) :
    (s.map fun r => X + C r).prod =
      ∑ j ∈ Finset.range (Multiset.card s + 1), (C (s.esymm j) * X ^ (Multiset.card s - j))

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

(Multiset.map (fun r => Polynomial.X + Polynomial.C r) s).prod =
  ∑ j ∈ Finset.range (Multiset.card s + 1), Polynomial.C (s.esymm j) * Polynomial.X ^ (Multiset.card s - j)


theorem repr_opow_aux₂ {a0 a'} [N0 : NF a0] [Na' : NF a'] (m : ℕ) (d : ω ∣ repr a')
    (e0 : repr a0 ≠ 0) (h : repr a' + m < (ω ^ repr a0)) (n : ℕ+) (k : ℕ) :
    let R := repr (opowAux 0 a0 (oadd a0 n a' * ofNat m) k m)
    (k ≠ 0 → R < ((ω ^ repr a0) ^ succ (k : Ordinal))) ∧
      ((ω ^ repr a0) ^ (k : Ordinal)) * ((ω ^ repr a0) * (n : ℕ) + repr a') + R =
        ((ω ^ repr a0) * (n : ℕ) + repr a' + m) ^ succ (k : Ordinal)

{a0 a' : ONote}
[N0 : a0.NF]
[Na' : a'.NF]
(m : ℕ)
(d : ω ∣ a'.repr)
(e0 : a0.repr ≠ 0)
(h : a'.repr + ↑m < ω ^ a0.repr)
(n : ℕ+)
(k : ℕ)

let R := (ONote.opowAux 0 a0 (a0.oadd n a' * ↑m) k m).repr;
(k ≠ 0 → R < (ω ^ a0.repr) ^ Order.succ ↑k) ∧
  (ω ^ a0.repr) ^ ↑k * (ω ^ a0.repr * ↑↑n + a'.repr) + R = (ω ^ a0.repr * ↑↑n + a'.repr + ↑m) ^ Order.succ ↑k


@[to_additive]
theorem div_eq_iff_eq_mul : a / b = c ↔ a = c * b


@[to_additive]
lemma mabs_mabs_div_mabs_le (a b : α) : |(|a|ₘ / |b|ₘ)|ₘ ≤ |a / b|ₘ

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


@[simp] lemma _root_.EquivLike.coe_symm_comp_self {F} [EquivLike F α β] (e : F) :
    (e : α ≃ β).symm ∘ e = id

{α : Sort u}
{β : Sort v}
{F : Sort u_1}
[EquivLike F α β]
(e : F)


@[simp]
theorem setPreimage_id : setPreimage (id : α → α) = CompleteLatticeHom.id _

CompleteLatticeHom.setPreimage id = CompleteLatticeHom.id (Set α)


/-- An element of `S` admitting a left inverse in `R` is `M`-regular. -/
theorem of_smul_eq_one (h : a • s = 1) : IsSMulRegular M s

{R : Type u_1}
{S : Type u_2}
{M : Type u_3}
{a : R}
{s : S}
[Monoid S]
[SMul R M]
[SMul R S]
[MulAction S M]
[IsScalarTower R S M]
(h : a • s = 1)


@[simp]
theorem comap_pure {b : β} : comap m (pure b) = 𝓟 (m ⁻¹' {b})

{α : Type u}
{β : Type v}
{m : α → β}
{b : β}


theorem ciSup_subsingleton [Subsingleton ι] (i : ι) (s : ι → α) : ⨆ i, s i = s i

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
[Subsingleton ι]
(i : ι)
(s : ι → α)


protected theorem CompleteSpace.iInf {ι X : Type*} {u : ι → UniformSpace X}
    (hu : ∀ i, @CompleteSpace X (u i))
    (ht : ∃ t, @T2Space X t ∧ ∀ i, (u i).toTopologicalSpace ≤ t) :
    @CompleteSpace X (⨅ i, u i)

(ht : ∃ t, T2Space X ∧ ∀ (i : ι), UniformSpace.toTopologicalSpace ≤ t)


/-- If a property holds for all points in closed balls of arbitrarily large radii, then it holds for
all points. -/
theorem forall_of_forall_mem_closedBall (p : α → Prop) (x : α)
    (H : ∃ᶠ R : ℝ in atTop, ∀ y ∈ closedBall x R, p y) (y : α) : p y

(H : ∃ᶠ (R : ℝ) in Filter.atTop, ∀ y ∈ Metric.closedBall x R, p y)


@[simp]
theorem isCobounded_univ : IsCobounded (univ : Set α)

∀ {x : Bornology α}, Bornology.IsCobounded Set.univ


@[simp]
theorem inf_le_iff : b ⊓ c ≤ a ↔ b ≤ a ∨ c ≤ a

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


/-- Restricting a partial homeomorphism `e` to `e.source ∩ interior s`. We use the interior to make
sure that the restriction is well defined whatever the set s, since partial homeomorphisms are by
definition defined on open sets. In applications where `s` is open, this coincides with the
restriction of partial equivalences -/
@[simps! (config := mfld_cfg) apply symm_apply, simps! (config := .lemmasOnly) source target]
protected def restr (s : Set X) : PartialHomeomorph X Y

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

(e.restr s).source = e.source ∩ interior s


theorem adjugate_def (A : Matrix n n α) : adjugate A = of fun i => cramer Aᵀ (Pi.single i 1)

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A : Matrix n n α)

A.adjugate = Matrix.of fun i => A.transpose.cramer (Pi.single i 1)


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

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


theorem separatesPoints_iff [MeasurableSpace α] : SeparatesPoints α ↔
    ∀ x y : α, (∀ s, MeasurableSet s → (x ∈ s ↔ y ∈ s)) → x = y

MeasurableSpace.SeparatesPoints α ↔ ∀ (x y : α), (∀ (s : Set α), MeasurableSet s → (x ∈ s ↔ y ∈ s)) → x = y


/-- The angle between the negation of two vectors. -/
@[simp]
theorem angle_neg_neg (x y : V) : angle (-x) (-y) = angle x y

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
(x y : V)

InnerProductGeometry.angle (-x) (-y) = InnerProductGeometry.angle x y


theorem setCurr' : ∀ {it}, ValidFor l r it →
    ValidFor l (r.modifyHead fun _ => c) (it.setCurr c)

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

String.Iterator.ValidFor l r it → String.Iterator.ValidFor l (List.modifyHead (fun x => c) r) (it.setCurr c)


@[norm_cast]
theorem coe_le_coe : (a : α) ≤ b ↔ a ≤ b

{α : Type u_1}
[Lattice α]
[BoundedOrder α]
{a b : Complementeds α}

↑a ≤ ↑b ↔ a ≤ b


@[to_additive]
theorem Smooth.extend_one [T2Space M] [One M'] {U : Opens M} {f : U → M'}
    (supp : HasCompactMulSupport f) (diff : Smooth I I' f) : Smooth I I' (Subtype.val.extend f 1)

{𝕜 : 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']
[T2Space M]
[Zero M']
{U : TopologicalSpace.Opens M}
{f : ↥U → M'}
(supp : HasCompactSupport f)
(diff : Smooth I I' f)

Smooth I I' (Function.extend Subtype.val f 0)


theorem imp_semanticallyEquivalent_not_sup : T.SemanticallyEquivalent (φ.imp ψ) (φ.not ⊔ ψ)

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
{n : ℕ}
(φ ψ : L.BoundedFormula α n)

T.SemanticallyEquivalent (φ ⟹ ψ) (∼φ ⊔ ψ)


@[simp] theorem pure_def (a : α) : pure a = [a]


lemma iCondIndepFun.condIndepFun_prod_mk_prod_mk (h_indep : iCondIndepFun m' hm' m f μ)
    (hf : ∀ i, Measurable (f i))
    (i j k l : ι) (hik : i ≠ k) (hil : i ≠ l) (hjk : j ≠ k) (hjl : j ≠ l) :
    CondIndepFun m' hm' (fun a ↦ (f i a, f j a)) (fun a ↦ (f k a, f l a)) μ

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

ProbabilityTheory.CondIndepFun m' hm' (fun a => (f i a, f j a)) (fun a => (f k a, f l a)) μ


theorem getElem?_zipWith {f : α → β → γ} {i : Nat} :
    (List.zipWith f as bs)[i]? = match as[i]?, bs[i]? with
      | some a, some b => some (f a b) | _, _ => none

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{as : List α}
{bs : List β}
{f : α → β → γ}
{i : Nat}

(List.zipWith f as bs)[i]? =
  match as[i]?, bs[i]? with
  | some a, some b => some (f a b)
  | x, x_1 => none


@[simp]
lemma toPresheafOfModules_presheaf_map_apply {X Y : Cᵒᵖ} (f : X ⟶ Y) (x : M.obj X) :
    M.toPresheafOfModules.presheaf.map f x = M.map f x

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
(M : CorePresheafOfModules R)
{X Y : Cᵒᵖ}
(f : X ⟶ Y)
(x : M.obj X)

(M.toPresheafOfModules.presheaf.map f) x = (M.map f) x


theorem subset_diff_singleton {x : α} {s t : Set α} (h : s ⊆ t) (hx : x ∉ s) : s ⊆ t \ {x}

{α : Type u}
{x : α}
{s t : Set α}
(h : s ⊆ t)
(hx : x ∉ s)


@[simp] lemma intCast_mul_right (h : SemiconjBy a x y) (n : ℤ) : SemiconjBy a (n * x) (n * y)

{α : Type u_3}
[Ring α]
{a x y : α}
(h : SemiconjBy a x y)
(n : ℤ)


@[simp]
theorem prodEquivOfIsCompl_symm_apply_snd_eq_zero (h : IsCompl p q) {x : E} :
    ((prodEquivOfIsCompl p q h).symm x).2 = 0 ↔ x ∈ p

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
(p q : Submodule R E)
(h : IsCompl p q)
{x : E}

((p.prodEquivOfIsCompl q h).symm x).2 = 0 ↔ x ∈ p


private theorem hlup : Primrec fun p : _ × (_ × _) × _ => lup p.1 p.2.1 p.2.2

Primrec fun p => Nat.Partrec.Code.lup p.1 p.2.1 p.2.2


theorem sigma_image_fst_preimage_mk {β : α → Type*} [DecidableEq α] (s : Finset (Σa, β a)) :
    ((s.image Sigma.fst).sigma fun a => s.preimage (Sigma.mk a) sigma_mk_injective.injOn) =
      s

{α : Type u}
{β : α → Type u_1}
[DecidableEq α]
(s : Finset ((a : α) × β a))

((Finset.image Sigma.fst s).sigma fun a => s.preimage (Sigma.mk a) ⋯) = s


/-- If two continuous functions are a.e. equal, then they are equal. -/
theorem eq_of_ae_eq {f g : X → Y} (h : f =ᵐ[μ] g) (hf : Continuous f) (hg : Continuous g) : f = g

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{m : MeasurableSpace X}
[TopologicalSpace Y]
[T2Space Y]
{μ : MeasureTheory.Measure X}
[μ.IsOpenPosMeasure]
{f g : X → Y}
(h : f =ᵐ[μ] g)
(hf : Continuous f)
(hg : Continuous g)


theorem two_nsmul_eq_pi_iff {θ : Angle} : (2 : ℕ) • θ = π ↔ θ = (π / 2 : ℝ) ∨ θ = (-π / 2 : ℝ)


/--
`eq_of_testBit_eq` allows proving two natural numbers are equal
if their bits are all equal.
-/
theorem eq_of_testBit_eq {x y : Nat} (pred : ∀i, testBit x i = testBit y i) : x = y

(pred : ∀ (i : Nat), x.testBit i = y.testBit i)


theorem cantorFunction_succ (f : ℕ → Bool) (h1 : 0 ≤ c) (h2 : c < 1) :
    cantorFunction c f = cond (f 0) 1 0 + c * cantorFunction c fun n => f (n + 1)

Cardinal.cantorFunction c f = (bif f 0 then 1 else 0) + c * Cardinal.cantorFunction c fun n => f (n + 1)


lemma condCDF_eq_stieltjesOfMeasurableRat_unit_prod (ρ : Measure (α × ℝ)) (a : α) :
    condCDF ρ a = stieltjesOfMeasurableRat (fun (p : Unit × α) r ↦ (preCDF ρ r p.2).toReal)
      (measurable_preCDF'.comp measurable_snd) ((), a)

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
(a : α)

ProbabilityTheory.condCDF ρ a =
  ProbabilityTheory.stieltjesOfMeasurableRat (fun p r => (ProbabilityTheory.preCDF ρ r p.2).toReal) ⋯ ((), a)


/-- The underlying binary operation of the infimum of a set of equivalence relations
    is the infimum of the set's image under the map to the underlying binary operation. -/
theorem sInf_def {s : Set (Setoid α)} : (sInf s).Rel = sInf (Rel '' s)


theorem isClopen_empty : IsClopen (∅ : Set X)


lemma map₂_tprod_tprod (f : Π i, s i →ₗ[R] t i →ₗ[R] t' i) (x : Π i, s i) (y : Π i, t i) :
    map₂ f (tprod R x) (tprod R y) = tprod R fun i ↦ f i (x i) (y i)

(f : (i : ι) → s i →ₗ[R] t i →ₗ[R] t' i)

((PiTensorProduct.map₂ f) ((PiTensorProduct.tprod R) x)) ((PiTensorProduct.tprod R) y) =
  ⨂ₜ[R] (i : ι), ((f i) (x i)) (y i)


theorem annihilator_quotient {N : Submodule R M} :
    Module.annihilator R (M ⧸ N) = N.colon ⊤

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{N : Submodule R M}


theorem tsub_le_iff_left : a - b ≤ c ↔ a ≤ b + c

{α : Type u_1}
[Preorder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]
{a b c : α}


protected theorem NeBot.le_pure_iff (hf : f.NeBot) : f ≤ pure a ↔ f = pure a

{α : Type u}
{f : Filter α}
{a : α}
(hf : f.NeBot)


@[to_additive]
theorem one_mem_one : (1 : α) ∈ (1 : NonemptyInterval α)


lemma autAdjoinRootXPowSubCEquiv_root (η) :
    autAdjoinRootXPowSubCEquiv hζ hn H η (root _) = ((η : Kˣ) : K) • root _

(H : Irreducible (Polynomial.X ^ n - Polynomial.C a))

((autAdjoinRootXPowSubCEquiv hζ hn H) η) (AdjoinRoot.root (Polynomial.X ^ n - Polynomial.C a)) =
  ↑↑η • AdjoinRoot.root (Polynomial.X ^ n - Polynomial.C a)


@[to_additive (attr := simp) addCentralizer_eq_top_iff_subset]
theorem centralizer_eq_top_iff_subset : centralizer S = Set.univ ↔ S ⊆ center M

{M : Type u_1}
{S : Set M}
[Semigroup M]

S.centralizer = Set.univ ↔ S ⊆ Set.center M


/-- Right scalar multiplication as an order isomorphism. -/
@[simps] def Equiv.smulRight (ha : a ≠ 0) : β ≃ β

{α : Type u}
{β : Type v}
[GroupWithZero α]
[MulAction α β]
{a : α}
(ha : a ≠ 0)
(b : β)


theorem rpow_add_le_add_rpow {p : ℝ} (a b : ℝ≥0) (hp : 0 ≤ p) (hp1 : p ≤ 1) :
    (a + b) ^ p ≤ a ^ p + b ^ p


@[simp]
theorem lift_of {x : R} : lift i a h x = i x

{R : Type u}
{S : Type v}
[CommRing R]
{f : R[X]}
[CommRing S]
{i : R →+* S}
{a : S}
(h : Polynomial.eval₂ i a f = 0)
{x : R}

(AdjoinRoot.lift i a h) ((AdjoinRoot.of f) x) = i x


theorem span_singleton_mul_right_mono [IsDomain R] {x : R} (hx : x ≠ 0) :
    span {x} * I ≤ span {x} * J ↔ I ≤ J

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

Ideal.span {x} * I ≤ Ideal.span {x} * J ↔ I ≤ J


/-- The points of a face of a simplex are given by `mono_of_fin`. -/
theorem face_points' {n : ℕ} (s : Simplex k P n) {fs : Finset (Fin (n + 1))} {m : ℕ}
    (h : fs.card = m + 1) : (s.face h).points = s.points ∘ fs.orderEmbOfFin h

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{n : ℕ}
(s : Affine.Simplex k P n)
{fs : Finset (Fin (n + 1))}
{m : ℕ}
(h : fs.card = m + 1)

(s.face h).points = s.points ∘ ⇑(fs.orderEmbOfFin h)


@[simp, norm_cast, nolint simpNF]
theorem coe_to_nonUnitalAlgHom (f : A →ₐ[R] B) : ⇑(f.toNonUnitalAlgHom) = ⇑f

{R : Type u_2}
[CommSemiring R]
{A : Type u_3}
{B : Type u_4}
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(f : A →ₐ[R] B)


theorem inl_injective [Zero M] : Function.Injective (inl : R → tsze R M)


@[measurability]
theorem Measurable.sup' (hf : Measurable f) (hg : Measurable g) : Measurable (f ⊔ g)

{M : Type u_1}
[MeasurableSpace M]
{α : Type u_2}
{m : MeasurableSpace α}
{f g : α → M}
[Sup M]
[MeasurableSup₂ M]
(hf : Measurable f)
(hg : Measurable g)


@[to_additive]
theorem red_iff_irreducible {x1 b1 x2 b2} (h : (x1, b1) ≠ (x2, b2)) :
    Red [(x1, !b1), (x2, b2)] L ↔ L = [(x1, !b1), (x2, b2)]

{α : Type u}
{L : List (α × Bool)}
{x1 : α}
{b1 : Bool}
{x2 : α}
{b2 : Bool}
(h : (x1, b1) ≠ (x2, b2))


theorem pullback_map_eq_pullbackFstFstIso_inv {X Y S X' Y' S' : C} (f : X ⟶ S) (g : Y ⟶ S)
    (f' : X' ⟶ S') (g' : Y' ⟶ S') (i₁ : X ⟶ X') (i₂ : Y ⟶ Y') (i₃ : S ⟶ S')
    (e₁ : f ≫ i₃ = i₁ ≫ f') (e₂ : g ≫ i₃ = i₂ ≫ g') [Mono i₃] :
    pullback.map f g f' g' i₁ i₂ i₃ e₁ e₂ =
      (pullbackFstFstIso f g f' g' i₁ i₂ i₃ e₁ e₂).inv ≫ pullback.snd _ _ ≫ pullback.fst _ _

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Limits.HasPullbacks C]
{X Y S X' Y' S' : C}
(f : X ⟶ S)
(g : Y ⟶ S)
(f' : X' ⟶ S')
(g' : Y' ⟶ S')
(i₁ : X ⟶ X')
(i₂ : Y ⟶ Y')
(i₃ : S ⟶ S')
(e₁ : f ≫ i₃ = i₁ ≫ f')
(e₂ : g ≫ i₃ = i₂ ≫ g')
[CategoryTheory.Mono i₃]

CategoryTheory.Limits.pullback.map f g f' g' i₁ i₂ i₃ e₁ e₂ =
  (CategoryTheory.Limits.pullbackFstFstIso f g f' g' i₁ i₂ i₃ e₁ e₂).inv ≫
    CategoryTheory.Limits.pullback.snd
        (CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst f' g') i₁)
        (CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.snd f' g') i₂) ≫
      CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.snd f' g') i₂


theorem Equivalence.eqvGen_iff (h : Equivalence r) : EqvGen r a b ↔ r a b

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


theorem Iic_inter_Ioi : Iic a ∩ Ioi b = Ioc b a


/-- A family of continuous linear maps is `C^n` on `s` if all its applications are. -/
theorem contDiffOn_clm_apply {n : ℕ∞} {f : E → F →L[𝕜] G} {s : Set E} [FiniteDimensional 𝕜 F] :
    ContDiffOn 𝕜 n f s ↔ ∀ y, ContDiffOn 𝕜 n (fun x => f x y) s

{𝕜 : 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]
[CompleteSpace 𝕜]
{n : ℕ∞}
{f : E → F →L[𝕜] G}
{s : Set E}
[FiniteDimensional 𝕜 F]

ContDiffOn 𝕜 n f s ↔ ∀ (y : F), ContDiffOn 𝕜 n (fun x => (f x) y) s


/-- Convolution of a measure μ with the zero measure returns the zero measure. -/
@[to_additive (attr := simp) zero_conv]
theorem zero_mconv (μ : Measure M) : μ ∗ (0 : Measure M) = (0 : Measure M)

{M : Type u_1}
[Monoid M]
[MeasurableSpace M]
(μ : MeasureTheory.Measure M)


theorem cpow_def (x y : ℂ) : x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y)

x ^ y = if x = 0 then if y = 0 then 1 else 0 else Complex.exp (Complex.log x * y)


theorem summable_of_sum_le {ι : Type*} {f : ι → ℝ} {c : ℝ} (hf : 0 ≤ f)
    (h : ∀ u : Finset ι, ∑ x ∈ u, f x ≤ c) : Summable f

(h : ∀ (u : Finset ι), ∑ x ∈ u, f x ≤ c)


theorem isLowerSet_sInter {S : Set (Set α)} (hf : ∀ s ∈ S, IsLowerSet s) : IsLowerSet (⋂₀ S)

{α : Type u_1}
[LE α]
{S : Set (Set α)}
(hf : ∀ s ∈ S, IsLowerSet s)


/-- The truncated cast `ENNReal.truncateToReal t : ℝ≥0∞ → ℝ` is monotone when `t ≠ ∞`. -/
lemma monotone_truncateToReal {t : ℝ≥0∞} (t_ne_top : t ≠ ∞) : Monotone (truncateToReal t)


lemma toSections_fac : I.sectionsEquiv.symm ∘ Types.sectionOfCone c = c.toSections

{I : CategoryTheory.Limits.MulticospanIndex (Type u)}

⇑I.sectionsEquiv.symm ∘ CategoryTheory.Limits.Types.sectionOfCone c = c.toSections


theorem toInvSubmonoid_eq_mk' (x : M) : (toInvSubmonoid M S x : S) = mk' S 1 x

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

↑((IsLocalization.toInvSubmonoid M S) x) = IsLocalization.mk' S 1 x


@[ext]
theorem leftDistributor_ext_right {J : Type} [Fintype J] {X Y : C} {f : J → C} {g h : X ⟶ Y ⊗ ⨁ f}
    (w : ∀ j, g ≫ (Y ◁ biproduct.π f j) = h ≫ (Y ◁ biproduct.π f j)) : g = h

{g h : X ⟶ CategoryTheory.MonoidalCategory.tensorObj Y (⨁ f)}

(w :
  ∀ (j : J),
    CategoryTheory.CategoryStruct.comp g
        (CategoryTheory.MonoidalCategory.whiskerLeft Y (CategoryTheory.Limits.biproduct.π f j)) =
      CategoryTheory.CategoryStruct.comp h
        (CategoryTheory.MonoidalCategory.whiskerLeft Y (CategoryTheory.Limits.biproduct.π f j)))


/-- The obvious homotopy between two equal morphisms of short complexes. -/
@[simps]
def ofEq (h : φ₁ = φ₂) : Homotopy φ₁ φ₂

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
{φ₁ φ₂ : S₁ ⟶ S₂}
(h : φ₁ = φ₂)

(CategoryTheory.ShortComplex.Homotopy.ofEq h).h₁ = 0


theorem num_div_eq_of_coprime {a b : ℤ} (hb0 : 0 < b) (h : Nat.Coprime a.natAbs b.natAbs) :
    (a / b : ℚ).num = a

{a b : ℤ}
(hb0 : 0 < b)
(h : a.natAbs.Coprime b.natAbs)


theorem toFinsupp_sum {ι : Type*} (s : Finset ι) (f : ι → R[X]) :
    (∑ i ∈ s, f i : R[X]).toFinsupp = ∑ i ∈ s, (f i).toFinsupp

{R : Type u}
[Semiring R]
{ι : Type u_1}
(s : Finset ι)
(f : ι → R[X])

(∑ i ∈ s, f i).toFinsupp = ∑ i ∈ s, (f i).toFinsupp


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

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


theorem CovBy.Ioo_eq (h : a ⋖ b) : Ioo a b = ∅

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