/-- The uncurrying functor, taking a functor `C ⥤ (D ⥤ E)` and producing a functor `(C × D) ⥤ E`.
-/
@[simps]
def uncurry : (C ⥤ D ⥤ E) ⥤ C × D ⥤ E

(F : CategoryTheory.Functor C (CategoryTheory.Functor D E))

(CategoryTheory.uncurry.obj F).map f = CategoryTheory.CategoryStruct.comp ((F.map f.1).app X.2) ((F.obj Y.1).map f.2)


/-- The new distance is an extension of the original distance. -/
@[simp]
protected theorem dist_eq (x y : α) : dist (x : Completion α) y = dist x y

{α : Type u}
[PseudoMetricSpace α]
(x y : α)


/-- A category is called preadditive if `P ⟶ Q` is an abelian group such that composition is
    linear in both variables. -/
class Preadditive where
  homGroup : ∀ P Q : C, AddCommGroup (P ⟶ Q) := by infer_instance
  add_comp : ∀ (P Q R : C) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g := by
    aesop_cat
  comp_add : ∀ (P Q R : C) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g' := by
    aesop_cat

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[self : CategoryTheory.Preadditive C]
(P Q R : C)
(f f' : P ⟶ Q)
(g : Q ⟶ R)


@[simp]
theorem add_modEq_right : a + n ≡ a [ZMOD n]


@[simp]
theorem sym_univ [Fintype α] (n : ℕ) : (univ : Finset α).sym n = univ

{α : Type u_1}
[DecidableEq α]
[Fintype α]
(n : ℕ)


@[simp]
theorem nil_append (s : WSeq α) : append nil s = s


/-- This lemma demonstrates the origin of the `foldl` name. -/
theorem foldl_prod_map_ι (l : List M) (f : M →ₗ[R] N →ₗ[R] N) (hf) (n : N) :
    foldl Q f hf n (l.map <| ι Q).prod = List.foldl (fun m n => f n m) n l

((CliffordAlgebra.foldl Q f hf) n) (List.map (⇑(CliffordAlgebra.ι Q)) l).prod = List.foldl (fun m n => (f n) m) n l


protected theorem Commute.geom_sum₂_comm {α : Type u} [Semiring α] {x y : α} (n : ℕ)
    (h : Commute x y) :
    ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) = ∑ i ∈ range n, y ^ i * x ^ (n - 1 - i)

∑ i ∈ Finset.range n, x ^ i * y ^ (n - 1 - i) = ∑ i ∈ Finset.range n, y ^ i * x ^ (n - 1 - i)


theorem differentiableAt_exp : DifferentiableAt ℝ exp x


theorem of_nhds_le (hf : ∀ x, 𝓝 (f x) ≤ map f (𝓝 x)) : IsOpenMap f

(hf : ∀ (x : X), 𝓝 (f x) ≤ Filter.map f (𝓝 x))


@[simp]
theorem cond_univ [IsProbabilityMeasure μ] : μ[|Set.univ] = μ

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


theorem isIso_arrow_iff_eq_top {Y : C} (P : Subobject Y) : IsIso P.arrow ↔ P = ⊤

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


@[simp]
theorem toNonneg_lt {a : { x : α // 0 ≤ x }} {b : α} : a < toNonneg b ↔ ↑a < b

{α : Type u_1}
[Zero α]
[LinearOrder α]
{a : { x // 0 ≤ x }}
{b : α}


theorem affineLocally_iff_affineOpens_le {X Y : Scheme.{u}} (f : X ⟶ Y) :
    affineLocally.{u} P f ↔
      ∀ (U : Y.affineOpens) (V : X.affineOpens) (e : V.1 ≤ f ⁻¹ᵁ U.1), P (f.appLE U V e)

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

AlgebraicGeometry.affineLocally (fun {R S} [CommRing R] [CommRing S] => P) f ↔
  ∀ (U : ↑Y.affineOpens) (V : ↑X.affineOpens) (e : ↑V ≤ f ⁻¹ᵁ ↑U), P (AlgebraicGeometry.Scheme.Hom.appLE f (↑U) (↑V) e)


@[deprecated measure_iUnion_le (since := "2024-05-14")]
protected theorem iUnion (m : OuterMeasure α) {β} [Countable β] (s : β → Set α) :
    m (⋃ i, s i) ≤ ∑' i, m (s i)

{α : Type u_1}
(m : MeasureTheory.OuterMeasure α)
{β : Type u_3}
[Countable β]
(s : β → Set α)


@[simp]
theorem map_quotient_self (I : Ideal R) : map (Quotient.mk I) I = ⊥


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

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


/-- One line is contained in another differing in the first point if the first point of the first
line is contained in the second line. -/
theorem affineSpan_pair_le_of_left_mem {p₁ p₂ p₃ : P} (h : p₁ ∈ line[k, p₂, p₃]) :
    line[k, p₁, p₃] ≤ line[k, p₂, p₃]

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ p₃ : P}
(h : p₁ ∈ affineSpan k {p₂, p₃})

affineSpan k {p₁, p₃} ≤ affineSpan k {p₂, p₃}


@[simp]
theorem zipLeft'_nil_left : zipLeft' ([] : List α) bs = ([], bs)


@[to_additive (attr := simp)]
theorem map_mul_right_nhds (x y : G) : map (· * x) (𝓝 y) = 𝓝 (y * x)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
(x y : G)

Filter.map (fun x_1 => x_1 + x) (𝓝 y) = 𝓝 (y + x)


/-- An induction principle for closure membership. If `p` holds for `1` and all elements of `k`, and
is preserved under multiplication and inverse, then `p` holds for all elements of the closure
of `k`. -/
@[to_additive (attr := elab_as_elim)
      "An induction principle for additive closure membership. If `p`
      holds for `0` and all elements of `k`, and is preserved under addition and inverses, then `p`
      holds for all elements of the additive closure of `k`."]
theorem closure_induction {p : G → Prop} {x} (h : x ∈ closure k) (mem : ∀ x ∈ k, p x) (one : p 1)
    (mul : ∀ x y, p x → p y → p (x * y)) (inv : ∀ x, p x → p x⁻¹) : p x

(mul : ∀ (x y : G), p x → p y → p (x + y))


lemma ne_one_iff {χ : MulChar R R'} : χ ≠ 1 ↔ ∃ a : Rˣ, χ a ≠ 1

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommMonoidWithZero R']
{χ : MulChar R R'}

χ ≠ 1 ↔ ∃ a, χ ↑a ≠ 1


@[aesop unsafe 10% (rule_sets := [Matroid])]
private theorem singleton_subset_ground (he : e ∈ M.E) : {e} ⊆ M.E

{α : Type u_1}
{M : Matroid α}
{e : α}
(he : e ∈ M.E)


/-- An orthonormal basis of `ℝ` is made either of the vector `1`, or of the vector `-1`. -/
theorem orthonormalBasis_one_dim (b : OrthonormalBasis ι ℝ ℝ) :
    (⇑b = fun _ => (1 : ℝ)) ∨ ⇑b = fun _ => (-1 : ℝ)

{ι : Type u_1}
[Fintype ι]
(b : OrthonormalBasis ι ℝ ℝ)


theorem lebesgue_number_lemma_of_metric {s : Set α} {ι : Sort*} {c : ι → Set α} (hs : IsCompact s)
    (hc₁ : ∀ i, IsOpen (c i)) (hc₂ : s ⊆ ⋃ i, c i) : ∃ δ > 0, ∀ x ∈ s, ∃ i, ball x δ ⊆ c i

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
{ι : Sort u_3}
{c : ι → Set α}
(hs : IsCompact s)
(hc₁ : ∀ (i : ι), IsOpen (c i))
(hc₂ : s ⊆ ⋃ i, c i)

∃ δ > 0, ∀ x ∈ s, ∃ i, Metric.ball x δ ⊆ c i


/-- A localizer morphism `Φ : LocalizerMorphism W₁ W₂` is a right derivability
structure if it has right resolutions and the 2-square where the left and right functors
are localizations functors for `W₁` and `W₂` are Guitart exact. -/
class IsRightDerivabilityStructure : Prop where
  hasRightResolutions : Φ.HasRightResolutions := by infer_instance
  guitartExact' : TwoSquare.GuitartExact ((Φ.catCommSq W₁.Q W₂.Q).iso).hom

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}

CategoryTheory.TwoSquare.GuitartExact
  (CategoryTheory.CatCommSq.iso Φ.functor W₁.Q W₂.Q (Φ.localizedFunctor W₁.Q W₂.Q)).hom


@[to_additive (attr := simp)] theorem range_lift (f : G →* K) (g : H →* K) :
    MonoidHom.range (lift f g) = MonoidHom.range f ⊔ MonoidHom.range g

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
{K : Type u_3}
[AddGroup K]
(f : G →+ K)
(g : H →+ K)

(AddMonoid.Coprod.lift f g).range = f.range ⊔ g.range


lemma pow_toLinearMap (σ : A₁ ≃ₐ[R] A₁) (n : ℕ) :
    (σ ^ n).toLinearMap = σ.toLinearMap ^ n

{R : Type uR}
{A₁ : Type uA₁}
[CommSemiring R]
[Semiring A₁]
[Algebra R A₁]
(σ : A₁ ≃ₐ[R] A₁)
(n : ℕ)


theorem le_equalizer {φ ψ : F} {S : Subalgebra R A} : S ≤ equalizer φ ψ ↔ Set.EqOn φ ψ S

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

S ≤ AlgHom.equalizer φ ψ ↔ Set.EqOn ⇑φ ⇑ψ ↑S


private theorem commClosure_eq_closure {s : Set K} : commClosure s = closure s

Subfield.commClosure s = Subfield.closure s


lemma singularPart_eq_zero (μ ν : Measure α) [μ.HaveLebesgueDecomposition ν] :
    μ.singularPart ν = 0 ↔ μ ≪ ν

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


@[simp]
theorem lintegral_indicator (f : α → ℝ≥0∞) {s : Set α} (hs : MeasurableSet s) :
    ∫⁻ a, s.indicator f a ∂μ = ∫⁻ a in s, f a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → ℝ≥0∞)
{s : Set α}
(hs : MeasurableSet s)

∫⁻ (a : α), s.indicator f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ


/-- A collection of elements in an `AddCommGroup` designated as "non-negative".
This is useful for constructing an `OrderedAddCommGroup`
by choosing a positive cone in an existing `AddCommGroup`. -/
-- Porting note(#5171): @[nolint has_nonempty_instance]
structure PositiveCone (α : Type*) [AddCommGroup α] where
  /-- The characteristic predicate of a positive cone. `nonneg a` means that `0 ≤ a` according to
  the cone. -/
  nonneg : α → Prop
  /-- The characteristic predicate of a positive cone. `pos a` means that `0 < a` according to
  the cone. -/
  pos : α → Prop := fun a => nonneg a ∧ ¬nonneg (-a)
  pos_iff : ∀ a, pos a ↔ nonneg a ∧ ¬nonneg (-a) := by intros; rfl
  zero_nonneg : nonneg 0
  add_nonneg : ∀ {a b}, nonneg a → nonneg b → nonneg (a + b)
  nonneg_antisymm : ∀ {a}, nonneg a → nonneg (-a) → a = 0

{α : Type u_1}
[AddCommGroup α]
(self : AddCommGroup.PositiveCone α)
{a b : α}

self.nonneg a → self.nonneg b → self.nonneg (a + b)


theorem outerMeasure_exists_open {A : Set G} (hA : μ.outerMeasure A ≠ ∞) {ε : ℝ≥0} (hε : ε ≠ 0) :
    ∃ U : Opens G, A ⊆ U ∧ μ.outerMeasure U ≤ μ.outerMeasure A + ε

{G : Type w}
[TopologicalSpace G]
(μ : MeasureTheory.Content G)
[R1Space G]
{A : Set G}
(hA : μ.outerMeasure A ≠ ⊤)
{ε : ℝ≥0}
(hε : ε ≠ 0)

∃ U, A ⊆ ↑U ∧ μ.outerMeasure ↑U ≤ μ.outerMeasure A + ↑ε


/-- A homeomorphism `h : X ≃ₜ Y` lifts to a homeomorphism between subtypes corresponding to
predicates `p : X → Prop` and `q : Y → Prop` so long as `p = q ∘ h`. -/
@[simps!]
def subtype {p : X → Prop} {q : Y → Prop} (h : X ≃ₜ Y) (h_iff : ∀ x, p x ↔ q (h x)) :
    {x // p x} ≃ₜ {y // q y}

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{p : X → Prop}
{q : Y → Prop}
(h : X ≃ₜ Y)
(h_iff : ∀ (x : X), p x ↔ q (h x))
(a : { a // p a })


theorem mem_image_univ_iff_mem_range {α β : Type*} [Fintype α] [DecidableEq β] {f : α → β}
    {b : β} : b ∈ univ.image f ↔ b ∈ Set.range f

{α : Type u_4}
{β : Type u_5}
[Fintype α]
[DecidableEq β]
{f : α → β}
{b : β}

b ∈ Finset.image f Finset.univ ↔ b ∈ Set.range f


/-- If `M` is an `R`-module with one and `M` has characteristic zero, then `R` has characteristic
zero as well. Usually `M` is an `R`-algebra. -/
theorem CharZero.of_module (M) [AddCommMonoidWithOne M] [CharZero M] [Module R M] : CharZero R

(R : Type u_2)
[Semiring R]
(M : Type u_9)
[AddCommMonoidWithOne M]
[CharZero M]
[Module R M]


theorem projIic_surjOn : SurjOn (projIic b) (Iic b) univ

Set.SurjOn (Set.projIic b) (Set.Iic b) Set.univ


@[simp]
theorem mk_preimage_sigma (hi : i ∈ s) : Sigma.mk i ⁻¹' s.sigma t = t i

{ι : Type u_1}
{α : ι → Type u_3}
{s : Set ι}
{t : (i : ι) → Set (α i)}
{i : ι}
(hi : i ∈ s)


@[to_additive (attr := simp)]
theorem liftOn₂_mk' {p : Sort*} (f : M → S → M → S → p) (H) (a c : M) (b d : S) :
    liftOn₂ ((monoidOf S).mk' a b) ((monoidOf S).mk' c d) f H = f a b c d

(H :
  ∀ {a a' : M} {b b' : ↥S} {c c' : M} {d d' : ↥S},
    (AddLocalization.r S) (a, b) (a', b') → (AddLocalization.r S) (c, d) (c', d') → f a b c d = f a' b' c' d')

((AddLocalization.addMonoidOf S).mk' a b).liftOn₂ ((AddLocalization.addMonoidOf S).mk' c d) f H = f a b c d


theorem derivWithin_clm_comp (hc : DifferentiableWithinAt 𝕜 c s x)
    (hd : DifferentiableWithinAt 𝕜 d s x) (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin (fun y => (c y).comp (d y)) s x =
      (derivWithin c s x).comp (d x) + (c x).comp (derivWithin d s x)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : 𝕜}
{s : Set 𝕜}
{G : Type u_2}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{c : 𝕜 → F →L[𝕜] G}
{d : 𝕜 → E →L[𝕜] F}
(hc : DifferentiableWithinAt 𝕜 c s x)
(hd : DifferentiableWithinAt 𝕜 d s x)
(hxs : UniqueDiffWithinAt 𝕜 s x)


theorem Pairwise.pmap {l : List α} (hl : Pairwise R l) {p : α → Prop} {f : ∀ a, p a → β}
    (h : ∀ x ∈ l, p x) {S : β → β → Prop}
    (hS : ∀ ⦃x⦄ (hx : p x) ⦃y⦄ (hy : p y), R x y → S (f x hx) (f y hy)) :
    Pairwise S (l.pmap f h)

(hS : ∀ ⦃x : α⦄ (hx : p x) ⦃y : α⦄ (hy : p y), R x y → S (f x hx) (f y hy))


@[simp]
theorem extendTo𝕜'_apply_re (fr : F →ₗ[ℝ] ℝ) (x : F) : re (fr.extendTo𝕜' x : 𝕜) = fr x

{𝕜 : Type u_1}
[RCLike 𝕜]
{F : Type u_2}
[SeminormedAddCommGroup F]
[NormedSpace 𝕜 F]
[Module ℝ F]
[IsScalarTower ℝ 𝕜 F]
(fr : F →ₗ[ℝ] ℝ)
(x : F)


theorem order_eq_find [DecidablePred fun n => p n ≠ 0] (hp : ∃ n, p n ≠ 0) :
    p.order = Nat.find hp

{𝕜 : Type u}
{E : Type v}
{F : Type w}
[Ring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]
{p : FormalMultilinearSeries 𝕜 E F}
[DecidablePred fun n => p n ≠ 0]
(hp : ∃ n, p n ≠ 0)


@[simp]
theorem lt_mul_iff_one_lt_right [PosMulStrictMono α] [PosMulReflectLT α] (a0 : 0 < a) :
    a < a * b ↔ 1 < b

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
[PosMulReflectLT α]
(a0 : 0 < a)


theorem directedOn_pair' (h : Reflexive r) {a b : α} (hab : a ≼ b) :
    DirectedOn r ({b, a} : Set α)

{α : Type u}
{r : α → α → Prop}
(h : Reflexive r)
{a b : α}
(hab : r a b)


theorem coe_semilinearMap {F : Type*} [FunLike F M M₃] [SemilinearMapClass F σ M M₃] (f : F) :
    ((f : M →ₛₗ[σ] M₃) : M → M₃) = f

{R : Type u_1}
{S : Type u_6}
{M : Type u_9}
{M₃ : Type u_12}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₃]
[Module R M]
[Module S M₃]
{σ : R →+* S}
{F : Type u_17}
[FunLike F M M₃]
[SemilinearMapClass F σ M M₃]
(f : F)


theorem le_hausdorffMeasure (d : ℝ) (μ : Measure X) (ε : ℝ≥0∞) (h₀ : 0 < ε)
    (h : ∀ s : Set X, diam s ≤ ε → μ s ≤ diam s ^ d) : μ ≤ μH[d]

(h : ∀ (s : Set X), EMetric.diam s ≤ ε → μ s ≤ EMetric.diam s ^ d)


@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.2 / x.1 ∈ U i }

{α : Type u_1}
[UniformSpace α]
[Group α]
[UniformGroup α]
{ι : Sort u_3}
{p : ι → Prop}
{U : ι → Set α}
(h : (𝓝 1).HasBasis p U)

(𝓤 α).HasBasis p fun i => {x | x.2 / x.1 ∈ U i}


lemma monotone_pred_comp (hf : ∀ a, f a ≠ 0) (hf₂ : Monotone f) :
    Monotone (fun a => pred (f a) (hf a))

{n : ℕ}
{α : Type u_1}
[Preorder α]
{f : α → Fin (n + 1)}
(hf : ∀ (a : α), f a ≠ 0)
(hf₂ : Monotone f)


theorem intervalIntegrable_norm_iff {f : ℝ → E} {μ : Measure ℝ} {a b : ℝ}
    (hf : AEStronglyMeasurable f (μ.restrict (Ι a b))) :
    IntervalIntegrable (fun t => ‖f t‖) μ a b ↔ IntervalIntegrable f μ a b

(hf : MeasureTheory.AEStronglyMeasurable f (μ.restrict (Ι a b)))


theorem wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg (x : P) (v : V) {r₁ r₂ : R} (hr₁ : r₁ ≤ 0)
    (hr₂ : 0 ≤ r₂) : Wbtw R (r₁ • v +ᵥ x) x (r₂ • v +ᵥ x)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(v : V)
{r₁ r₂ : R}
(hr₁ : r₁ ≤ 0)
(hr₂ : 0 ≤ r₂)


/-- Given a morphism `f : R ⟶ S`, and an isomorphism `φ : a ≅ b` lifting `f`, `isoOfIsoLift f φ` is
the isomorphism `Φ : R ≅ S` with `Φ.hom = f` induced from `φ` -/
@[simps hom]
def isoOfIsoLift (f : R ⟶ S) (φ : a ≅ b) [p.IsHomLift f φ.hom] :
    R ≅ S

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₂} 𝒳]
[CategoryTheory.Category.{v₂, u₁} 𝒮]
(p : 𝒳 ⥤ 𝒮)
{R S : 𝒮}
{a b : 𝒳}
(f : R ⟶ S)
(φ : a ≅ b)
[p.IsHomLift f φ.hom]

(CategoryTheory.IsHomLift.isoOfIsoLift p f φ).hom = f


@[to_additive (attr := simp)]
theorem comap_mk_nhds (x : Mᵈᵐᵃ) : comap (mk : M → Mᵈᵐᵃ) (𝓝 x) = 𝓝 (mk.symm x)

{M : Type u_1}
[TopologicalSpace M]
(x : Mᵈᵐᵃ)

Filter.comap (⇑DomMulAct.mk) (𝓝 x) = 𝓝 (DomMulAct.mk.symm x)


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

(map_div : ∀ (a b : G), f (a + -b) = f a + -f b)

⇑(AddMonoidHom.ofMapAddNeg f map_div) = f


theorem smul_mem (hx : x ∈ K) (c : ZMod n) : c • x ∈ K

{n : ℕ}
{M : Type u_1}
{S : Type u_4}
[AddCommGroup M]
[Module (ZMod n) M]
[SetLike S M]
[AddSubgroupClass S M]
{x : M}
{K : S}
(hx : x ∈ K)
(c : ZMod n)


theorem Integrable.prod_mul {L : Type*} [RCLike L] {f : α → L} {g : β → L} (hf : Integrable f μ)
    (hg : Integrable g ν) : Integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν)

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{L : Type u_7}
[RCLike L]
{f : α → L}
{g : β → L}
(hf : MeasureTheory.Integrable f μ)
(hg : MeasureTheory.Integrable g ν)

MeasureTheory.Integrable (fun z => f z.1 * g z.2) (μ.prod ν)


@[simp]
theorem coe_toPNat' (n : ℕ+) : (n : ℕ).toPNat' = n


theorem filter_eq_self_iff : f.filter p = f ↔ ∀ x, f x ≠ 0 → p x

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

Finsupp.filter p f = f ↔ ∀ (x : α), f x ≠ 0 → p x


lemma CovBy.of_lt_of_le (hac : a ⋖ c) (hab : a < b) (hbc : b ≤ c) : a ⋖ b

{α : Type u_1}
[Preorder α]
{a b c : α}
(hac : a ⋖ c)
(hab : a < b)
(hbc : b ≤ c)


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


@[to_additive]
theorem MonoidHom.uniformContinuous_of_continuousAt_one [UniformSpace β] [Group β] [UniformGroup β]
    (f : α →* β) (hf : ContinuousAt f 1) : UniformContinuous f

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[Group α]
[UniformGroup α]
[UniformSpace β]
[Group β]
[UniformGroup β]
(f : α →* β)
(hf : ContinuousAt (⇑f) 1)


lemma CompleteOrthogonalIdempotents.bijective_pi' (he : CompleteOrthogonalIdempotents (1 - e ·)) :
    Function.Bijective (Pi.ringHom fun i ↦ Ideal.Quotient.mk (Ideal.span {e i}))

(he : CompleteOrthogonalIdempotents fun x => 1 - e x)

Function.Bijective ⇑(Pi.ringHom fun i => Ideal.Quotient.mk (Ideal.span {e i}))


@[simp]
theorem map_dfinsupp_sumAddHom [∀ i, AddZeroClass (γ i)] (f : M ≃ₛₗ[τ₁₂] M₂) (t : Π₀ i, γ i)
    (g : ∀ i, γ i →+ M) :
    f (sumAddHom g t) = sumAddHom (fun i => f.toAddEquiv.toAddMonoidHom.comp (g i)) t

{R : Type u_6}
{R₂ : Type u_7}
{M : Type u_8}
{M₂ : Type u_9}
{ι : Type u_10}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{τ₂₁ : R₂ →+* R}
[RingHomInvPair τ₁₂ τ₂₁]
[RingHomInvPair τ₂₁ τ₁₂]
{γ : ι → Type u_11}
[DecidableEq ι]
[(i : ι) → AddZeroClass (γ i)]
(f : M ≃ₛₗ[τ₁₂] M₂)
(t : Π₀ (i : ι), γ i)
(g : (i : ι) → γ i →+ M)

f ((DFinsupp.sumAddHom g) t) = (DFinsupp.sumAddHom fun i => f.toAddEquiv.toAddMonoidHom.comp (g i)) t


@[simp]
theorem pred_succ (i : Fin n) {h : i.succ ≠ 0} : i.succ.pred h = i


lemma log_nonneg_of_isNat {n : ℕ} (h : NormNum.IsNat e n) : 0 ≤ Real.log (e : ℝ)

{e : ℝ}
{n : ℕ}
(h : Mathlib.Meta.NormNum.IsNat e n)


theorem toNat_lt_toNat (hcd : c < d) (hd : d < ℵ₀) : toNat c < toNat d

{c d : Cardinal.{u}}
(hcd : c < d)
(hd : d < Cardinal.aleph0)


@[simp]
theorem commutator_bot_left : ⁅(⊥ : Subgroup G), H₁⁆ = ⊥

{G : Type u_1}
[Group G]
(H₁ : Subgroup G)


/-- The leading coefficient of a product of polynomials is equal to
the product of the leading coefficients.

See `Polynomial.leadingCoeff_multiset_prod'` (with a `'`) for a version for commutative semirings,
where additionally, the product of the leading coefficients must be nonzero.
-/
theorem leadingCoeff_multiset_prod :
    t.prod.leadingCoeff = (t.map fun f => leadingCoeff f).prod

{R : Type u}
[CommSemiring R]
[NoZeroDivisors R]
(t : Multiset R[X])

t.prod.leadingCoeff = (Multiset.map (fun f => f.leadingCoeff) t).prod


@[to_additive]
theorem Pi.update_eq_div_mul_mulSingle [∀ i, Group <| f i] (g : ∀ i : I, f i) (x : f i) :
    Function.update g i x = g / mulSingle i (g i) * mulSingle i x

{I : Type u}
{f : I → Type v}
(i : I)
[DecidableEq I]
[(i : I) → AddGroup (f i)]
(g : (i : I) → f i)
(x : f i)

Function.update g i x = g - Pi.single i (g i) + Pi.single i x


@[simp, norm_cast]
theorem coe_zero : ⇑(0 : CentroidHom α) = 0

{α : Type u_5}
[NonUnitalNonAssocSemiring α]


@[to_additive exists_lt_of_sum_lt]
theorem exists_lt_of_prod_lt' (Hlt : ∏ i ∈ s, f i < ∏ i ∈ s, g i) : ∃ i ∈ s, f i < g i

{ι : Type u_1}
{M : Type u_4}
[LinearOrderedCancelCommMonoid M]
{f g : ι → M}
{s : Finset ι}
(Hlt : ∏ i ∈ s, f i < ∏ i ∈ s, g i)


/-- Given a nonempty affine subspace, whose direction is complete,
that contains a set of points, those points are cospherical if and
only if they are equidistant from some point in that subspace. -/
theorem cospherical_iff_exists_mem_of_complete {s : AffineSubspace ℝ P} {ps : Set P} (h : ps ⊆ s)
    [Nonempty s] [HasOrthogonalProjection s.direction] :
    Cospherical ps ↔ ∃ center ∈ s, ∃ radius : ℝ, ∀ p ∈ ps, dist p center = radius

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s : AffineSubspace ℝ P}
{ps : Set P}
(h : ps ⊆ ↑s)
[Nonempty ↥s]
[HasOrthogonalProjection s.direction]

EuclideanGeometry.Cospherical ps ↔ ∃ center ∈ s, ∃ radius, ∀ p ∈ ps, dist p center = radius


@[simp]
theorem coe_toEmbedding (f : M ≃[L] N) : (f.toEmbedding : M → N) = (f : M → N)

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
(f : L.Equiv M N)


@[simp] lemma natCast_mul_right (h : Commute a b) (n : ℕ) : Commute a (n * b)

{α : Type u_1}
[Semiring α]
{a b : α}
(h : Commute a b)
(n : ℕ)


@[simp] lemma coe_castRingHom : ⇑(castRingHom α) = fun x : ℤ ↦ (x : α)


/-- The obvious equivalence `ShortComplex (J ⥤ C) ≌ J ⥤ ShortComplex C`. -/
@[simps]
def functorEquivalence : ShortComplex (J ⥤ C) ≌ J ⥤ ShortComplex C

(CategoryTheory.ShortComplex.functorEquivalence J C).counitIso =
  CategoryTheory.ShortComplex.FunctorEquivalence.counitIso J C


theorem contDiffAt_top : ContDiffAt 𝕜 ∞ f x ↔ ∀ n : ℕ, ContDiffAt 𝕜 n f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}

ContDiffAt 𝕜 ⊤ f x ↔ ∀ (n : ℕ), ContDiffAt 𝕜 (↑n) f x


protected theorem sub_left_lt_of_lt_add {a b c : Int} (h : a < b + c) : a - b < c


/-- If the coproduct comparison morphism is an iso, its inverse is natural. -/
@[reassoc]
theorem coprodComparison_inv_natural (f : A ⟶ A') (g : B ⟶ B') [IsIso (coprodComparison F A B)]
    [IsIso (coprodComparison F A' B')] :
    inv (coprodComparison F A B) ≫ coprod.map (F.map f) (F.map g) =
      F.map (coprod.map f g) ≫ inv (coprodComparison F A' B')

[CategoryTheory.Limits.HasBinaryCoproduct (F.obj A) (F.obj B)]

[CategoryTheory.Limits.HasBinaryCoproduct (F.obj A') (F.obj B')]

[CategoryTheory.IsIso (CategoryTheory.Limits.coprodComparison F A B)]

[CategoryTheory.IsIso (CategoryTheory.Limits.coprodComparison F A' B')]

CategoryTheory.inv (CategoryTheory.Limits.coprodComparison F A B) ≫
    CategoryTheory.Limits.coprod.map (F.map f) (F.map g) =
  F.map (CategoryTheory.Limits.coprod.map f g) ≫ CategoryTheory.inv (CategoryTheory.Limits.coprodComparison F A' B')


@[simp]
theorem sInf_coe (S : Set (LieSubmodule R L M)) : (↑(sInf S) : Set M) = ⋂ s ∈ S, (s : Set M)

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(S : Set (LieSubmodule R L M))


theorem TendstoUniformlyOnFilter.mono_left {p'' : Filter ι} (h : TendstoUniformlyOnFilter F f p p')
    (hp : p'' ≤ p) : TendstoUniformlyOnFilter F f p'' p'

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{p : Filter ι}
{p' : Filter α}
{p'' : Filter ι}
(h : TendstoUniformlyOnFilter F f p p')
(hp : p'' ≤ p)


lemma Odd.add_odd : Odd a → Odd b → Even (a + b)


@[simp]
theorem factors_prod (a : Associates α) : a.factors.prod = a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
(a : Associates α)


theorem xy_succ_succ (n) :
    xn a1 (n + 2) + xn a1 n =
      2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)

Pell.xn a1 (n + 2) + Pell.xn a1 n = 2 * a * Pell.xn a1 (n + 1) ∧
  Pell.yn a1 (n + 2) + Pell.yn a1 n = 2 * a * Pell.yn a1 (n + 1)


theorem toOuterMeasure_apply_singleton (a : α) : p.toOuterMeasure {a} = p a


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

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


@[simp]
theorem coe_comapOfKerIsPGroup (hϕ : IsPGroup p ϕ.ker) (h : ↑P ≤ ϕ.range) :
    (P.comapOfKerIsPGroup ϕ hϕ h : Subgroup K) = Subgroup.comap ϕ ↑P

{p : ℕ}
{G : Type u_1}
[Group G]
(P : Sylow p G)
{K : Type u_2}
[Group K]
(ϕ : K →* G)
(hϕ : IsPGroup p ↥ϕ.ker)
(h : ↑P ≤ ϕ.range)

↑(P.comapOfKerIsPGroup ϕ hϕ h) = Subgroup.comap ϕ ↑P


theorem antitone_const_tsub : Antitone fun x => c - x

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


theorem image_relIso_iff {φ : r ≃r r'} : IsAntichain r' (φ '' s) ↔ IsAntichain r s

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{r' : β → β → Prop}
{s : Set α}
{φ : r ≃r r'}

IsAntichain r' (⇑φ '' s) ↔ IsAntichain r s


/-- The product of two `C^n` functions on a domain is `C^n`. -/
theorem ContDiffOn.mul {f g : E → 𝔸} (hf : ContDiffOn 𝕜 n f s) (hg : ContDiffOn 𝕜 n g s) :
    ContDiffOn 𝕜 n (fun x => f x * g x) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{n : ℕ∞}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{f g : E → 𝔸}
(hf : ContDiffOn 𝕜 n f s)
(hg : ContDiffOn 𝕜 n g s)


@[to_additive]
theorem inv_mul_toFun_mem (hS : S ∈ Subgroup.leftTransversals (H : Set G)) (g : G) :
    g⁻¹ * toFun hS g ∈ H

{G : Type u_1}
[Group G]
{H : Subgroup G}
{S : Set G}
(hS : S ∈ Subgroup.leftTransversals ↑H)
(g : G)

g⁻¹ * ↑(Subgroup.MemLeftTransversals.toFun hS g) ∈ H


@[simp]
theorem Ioo_eq_empty (h : ¬a < b) : Ioo a b = ∅

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


theorem nat_lcm_helper (x y d m : ℕ) (hd : Nat.gcd x y = d)
    (d0 : Nat.beq d 0 = false)
    (dm : x * y = d * m) : Nat.lcm x y = m

(x y d m : ℕ)
(hd : x.gcd y = d)
(d0 : d.beq 0 = false)
(dm : x * y = d * m)


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


theorem ContMDiff.smooth (h : ContMDiff I I' ⊤ f) : Smooth I I' f

{𝕜 : 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'}
(h : ContMDiff I I' ⊤ f)


@[to_additive (attr := simp)]
theorem map_one [OneHomClass F M N] (f : F) : f 1 = 1

{M : Type u_4}
{N : Type u_5}
{F : Type u_9}
[One M]
[One N]
[FunLike F M N]
[OneHomClass F M N]
(f : F)


theorem GroupWithZero.mul_left_injective (h : x ≠ 0) :
    Function.Injective fun y => x * y

{G₀ : Type u_3}
[GroupWithZero G₀]
{x : G₀}
(h : x ≠ 0)


theorem Sized.mono (h : A ⊆ B) (hB : B.Sized r) : A.Sized r

{α : Type u_1}
{A B : Set (Finset α)}
{r : ℕ}
(h : A ⊆ B)
(hB : Set.Sized r B)


theorem bind_of_mem {o : Part α} {a : α} (h : a ∈ o) (f : α → Part β) : o.bind f = f a

{α : Type u_1}
{β : Type u_2}
{o : Part α}
{a : α}
(h : a ∈ o)
(f : α → Part β)


lemma cfc_apply_pi {ι : Type*} (f : ι → R → R) (a : A) (ha : p a := by cfc_tac)
    (hf : ∀ i, ContinuousOn (f i) (spectrum R a) := by cfc_cont_tac) :
    (fun i => cfc (f i) a) = (fun i => cfcHom (a := a) ha ⟨_, (hf i).restrict⟩)

(hf : ∀ (i : ι), ContinuousOn (f i) (spectrum R a) := by cfc_cont_tac)

(fun i => cfc (f i) a) = fun i => (cfcHom ha) { toFun := (spectrum R a).restrict (f i), continuous_toFun := ⋯ }


/-- A useful special case of `Continuous.IccExtend`. -/
@[continuity]
protected theorem Continuous.Icc_extend' {f : Icc a b → β} (hf : Continuous f) :
    Continuous (IccExtend h f)

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{a b : α}
{h : a ≤ b}
[TopologicalSpace α]
[OrderTopology α]
[TopologicalSpace β]
{f : ↑(Set.Icc a b) → β}
(hf : Continuous f)


theorem continuous_empty_function [TopologicalSpace α] [TopologicalSpace β] [IsEmpty β]
    (f : α → β) : Continuous f

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[IsEmpty β]
(f : α → β)


/-- An action of an additive monoid `M` on a topological space is called *minimal* if the `M`-orbit
of every point `x : α` is dense. -/
class AddAction.IsMinimal (M α : Type*) [AddMonoid M] [TopologicalSpace α] [AddAction M α] :
    Prop where
  dense_orbit : ∀ x : α, Dense (AddAction.orbit M x)

{M : Type u_1}
{α : Type u_2}
[AddMonoid M]
[TopologicalSpace α]
[AddAction M α]
[self : AddAction.IsMinimal M α]
(x : α)


lemma mem_isoClosure {X Y : C} (h : P X) (e : X ⟶ Y) [IsIso e] : isoClosure P Y

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{P : C → Prop}
{X Y : C}
(h : P X)
(e : X ⟶ Y)
[CategoryTheory.IsIso e]


theorem mk_image_eq_of_injOn_lift {α : Type u} {β : Type v} (f : α → β) (s : Set α)
    (h : InjOn f s) : lift.{u} #(f '' s) = lift.{v} #s

{α : Type u}
{β : Type v}
(f : α → β)
(s : Set α)
(h : Set.InjOn f s)

Cardinal.lift.{u, v} (Cardinal.mk ↑(f '' s)) = Cardinal.lift.{v, u} (Cardinal.mk ↑s)


theorem not_mem_of_coe_lt_min {a : α} {s : Finset α} (h : ↑a < s.min) : a ∉ s

{α : Type u_2}
[LinearOrder α]
{a : α}
{s : Finset α}
(h : ↑a < s.min)


@[simp]
theorem tmul_mul_tmul (a₁ a₂ : A) (b₁ b₂ : B) :
    a₁ ⊗ₜ[R] b₁ * a₂ ⊗ₜ[R] b₂ = (a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[SMulCommClass R B B]
[IsScalarTower R B B]
(a₁ a₂ : A)
(b₁ b₂ : B)


@[simp]
theorem kunion_kerase {a} :
    ∀ {l₁ l₂ : List (Sigma β)}, kunion (kerase a l₁) (kerase a l₂) = kerase a (kunion l₁ l₂)

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{l₁ l₂ : List (Sigma β)}

(List.kerase a l₁).kunion (List.kerase a l₂) = List.kerase a (l₁.kunion l₂)


/-- The functor `HomologicalComplex (Karoubi C) c ⥤ Karoubi (HomologicalComplex C c)`. -/
@[simps]
def inverse : HomologicalComplex (Karoubi C) c ⥤ Karoubi (HomologicalComplex C c)

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{ι : Type u_2}
{c : ComplexShape ι}

∀ {X Y : HomologicalComplex (CategoryTheory.Idempotents.Karoubi C) c} (f : X ⟶ Y),
  CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.inverse.map f =
    CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Inverse.map f


/-- X is a Lindelöf space iff every open cover has a countable subcover. -/
class LindelofSpace (X : Type*) [TopologicalSpace X] : Prop where
  /-- In a Lindelöf space, `Set.univ` is a Lindelöf set. -/
  isLindelof_univ : IsLindelof (univ : Set X)

{X : Type u_2}
[TopologicalSpace X]
[self : LindelofSpace X]


theorem Filter.EventuallyEq.mfderiv_eq (hL : f₁ =ᶠ[𝓝 x] f) :
    mfderiv I I' f₁ x = (mfderiv I I' f 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 f₁ : M → M'}
{x : M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
(hL : f₁ =ᶠ[𝓝 x] f)


@[simp] protected theorem mul_div_cancel_left (b : Int) (H : a ≠ 0) : (a * b).div a = b


theorem bind_map {α β} (m : α → β) (f : Filter α) (g : β → Filter γ) :
    (bind (map m f) g) = bind f (g ∘ m)

{γ : Type w}
{α : Type u_2}
{β : Type u_3}
(m : α → β)
(f : Filter α)
(g : β → Filter γ)

(Filter.map m f).bind g = f.bind (g ∘ m)


theorem Inseparable.specializes' (h : x ~ᵢ y) : y ⤳ x

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(h : x ~ᵢ y)


/-- Construct an isomorphism of comonoids by giving an isomorphism between the underlying objects
and checking compatibility with counit and comultiplication only in the forward direction.
-/
@[simps]
def mkIso {M N : Comon_ C} (f : M.X ≅ N.X) (f_counit : f.hom ≫ N.counit = M.counit := by aesop_cat)
    (f_comul : f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom) := by aesop_cat) : M ≅ N

(Comon_.mkIso f f_counit f_comul).hom.hom = f.hom


protected theorem embedding (h : X ≃ₜ Y) : Embedding h

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


lemma freeHomEquiv_comp_apply {M N : SheafOfModules.{u} R} {I : Type u}
    (f : free I ⟶ M) (p : M ⟶ N) (i : I) :
    N.freeHomEquiv (f ≫ p) i = sectionsMap p (M.freeHomEquiv f i)

{J : CategoryTheory.GrothendieckTopology C}

[J.HasSheafCompose (CategoryTheory.forget₂ RingCat AddCommGrp)]

N.freeHomEquiv (f ≫ p) i = SheafOfModules.sectionsMap p (M.freeHomEquiv f i)


theorem finite_dualAnnihilator_iff {W : Submodule R M} [Free R (M ⧸ W)] :
    Finite R W.dualAnnihilator ↔ Finite R (M ⧸ W)

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{W : Submodule R M}
[Module.Free R (M ⧸ W)]

Module.Finite R ↥W.dualAnnihilator ↔ Module.Finite R (M ⧸ W)


theorem coe_mul_eq_smul : ↑r * a = r • a

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


theorem ContMDiffAt.clm_comp {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₁} {x : M}
    (hg : ContMDiffAt I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g x) (hf : ContMDiffAt I 𝓘(𝕜, F₂ →L[𝕜] F₁) n f x) :
    ContMDiffAt I 𝓘(𝕜, F₂ →L[𝕜] F₃) n (fun x => (g x).comp (f x)) x


@[to_additive (attr := simp)]
theorem dist_mul_self_right (a b : E) : dist b (a * b) = ‖a‖

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


theorem IsVanKampenColimit.precompose_isIso {F G : J ⥤ C} (α : F ⟶ G) [IsIso α]
    {c : Cocone G} (hc : IsVanKampenColimit c) :
    IsVanKampenColimit ((Cocones.precompose α).obj c)

(hc : CategoryTheory.IsVanKampenColimit c)

CategoryTheory.IsVanKampenColimit ((CategoryTheory.Limits.Cocones.precompose α).obj c)


/-- The counit isomorphism of the equivalence
`ShortComplex.functorEquivalence : ShortComplex (J ⥤ C) ≌ J ⥤ ShortComplex C`. -/
@[simps!]
def counitIso : inverse J C ⋙ functor J C ≅ 𝟭 _

(X : CategoryTheory.Functor J (CategoryTheory.ShortComplex C))

∀ (X_1 : J),
  (((CategoryTheory.ShortComplex.FunctorEquivalence.counitIso J C).inv.app X).app X_1).τ₁ =
    CategoryTheory.CategoryStruct.id (X.obj X_1).X₁


theorem zeroLocus_singleton_mul (f g : A) :
    zeroLocus 𝒜 ({f * g} : Set A) = zeroLocus 𝒜 {f} ∪ zeroLocus 𝒜 {g}

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(f g : A)

ProjectiveSpectrum.zeroLocus 𝒜 {f * g} = ProjectiveSpectrum.zeroLocus 𝒜 {f} ∪ ProjectiveSpectrum.zeroLocus 𝒜 {g}


@[to_additive (attr := simp)]
theorem nhds_one_mul_nhds {M} [MulOneClass M] [TopologicalSpace M] [ContinuousMul M] (a : M) :
    𝓝 (1 : M) * 𝓝 a = 𝓝 a

{M : Type u_6}
[AddZeroClass M]
[TopologicalSpace M]
[ContinuousAdd M]
(a : M)


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

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

(CategoryTheory.ShrinkHoms.equivalence C).functor.obj X = CategoryTheory.ShrinkHoms.toShrinkHoms X


@[simp] theorem max_eq_zero_iff : max a b = 0 ↔ a = 0 ∧ b = 0


/-- The comparison isomorphism between `normalizedMooreComplex A` and
the functor `Idempotents.DoldKan.N` from the pseudoabelian case -/
@[simps!]
def comparisonN : (N : SimplicialObject A ⥤ _) ≅ Idempotents.DoldKan.N

{A : Type u_1}
[CategoryTheory.Category.{u_2, u_1} A]
[CategoryTheory.Abelian A]
(X : CategoryTheory.SimplicialObject A)
(i : ℕ)

(CategoryTheory.Abelian.DoldKan.comparisonN.inv.app X).f i =
  ((CategoryTheory.Idempotents.toKaroubiEquivalence (ChainComplex A ℕ)).inverse.map
          ((AlgebraicTopology.DoldKan.N₁_iso_normalizedMooreComplex_comp_toKaroubi A).hom.app X)).f
      i ≫
    ((CategoryTheory.Idempotents.toKaroubiEquivalence (ChainComplex A ℕ)).unitIso.inv.app
          (CategoryTheory.Abelian.DoldKan.N.obj X)).f
      i


theorem symm_image_eq_source_inter_preimage {s : Set Y} (h : s ⊆ e.target) :
    e.symm '' s = e.source ∩ e ⁻¹' s

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


theorem continuous_coe : Continuous ((↑) : ℝ≥0 → ℝ)


@[simp]
lemma univ_coeff_card : (univ R n).coeff (Fintype.card n) = 1

(R : Type u_1)
(n : Type u_3)
[CommRing R]
[Fintype n]
[DecidableEq n]

(Matrix.charpoly.univ R n).coeff (Fintype.card n) = 1


theorem setOf_and {p q : α → Prop} : { a | p a ∧ q a } = { a | p a } ∩ { a | q a }


theorem Kernel.measure_le_bound (κ : Kernel α β) [h : IsFiniteKernel κ] (a : α) (s : Set β) :
    κ a s ≤ IsFiniteKernel.bound κ

[h : ProbabilityTheory.IsFiniteKernel κ]

(κ a) s ≤ ProbabilityTheory.IsFiniteKernel.bound κ


theorem ofNat_dvd_left {n : Nat} {z : Int} : (↑n : Int) ∣ z ↔ n ∣ z.natAbs


theorem card_le_degree_of_subset_roots {p : R[X]} {Z : Finset R} (h : Z.val ⊆ p.roots) :
    Z.card ≤ p.natDegree

{R : Type u}
[CommRing R]
[IsDomain R]
{p : Polynomial R}
{Z : Finset R}
(h : Z.val ⊆ p.roots)


theorem iota_eq_reverse_range' : ∀ n : Nat, iota n = reverse (range' 1 n)


theorem integrableOn_Ioc_iff_integrableOn_Ioo' (hb : μ {b} ≠ ∞) :
    IntegrableOn f (Ioc a b) μ ↔ IntegrableOn f (Ioo a b) μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[PartialOrder α]
[MeasurableSingletonClass α]
{f : α → E}
{μ : MeasureTheory.Measure α}
{a b : α}
(hb : μ {b} ≠ ⊤)

MeasureTheory.IntegrableOn f (Set.Ioc a b) μ ↔ MeasureTheory.IntegrableOn f (Set.Ioo a b) μ


theorem mulVec_diagonal [Fintype m] [DecidableEq m] (v w : m → α) (x : m) :
    (diagonal v *ᵥ w) x = v x * w x

{m : Type u_2}
{α : Type v}
[NonUnitalNonAssocSemiring α]
[Fintype m]
[DecidableEq m]
(v w : m → α)
(x : m)


@[simp]
theorem conjTranspose_ratCast_smul [DivisionRing R] [AddCommGroup α] [StarAddMonoid α] [Module R α]
    (c : ℚ) (M : Matrix m n α) : ((c : R) • M)ᴴ = (c : R) • Mᴴ

{m : Type u_2}
{n : Type u_3}
{R : Type u_7}
{α : Type v}
[DivisionRing R]
[AddCommGroup α]
[StarAddMonoid α]
[Module R α]
(c : ℚ)
(M : Matrix m n α)


theorem condCount_eq_zero_iff (hs : s.Finite) : condCount s t = 0 ↔ s ∩ t = ∅

{Ω : Type u_1}
[MeasurableSpace Ω]
[MeasurableSingletonClass Ω]
{s t : Set Ω}
(hs : s.Finite)

(ProbabilityTheory.condCount s) t = 0 ↔ s ∩ t = ∅


lemma mem_traceDual {I : Submodule B L} {x} :
    x ∈ Iᵛ ↔ ∀ a ∈ I, traceForm K L x a ∈ (algebraMap A K).range

{A : Type u_1}
{K : Type u_2}
{L : Type u}
{B : Type u_3}
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
{I : Submodule B L}
{x : L}

x ∈ Submodule.traceDual A K I ↔ ∀ a ∈ I, ((Algebra.traceForm K L) x) a ∈ (algebraMap A K).range


protected theorem map_intCast [DecidableEq n] [AddGroupWithOne α] [AddGroupWithOne β]
    {f : α → β} (h : f 0 = 0) (d : ℤ) :
    (d : Matrix n n α).map f = diagonal (fun _ => f d)

{n : Type u_3}
{α : Type v}
{β : Type w}
[DecidableEq n]
[AddGroupWithOne α]
[AddGroupWithOne β]
{f : α → β}
(h : f 0 = 0)
(d : ℤ)

(↑d).map f = Matrix.diagonal fun x => f ↑d


lemma Hom.toBialgHom_injective (V W : BialgebraCat.{v} R) :
    Function.Injective (Hom.toBialgHom : Hom V W → _)

{R : Type u}
[CommRing R]
(V W : BialgebraCat R)


@[aesop unsafe 5% (rule_sets := [Matroid])]
private theorem mem_ground_of_mem_of_subset (hX : X ⊆ M.E) (heX : e ∈ X) : e ∈ M.E

{α : Type u_1}
{M : Matroid α}
{X : Set α}
{e : α}
(hX : X ⊆ M.E)
(heX : e ∈ X)


@[simp]
lemma one_le_star_iff {x : R} : 1 ≤ star x ↔ 1 ≤ x

{R : Type u}
[Semiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{x : R}


@[simp] theorem ofInt_ofNat : ofInt (OfNat.ofNat n) = OfNat.ofNat n

Rat.ofInt (OfNat.ofNat n) = OfNat.ofNat n


theorem subset_extend {s : Set V} (hs : LinearIndependent K ((↑) : s → V)) :
    s ⊆ hs.extend (Set.subset_univ _)

(hs : LinearIndependent (ι := { x // x ∈ s }) K Subtype.val)


theorem eq_of_base_iff_base_forall {M₁ M₂ : Matroid α} (hE : M₁.E = M₂.E)
    (h : ∀ ⦃B⦄, B ⊆ M₁.E → (M₁.Base B ↔ M₂.Base B)) : M₁ = M₂

(h : ∀ ⦃B : Set α⦄, B ⊆ M₁.E → (M₁.Base B ↔ M₂.Base B))


theorem mem_closure_tfae (a : Ordinal.{u}) (s : Set Ordinal) :
    TFAE [a ∈ closure s,
      a ∈ closure (s ∩ Iic a),
      (s ∩ Iic a).Nonempty ∧ sSup (s ∩ Iic a) = a,
      ∃ t, t ⊆ s ∧ t.Nonempty ∧ BddAbove t ∧ sSup t = a,
      ∃ (o : Ordinal.{u}), o ≠ 0 ∧ ∃ (f : ∀ x < o, Ordinal),
        (∀ x hx, f x hx ∈ s) ∧ bsup.{u, u} o f = a,
      ∃ (ι : Type u), Nonempty ι ∧ ∃ f : ι → Ordinal, (∀ i, f i ∈ s) ∧ sup.{u, u} f = a]

[a ∈ closure s, a ∈ closure (s ∩ Set.Iic a), (s ∩ Set.Iic a).Nonempty ∧ sSup (s ∩ Set.Iic a) = a,
    ∃ t ⊆ s, t.Nonempty ∧ BddAbove t ∧ sSup t = a,
    ∃ o, o ≠ 0 ∧ ∃ f, (∀ (x : Ordinal.{u}) (hx : x < o), f x hx ∈ s) ∧ o.bsup f = a,
    ∃ ι, Nonempty ι ∧ ∃ f, (∀ (i : ι), f i ∈ s) ∧ Ordinal.sup f = a].TFAE


theorem IsNClique.not_cliqueFree (hG : G.IsNClique n s) : ¬G.CliqueFree n

{α : Type u_1}
{G : SimpleGraph α}
{n : ℕ}
{s : Finset α}
(hG : G.IsNClique n s)


/-- The "unopposite" of a natural transformation. -/
@[simps]
protected def unop {F G : Cᵒᵖ ⥤ Dᵒᵖ} (α : F ⟶ G) : G.unop ⟶ F.unop

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F G : CategoryTheory.Functor Cᵒᵖ Dᵒᵖ}
(α : F ⟶ G)
(X : C)

(CategoryTheory.NatTrans.unop α).app X = (α.app (Opposite.op X)).unop


theorem isRelPrime_one_left : IsRelPrime 1 x


theorem disjUnion_comm (s t : Finset α) (h : Disjoint s t) :
    disjUnion s t h = disjUnion t s h.symm

{α : Type u_1}
(s t : Finset α)
(h : Disjoint s t)


@[simp]
theorem radical_bot_of_noZeroDivisors {R : Type u} [CommSemiring R] [NoZeroDivisors R] :
    radical (⊥ : Ideal R) = ⊥


lemma sub_one_lt_iff {k : Fin (n + 1)} : k - 1 < k ↔ 0 < k


theorem transpose_eq_iff_eq_transpose {μ ν : YoungDiagram} : μ.transpose = ν ↔ μ = ν.transpose


@[simp]
theorem π_map (p q : ActionCategory M X) (f : p ⟶ q) : (π M X).map f = f.val

(p q : CategoryTheory.ActionCategory M X)

(CategoryTheory.ActionCategory.π M X).map f = ↑f


@[simp] lemma T_apply (m n : ℤ) : (T n : R[T;T⁻¹]) m = if n = m then 1 else 0

(LaurentPolynomial.T n) m = if n = m then 1 else 0


@[simp]
theorem map_id_obj' (x : X) (U) (p) (q) : (map (𝟙 X) x).obj ⟨⟨U, p⟩, q⟩ = ⟨⟨U, p⟩, q⟩

(q : (𝟙 X) x ∈ { carrier := U, is_open' := p })

(TopologicalSpace.OpenNhds.map (𝟙 X) x).obj { obj := { carrier := U, is_open' := p }, property := q } =
  { obj := { carrier := U, is_open' := p }, property := q }


theorem IsOpen.continuousOn_iff {f : α → β} {s : Set α} (hs : IsOpen s) :
    ContinuousOn f s ↔ ∀ ⦃a⦄, a ∈ s → ContinuousAt f a

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
(hs : IsOpen s)

ContinuousOn f s ↔ ∀ ⦃a : α⦄, a ∈ s → ContinuousAt f a


/-- Sum of a list of elements in an intermediate field is in the intermediate_field. -/
protected theorem list_sum_mem {l : List L} : (∀ x ∈ l, x ∈ S) → l.sum ∈ S

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)
{l : List L}


lemma eval₂_minpolyDiv_self {T} [CommRing T] [Algebra R T] [IsDomain T] [DecidableEq T] (x : S)
    (σ₁ σ₂ : S →ₐ[R] T) :
    eval₂ σ₁ (σ₂ x) (minpolyDiv R x) =
      if σ₁ x = σ₂ x then σ₁ (aeval x (derivative <| minpoly R x)) else 0

{R : Type u_2}
{S : Type u_3}
[CommRing R]
[CommRing S]
[Algebra R S]
{T : Type u_1}
[CommRing T]
[Algebra R T]
[IsDomain T]
[DecidableEq T]
(x : S)
(σ₁ σ₂ : S →ₐ[R] T)

Polynomial.eval₂ (↑σ₁) (σ₂ x) (minpolyDiv R x) =
  if σ₁ x = σ₂ x then σ₁ ((Polynomial.aeval x) (Polynomial.derivative (minpoly R x))) else 0


/-- Given an equivalence `e : A ≃ₐ[R] B` of `R`-algebras and a subalgebra `S` of `A`,
`subalgebraMap` is the induced equivalence between `S` and `S.map e` -/
@[simps!]
def subalgebraMap (e : A ≃ₐ[R] B) (S : Subalgebra R A) : S ≃ₐ[R] S.map (e : A →ₐ[R] B)

(y : ↑(⇑↑e.toRingEquiv.toAddEquiv '' ↑S.toAddSubmonoid))

↑((e.subalgebraMap S).symm y) = (↑↑e).symm ↑y


@[simp] theorem coprime_zero_left (n : Nat) : Coprime 0 n ↔ n = 1


lemma natAbs_ediv (a b : ℤ) (H : b ∣ a) : natAbs (a / b) = natAbs a / natAbs b


theorem gc : GaloisConnection ((↑) : Opens α → Set α) interior


/-- Binary pushforward of nonempty intervals. -/
@[simps]
def map₂ (f : α → β → γ) (h₀ : ∀ b, Monotone fun a => f a b) (h₁ : ∀ a, Monotone (f a)) :
    NonemptyInterval α → NonemptyInterval β → NonemptyInterval γ

(f : α → β → γ)

(h₀ : ∀ (b : β), Monotone fun a => f a b)

∀ (a : NonemptyInterval α) (a_1 : NonemptyInterval β),
  (NonemptyInterval.map₂ f h₀ h₁ a a_1).toProd.2 = f a.toProd.2 a_1.toProd.2


theorem eq_top_of_bot_eq_top (hα : (⊥ : α) = ⊤) (x : α) : x = (⊤ : α)

{α : Type u}
[PartialOrder α]
[BoundedOrder α]
(hα : ⊥ = ⊤)
(x : α)


/-- The product of two sets is null measurable
if and only if both of them are null measurable or one of them has measure zero. -/
lemma nullMeasurableSet_prod {s : Set α} {t : Set β} :
    NullMeasurableSet (s ×ˢ t) (μ.prod ν) ↔
      NullMeasurableSet s μ ∧ NullMeasurableSet t ν ∨ μ s = 0 ∨ ν t = 0

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
{s : Set α}
{t : Set β}

MeasureTheory.NullMeasurableSet (s ×ˢ t) (μ.prod ν) ↔
  MeasureTheory.NullMeasurableSet s μ ∧ MeasureTheory.NullMeasurableSet t ν ∨ μ s = 0 ∨ ν t = 0


theorem reaches₁_eq {σ} {f : σ → Option σ} {a b c} (h : f a = f b) :
    Reaches₁ f a c ↔ Reaches₁ f b c

{σ : Type u_1}
{f : σ → Option σ}
{a b c : σ}
(h : f a = f b)

Turing.Reaches₁ f a c ↔ Turing.Reaches₁ f b c


theorem adic_module_basis :
    I.ringFilterBasis.SubmodulesBasis fun n : ℕ => I ^ n • (⊤ : Submodule R M)

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(M : Type u_2)
[AddCommGroup M]
[Module R M]

I.ringFilterBasis.SubmodulesBasis fun n => I ^ n • ⊤


theorem X_pow_sub_C_irreducible_iff_forall_prime_of_odd {n : ℕ} (hn : Odd n) {a : K} :
    Irreducible (X ^ n - C a) ↔ (∀ p : ℕ, p.Prime → p ∣ n → ∀ b : K, b ^ p ≠ a)

{K : Type u}
[Field K]
{n : ℕ}
(hn : Odd n)
{a : K}

Irreducible (Polynomial.X ^ n - Polynomial.C a) ↔ ∀ (p : ℕ), Nat.Prime p → p ∣ n → ∀ (b : K), b ^ p ≠ a


theorem get_eq_of_mem {o : Part α} {a} (h : a ∈ o) (h') : get o h' = a

{α : Type u_1}
{o : Part α}
{a : α}
(h : a ∈ o)
(h' : o.Dom)


@[simp] theorem ofReal_coe_nnreal : ENNReal.ofReal p = p


/-- Any element `x` of `F` is a separable element of `E / F` when embedded into `E`. -/
theorem isSeparable_algebraMap (x : F) : IsSeparable F ((algebraMap F E) x)

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


theorem eraseLead_natDegree_lt (f0 : 2 ≤ f.support.card) : (eraseLead f).natDegree < f.natDegree

{R : Type u_1}
[Semiring R]
{f : R[X]}
(f0 : 2 ≤ f.support.card)


theorem ramificationIdx_ne_zero {e : ℕ} (he : e ≠ 0) (hle : map f p ≤ P ^ e)
    (hnle : ¬map f p ≤ P ^ (e + 1)) : ramificationIdx f p P ≠ 0

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
{f : R →+* S}
{p : Ideal R}
{P : Ideal S}
{e : ℕ}
(he : e ≠ 0)
(hle : Ideal.map f p ≤ P ^ e)
(hnle : ¬Ideal.map f p ≤ P ^ (e + 1))


@[to_additive existing (attr := simp)]
theorem eval₂_prod (s : Finset S₂) (p : S₂ → MvPolynomial σ R) :
    eval₂ f g (∏ x ∈ s, p x) = ∏ x ∈ s, eval₂ f g (p x)

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

MvPolynomial.eval₂ f g (∏ x ∈ s, p x) = ∏ x ∈ s, MvPolynomial.eval₂ f g (p x)


theorem linearProjOfIsCompl_apply_right' (h : IsCompl p q) (x : E) (hx : x ∈ q) :
    linearProjOfIsCompl p q h x = 0

{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)
(hx : x ∈ q)


theorem getElem?_iterate (f : α → α) (a : α) :
    ∀ (n i : ℕ), i < n → (iterate f a n)[i]? = f^[i] a

{α : Type u_1}
(f : α → α)
(a : α)
(n i : ℕ)

i < n → (List.iterate f a n)[i]? = some (f^[i] a)


theorem sum_lt_of_isRegular {ι : Type u} {f : ι → Cardinal} {c : Cardinal} (hc : IsRegular c)
    (hι : #ι < c) : (∀ i, f i < c) → sum f < c

{ι : Type u}
{f : ι → Cardinal.{u}}
{c : Cardinal.{u}}
(hc : c.IsRegular)
(hι : #ι < c)

(∀ (i : ι), f i < c) → Cardinal.sum f < c


theorem map_comap_setCoe_val (f : Filter β) (s : Set β) :
    (f.comap ((↑) : s → β)).map (↑) = f ⊓ 𝓟 s

Filter.map Subtype.val (Filter.comap Subtype.val f) = f ⊓ 𝓟 s


lemma SecondCountableTopology.mk' {b : Set (Set α)} (hc : b.Countable) :
    @SecondCountableTopology α (generateFrom b)

{α : Type u}
{b : Set (Set α)}
(hc : b.Countable)


theorem gcd_mul_left' [GCDMonoid α] (a b c : α) :
    Associated (gcd (a * b) (a * c)) (a * gcd b c)

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


/-- Auxiliary definition:
the diagram whose limit gives the morphism space between two objects of the limit category. -/
@[simps]
def homDiagram {F : J ⥤ Cat.{v, v}} (X Y : limit (F ⋙ Cat.objects.{v, v})) : J ⥤ Type v

{F : CategoryTheory.Functor J CategoryTheory.Cat}

(X Y : CategoryTheory.Limits.limit (F.comp CategoryTheory.Cat.objects))

(CategoryTheory.Cat.HasLimits.homDiagram X Y).obj j =
  (CategoryTheory.Limits.limit.π (F.comp CategoryTheory.Cat.objects) j X ⟶
    CategoryTheory.Limits.limit.π (F.comp CategoryTheory.Cat.objects) j Y)


@[simp]
theorem SlashInvariantFormClass.coe_coe [SlashInvariantFormClass F Γ k] (f : F) :
    ((f : SlashInvariantForm Γ k) : ℍ → ℂ) = f

{F : Type u_1}
{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
[FunLike F ℍ ℂ]
[SlashInvariantFormClass F Γ k]
(f : F)

⇑{ toFun := ⇑f, slash_action_eq' := ⋯ } = ⇑f


theorem tendsto_pre (m : Set X → ℝ≥0∞) (s : Set X) :
    Tendsto (fun r => pre m r s) (𝓝[>] 0) (𝓝 <| mkMetric' m s)

{X : Type u_2}
[EMetricSpace X]
(m : Set X → ℝ≥0∞)
(s : Set X)

Filter.Tendsto (fun r => (MeasureTheory.OuterMeasure.mkMetric'.pre m r) s) (𝓝[>] 0)
  (𝓝 ((MeasureTheory.OuterMeasure.mkMetric' m) s))


@[simp]
theorem castNum_testBit (m n) : testBit m n = Nat.testBit m n


theorem integralClosure_idem {R A : Type*} [CommRing R] [CommRing A] [Algebra R A] :
    integralClosure (integralClosure R A : Set A) A = ⊥

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

integralClosure (↑↑(integralClosure R A)) A = ⊥


/-- The coalgebra structure which will be the point of the new colimit cone for `D`. -/
@[simps]
def coconePoint : Coalgebra T

(D : CategoryTheory.Functor J T.Coalgebra)

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

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


protected theorem Ne.dite_ne_right_iff (h : ∀ h, A h ≠ b) : (dite P A fun _ ↦ b) ≠ b ↔ P

{α : Sort u_1}
{P : Prop}
[Decidable P]
{b : α}
{A : P → α}
(h : ∀ (h : P), A h ≠ b)


@[simp]
theorem weightedSMul_empty {m : MeasurableSpace α} (μ : Measure α) :
    weightedSMul μ ∅ = (0 : F →L[ℝ] F)

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)


/-- Given two bifunctors `F : C₁ ⥤ C₂₃ ⥤ C₄` and `G₂₃ : C₂ ⥤ C₃ ⥤ C₄`, this is
the trifunctor `C₁ ⥤ C₂ ⥤ C₃ ⥤ C₄` obtained by composition. -/
@[simps]
def bifunctorComp₂₃ : C₁ ⥤ C₂ ⥤ C₃ ⥤ C₄

(F : CategoryTheory.Functor C₁ (CategoryTheory.Functor C₂₃ C₄))

(G₂₃ : CategoryTheory.Functor C₂ (CategoryTheory.Functor C₃ C₂₃))

(CategoryTheory.bifunctorComp₂₃ F G₂₃).obj X₁ = CategoryTheory.bifunctorComp₂₃Obj F G₂₃ X₁


lemma Real.summable_one_div_int_add_rpow (a : ℝ) (s : ℝ) :
    Summable (fun n : ℤ ↦ 1 / |n + a| ^ s) ↔ 1 < s

(Summable fun n => 1 / |↑n + a| ^ s) ↔ 1 < s


/-- If `m ≠ 0` and the `Finset` of prime factors of `m` is contained in `s`, then `m`
is `s`-factored. -/
lemma mem_factoredNumbers_of_primeFactors_subset {s : Finset ℕ} {m : ℕ} (hm : m ≠ 0)
    (hp : m.primeFactors ⊆ s) :
    m ∈ factoredNumbers s


theorem lintegral_map' {mβ : MeasurableSpace β} {f : β → ℝ≥0∞} {g : α → β}
    (hf : AEMeasurable f (Measure.map g μ)) (hg : AEMeasurable g μ) :
    ∫⁻ a, f a ∂Measure.map g μ = ∫⁻ a, f (g a) ∂μ

{f : β → ℝ≥0∞}

(hf : AEMeasurable f (MeasureTheory.Measure.map g μ))

∫⁻ (a : β), f a ∂MeasureTheory.Measure.map g μ = ∫⁻ (a : α), f (g a) ∂μ


theorem span_monotone : Monotone (span R : Set M → Submodule R M)

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]


@[to_additive]
theorem smul_union : s • (t₁ ∪ t₂) = s • t₁ ∪ s • t₂

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


/-- The equivalence from coalgebras for the product comonad to the over category. -/
@[simps]
def coalgebraEquivOver : Coalgebra (prodComonad X) ≌ Over X

(CategoryTheory.coalgebraEquivOver X).counitIso =
  CategoryTheory.NatIso.ofComponents
    (fun f =>
      CategoryTheory.Over.isoMk
        (CategoryTheory.Iso.refl
          (((CategoryTheory.overToCoalgebra X).comp (CategoryTheory.coalgebraToOver X)).obj f).left)
        ⋯)
    ⋯


/-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
we have `k (g y) * f.map hy k z = k (g x)` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
we have `k (g y) + f.map hy k z = k (g x)` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_mul_left (z) : k.toMap (g (f.sec z).2) * f.map hy k z = k.toMap (g (f.sec z).1)

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{g : M →+ P}
{T : AddSubmonoid P}
(hy : ∀ (y : ↥S), g ↑y ∈ T)
{Q : Type u_4}
[AddCommMonoid Q]
{k : T.LocalizationMap Q}
(z : N)

k.toMap (g ↑(f.sec z).2) + (f.map hy k) z = k.toMap (g (f.sec z).1)


theorem firstDiff_comm (x y : ∀ n, E n) : firstDiff x y = firstDiff y x

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

PiNat.firstDiff x y = PiNat.firstDiff y x


/-- The complex power function with any exponent is not integrable on `(0, +∞)`. -/
theorem not_integrableOn_Ioi_cpow (s : ℂ) :
    ¬ IntegrableOn (fun x : ℝ ↦ (x : ℂ) ^ s) (Ioi (0 : ℝ))

¬MeasureTheory.IntegrableOn (fun x => ↑x ^ s) (Set.Ioi 0) MeasureTheory.volume


theorem mem_support (H : Subgraph G) {v : V} : v ∈ H.support ↔ ∃ w, H.Adj v w

{V : Type u}
{G : SimpleGraph V}
(H : G.Subgraph)
{v : V}


/-- (Impl) Establish an equivalence between the category of cones for `F` and for the "grown" `F`.
-/
@[simps]
def conesEquiv (B : C) (F : Discrete J ⥤ Over B) :
    Cone (widePullbackDiagramOfDiagramOver B F) ≌ Cone F

(F : CategoryTheory.Discrete J ⥤ CategoryTheory.Over B)

(CategoryTheory.Over.ConstructProducts.conesEquiv B F).counitIso =
  CategoryTheory.Over.ConstructProducts.conesEquivCounitIso B F


/-- Product of elements of a submonoid of a `CommMonoid` indexed by a `Finset` is in the
    submonoid. -/
@[to_additive
      "Sum of elements in an `AddSubmonoid` of an `AddCommMonoid` indexed by a `Finset`
      is in the `AddSubmonoid`."]
theorem prod_mem {M : Type*} [CommMonoid M] (S : Submonoid M) {ι : Type*} {t : Finset ι}
    {f : ι → M} (h : ∀ c ∈ t, f c ∈ S) : (∏ c ∈ t, f c) ∈ S

{M : Type u_4}
[CommMonoid M]
(S : Submonoid M)
{ι : Type u_5}
{t : Finset ι}
{f : ι → M}
(h : ∀ c ∈ t, f c ∈ S)


@[reassoc]
lemma mapCyclesIso_hom_naturality [S₁.HasLeftHomology] [S₂.HasLeftHomology]
    [F.PreservesLeftHomologyOf S₁] [F.PreservesLeftHomologyOf S₂] :
    cyclesMap (F.mapShortComplex.map φ) ≫ (S₂.mapCyclesIso F).hom =
      (S₁.mapCyclesIso F).hom ≫ F.map (cyclesMap φ)

CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.cyclesMap (F.mapShortComplex.map φ))
    (S₂.mapCyclesIso F).hom =
  CategoryTheory.CategoryStruct.comp (S₁.mapCyclesIso F).hom (F.map (CategoryTheory.ShortComplex.cyclesMap φ))


theorem comp {Cg rg : ℝ≥0} {g : Y → Z} {t : Set Y} (hg : HolderOnWith Cg rg g t) {Cf rf : ℝ≥0}
    {f : X → Y} (hf : HolderOnWith Cf rf f s) (hst : MapsTo f s t) :
    HolderOnWith (Cg * Cf ^ (rg : ℝ)) (rg * rf) (g ∘ f) s

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
[PseudoEMetricSpace Z]
{s : Set X}
{Cg rg : ℝ≥0}
{g : Y → Z}
{t : Set Y}
(hg : HolderOnWith Cg rg g t)
{Cf rf : ℝ≥0}
{f : X → Y}
(hf : HolderOnWith Cf rf f s)
(hst : Set.MapsTo f s t)

HolderOnWith (Cg * Cf ^ ↑rg) (rg * rf) (g ∘ f) s


@[simp]
theorem map_id : map σ (RingHom.id R) = RingHom.id _

{σ : Type u_1}
{R : Type u_2}
[Semiring R]

MvPowerSeries.map σ (RingHom.id R) = RingHom.id (MvPowerSeries σ R)


lemma iterate_bit1 (hf : Involutive f) (n : ℕ) : f^[2 * n + 1] = f

{α : Type u_5}
{f : α → α}
(hf : Function.Involutive f)
(n : ℕ)


theorem _root_.measurableEmbedding_const_smul₀ {c : G₀} (hc : c ≠ 0) :
    MeasurableEmbedding (c • · : α → α)

{G₀ : Type u_2}
{α : Type u_3}
[MeasurableSpace G₀]
[MeasurableSpace α]
[GroupWithZero G₀]
[MulAction G₀ α]
[MeasurableSMul G₀ α]
{c : G₀}
(hc : c ≠ 0)


/-- Given a t-structure `t` on a pretriangulated category `C`, the property `t.IsGE X n`
holds if `X : C` is `≥ n` for the t-structure. -/
class IsGE (X : C) (n : ℤ) : Prop where
  ge : t.GE n X

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

{t : CategoryTheory.Triangulated.TStructure C}


@[simp]
theorem attach_val (s : Finset α) : s.attach.1 = s.1.attach


@[simp]
theorem fst_zero [Zero R] [Zero M] : (0 : tsze R M).fst = 0

{R : Type u}
{M : Type v}
[Zero R]
[Zero M]


theorem Projective.of_split [Module.Projective R M]
    (i : P →ₗ[R] M) (s : M →ₗ[R] P) (H : s.comp i = LinearMap.id) : Module.Projective R P

{R : Type u}
[Ring R]
{P : Type v}
[AddCommGroup P]
[Module R P]
{M : Type u_1}
[AddCommGroup M]
[Module R M]
[Module.Projective R M]
(i : P →ₗ[R] M)
(s : M →ₗ[R] P)
(H : s ∘ₗ i = LinearMap.id)


@[reassoc (attr := simp)]
lemma _root_.CategoryTheory.Iso.hom_inv_id_triangle_hom₃ {A B : Triangle C} (e : A ≅ B) :
    e.hom.hom₃ ≫ e.inv.hom₃ = 𝟙 _

{A B : CategoryTheory.Pretriangulated.Triangle C}


/-- The discriminant of the power basis given by `ζ - 1`. -/
theorem discr_prime_pow_ne_two' [IsCyclotomicExtension {p ^ (k + 1)} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))) (hk : p ^ (k + 1) ≠ 2) :
    discr ℚ (hζ.subOnePowerBasis ℚ).basis =
      (-1) ^ ((p ^ (k + 1) : ℕ).totient / 2) * p ^ ((p : ℕ) ^ k * ((p - 1) * (k + 1) - 1))

Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =
  (-1) ^ (φ (↑p ^ (k + 1)) / 2) * ↑↑p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1))


/-- If `f` is `ℝ`-valued and integrable, then for any `c < 0` the set `{x | f x < c}` has finite
measure. -/
lemma Integrable.measure_lt_lt_top {f : α → ℝ} (hf : Integrable f μ) {c : ℝ} (c_neg : c < 0) :
    μ {a : α | f a < c} < ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : MeasureTheory.Integrable f μ)
{c : ℝ}
(c_neg : c < 0)


/-- Every element of the direct limit corresponds to some element in
some component of the directed system. -/
theorem exists_of [Nonempty ι] [IsDirected ι (· ≤ ·)] (z : DirectLimit G f) :
    ∃ i x, of G f i x = z

{ι : Type v}
[Preorder ι]
{G : ι → Type w}
[(i : ι) → CommRing (G i)]
{f : (i j : ι) → i ≤ j → G i → G j}
[Nonempty ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
(z : Ring.DirectLimit G f)

∃ i x, (Ring.DirectLimit.of G f i) x = z


@[to_additive addProjection_respects_measure_apply]
lemma IsFundamentalDomain.projection_respects_measure_apply {ν : Measure α}
    (μ : Measure (Quotient α_mod_G)) [i : QuotientMeasureEqMeasurePreimage ν μ] {t : Set α}
    (fund_dom_t : IsFundamentalDomain G t ν) {U : Set (Quotient α_mod_G)}
    (meas_U : MeasurableSet U) : μ U = ν (π ⁻¹' U ∩ t)

(μ : MeasureTheory.Measure (Quotient (AddAction.orbitRel G α)))

[i : MeasureTheory.AddQuotientMeasureEqMeasurePreimage ν μ]

(fund_dom_t : MeasureTheory.IsAddFundamentalDomain G t ν)

{U : Set (Quotient (AddAction.orbitRel G α))}

μ U = ν (Quotient.mk (AddAction.orbitRel G α) ⁻¹' U ∩ t)


theorem mapM_eq_foldlM [Monad m] [LawfulMonad m] (f : α → m β) (arr : Array α) :
    arr.mapM f = arr.foldlM (fun bs a => bs.push <$> f a) #[]

{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
[Monad m]
[LawfulMonad m]
(f : α → m β)
(arr : Array α)
(i : Nat)
(r : Array β)

Array.mapM.map f arr i r = List.foldlM (fun bs a => bs.push <$> f a) r (List.drop i arr.data)


@[simp]
theorem map_subset_map {f : α → β} {s t : Multiset α} (H : s ⊆ t) : map f s ⊆ map f t

{α : Type u_1}
{β : Type v}
{f : α → β}
{s t : Multiset α}
(H : s ⊆ t)


protected theorem exists_eq_add_of_le' (h : m ≤ n) : ∃ k : Nat, n = k + m


@[reassoc (attr := simp)]
theorem IsSplitMono.id {X Y : C} (f : X ⟶ Y) [hf : IsSplitMono f] : f ≫ retraction f = 𝟙 X

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

CategoryTheory.CategoryStruct.comp f (CategoryTheory.retraction f) = CategoryTheory.CategoryStruct.id X


theorem zero_of_epi_comp {X Y Z : C} (f : X ⟶ Y) {g : Y ⟶ Z} [Epi f] (h : f ≫ g = 0) : g = 0


@[simp]
theorem toAddMonoidHom_coe : ⇑f.toAddMonoidHom = f

{R : Type u_1}
{S : Type u_6}
{M : Type u_9}
{M₃ : Type u_12}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₃]
[Module R M]
[Module S M₃]
{σ : R →+* S}
(f : M →ₛₗ[σ] M₃)


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

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


/-- A functor that preserves zero morphisms also preserves the zero object. -/
@[simps]
def mapZeroObject [PreservesZeroMorphisms F] : F.obj 0 ≅ 0


/-- In a sequential space, a sequentially closed set is closed. -/
protected theorem IsSeqClosed.isClosed [SequentialSpace X] {s : Set X} (hs : IsSeqClosed s) :
    IsClosed s

{X : Type u_1}
[TopologicalSpace X]
[SequentialSpace X]
{s : Set X}
(hs : IsSeqClosed s)


@[simp]
theorem isNClique_bot_iff : (⊥ : SimpleGraph α).IsNClique n s ↔ n ≤ 1 ∧ s.card = n


lemma shiftFunctorZero_op_inv_app (X : Cᵒᵖ) :
    (shiftFunctorZero Cᵒᵖ ℤ).inv.app X =
      ((shiftFunctorZero C ℤ).hom.app X.unop).op ≫
      (shiftFunctorOpIso C 0 0 (zero_add 0)).inv.app X

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.HasShift C ℤ]
(X : Cᵒᵖ)

(CategoryTheory.shiftFunctorZero Cᵒᵖ ℤ).inv.app X =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorZero C ℤ).hom.app (Opposite.unop X)).op
    ((CategoryTheory.Pretriangulated.shiftFunctorOpIso C 0 0 ⋯).inv.app X)


@[simp]
theorem support_X_mul (s : σ) (p : MvPolynomial σ R) :
    (X s * p).support = p.support.map (addLeftEmbedding (Finsupp.single s 1))

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

(MvPolynomial.X s * p).support = Finset.map (addLeftEmbedding (Finsupp.single s 1)) p.support


theorem imp_eq_of_eq_false_left {a b : Prop} (h : a = False) : (a → b) = True


/-- The `Ideal.closure` of a proper ideal in a complete normed ring is proper. -/
theorem closure_ne_top (I : Ideal R) (hI : I ≠ ⊤) : I.closure ≠ ⊤

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
(I : Ideal R)
(hI : I ≠ ⊤)


@[simp]
theorem constantCoeff_wittPolynomial [hp : Fact p.Prime] (n : ℕ) :
    constantCoeff (wittPolynomial p R n) = 0

(p : ℕ)
(R : Type u_1)
[CommRing R]
[hp : Fact (Nat.Prime p)]
(n : ℕ)


theorem all_def (p : α → Prop) (s : Stream' α) : All p s = ∀ n, p (get s n)

{α : Type u}
(p : α → Prop)
(s : Stream' α)

Stream'.All p s = ∀ (n : ℕ), p (s.get n)


/-- `is_basis p s` means the image of `s` bounded by `p` is a filter basis. -/
structure Filter.IsBasis (p : ι → Prop) (s : ι → Set α) : Prop where
  /-- There exists at least one `i` that satisfies `p`. -/
  nonempty : ∃ i, p i
  /-- `s` is directed downwards on `i` such that `p i`. -/
  inter : ∀ {i j}, p i → p j → ∃ k, p k ∧ s k ⊆ s i ∩ s j

{α : Type u_1}
{ι : Sort u_4}
{p : ι → Prop}
{s : ι → Set α}
(self : Filter.IsBasis p s)
{i j : ι}


theorem norm_setIntegral_le_of_norm_le_const' {C : ℝ} (hs : μ s < ∞) (hsm : MeasurableSet s)
    (hC : ∀ x ∈ s, ‖f x‖ ≤ C) : ‖∫ x in s, f x ∂μ‖ ≤ C * (μ s).toReal

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{s : Set X}
{μ : MeasureTheory.Measure X}
{C : ℝ}
(hs : μ s < ⊤)
(hsm : MeasurableSet s)
(hC : ∀ x ∈ s, ‖f x‖ ≤ C)

‖∫ (x : X) in s, f x ∂μ‖ ≤ C * (μ s).toReal


theorem log_rpow {x : ℝ} (hx : 0 < x) (y : ℝ) : log (x ^ y) = y * log x


@[simp] theorem run_lift {α ε : Type u} [Monad m] (x : m α) : run (ExceptCpsT.lift x : ExceptCpsT ε m α) = (x >>= fun a => pure (Except.ok a) : m (Except ε α))

{m : Type u → Type u_1}
{α ε : Type u}
[Monad m]
(x : m α)

(ExceptCpsT.lift x).run = do
  let a ← x
  pure (Except.ok a)


lemma map_apply {m₁ m₂ : SimplexCategoryᵒᵖ} (f : m₁ ⟶ m₂) {n : SimplexCategory}
    (x : (standardSimplex.{u}.obj n).obj m₁) :
    (standardSimplex.{u}.obj n).map f x = (objEquiv _ _).symm (f.unop ≫ (objEquiv _ _) x)

(x : (SSet.standardSimplex.obj n).obj m₁)

(SSet.standardSimplex.obj n).map f x =
  (SSet.standardSimplex.objEquiv n m₂).symm (f.unop ≫ (SSet.standardSimplex.objEquiv n m₁) x)


@[to_additive (attr := simp)]
lemma finite_powers : (powers a : Set G).Finite ↔ IsOfFinOrder a

{G : Type u_1}
[LeftCancelMonoid G]
{a : G}

(↑(Submonoid.powers a)).Finite ↔ IsOfFinOrder a


theorem HasDerivWithinAt.inner {f g : ℝ → E} {f' g' : E} {s : Set ℝ} {x : ℝ}
    (hf : HasDerivWithinAt f f' s x) (hg : HasDerivWithinAt g g' s x) :
    HasDerivWithinAt (fun t => ⟪f t, g t⟫) (⟪f x, g'⟫ + ⟪f', g x⟫) s x

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{f g : ℝ → E}
{f' g' : E}
{s : Set ℝ}
{x : ℝ}
(hf : HasDerivWithinAt f f' s x)
(hg : HasDerivWithinAt g g' s x)

HasDerivWithinAt (fun t => ⟪f t, g t⟫_𝕜) (⟪f x, g'⟫_𝕜 + ⟪f', g x⟫_𝕜) s x


theorem exp_log {x : ℂ} (hx : x ≠ 0) : exp (log x) = x


@[to_additive]
theorem orbit_eq_iff {a b : α} : orbit G a = orbit G b ↔ a ∈ orbit G b

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{a b : α}

MulAction.orbit G a = MulAction.orbit G b ↔ a ∈ MulAction.orbit G b


@[simp]
theorem getElem?_setD_eq (a : Array α) {i : Nat} (p : i < a.size) (v : α) : (a.setD i v)[i]? = some v

{α : Type u_1}
(a : Array α)
{i : Nat}
(p : i < a.size)
(v : α)


theorem Int.closedEmbedding_coe_rat : ClosedEmbedding ((↑) : ℤ → ℚ)


/-- **Gram-Schmidt Orthonormalization**:
`gramSchmidtNormed` applied to a linearly independent set of vectors produces an orthornormal
system of vectors. -/
theorem gramSchmidt_orthonormal {f : ι → E} (h₀ : LinearIndependent 𝕜 f) :
    Orthonormal 𝕜 (gramSchmidtNormed 𝕜 f)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_3}
[LinearOrder ι]
[LocallyFiniteOrderBot ι]
[IsWellOrder ι fun x x_1 => x < x_1]
{f : ι → E}
(h₀ : LinearIndependent 𝕜 f)


theorem lineMap_apply_ring (a b c : k) : lineMap a b c = (1 - c) * a + c * b

(AffineMap.lineMap a b) c = (1 - c) * a + c * b


@[simp]
theorem snd_comp_inl [Zero M] : snd ∘ (inl : R → tsze R M) = 0

TrivSqZeroExt.snd ∘ TrivSqZeroExt.inl = 0


@[simp, norm_cast]
lemma mk_apply (μ : Measure Ω) (hμ) (s : Set Ω) :
    DFunLike.coe (F := ProbabilityMeasure Ω) ⟨μ, hμ⟩ s = (μ s).toNNReal

(hμ : MeasureTheory.IsProbabilityMeasure μ)


@[gcongr]
theorem seq_mono {s₀ s₁ : Set (α → β)} {t₀ t₁ : Set α} (hs : s₀ ⊆ s₁) (ht : t₀ ⊆ t₁) :
    seq s₀ t₀ ⊆ seq s₁ t₁

{α : Type u_1}
{β : Type u_2}
{s₀ s₁ : Set (α → β)}
{t₀ t₁ : Set α}
(hs : s₀ ⊆ s₁)
(ht : t₀ ⊆ t₁)


/-- **Kaminski's Equation** -/
theorem apply_apply_apply (f : Bool → Bool) (x : Bool) : f (f (f x)) = f x


@[simp]
theorem matrix_trace_commutator_zero [Fintype n] (X Y : Matrix n n R) : Matrix.trace ⁅X, Y⁆ = 0

(n : Type u_1)
(R : Type u₂)
[DecidableEq n]
[CommRing R]
[Fintype n]
(X Y : Matrix n n R)


theorem Context.mergeIdem_nonEmpty (e : List Nat) (h : e ≠ []) : mergeIdem e ≠ []


theorem finiteDimensional_quot_dualCoannihilator_iff {W : Submodule K (Dual K V)} :
    FiniteDimensional K (V ⧸ W.dualCoannihilator) ↔ FiniteDimensional K W

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
{W : Submodule K (Module.Dual K V)}

FiniteDimensional K (V ⧸ W.dualCoannihilator) ↔ FiniteDimensional K ↥W


/-- The definition of `sinh` in terms of `exp`. -/
nonrec theorem sinh_eq (x : ℝ) : sinh x = (exp x - exp (-x)) / 2

Real.sinh x = (Real.exp x - Real.exp (-x)) / 2


@[simp]
theorem Matrix.toLinAlgEquiv_self (M : Matrix n n R) (i : n) :
    Matrix.toLinAlgEquiv v₁ M (v₁ i) = ∑ j, M j i • v₁ j

{R : Type u_1}
[CommSemiring R]
{n : Type u_4}
[Fintype n]
[DecidableEq n]
{M₁ : Type u_5}
[AddCommMonoid M₁]
[Module R M₁]
(v₁ : Basis n R M₁)
(M : Matrix n n R)
(i : n)

((Matrix.toLinAlgEquiv v₁) M) (v₁ i) = ∑ j : n, M j i • v₁ j


theorem Antiperiodic.nsmul_sub_eq [AddCommGroup α] [AddGroup β] (h : Antiperiodic f c) (n : ℕ) :
    f (n • c - x) = (-1) ^ n • f (-x)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[AddCommGroup α]
[AddGroup β]
(h : Function.Antiperiodic f c)
(n : ℕ)


@[to_additive, field_simps]
theorem div_div : a / b / c = a / (b * c)

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


@[simp] lemma toOption_eq_none (o : Part α) [Decidable o.Dom] : o.toOption = none ↔ ¬o.Dom

{α : Type u_1}
(o : Part α)
[Decidable o.Dom]


@[to_additive existing (attr := simp)]
lemma equivShrink_symm_mul [Mul α] [Small α] (x y : Shrink α) :
    (equivShrink α).symm (x * y) = (equivShrink α).symm x * (equivShrink α).symm y

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


theorem neg_one_right (a : R) : Commute a (-1)

{R : Type x}
[MulOneClass R]
[HasDistribNeg R]
(a : R)


@[to_additive gcd_nsmul_eq_zero]
theorem pow_gcd_eq_one {M : Type*} [Monoid M] (x : M) {m n : ℕ} (hm : x ^ m = 1) (hn : x ^ n = 1) :
    x ^ m.gcd n = 1

{M : Type u_1}
[Monoid M]
(x : M)
{m n : ℕ}
(hm : x ^ m = 1)
(hn : x ^ n = 1)


/-- The unit isomorphism of the equivalence
`ShortComplex.functorEquivalence : ShortComplex (J ⥤ C) ≌ J ⥤ ShortComplex C`. -/
@[simps!]
def unitIso : 𝟭 _ ≅ functor J C ⋙ inverse J C

(X : CategoryTheory.ShortComplex (CategoryTheory.Functor J C))

∀ (X_1 : J),
  ((CategoryTheory.ShortComplex.FunctorEquivalence.unitIso J C).hom.app X).τ₂.app X_1 =
    CategoryTheory.CategoryStruct.id (X.X₂.obj X_1)


/-- An `AddMonoid` is an `AddSemigroup` with an element `0` such that `0 + a = a + 0 = a`. -/
class AddMonoid (M : Type u) extends AddSemigroup M, AddZeroClass M where
  /-- Multiplication by a natural number.
  Set this to `nsmulRec` unless `Module` diamonds are possible. -/
  protected nsmul : ℕ → M → M
  /-- Multiplication by `(0 : ℕ)` gives `0`. -/
  protected nsmul_zero : ∀ x, nsmul 0 x = 0 := by intros; rfl
  /-- Multiplication by `(n + 1 : ℕ)` behaves as expected. -/
  protected nsmul_succ : ∀ (n : ℕ) (x), nsmul (n + 1) x = nsmul n x + x := by intros; rfl

{M : Type u}
[self : AddMonoid M]
(x : M)


/-- `qrSign` is multiplicative in the first argument. -/
theorem mul_left (m₁ m₂ n : ℕ) : qrSign (m₁ * m₂) n = qrSign m₁ n * qrSign m₂ n


theorem length_le_encode : ∀ l : List α, length l ≤ encode l

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


/-- Converting an in-range number to `Fin (n + 1)` produces a result
whose value is the original number.  -/
theorem val_cast_of_lt {n : ℕ} [NeZero n] {a : ℕ} (h : a < n) : (a : Fin n).val = a


theorem Ideal.exists_mem_pow_not_mem_pow_succ (I : Ideal A) (hI0 : I ≠ ⊥) (hI1 : I ≠ ⊤) (e : ℕ) :
    ∃ x ∈ I ^ e, x ∉ I ^ (e + 1)

{A : Type u_2}
[CommRing A]
[IsDedekindDomain A]
(I : Ideal A)
(hI0 : I ≠ ⊥)
(hI1 : I ≠ ⊤)
(e : ℕ)


theorem lift_mk_le {α : Type v} {β : Type w} :
    lift.{max u w} #α ≤ lift.{max u v} #β ↔ Nonempty (α ↪ β)

Cardinal.lift.{max u w, v} (Cardinal.mk α) ≤ Cardinal.lift.{max u v, w} (Cardinal.mk β) ↔ Nonempty (α ↪ β)


/-- In a complete normed algebra, the operation of inversion is `C^n`, for all `n`, at each
invertible element.  The proof is by induction, bootstrapping using an identity expressing the
derivative of inversion as a bilinear map of inversion itself. -/
theorem contDiffAt_ring_inverse [CompleteSpace R] (x : Rˣ) :
    ContDiffAt 𝕜 n Ring.inverse (x : R)

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{n : ℕ∞}
{R : Type u_3}
[NormedRing R]
[NormedAlgebra 𝕜 R]
[CompleteSpace R]
(x : Rˣ)


@[to_additive (attr := simp)]
theorem ofLeftInverse_apply {f : G →* N} {g : N →* G} (h : Function.LeftInverse g f) (x : G) :
    ↑(ofLeftInverse h x) = f x

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{f : G →+ N}
{g : N →+ G}
(h : Function.LeftInverse ⇑g ⇑f)
(x : G)

↑((AddMonoidHom.ofLeftInverse h) x) = f x


theorem nhdsWithin_Ioi_basis' {a : α} (h : ∃ b, a < b) : (𝓝[>] a).HasBasis (a < ·) (Ioo a)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{a : α}
(h : ∃ b, a < b)

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


@[simp]
theorem WithBot.sSup_empty [SupSet α] : sSup (∅ : Set (WithBot α)) = ⊥


lemma range_eq_top_of_ne_zero :
    LinearMap.range f = ⊤

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
[AddCommGroup V₁]
[Module K V₁]
{f : Module.Dual K V₁}
(hf : f ≠ 0)


@[to_additive (attr := simp)]
theorem div_ball : s / ball x δ = x⁻¹ • thickening δ s

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

s / Metric.ball x δ = x⁻¹ • Metric.thickening δ s


/-- The object in the category of `R`-Hopf algebras associated to an `R`-Hopf algebra. -/
@[simps]
def of (X : Type v) [Ring X] [HopfAlgebra R X] :
    HopfAlgebraCat R

(R : Type u)
[CommRing R]
(X : Type v)
[Ring X]
[HopfAlgebra R X]


theorem Equiv.equivalence : Equivalence (@Equiv α)


/-- A compact subset has finite measure for a measure which is finite on compacts. -/
theorem _root_.IsCompact.measure_ne_top [TopologicalSpace α] {μ : Measure α}
    [IsFiniteMeasureOnCompacts μ] ⦃K : Set α⦄ (hK : IsCompact K) : μ K ≠ ∞


theorem factors_zero [HasZeroMorphisms C] {X Y : C} {P : Subobject Y} : P.Factors (0 : X ⟶ Y)


theorem IsNilpotent.isUnit_add_one [Ring R] {r : R} (hnil : IsNilpotent r) : IsUnit (r + 1)

{R : Type u_1}
[Ring R]
{r : R}
(hnil : IsNilpotent r)


theorem getElem_append_right (as bs : List α) (h : ¬ i < as.length) {h' h''} : (as ++ bs)[i]'h' = bs[i - as.length]'h''

{α : Type u_1}
{i : Nat}
(as bs : List α)
(h : ¬i < as.length)
{h' : i < (as ++ bs).length}
{h'' : i - as.length < bs.length}


/-- If `f` tends to infinity along a nontrivial filter `l`, then
`fun x ↦ r * f x` tends to infinity if and only if `0 < r. `-/
theorem tendsto_const_mul_atTop_iff_pos [NeBot l] (h : Tendsto f l atTop) :
    Tendsto (fun x => r * f x) l atTop ↔ 0 < r

{α : Type u_3}
{β : Type u_4}
[LinearOrderedSemifield α]
{l : Filter β}
{f : β → α}
{r : α}
[l.NeBot]
(h : Filter.Tendsto f l Filter.atTop)

Filter.Tendsto (fun x => r * f x) l Filter.atTop ↔ 0 < r


@[to_additive]
nonrec theorem SmoothOn.div_const (hf : SmoothOn I' I f s) :
    SmoothOn I' I (fun x ↦ f x / c) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[SubNegMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothAdd I G]
{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 → G}
{s : Set M}
(c : G)
(hf : SmoothOn I' I f s)


@[mono]
theorem cast_mono : Monotone ((↑) : ℚ≥0 → K)

{K : Type u_5}
[LinearOrderedSemifield K]


theorem ContMDiffOn.smoothOn (h : ContMDiffOn I I' ⊤ f s) : SmoothOn I I' f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{s : Set M}
(h : ContMDiffOn I I' ⊤ f s)


theorem measure_closedBall_div_le_integral [IsAddHaarMeasure μ] (K : ℝ) (h : f.rOut ≤ K * f.rIn) :
    (μ (closedBall c f.rOut)).toReal / K ^ finrank ℝ E ≤ ∫ x, f x ∂μ

(μ (Metric.closedBall c f.rOut)).toReal / K ^ FiniteDimensional.finrank ℝ E ≤ ∫ (x : E), ↑f x ∂μ


protected theorem AntitoneOn.Ioo (hf : AntitoneOn f s) (hg : MonotoneOn g s) :
    MonotoneOn (fun x => Ioo (f x) (g x)) s

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f g : α → β}
{s : Set α}
(hf : AntitoneOn f s)
(hg : MonotoneOn g s)

MonotoneOn (fun x => Set.Ioo (f x) (g x)) s


{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M]
[Algebra R A]
[Module A M]
[Module R M]
(D : Derivation R A M)


theorem strictMono_iff {f : WithBot α → β} :
    StrictMono f ↔ StrictMono (fun a => f a : α → β) ∧ ∀ x : α, f ⊥ < f x

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f : WithBot α → β}

StrictMono f ↔ (StrictMono fun a => f ↑a) ∧ ∀ (x : α), f ⊥ < f ↑x


theorem succ_mono : CategoryTheory.Mono (ModuleCat.ofHom (πs C o))

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

CategoryTheory.Mono (ModuleCat.ofHom (Profinite.NobelingProof.πs C o))


theorem radical_eq_top : radical I = ⊤ ↔ I = ⊤

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


@[simp]
theorem mk_finsupp_lift_of_infinite (α : Type u) (β : Type v) [Infinite α] [Zero β] [Nontrivial β] :
    #(α →₀ β) = max (lift.{v} #α) (lift.{u} #β)

#(α →₀ β) = max (Cardinal.lift.{v, u} #α) (Cardinal.lift.{u, v} #β)


@[simp]
theorem directSumRight_symm_lof_tmul (x : M₁') (i : ι₂) (y : M₂ i) :
    (directSumRight R M₁' M₂).symm (DirectSum.lof R _ _ i (x ⊗ₜ[R] y)) =
      x ⊗ₜ[R] DirectSum.lof R _ _ i y

(R : Type u)
[CommSemiring R]
{ι₂ : Type v₂}
[DecidableEq ι₂]
{M₁' : Type w₁'}
{M₂ : ι₂ → Type w₂}
[AddCommMonoid M₁']
[(i₂ : ι₂) → AddCommMonoid (M₂ i₂)]
[Module R M₁']
[(i₂ : ι₂) → Module R (M₂ i₂)]
(x : M₁')
(i : ι₂)
(y : M₂ i)

(TensorProduct.directSumRight R M₁' M₂).symm
    ((DirectSum.lof R ι₂ (fun i => TensorProduct R M₁' (M₂ i)) i) (x ⊗ₜ[R] y)) =
  x ⊗ₜ[R] (DirectSum.lof R ι₂ M₂ i) y


theorem iterate_derivative_X_pow_eq_smul (n : ℕ) (k : ℕ) :
    derivative^[k] (X ^ n : R[X]) = (Nat.descFactorial n k : R) • X ^ (n - k)

(⇑Polynomial.derivative)^[k] (Polynomial.X ^ n) = ↑(n.descFactorial k) • Polynomial.X ^ (n - k)


@[simp, norm_cast] lemma pow_apply (ψ : AddChar A M) (n : ℕ) (a : A) : (ψ ^ n) a = (ψ a) ^ n

{A : Type u_1}
{M : Type u_2}
[AddMonoid A]
[CommMonoid M]
(ψ : AddChar A M)
(n : ℕ)
(a : A)


@[norm_cast]
theorem coe_mul (a b : R) : (↑(a * b : R) : A) = ↑a * ↑b

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(a b : R)


theorem toZ_of_lt (hi : i < i0) : toZ i0 i = -Nat.find (exists_pred_iterate_of_le hi.le)

{ι : Type u_1}
[LinearOrder ι]
[SuccOrder ι]
[IsSuccArchimedean ι]
[PredOrder ι]
{i0 i : ι}
(hi : i < i0)


theorem Subsemiring.one_mem_toNonUnitalSubsemiring (S : Subsemiring R) :
    (1 : R) ∈ S.toNonUnitalSubsemiring

{R : Type u_1}
[NonAssocSemiring R]
(S : Subsemiring R)


@[simp]
theorem card_singleton (a : α) : card ({a} : Finset α) = 1


@[simp]
lemma map_zero_zero : map F f 0 0 (by simp) = 𝟙 X

(F : CategoryTheory.ComposableArrows C n)

CategoryTheory.ComposableArrows.Precomp.map F f 0 0 ⋯ = CategoryTheory.CategoryStruct.id X


@[simp]
theorem quotAdjoinEquivQuotMap_apply_mk (hx : (conductor R x).comap (algebraMap R S) ⊔ I = ⊤)
    (h_alg : Function.Injective (algebraMap R<x> S)) (a : R<x>) :
    quotAdjoinEquivQuotMap hx h_alg (Ideal.Quotient.mk (I.map (algebraMap R R<x>)) a) =
      Ideal.Quotient.mk (I.map (algebraMap R S)) ↑a

(hx : Ideal.comap (algebraMap R S) (conductor R x) ⊔ I = ⊤)

(h_alg : Function.Injective ⇑(algebraMap (↥(Algebra.adjoin R {x})) S))

(quotAdjoinEquivQuotMap hx h_alg) ((Ideal.Quotient.mk (Ideal.map (algebraMap R ↥(Algebra.adjoin R {x})) I)) a) =
  (Ideal.Quotient.mk (Ideal.map (algebraMap R S) I)) ↑a


@[simp]
theorem toFinset_subset [Fintype s] {t : Finset α} : s.toFinset ⊆ t ↔ s ⊆ t

{α : Type u_1}
{s : Set α}
[Fintype ↑s]
{t : Finset α}


theorem rev_lt_iff {i j : Fin n} : rev i < j ↔ rev j < i


@[simp]
theorem prod_inf_prod : prod p q₁ ⊓ prod p' q₁' = prod (p ⊓ p') (q₁ ⊓ q₁')

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(p p' : Submodule R M)
{M' : Type u_9}
[AddCommMonoid M']
[Module R M']
(q₁ q₁' : Submodule R M')

p.prod q₁ ⊓ p'.prod q₁' = (p ⊓ p').prod (q₁ ⊓ q₁')


lemma of_precomp {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (hf : W f) (hfg : W (f ≫ g)) :
    W g

(hfg : W (CategoryTheory.CategoryStruct.comp f g))


@[to_additive]
protected theorem pow_mem {M : Type*} [Monoid M] (S : Submonoid M) {x : M} (hx : x ∈ S) (n : ℕ) :
    x ^ n ∈ S

{M : Type u_5}
[Monoid M]
(S : Submonoid M)
{x : M}
(hx : x ∈ S)
(n : ℕ)


theorem inv_def (e : E ≃ₗᵢ[R] E) : (e⁻¹ : E ≃ₗᵢ[R] E) = e.symm

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


theorem IsBigO.trans_le (hfg : f =O[l] g') (hgk : ∀ x, ‖g' x‖ ≤ ‖k x‖) : f =O[l] k

{α : Type u_1}
{E : Type u_3}
{G : Type u_5}
{F' : Type u_7}
[Norm E]
[Norm G]
[SeminormedAddCommGroup F']
{f : α → E}
{k : α → G}
{g' : α → F'}
{l : Filter α}
(hfg : f =O[l] g')
(hgk : ∀ (x : α), ‖g' x‖ ≤ ‖k x‖)


@[to_additive]
theorem sizeof_of_step : ∀ {L₁ L₂ : List (α × Bool)},
    Step L₁ L₂ → sizeOf L₂ < sizeOf L₁

FreeAddGroup.Red.Step L₁ L₂ → sizeOf L₂ < sizeOf L₁


theorem derivWithin_clm_apply (hxs : UniqueDiffWithinAt 𝕜 s x) (hc : DifferentiableWithinAt 𝕜 c s x)
    (hu : DifferentiableWithinAt 𝕜 u s x) :
    derivWithin (fun y => (c y) (u y)) s x = derivWithin c s x (u x) + c x (derivWithin u s x)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
{s : Set 𝕜}
{G : Type u_2}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{c : 𝕜 → F →L[𝕜] G}
{u : 𝕜 → F}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(hc : DifferentiableWithinAt 𝕜 c s x)
(hu : DifferentiableWithinAt 𝕜 u s x)

derivWithin (fun y => (c y) (u y)) s x = (derivWithin c s x) (u x) + (c x) (derivWithin u s x)


@[simp] lemma diffs_subset_iff : s \\ t ⊆ u ↔ ∀ a ∈ s, ∀ b ∈ t, a \ b ∈ u

{α : Type u_2}
[DecidableEq α]
[GeneralizedBooleanAlgebra α]
{s t u : Finset α}

s.diffs t ⊆ u ↔ ∀ a ∈ s, ∀ b ∈ t, a \ b ∈ u


theorem minSqFac_has_prop (n : ℕ) : MinSqFacProp n (minSqFac n)


theorem Results.length {s : Computation α} {a n} [_T : Terminates s] : Results s a n → length s = n

{α : Type u}
{s : Computation α}
{a : α}
{n : ℕ}
[_T : s.Terminates]


@[measurability]
theorem Finset.measurable_range_sup' {f : ℕ → δ → α} {n : ℕ} (hf : ∀ k ≤ n, Measurable (f k)) :
    Measurable ((range (n + 1)).sup' nonempty_range_succ f)

{α : Type u_2}
{m : MeasurableSpace α}
{δ : Type u_3}
[MeasurableSpace δ]
[SemilatticeSup α]
[MeasurableSup₂ α]
{f : ℕ → δ → α}
{n : ℕ}
(hf : ∀ k ≤ n, Measurable (f k))

Measurable ((Finset.range (n + 1)).sup' ⋯ f)


/-- If a vector `v₁` is on the same ray as a nonzero vector `v₂`, then it is equal to `c • v₂` for
some nonnegative `c`. -/
theorem exists_nonneg_right (h : SameRay R x y) (hy : y ≠ 0) : ∃ r : R, 0 ≤ r ∧ x = r • y

{R : Type u_1}
[LinearOrderedField R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x y : M}
(h : SameRay R x y)
(hy : y ≠ 0)


theorem measurable_of_measurable_nnreal_prod [MeasurableSpace β] [MeasurableSpace γ]
    {f : ℝ≥0∞ × β → γ} (H₁ : Measurable fun p : ℝ≥0 × β => f (p.1, p.2))
    (H₂ : Measurable fun x => f (∞, x)) : Measurable f

{f : ℝ≥0∞ × β → γ}

(H₁ : Measurable fun p => f (↑p.1, p.2))


/-- If `f : R →+* S` is a local ring hom, then `R` is a local ring if `S` is. -/
theorem RingHom.domain_localRing {R S : Type*} [CommSemiring R] [CommSemiring S] [H : LocalRing S]
    (f : R →+* S) [IsLocalRingHom f] : LocalRing R

{R : Type u_4}
{S : Type u_5}
[CommSemiring R]
[CommSemiring S]
[H : LocalRing S]
(f : R →+* S)
[IsLocalRingHom f]


@[to_additive]
theorem mem_smul {x : β} : x ∈ s • t ↔ ∃ y ∈ s, ∃ z ∈ t, y • z = x

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{s : Finset α}
{t : Finset β}
{x : β}

x ∈ s +ᵥ t ↔ ∃ y ∈ s, ∃ z ∈ t, y +ᵥ z = x


/-- If there are no configurations of satellites with `N+1` points, one never uses more than `N`
distinct families in the Besicovitch inductive construction. -/
theorem color_lt {i : Ordinal.{u}} (hi : i < p.lastStep) {N : ℕ}
    (hN : IsEmpty (SatelliteConfig α N p.τ)) : p.color i < N

(hN : IsEmpty (Besicovitch.SatelliteConfig α N p.τ))


theorem filter_eq_foldr (p : α → Bool) (l : List α) :
    filter p l = foldr (fun a out => bif p a then a :: out else out) [] l

{α : Type u}
(p : α → Bool)
(l : List α)

List.filter p l = List.foldr (fun a out => bif p a then a :: out else out) [] l


{R₂ : Type u_3}
{R₃ : Type u_4}
{M₂ : Type u_11}
{M₃ : Type u_12}
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
{module_M₂ : Module R₂ M₂}
{module_M₃ : Module R₃ M₃}
{σ₂₃ : R₂ →+* R₃}
(f : M₂ →ₛₗ[σ₂₃] M₃)


theorem imp_and_neg_imp_iff (p q : Prop) : (p → q) ∧ (¬p → q) ↔ q


theorem cast_comm (n : ℕ) (x : α) : (n : α) * x = x * n

{α : Type u_1}
[NonAssocSemiring α]
(n : ℕ)
(x : α)


@[to_additive (attr := simp)]
theorem mk_inv (a : G) : ((a⁻¹ : G) : Q) = (a : Q)⁻¹

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]
(a : G)

↑a⁻¹ = (↑a)⁻¹


/-- Every functor indexing a (co)equalizer is naturally isomorphic (actually, equal) to a
    `parallelPair` -/
@[simps!]
def diagramIsoParallelPair (F : WalkingParallelPair ⥤ C) :
    F ≅ parallelPair (F.map left) (F.map right)

(F : CategoryTheory.Functor CategoryTheory.Limits.WalkingParallelPair C)

(CategoryTheory.Limits.diagramIsoParallelPair F).inv.app X = CategoryTheory.eqToHom ⋯


@[simp]
theorem add_moveRight_inl {x : PGame} (y : PGame) (i) :
    (x + y).moveRight (toRightMovesAdd (Sum.inl i)) = x.moveRight i + y

{x : SetTheory.PGame}
(y : SetTheory.PGame)
(i : x.RightMoves)

(x + y).moveRight (SetTheory.PGame.toRightMovesAdd (Sum.inl i)) = x.moveRight i + y


lemma _root_.MeasurableEquiv.gaussianReal_map_symm_apply (hv : v ≠ 0) (f : ℝ ≃ᵐ ℝ) {f' : ℝ → ℝ}
    (h_deriv : ∀ x, HasDerivAt f (f' x) x) {s : Set ℝ} (hs : MeasurableSet s) :
    (gaussianReal μ v).map f.symm s
      = ENNReal.ofReal (∫ x in s, |f' x| * gaussianPDFReal μ v (f x))

(f : ℝ ≃ᵐ ℝ)

(h_deriv : ∀ (x : ℝ), HasDerivAt (⇑f) (f' x) x)

(MeasureTheory.Measure.map (⇑f.symm) (ProbabilityTheory.gaussianReal μ v)) s =
  ENNReal.ofReal (∫ (x : ℝ) in s, |f' x| * ProbabilityTheory.gaussianPDFReal μ v (f x))


theorem iSup_mul_le {a : ℝ≥0} {g : ι → ℝ≥0} {h : ℝ≥0} (H : ∀ i, g i * h ≤ a) : iSup g * h ≤ a

{ι : Sort u_1}
{a : ℝ≥0}
{g : ι → ℝ≥0}
{h : ℝ≥0}
(H : ∀ (i : ι), g i * h ≤ a)


@[simp]
theorem linMulLin_apply (f g : M →ₗ[R] A) (x) : linMulLin f g x = f x * g x

{R : Type u_3}
{M : Type u_4}
{A : Type u_7}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[AddCommMonoid M]
[Module R M]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
(f g : M →ₗ[R] A)
(x : M)

(QuadraticMap.linMulLin f g) x = f x * g x


/-- A number satisfying the Liouville condition with exponent `p > 1` is an irrational number. -/
protected theorem irrational (h : LiouvilleWith p x) (hp : 1 < p) : Irrational x

{p x : ℝ}
(h : LiouvilleWith p x)
(hp : 1 < p)


theorem IsPredLimit.lt_pred (h : IsPredLimit a) : a < b → a < pred b

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a b : α}
(h : Order.IsPredLimit a)


theorem measurableSpace_le_of_le_const (hτ : IsStoppingTime f τ) {i : ι} (hτ_le : ∀ ω, τ ω ≤ i) :
    hτ.measurableSpace ≤ f i

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
(hτ : MeasureTheory.IsStoppingTime f τ)
{i : ι}
(hτ_le : ∀ (ω : Ω), τ ω ≤ i)


@[to_additive]
theorem mem_iSup_of_mem {ι : Sort*} {S : ι → Submonoid M} (i : ι) :
    ∀ {x : M}, x ∈ S i → x ∈ iSup S

{M : Type u_1}
[MulOneClass M]
{ι : Sort u_4}
{S : ι → Submonoid M}
(i : ι)
{x : M}


@[simp]
theorem support_zsmul (k : ℤ) (h : k ≠ 0) (a : FreeAbelianGroup X) :
    support (k • a) = support a

{X : Type u_1}
(k : ℤ)
(h : k ≠ 0)
(a : FreeAbelianGroup X)


/-- If `S` a module-finite free `R`-algebra, then the `R`-rank of a nonzero `R`-free
ideal `I` of `S` is the same as the rank of `S`. -/
theorem Ideal.rank_eq {R S : Type*} [CommRing R] [StrongRankCondition R] [Ring S] [IsDomain S]
    [Algebra R S] {n m : Type*} [Fintype n] [Fintype m] (b : Basis n R S) {I : Ideal S}
    (hI : I ≠ ⊥) (c : Basis m R I) : Fintype.card m = Fintype.card n

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[StrongRankCondition R]
[Ring S]
[IsDomain S]
[Algebra R S]
{n : Type u_3}
{m : Type u_4}
[Fintype n]
[Fintype m]
(b : Basis n R S)
{I : Ideal S}
(hI : I ≠ ⊥)
(c : Basis m R ↥I)


theorem HasStrictDerivAt.sinh (hf : HasStrictDerivAt f f' x) :
    HasStrictDerivAt (fun x => Real.sinh (f x)) (Real.cosh (f x) * f') x

{f : ℝ → ℝ}
{f' x : ℝ}
(hf : HasStrictDerivAt f f' x)


theorem iSup_empty [IsEmpty ι] (f : ι → ℝ≥0) : ⨆ i, f i = 0

{ι : Sort u_1}
[IsEmpty ι]
(f : ι → ℝ≥0)


/-- A point in the antidiagonal is determined by its first co-ordinate (subtype version of
`Finset.antidiagonal_congr`). This lemma is used by the `ext` tactic. -/
@[ext] theorem antidiagonal_subtype_ext {p q : antidiagonal n} (h : p.val.1 = q.val.1) : p = q

{p q : { x // x ∈ Finset.antidiagonal n }}


@[simp, mfld_simps]
theorem preimage_inter {s t : Set β} : f ⁻¹' (s ∩ t) = f ⁻¹' s ∩ f ⁻¹' t

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


/-- Induction principle for `RatFunc K`: if `f p q : P (RatFunc.mk p q)` for all `p q`,
then `P` holds on all elements of `RatFunc K`.

See also `induction_on`, which is a recursion principle defined in terms of `algebraMap`.
-/
@[elab_as_elim]
protected theorem induction_on' {P : RatFunc K → Prop} :
    ∀ (x : RatFunc K) (_pq : ∀ (p q : K[X]) (_ : q ≠ 0), P (RatFunc.mk p q)), P x

(_pq : ∀ (p q : K[X]), q ≠ 0 → P (RatFunc.mk p q))


/-- For any function `f : α → ℝ≥0∞`, there exists a measurable function `g ≤ f` with the same
integral. -/
theorem exists_measurable_le_lintegral_eq (f : α → ℝ≥0∞) :
    ∃ g : α → ℝ≥0∞, Measurable g ∧ g ≤ f ∧ ∫⁻ a, f a ∂μ = ∫⁻ a, g a ∂μ

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

∃ g, Measurable g ∧ g ≤ f ∧ ∫⁻ (a : α), f a ∂μ = ∫⁻ (a : α), g a ∂μ


@[simp] lemma support_inv' (f : ι → G₀) : support f⁻¹ = support f

{ι : Type u_1}
{G₀ : Type u_3}
[GroupWithZero G₀]
(f : ι → G₀)

Function.support f⁻¹ = Function.support f


/-- Given two classes of morphisms `W₁` and `W₂` on a category `C`, this is
the data of the factorization of a morphism `f : X ⟶ Y` as `i ≫ p` with
`W₁ i` and `W₂ p`. -/
structure MapFactorizationData {X Y : C} (f : X ⟶ Y) where
  /-- the intermediate object in the factorization -/
  Z : C
  /-- the first morphism in the factorization -/
  i : X ⟶ Z
  /-- the second morphism in the factorization -/
  p : Z ⟶ Y
  fac : i ≫ p = f := by aesop_cat
  hi : W₁ i
  hp : W₂ p

{W₁ W₂ : CategoryTheory.MorphismProperty C}


protected theorem lt_succ_iff_lt_or_eq : m < succ n ↔ m < n ∨ m = n


theorem univ_pi_eq_iInter (t : ∀ i, Set (π i)) : pi univ t = ⋂ i, eval i ⁻¹' t i

{α : Type u_1}
{π : α → Type u_11}
(t : (i : α) → Set (π i))

Set.univ.pi t = ⋂ i, Function.eval i ⁻¹' t i


@[simp]
theorem Ico_eq_empty_iff : Ico a b = ∅ ↔ ¬a < b

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}


/-- The left fraction from `X` to `Y` given by a morphism `s : Y ⟶ X` such that `W s`. -/
@[simps]
def ofInv (s : Y ⟶ X) (hs : W s) :
    W.LeftFraction X Y

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(s : Y ⟶ X)
(hs : W s)

(CategoryTheory.MorphismProperty.LeftFraction.ofInv s hs).Y' = X


/-- Uniform convergence on a singleton is equivalent to regular convergence -/
theorem tendstoUniformlyOn_singleton_iff_tendsto :
    TendstoUniformlyOn F f p {x} ↔ Tendsto (fun n : ι => F n x) p (𝓝 (f x))

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{x : α}
{p : Filter ι}

TendstoUniformlyOn F f p {x} ↔ Filter.Tendsto (fun n => F n x) p (𝓝 (f x))


theorem Commute.invOf_right [Monoid α] {a b : α} [Invertible b] (h : Commute a b) :
    Commute a (⅟ b)

{α : Type u}
[Monoid α]
{a b : α}
[Invertible b]
(h : Commute a b)


theorem any (f) : ∀ {s}, ValidFor l m r s → s.any f = m.any f

{l m r : List Char}
(f : Char → Bool)
{s : Substring}

Substring.ValidFor l m r s → s.any f = m.any f


/-- Coercion of a `MonoidHom` into a function is itself a `MonoidHom`.

See also `MonoidHom.eval`. -/
@[to_additive (attr := simps) "Coercion of an `AddMonoidHom` into a function is itself
an `AddMonoidHom`.

See also `AddMonoidHom.eval`."]
def MonoidHom.coeFn (α β : Type*) [MulOneClass α] [CommMonoid β] : (α →* β) →* α → β

(α : Type u_3)
(β : Type u_4)
[AddZeroClass α]
[AddCommMonoid β]
(g : α →+ β)
(a : α)


lemma mono_iff_isPullback : Mono f ↔ IsPullback (𝟙 X) (𝟙 X) f f

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X Y : C}
(f : X ⟶ Y)

CategoryTheory.Mono f ↔
  CategoryTheory.IsPullback (CategoryTheory.CategoryStruct.id X) (CategoryTheory.CategoryStruct.id X) f f


/-- The cdf is monotone. -/
lemma monotone_cdf : Monotone (cdf μ)


theorem ker_smul' (f : V →ₗ[K] V₂) (a : K) : ker (a • f) = ⨅ _ : a ≠ 0, ker f

{K : Type u_5}
{V : Type u_10}
{V₂ : Type u_11}
[Semifield K]
[AddCommMonoid V]
[Module K V]
[AddCommMonoid V₂]
[Module K V₂]
(f : V →ₗ[K] V₂)
(a : K)

LinearMap.ker (a • f) = ⨅ (_ : a ≠ 0), LinearMap.ker f


/--
For any type `α`, each term of `α` gives a relation series with the right most index to be 0.
-/
@[simps!] def singleton (a : α) : RelSeries r

∀ (x : Fin (0 + 1)), (RelSeries.singleton r a).toFun x = a


theorem Ioi_pred_of_not_isMin (ha : ¬IsMin a) : Ioi (pred a) = Ici a

{α : Type u_1}
[Preorder α]
[PredOrder α]
{a : α}
(ha : ¬IsMin a)


@[simp]
lemma opNorm_mul_apply (x : 𝕜') : ‖mul 𝕜 𝕜' x‖ = ‖x‖

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
(𝕜' : Type u_3)
[NonUnitalSeminormedRing 𝕜']
[NormedSpace 𝕜 𝕜']
[IsScalarTower 𝕜 𝕜' 𝕜']
[SMulCommClass 𝕜 𝕜' 𝕜']
[RegularNormedAlgebra 𝕜 𝕜']
(x : 𝕜')

‖(ContinuousLinearMap.mul 𝕜 𝕜') x‖ = ‖x‖


@[csimp] private theorem fastJacobiSym.eq : jacobiSym = fastJacobiSym


theorem normed_le_div_measure_closedBall_rIn (x : E) :
    f.normed μ x ≤ 1 / (μ (closedBall c f.rIn)).toReal

f.normed μ x ≤ 1 / (μ (Metric.closedBall c f.rIn)).toReal


theorem support_takeUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
    (p.takeUntil u h).support ⊆ p.support

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v w : V}
(p : G.Walk v w)
(h : u ∈ p.support)


theorem bmod_neg (x : Int) (m : Nat) (p : x % m ≥ (m + 1) / 2) : bmod x m = (x % m) - m


theorem hasDerivAt_exp (x : ℝ) : HasDerivAt exp (exp x) x


theorem coe_le_one (x : Icc (0 : α) 1) : (x : α) ≤ 1

{α : Type u_1}
[OrderedSemiring α]
(x : ↑(Set.Icc 0 1))


protected theorem continuousAt_mul_const {a b : ℝ≥0∞} (h : a ≠ ∞ ∨ b ≠ 0) :
    ContinuousAt (fun x => x * a) b


@[simp]
theorem leAdd_apply (r : α → α → Prop) (s : β → β → Prop) (a) : leAdd r s a = Sum.inl a

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


/-- A simple graph is an irreflexive symmetric relation `Adj` on a vertex type `V`.
The relation describes which pairs of vertices are adjacent.
There is exactly one edge for every pair of adjacent vertices;
see `SimpleGraph.edgeSet` for the corresponding edge set.
-/
@[ext, aesop safe constructors (rule_sets := [SimpleGraph])]
structure SimpleGraph (V : Type u) where
  /-- The adjacency relation of a simple graph. -/
  Adj : V → V → Prop
  symm : Symmetric Adj := by aesop_graph
  loopless : Irreflexive Adj := by aesop_graph


theorem isLocalization_iff_of_ringEquiv (h : S ≃+* P) :
    IsLocalization M S ↔
      haveI := (h.toRingHom.comp <| algebraMap R S).toAlgebra; IsLocalization M P

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
(h : S ≃+* P)


/-- `MvPolynomial.eval` as a `K`-linear map. -/
@[simps]
def evalₗ [CommSemiring K] : MvPolynomial σ K →ₗ[K] (σ → K) → K

(K : Type u_1)
(σ : Type u_2)
[CommSemiring K]
(p : MvPolynomial σ K)
(e : σ → K)

(MvPolynomial.evalₗ K σ) p e = (MvPolynomial.eval e) p


@[ext]
lemma hom_ext₀ {F G : ComposableArrows C 0} {φ φ' : F ⟶ G}
    (h : app' φ 0 = app' φ' 0) :
    φ = φ'

{F G : CategoryTheory.ComposableArrows C 0}

(h : CategoryTheory.ComposableArrows.app' φ 0 ⋯ = CategoryTheory.ComposableArrows.app' φ' 0 ⋯)


lemma Disjoint.ne_iff (hab : Disjoint a b) : a ≠ b ↔ a ≠ ⊥ ∨ b ≠ ⊥

{α : Type u_1}
[PartialOrder α]
[OrderBot α]
{a b : α}
(hab : Disjoint a b)

a ≠ b ↔ a ≠ ⊥ ∨ b ≠ ⊥


@[simp] theorem neg_im : (-a).im = -a.im

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


/-- **Primitive element theorem** assuming E is finite. -/
theorem exists_primitive_element_of_finite_top [Finite E] : ∃ α : E, F⟮α⟯ = ⊤

(F : Type u_1)
[Field F]
(E : Type u_2)
[Field E]
[Algebra F E]
[Finite E]

∃ α, F⟮α⟯ = ⊤


@[simp]
theorem curry_apply (f : α × β →₀ M) (x : α) (y : β) : f.curry x y = f (x, y)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
(f : α × β →₀ M)
(x : α)
(y : β)


theorem disjoint_toFinset {m1 m2 : Multiset α} :
    _root_.Disjoint m1.toFinset m2.toFinset ↔ m1.Disjoint m2

{α : Type u_1}
[DecidableEq α]
{m1 m2 : Multiset α}


@[simp]
theorem prodMap_id_id : (PFun.id α).prodMap (PFun.id β) = PFun.id _

(PFun.id α).prodMap (PFun.id β) = PFun.id (α × β)


theorem smooth_transDiffeomorph_left {f : M → M'} :
    Smooth (I.transDiffeomorph e) I' f ↔ Smooth I I' f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
(e : E ≃ₘ⟮𝓘(𝕜, E), 𝓘(𝕜, F)⟯ F)
{f : M → M'}