@[to_additive]
lemma exists_left_transversal (H : Subgroup G) (g : G) :
    ∃ S ∈ leftTransversals (H : Set G), g ∈ S

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

∃ S ∈ Subgroup.leftTransversals ↑H, g ∈ S


theorem Summable.of_norm {f : ι → E} (hf : Summable fun a => ‖f a‖) : Summable f

{ι : Type u_1}
{E : Type u_3}
[SeminormedAddCommGroup E]
[CompleteSpace E]
{f : ι → E}
(hf : Summable fun a => ‖f a‖)


theorem head_stack_ok {q s L₁ L₂ L₃} :
    Reaches₁ (TM2.step tr)
      ⟨some (head stack q), s, K'.elim (trList L₁) [] [] (trList L₂ ++ Γ'.consₗ :: L₃)⟩
      ⟨some q, none, K'.elim (trList (L₂.headI :: L₁)) [] [] L₃⟩

{q : Turing.PartrecToTM2.Λ'}
{s : Option Turing.PartrecToTM2.Γ'}
{L₁ L₂ : List ℕ}
{L₃ : List Turing.PartrecToTM2.Γ'}

Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
  { l := some (Turing.PartrecToTM2.head Turing.PartrecToTM2.K'.stack q), var := s,
    stk :=
      Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList L₁) [] []
        (Turing.PartrecToTM2.trList L₂ ++ Turing.PartrecToTM2.Γ'.consₗ :: L₃) }
  { l := some q, var := none,
    stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList (L₂.headI :: L₁)) [] [] L₃ }


/-- The opposite of the right homology functor is the left homology functor. -/
@[simps!]
noncomputable def rightHomologyFunctorOpNatIso :
    (rightHomologyFunctor C).op ≅ opFunctor C ⋙ leftHomologyFunctor Cᵒᵖ

(CategoryTheory.ShortComplex.rightHomologyFunctorOpNatIso C).inv.app X = (Opposite.unop X).leftHomologyOpIso.hom


/-- If a nondegenerate configuration has at least as many points as lines, then there exists
  an injective function `f` from lines to points, such that `f l` does not lie on `l`. -/
theorem Nondegenerate.exists_injective_of_card_le [Nondegenerate P L] [Fintype P] [Fintype L]
    (h : Fintype.card L ≤ Fintype.card P) : ∃ f : L → P, Function.Injective f ∧ ∀ l, f l ∉ l

{P : Type u_1}
{L : Type u_2}
[Membership P L]
[Configuration.Nondegenerate P L]
[Fintype P]
[Fintype L]
(h : Fintype.card L ≤ Fintype.card P)

∃ f, Function.Injective f ∧ ∀ (l : L), f l ∉ l


theorem comp_deterministic_eq_comap (κ : Kernel α β) (hg : Measurable g) :
    κ ∘ₖ deterministic g hg = comap κ g hg

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_4}
{mγ : MeasurableSpace γ}
{g : γ → α}
(κ : ProbabilityTheory.Kernel α β)
(hg : Measurable g)

κ.comp (ProbabilityTheory.Kernel.deterministic g hg) = κ.comap g hg


lemma card_strictMono : StrictMono (card : Multiset α → ℕ)


protected theorem pow_ne_zero : a ≠ 0 → ∀ n : ℕ, a ^ n ≠ 0


@[simp] lemma map_fst_prod : (μ.prod ν).map Prod.fst = ν univ • μ

{α : Type u_1}
[MeasurableSpace α]
{β : Type u_2}
[MeasurableSpace β]
(μ : MeasureTheory.FiniteMeasure α)
(ν : MeasureTheory.FiniteMeasure β)

(μ.prod ν).map Prod.fst = ν Set.univ • μ


@[simp, bv_toNat] theorem toNat_shiftLeft {x : BitVec v} :
    BitVec.toNat (x <<< n) = BitVec.toNat x <<< n % 2^v


theorem Measurable.comp_eventuallyMeasurable (hh : Measurable h) (hf : EventuallyMeasurable m l f) :
    EventuallyMeasurable m l (h ∘ f)

{α : Type u_1}
{m : MeasurableSpace α}
{l : Filter α}
[CountableInterFilter l]
{β : Type u_2}
{γ : Type u_3}
[MeasurableSpace β]
[MeasurableSpace γ]
{f : α → β}
{h : β → γ}
(hh : Measurable h)
(hf : EventuallyMeasurable m l f)


theorem LocallyIntegrable.mono (hf : LocallyIntegrable f μ) {g : X → F}
    (hg : AEStronglyMeasurable g μ) (h : ∀ᵐ x ∂μ, ‖g x‖ ≤ ‖f x‖) :
    LocallyIntegrable g μ

(hf : MeasureTheory.LocallyIntegrable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)


theorem explicitCokernelDesc_norm_le {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}
    (w : f ≫ g = 0) : ‖explicitCokernelDesc w‖ ≤ ‖g‖

{X Y Z : SemiNormedGrp}
{f : X ⟶ Y}
{g : Y ⟶ Z}
(w : f ≫ g = 0)

‖SemiNormedGrp.explicitCokernelDesc w‖ ≤ ‖g‖


protected theorem bijective (h : α ≃ᵢ β) : Bijective h

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(h : α ≃ᵢ β)


theorem mem_find_of_unique {p : Fin n → Prop} [DecidablePred p] (h : ∀ i j, p i → p j → i = j)
    {i : Fin n} (hi : p i) : i ∈ Fin.find p

(h : ∀ (i j : Fin n), p i → p j → i = j)


@[simp]
theorem coe_prodEquivOfClosedCompl (h : IsCompl p q) (hp : IsClosed (p : Set E))
    (hq : IsClosed (q : Set E)) :
    ⇑(p.prodEquivOfClosedCompl q h hp hq) = p.prodEquivOfIsCompl q h

{𝕜 : Type u_1}
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace E]
{p q : Subspace 𝕜 E}
(h : IsCompl p q)
(hp : IsClosed ↑p)
(hq : IsClosed ↑q)

⇑(Submodule.prodEquivOfClosedCompl p q h hp hq) = ⇑(Submodule.prodEquivOfIsCompl p q h)


theorem map_apply {R F : Type*} [CommRing R] [IsDomain R]
    [FunLike F K[X] R[X]] [MonoidHomClass F K[X] R[X]] (φ : F)
    (hφ : K[X]⁰ ≤ R[X]⁰.comap φ) (f : RatFunc K) :
    map φ hφ f = algebraMap _ _ (φ f.num) / algebraMap _ _ (φ f.denom)

{K : Type u}
[Field K]
{R : Type u_1}
{F : Type u_2}
[CommRing R]
[IsDomain R]
[FunLike F K[X] R[X]]
[MonoidHomClass F K[X] R[X]]
(φ : F)
(hφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰)
(f : RatFunc K)

(RatFunc.map φ hφ) f = (algebraMap R[X] (RatFunc R)) (φ f.num) / (algebraMap R[X] (RatFunc R)) (φ f.denom)


/-- If a bounded group homomorphism map is constructed from a group homomorphism
via the constructor `AddMonoidHom.mkNormedAddGroupHom`, then its norm is bounded by the bound
given to the constructor or zero if this bound is negative. -/
theorem mkNormedAddGroupHom_norm_le' (f : V₁ →+ V₂) {C : ℝ} (h : ∀ x, ‖f x‖ ≤ C * ‖x‖) :
    ‖f.mkNormedAddGroupHom C h‖ ≤ max C 0

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


@[simp]
theorem center_toSubsemiring : (center R A).toSubsemiring = Subsemiring.center A

(R : Type u)
(A : Type v)
[CommSemiring R]
[Semiring A]
[Algebra R A]

(Subalgebra.center R A).toSubsemiring = Subsemiring.center A


@[simp]
theorem cancel_unit_right {X Y : C} (f f' : X ⟶ Y) :
    f ≫ e.unit.app Y = f' ≫ e.unit.app Y ↔ f = f'

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
{X Y : C}
(f f' : X ⟶ Y)

CategoryTheory.CategoryStruct.comp f (e.unit.app Y) = CategoryTheory.CategoryStruct.comp f' (e.unit.app Y) ↔ f = f'


/-- `ZeroHomClass F M N` states that `F` is a type of zero-preserving homomorphisms.

You should extend this typeclass when you extend `ZeroHom`.
-/
class ZeroHomClass (F : Type*) (M N : outParam Type*) [Zero M] [Zero N] [FunLike F M N] :
    Prop where
  /-- The proposition that the function preserves 0 -/
  map_zero : ∀ f : F, f 0 = 0

{F : Type u_10}
{M : outParam (Type u_11)}
{N : outParam (Type u_12)}
[Zero M]
[Zero N]
[FunLike F M N]
[self : ZeroHomClass F M N]
(f : F)


theorem bounded_lt_inter_not_lt [SemilatticeSup α] (a : α) :
    Bounded (· < ·) (s ∩ { b | ¬b < a }) ↔ Bounded (· < ·) s

{α : Type u_1}
{s : Set α}
[SemilatticeSup α]
(a : α)

Set.Bounded (fun x x_1 => x < x_1) (s ∩ {b | ¬b < a}) ↔ Set.Bounded (fun x x_1 => x < x_1) s


/-- `HomClass L F M N` states that `F` is a type of `L`-homomorphisms. You should extend this
  typeclass when you extend `FirstOrder.Language.Hom`. -/
class HomClass (L : outParam Language) (F M N : Type*)
  [FunLike F M N] [L.Structure M] [L.Structure N] : Prop where
  map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r x → RelMap r (φ ∘ x)

[self : FirstOrder.Language.HomClass L F M N]

φ (FirstOrder.Language.Structure.funMap f x) = FirstOrder.Language.Structure.funMap f (⇑φ ∘ x)


@[simp] lemma isAtom_iff_eq_top (I : LieIdeal R L) : IsAtom I ↔ I = ⊤

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsSimple R L]
(I : LieIdeal R L)


/-- A submonoid is either the trivial submonoid or contains a nonzero element. -/
@[to_additive
      "An additive submonoid is either the trivial additive submonoid or contains a nonzero
      element."]
theorem bot_or_exists_ne_one (S : Submonoid M) : S = ⊥ ∨ ∃ x ∈ S, x ≠ (1 : M)

{M : Type u_1}
[AddZeroClass M]
(S : AddSubmonoid M)


@[simp] theorem perm_append_singleton (a : α) (l : List α) : l ++ [a] ~ a :: l


lemma biUnion_inter (s : Finset α) (f : α → Finset β) (t : Finset β) :
    s.biUnion f ∩ t = s.biUnion fun x ↦ f x ∩ t

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
(s : Finset α)
(f : α → Finset β)
(t : Finset β)

s.biUnion f ∩ t = s.biUnion fun x => f x ∩ t


@[to_additive (attr := simp)]
theorem mul_div_mul_right_eq_div (a b c : G) : a * c / (b * c) = a / b


/-- The functor which sends `S : SnakeInput C` to `S.L₁'` which is
`S.L₀.X₂ ⟶ S.L₀.X₃ ⟶ S.L₃.X₁`. -/
@[simps]
noncomputable def functorL₁' : SnakeInput C ⥤ ShortComplex C

(S : CategoryTheory.ShortComplex.SnakeInput C)

CategoryTheory.ShortComplex.SnakeInput.functorL₁'.obj S = S.L₁'


@[gcongr]
theorem rpow_le_rpow {x y z : ℝ} (h : 0 ≤ x) (h₁ : x ≤ y) (h₂ : 0 ≤ z) : x ^ z ≤ y ^ z


theorem nhds_eq_comap (hf : Inducing f) : ∀ x : X, 𝓝 x = comap f (𝓝 <| f x)

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(hf : Inducing f)
(x : X)


@[simp]
theorem lift_sInf (s : Set Cardinal) : lift.{u, v} (sInf s) = sInf (lift.{u, v} '' s)

Cardinal.lift.{u, v} (sInf s) = sInf (Cardinal.lift.{u, v} '' s)


@[simp]
theorem symm_apply_apply (e : α ≃ᵐ β) (x : α) : e.symm (e x) = x

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
(e : α ≃ᵐ β)
(x : α)


/-- This statement is meant to be combined with `le_or_lt_of_add_le_add` and similar lemmas. -/
@[to_additive AddETransform.card "This statement is meant to be combined with
`le_or_lt_of_add_le_add` and similar lemmas."]
protected theorem MulETransform.card :
    (mulETransformLeft e x).1.card + (mulETransformLeft e x).2.card +
        ((mulETransformRight e x).1.card + (mulETransformRight e x).2.card) =
      x.1.card + x.2.card + (x.1.card + x.2.card)

{α : Type u_1}
[DecidableEq α]
[AddGroup α]
(e : α)
(x : Finset α × Finset α)

(Finset.addETransformLeft e x).1.card + (Finset.addETransformLeft e x).2.card +
    ((Finset.addETransformRight e x).1.card + (Finset.addETransformRight e x).2.card) =
  x.1.card + x.2.card + (x.1.card + x.2.card)


theorem StrictMono.le_iff_le (hf : StrictMono f) {a b : α} : f a ≤ f b ↔ a ≤ b

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
(hf : StrictMono f)
{a b : α}


@[simp]
theorem eval₂_zero_apply (f : R →+* S₂) (p : MvPolynomial σ R) :
    eval₂ f (0 : σ → S₂) p = f (constantCoeff p)

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

MvPolynomial.eval₂ f 0 p = f (MvPolynomial.constantCoeff p)


@[to_additive (attr := simp) le_add_iff_nonneg_right]
theorem le_mul_iff_one_le_right' [CovariantClass α α (· * ·) (· ≤ ·)]
    [ContravariantClass α α (· * ·) (· ≤ ·)] (a : α) {b : α} :
    a ≤ a * b ↔ 1 ≤ b

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

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


@[simp]
theorem coe_mk (f : A → B) (h₁ h₂ h₃ h₄) : ⇑(⟨⟨⟨f, h₁⟩, h₂, h₃⟩, h₄⟩ : A →ₛₙₐ[φ] B) = f

(h₁ : ∀ (m : R) (x : A), f (m • x) = φ m • f x)

(h₂ : { toFun := f, map_smul' := h₁ }.toFun 0 = 0)

(h₃ :
  ∀ (x y : A),
    { toFun := f, map_smul' := h₁ }.toFun (x + y) =
      { toFun := f, map_smul' := h₁ }.toFun x + { toFun := f, map_smul' := h₁ }.toFun y)

(h₄ :
  ∀ (x y : A),
    { toFun := f, map_smul' := h₁, map_zero' := h₂, map_add' := h₃ }.toFun (x * y) =
      { toFun := f, map_smul' := h₁, map_zero' := h₂, map_add' := h₃ }.toFun x *
        { toFun := f, map_smul' := h₁, map_zero' := h₂, map_add' := h₃ }.toFun y)

⇑{ toFun := f, map_smul' := h₁, map_zero' := h₂, map_add' := h₃, map_mul' := h₄ } = f


theorem uniformInducing_of_compose {f : α → β} {g : β → γ} (hf : UniformContinuous f)
    (hg : UniformContinuous g) (hgf : UniformInducing (g ∘ f)) : UniformInducing f

{α : Type u}
{β : Type v}
{γ : Type w}
[UniformSpace α]
[UniformSpace β]
[UniformSpace γ]
{f : α → β}
{g : β → γ}
(hf : UniformContinuous f)
(hg : UniformContinuous g)
(hgf : UniformInducing (g ∘ f))


theorem frequently_iff_seq_frequently {ι : Type*} {l : Filter ι} {p : ι → Prop}
    [l.IsCountablyGenerated] :
    (∃ᶠ n in l, p n) ↔ ∃ x : ℕ → ι, Tendsto x atTop l ∧ ∃ᶠ n : ℕ in atTop, p (x n)

{ι : Type u_6}
{l : Filter ι}
{p : ι → Prop}
[l.IsCountablyGenerated]

(∃ᶠ (n : ι) in l, p n) ↔ ∃ x, Filter.Tendsto x Filter.atTop l ∧ ∃ᶠ (n : ℕ) in Filter.atTop, p (x n)


@[simp]
theorem removeZero_coeff_zero (p : FormalMultilinearSeries 𝕜 E F) : p.removeZero 0 = 0

{𝕜 : 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)


protected theorem mono {i j : ι} (f : Filtration ι m) (hij : i ≤ j) : f i ≤ f j

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
{i j : ι}
(f : MeasureTheory.Filtration ι m)
(hij : i ≤ j)


theorem lt_asymm (h : cmp x y = .lt) : cmp y x ≠ .lt

∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y : x},
  cmp x_1 y = Ordering.lt → cmp y x_1 ≠ Ordering.lt


@[simp]
theorem iInf_pos {p : Prop} {f : p → α} (hp : p) : ⨅ h : p, f h = f hp

{α : Type u_1}
[CompleteLattice α]
{p : Prop}
{f : p → α}
(hp : p)


theorem factors_comp_arrow {X Y : C} {P : Subobject Y} (f : X ⟶ P) : P.Factors (f ≫ P.arrow)

(f : X ⟶ CategoryTheory.Subobject.underlying.obj P)


@[to_additive]
theorem card_dvd_of_le {H K : Subgroup α} (hHK : H ≤ K) : Nat.card H ∣ Nat.card K

{α : Type u_1}
[AddGroup α]
{H K : AddSubgroup α}
(hHK : H ≤ K)


/--
The `Functor` typeclass only contains the operations of a functor.
`LawfulFunctor` further asserts that these operations satisfy the laws of a functor,
including the preservation of the identity and composition laws:
```
id <$> x = x
(h ∘ g) <$> x = h <$> g <$> x
```
-/
class LawfulFunctor (f : Type u → Type v) [Functor f] : Prop where
  map_const          : (Functor.mapConst : α → f β → f α) = Functor.map ∘ const β
  id_map   (x : f α) : id <$> x = x
  comp_map (g : α → β) (h : β → γ) (x : f α) : (h ∘ g) <$> x = h <$> g <$> x

{f : Type u → Type v}
[Functor f]
[self : LawfulFunctor f]
{α β γ : Type u}
(g : α → β)
(h : β → γ)
(x : f α)


private theorem inv_aux : (∀ x, p x ↔ p (f x)) ↔ ∀ x, p x ↔ p (f⁻¹ x)

{α : Type u}
{p : α → Prop}
{f : Equiv.Perm α}

(∀ (x : α), p x ↔ p (f x)) ↔ ∀ (x : α), p x ↔ p (f⁻¹ x)


@[to_additive (attr := continuity, fun_prop) sub]
theorem Continuous.div' (hf : Continuous f) (hg : Continuous g) : Continuous fun x => f x / g x

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Sub G]
[ContinuousSub G]
[TopologicalSpace α]
{f g : α → G}
(hf : Continuous f)
(hg : Continuous g)


@[to_additive]
theorem le_of_forall_one_lt_le_mul (h : ∀ ε : α, 1 < ε → a ≤ b * ε) : a ≤ b

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

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


@[simp]
theorem trivial_lie_zero (L : Type v) (M : Type w) [Bracket L M] [Zero M] [LieModule.IsTrivial L M]
    (x : L) (m : M) : ⁅x, m⁆ = 0


theorem of_subsingleton [Subsingleton X] (f : X → Y) : Inducing f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[Subsingleton X]
(f : X → Y)


@[to_additive]
nonrec theorem SmoothOn.inv {f : M → G} {s : Set M} (hf : SmoothOn I' I f s) :
    SmoothOn I' I (fun x => (f x)⁻¹) 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_5}
[TopologicalSpace G]
[ChartedSpace H G]
[AddGroup G]
[LieAddGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{f : M → G}
{s : Set M}
(hf : SmoothOn I' I f s)


@[to_additive (attr := simp)]
lemma max_one [LinearOrder α] : (1 : Finset α).max = 1


theorem nnnorm_def (x : Unitization 𝕜 A) : ‖x‖₊ = ‖splitMul 𝕜 A x‖₊

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[IsScalarTower 𝕜 A A]
[SMulCommClass 𝕜 A A]
[RegularNormedAlgebra 𝕜 A]
(x : Unitization 𝕜 A)


/-- Sylow subgroups are Hall subgroups. -/
theorem card_coprime_index [Finite G] {p : ℕ} [hp : Fact p.Prime] (P : Sylow p G) :
    (Nat.card P).Coprime (index (P : Subgroup G))

{G : Type u}
[Group G]
[Finite G]
{p : ℕ}
[hp : Fact (Nat.Prime p)]
(P : Sylow p G)


@[to_additive]
theorem one_div_mul_one_div : 1 / a * (1 / b) = 1 / (a * b)

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


theorem IsRadical.radical_le_iff (hJ : J.IsRadical) : I.radical ≤ J ↔ I ≤ J

{R : Type u}
[CommSemiring R]
{I J : Ideal R}
(hJ : J.IsRadical)


theorem sInf_isClosed {c : ClosureOperator α} {S : Set α}
    (H : ∀ x ∈ S, c.IsClosed x) : c.IsClosed (sInf S)

{α : Type u_1}
[CompleteLattice α]
{c : ClosureOperator α}
{S : Set α}
(H : ∀ x ∈ S, c.IsClosed x)


/-- If a point belongs to an open ball, then there is a strictly smaller radius whose ball also
contains it.

See also `exists_lt_subset_ball`. -/
theorem exists_lt_mem_ball_of_mem_ball (h : x ∈ ball y ε) : ∃ ε' < ε, x ∈ ball y ε'

{α : Type u}
[PseudoMetricSpace α]
{x y : α}
{ε : ℝ}
(h : x ∈ Metric.ball y ε)


@[simp]
theorem noncommFold_empty (h) (a : α) : noncommFold op (0 : Multiset α) h a = a

(op : α → α → α)

(h : {x | x ∈ 0}.Pairwise fun x y => op x y = op y x)


@[simp] lemma bddAbove_closure : BddAbove (closure s) ↔ BddAbove s

{α : Type u}
[TopologicalSpace α]
[Preorder α]
[ClosedIicTopology α]
{s : Set α}


theorem some_eq_coe (a : α) : (Option.some a : WithBot α) = (↑a : WithBot α)


@[aesop safe 20 (rule_sets := [Measurable])]
protected theorem mul [MonoidWithZero β] [ContinuousMul β] (hf : AEFinStronglyMeasurable f μ)
    (hg : AEFinStronglyMeasurable g μ) : AEFinStronglyMeasurable (f * g) μ

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)

(hg : MeasureTheory.AEFinStronglyMeasurable g μ)

MeasureTheory.AEFinStronglyMeasurable (f * g) μ


@[simp]
theorem toMatrix_self [DecidableEq ι] : e.toMatrix e = 1

{ι : Type u_1}
{R : Type u_5}
{M : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(e : Basis ι R M)
[DecidableEq ι]


/-- In a bicategory, we can compose the 1-morphisms `f : a ⟶ b` and `g : b ⟶ c` to obtain
a 1-morphism `f ≫ g : a ⟶ c`. This composition does not need to be strictly associative,
but there is a specified associator, `α_ f g h : (f ≫ g) ≫ h ≅ f ≫ (g ≫ h)`.
There is an identity 1-morphism `𝟙 a : a ⟶ a`, with specified left and right unitor
isomorphisms `λ_ f : 𝟙 a ≫ f ≅ f` and `ρ_ f : f ≫ 𝟙 a ≅ f`.
These associators and unitors satisfy the pentagon and triangle equations.

See https://ncatlab.org/nlab/show/bicategory.
-/
@[nolint checkUnivs]
class Bicategory (B : Type u) extends CategoryStruct.{v} B where
  -- category structure on the collection of 1-morphisms:
  homCategory : ∀ a b : B, Category.{w} (a ⟶ b) := by infer_instance
  -- left whiskering:
  whiskerLeft {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h) : f ≫ g ⟶ f ≫ h
  -- right whiskering:
  whiskerRight {a b c : B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c) : f ≫ h ⟶ g ≫ h
  -- associator:
  associator {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) : (f ≫ g) ≫ h ≅ f ≫ g ≫ h
  -- left unitor:
  leftUnitor {a b : B} (f : a ⟶ b) : 𝟙 a ≫ f ≅ f
  -- right unitor:
  rightUnitor {a b : B} (f : a ⟶ b) : f ≫ 𝟙 b ≅ f
  -- axioms for left whiskering:
  whiskerLeft_id : ∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), whiskerLeft f (𝟙 g) = 𝟙 (f ≫ g) := by
    aesop_cat
  whiskerLeft_comp :
    ∀ {a b c} (f : a ⟶ b) {g h i : b ⟶ c} (η : g ⟶ h) (θ : h ⟶ i),
      whiskerLeft f (η ≫ θ) = whiskerLeft f η ≫ whiskerLeft f θ := by
    aesop_cat
  id_whiskerLeft :
    ∀ {a b} {f g : a ⟶ b} (η : f ⟶ g),
      whiskerLeft (𝟙 a) η = (leftUnitor f).hom ≫ η ≫ (leftUnitor g).inv := by
    aesop_cat
  comp_whiskerLeft :
    ∀ {a b c d} (f : a ⟶ b) (g : b ⟶ c) {h h' : c ⟶ d} (η : h ⟶ h'),
      whiskerLeft (f ≫ g) η =
        (associator f g h).hom ≫ whiskerLeft f (whiskerLeft g η) ≫ (associator f g h').inv := by
    aesop_cat
  -- axioms for right whiskering:
  id_whiskerRight : ∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), whiskerRight (𝟙 f) g = 𝟙 (f ≫ g) := by
    aesop_cat
  comp_whiskerRight :
    ∀ {a b c} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h) (i : b ⟶ c),
      whiskerRight (η ≫ θ) i = whiskerRight η i ≫ whiskerRight θ i := by
    aesop_cat
  whiskerRight_id :
    ∀ {a b} {f g : a ⟶ b} (η : f ⟶ g),
      whiskerRight η (𝟙 b) = (rightUnitor f).hom ≫ η ≫ (rightUnitor g).inv := by
    aesop_cat
  whiskerRight_comp :
    ∀ {a b c d} {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c) (h : c ⟶ d),
      whiskerRight η (g ≫ h) =
        (associator f g h).inv ≫ whiskerRight (whiskerRight η g) h ≫ (associator f' g h).hom := by
    aesop_cat
  -- associativity of whiskerings:
  whisker_assoc :
    ∀ {a b c d} (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g') (h : c ⟶ d),
      whiskerRight (whiskerLeft f η) h =
        (associator f g h).hom ≫ whiskerLeft f (whiskerRight η h) ≫ (associator f g' h).inv := by
    aesop_cat
  -- exchange law of left and right whiskerings:
  whisker_exchange :
    ∀ {a b c} {f g : a ⟶ b} {h i : b ⟶ c} (η : f ⟶ g) (θ : h ⟶ i),
      whiskerLeft f θ ≫ whiskerRight η i = whiskerRight η h ≫ whiskerLeft g θ := by
    aesop_cat
  -- pentagon identity:
  pentagon :
    ∀ {a b c d e} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : d ⟶ e),
      whiskerRight (associator f g h).hom i ≫
          (associator f (g ≫ h) i).hom ≫ whiskerLeft f (associator g h i).hom =
        (associator (f ≫ g) h i).hom ≫ (associator f g (h ≫ i)).hom := by
    aesop_cat
  -- triangle identity:
  triangle :
    ∀ {a b c} (f : a ⟶ b) (g : b ⟶ c),
      (associator f (𝟙 b) g).hom ≫ whiskerLeft f (leftUnitor g).hom
      = whiskerRight (rightUnitor f).hom g := by
    aesop_cat

{B : Type u}
[self : CategoryTheory.Bicategory B]
{a b c d : B}
(f : a ⟶ b)
(g : b ⟶ c)
{h h' : c ⟶ d}
(η : h ⟶ h')

CategoryTheory.Bicategory.whiskerLeft (CategoryTheory.CategoryStruct.comp f g) η =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator f g h).hom
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.whiskerLeft g η))
      (CategoryTheory.Bicategory.associator f g h').inv)


@[simp]
theorem compl_inter (s t : Finset α) : (s ∩ t)ᶜ = sᶜ ∪ tᶜ

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


@[to_additive (attr := simp)]
theorem iUnion_op_smul_set (s t : Set α) : ⋃ a ∈ t, MulOpposite.op a • s = s * t


theorem summable_geometric_of_abs_lt_one {r : ℝ} (h : |r| < 1) : Summable fun n : ℕ ↦ r ^ n


theorem coe_eq_zero_iff {x : s} : (x : R) = 0 ↔ x = 0

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


@[simp]
theorem length_sort {s : Finset α} : (sort r s).length = s.card

{α : Type u_1}
(r : α → α → Prop)
[DecidableRel r]
[IsTrans α r]
[IsAntisymm α r]
[IsTotal α r]
{s : Finset α}


@[simp, nolint simpNF]
theorem zero_apply [∀ i j, Zero (α i j)] (i j) : (0 : DMatrix m n α) i j = 0

{m : Type u_2}
{n : Type u_3}
{α : m → n → Type v}
[(i : m) → (j : n) → Zero (α i j)]
(i : m)
(j : n)


theorem eventuallyEq_nhdsWithin_iff {f g : α → β} {s : Set α} {a : α} :
    f =ᶠ[𝓝[s] a] g ↔ ∀ᶠ x in 𝓝 a, x ∈ s → f x = g x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
{f g : α → β}
{s : Set α}
{a : α}

f =ᶠ[𝓝[s] a] g ↔ ∀ᶠ (x : α) in 𝓝 a, x ∈ s → f x = g x


theorem isLittleO_exp_neg_mul_sq_cocompact {a : ℂ} (ha : 0 < a.re) (s : ℝ) :
    (fun x : ℝ => Complex.exp (-a * x ^ 2)) =o[cocompact ℝ] fun x : ℝ => |x| ^ s

(fun x => cexp (-a * ↑x ^ 2)) =o[Filter.cocompact ℝ] fun x => |x| ^ s


theorem mem_zip_inits_tails {l : List α} {init tail : List α} :
    (init, tail) ∈ zip l.inits l.tails ↔ init ++ tail = l

(init, tail) ∈ l.inits.zip l.tails ↔ init ++ tail = l


theorem map_map₂_antidistrib {g : γ → δ} {f' : β' → α' → δ} {g₁ : β → β'} {g₂ : α → α'}
    (h_antidistrib : ∀ a b, g (f a b) = f' (g₁ b) (g₂ a)) :
    (map₂ f a b).map g = map₂ f' (b.map g₁) (a.map g₂)

{f : α → β → γ}

(h_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ b) (g₂ a))

Option.map g (Option.map₂ f a b) = Option.map₂ f' (Option.map g₁ b) (Option.map g₂ a)


theorem le_nth_count' {n : ℕ} (hpn : ∃ k, p k ∧ n ≤ k) : n ≤ nth p (count p n)

{p : ℕ → Prop}
[DecidablePred p]
{n : ℕ}
(hpn : ∃ k, p k ∧ n ≤ k)


@[to_additive (attr := simp)]
theorem ofLex_inv [Inv α] (a : Lex α) : ofLex a⁻¹ = (ofLex a)⁻¹


@[simp]
theorem reparam_id (γ : Path x y) : γ.reparam id continuous_id rfl rfl = γ

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(γ : Path x y)


theorem sub (hφ : IsHomogeneous φ n) (hψ : IsHomogeneous ψ n) : IsHomogeneous (φ - ψ) n

{R : Type u_5}
{σ : Type u_6}
[CommRing R]
{φ ψ : MvPolynomial σ R}
{n : ℕ}
(hφ : φ.IsHomogeneous n)
(hψ : ψ.IsHomogeneous n)


/-- The composition of two cover-preserving functors is cover-preserving. -/
theorem CoverPreserving.comp {F} (hF : CoverPreserving J K F) {G} (hG : CoverPreserving K L G) :
    CoverPreserving J L (F ⋙ G)

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

{L : CategoryTheory.GrothendieckTopology A}

(hF : CategoryTheory.CoverPreserving J K F)

(hG : CategoryTheory.CoverPreserving K L G)

CategoryTheory.CoverPreserving J L (F ⋙ G)


theorem HasFDerivWithinAt.norm_sq {f : G → F} {f' : G →L[ℝ] F} (hf : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (‖f ·‖ ^ 2) (2 • (innerSL ℝ (f x)).comp f') s x

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{s : Set G}
{x : G}
{f : G → F}
{f' : G →L[ℝ] F}
(hf : HasFDerivWithinAt f f' s x)

HasFDerivWithinAt (fun x => ‖f x‖ ^ 2) (2 • ((innerSL ℝ) (f x)).comp f') s x


/-- Linear upper bound for `f (x + n)` on unit interval -/
theorem f_add_nat_le (hf_conv : ConvexOn ℝ (Ioi 0) f)
    (hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + log y) (hn : n ≠ 0) (hx : 0 < x) (hx' : x ≤ 1) :
    f (n + x) ≤ f n + x * log n

(hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + Real.log y)


theorem IsGLB.ciInf_eq [Nonempty ι] {f : ι → α} (H : IsGLB (range f) a) : ⨅ i, f i = a

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
{a : α}
[Nonempty ι]
{f : ι → α}
(H : IsGLB (Set.range f) a)


lemma chainTopCoeff_add_one :
    letI := Classical.propDecidable
    chainTopCoeff α β + 1 =
      Nat.find (eventually_weightSpace_smul_add_eq_bot M α β hα).exists

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[NoZeroSMulDivisors ℤ R]
[NoZeroSMulDivisors R M]
[IsNoetherian R M]
(α : L → R)
(β : LieModule.Weight R L M)
(hα : α ≠ 0)

LieModule.chainTopCoeff α β + 1 = Nat.find ⋯


theorem _root_.Polynomial.toLaurent_C_mul_eq (r : R) (f : R[X]) :
    toLaurent (Polynomial.C r * f) = C r * toLaurent f

{R : Type u_1}
[Semiring R]
(r : R)
(f : R[X])

Polynomial.toLaurent (Polynomial.C r * f) = LaurentPolynomial.C r * Polynomial.toLaurent f


@[symm]
theorem Coprime.symm {m n : ℕ+} : m.Coprime n → n.Coprime m


theorem map_eq_map (φ : R →+* S) : map p (of p R) (of p S) φ = Perfection.map p φ

(p : ℕ)
[Fact (Nat.Prime p)]
{R : Type u₁}
[CommSemiring R]
[CharP R p]
{S : Type u₂}
[CommSemiring S]
[CharP S p]
(φ : R →+* S)

PerfectionMap.map p ⋯ ⋯ φ = Perfection.map p φ


lemma eq_of_ker_eq_of_apply_eq {f g : Module.Dual K V₁} (x : V₁)
    (h : LinearMap.ker f = LinearMap.ker g) (h' : f x = g x) (hx : f x ≠ 0) :
    f = g

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
[AddCommGroup V₁]
[Module K V₁]
[FiniteDimensional K V₁]
{f g : Module.Dual K V₁}
(x : V₁)
(h : LinearMap.ker f = LinearMap.ker g)
(h' : f x = g x)
(hx : f x ≠ 0)


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

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

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


@[simp]
theorem card_disjSum : Multiset.card (s.disjSum t) = Multiset.card s + Multiset.card t

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


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

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(f : PseudoEpimorphism α β)


/-- A bounded function `u` is in particular eventually bounded. -/
theorem isBoundedUnder_of {f : Filter β} {u : β → α} : (∃ b, ∀ x, r (u x) b) → f.IsBoundedUnder r u

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{f : Filter β}
{u : β → α}

(∃ b, ∀ (x : β), r (u x) b) → Filter.IsBoundedUnder r f u


protected lemma Function.Embedding.uncountable [Uncountable α] (f : α ↪ β) : Uncountable β

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


@[simp] lemma linfty_opNNNorm_toMatrix (f : (n → α) →L[α] (m → α)) :
    ‖LinearMap.toMatrix' (↑f : (n → α) →ₗ[α] (m → α))‖₊ = ‖f‖₊

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[NontriviallyNormedField α]
[NormedAlgebra ℝ α]
[DecidableEq n]
(f : (n → α) →L[α] m → α)


theorem mapDomain_support_of_injective [DecidableEq β] {f : α → β} (hf : Function.Injective f)
    (s : α →₀ M) : (mapDomain f s).support = Finset.image f s.support

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
[DecidableEq β]
{f : α → β}
(hf : Function.Injective f)
(s : α →₀ M)

(Finsupp.mapDomain f s).support = Finset.image f s.support


theorem wf (f : α → β) (h : WellFounded r) : WellFounded (InvImage r f)

{α : Sort u}
{β : Sort v}
{r : β → β → Prop}
(f : α → β)
(h : WellFounded r)


@[simp]
theorem eval₂_C (a) : (C a).eval₂ f g = f a

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

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


theorem count_support_eq_one [DecidableEq V] {u v w : V} {p : G.Path u v}
    (hw : w ∈ (p : G.Walk u v).support) : (p : G.Walk u v).support.count w = 1

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v w : V}
{p : G.Path u v}
(hw : w ∈ (↑p).support)


@[simp] theorem getElem_range' {n m step} (i) (H : i < (range' n m step).length) :
    (range' n m step)[i] = n + step * i

{n m step : Nat}
(i : Nat)
(H : i < (List.range' n m step).length)

(List.range' n m step)[i] = n + step * i


@[to_additive ite_pos]
lemma one_lt_ite [LT α] (ha : 1 < a) (hb : 1 < b) : 1 < ite p a b

{α : Type u_2}
[One α]
{p : Prop}
[Decidable p]
{a b : α}
[LT α]
(ha : 1 < a)
(hb : 1 < b)


lemma IsWellOrderLimitElement.neq_succ (a : α) (ha : a < wellOrderSucc a)
    [IsWellOrderLimitElement (wellOrderSucc a)] : False


theorem nondegenerate_iff_det_ne_zero {A : Type*} [DecidableEq n] [CommRing A] [IsDomain A]
    {M : Matrix n n A} : Nondegenerate M ↔ M.det ≠ 0

{n : Type u_1}
[Fintype n]
{A : Type u_4}
[DecidableEq n]
[CommRing A]
[IsDomain A]
{M : Matrix n n A}


@[simp]
theorem antidiagonal_zero : antidiagonal (0 : A) = {(0, 0)}

{A : Type u_1}
[CanonicallyOrderedAddCommMonoid A]
[Finset.HasAntidiagonal A]


theorem union_iUnion [Nonempty ι] (s : Set β) (t : ι → Set β) : (s ∪ ⋃ i, t i) = ⋃ i, s ∪ t i

{β : Type u_2}
{ι : Sort u_4}
[Nonempty ι]
(s : Set β)
(t : ι → Set β)


lemma lintegral_density (hκν : fst κ ≤ ν) [IsFiniteKernel ν]
    (a : α) {s : Set β} (hs : MeasurableSet s) :
    ∫⁻ x, ENNReal.ofReal (density κ ν a x s) ∂(ν a) = κ a (univ ×ˢ s)

{κ : ProbabilityTheory.Kernel α (γ × β)}

∫⁻ (x : γ), ENNReal.ofReal (κ.density ν a x s) ∂ν a = (κ a) (Set.univ ×ˢ s)


/-- `MultilinearMap.domDomCongr` as a `LinearEquiv`. -/
@[simps apply symm_apply]
def domDomCongrLinearEquiv {ι₁ ι₂} (σ : ι₁ ≃ ι₂) :
    MultilinearMap R (fun _ : ι₁ => M₂) M₃ ≃ₗ[S] MultilinearMap R (fun _ : ι₂ => M₂) M₃

(R : Type uR)
(S : Type uS)
(M₂ : Type v₂)
(M₃ : Type v₃)
[Semiring R]
[AddCommMonoid M₂]
[Module R M₂]
[Semiring S]
[AddCommMonoid M₃]
[Module R M₃]
[Module S M₃]
[SMulCommClass R S M₃]
{ι₁ : Type u_1}
{ι₂ : Type u_2}
(σ : ι₁ ≃ ι₂)

∀ (a : MultilinearMap R (fun x => M₂) M₃),
  (MultilinearMap.domDomCongrLinearEquiv R S M₂ M₃ σ) a = (MultilinearMap.domDomCongrEquiv σ).toFun a


protected theorem add_left_cancel {n m k : Nat} : n + m = n + k → m = k


nonrec theorem IsLocalExtr.congr {f g : α → β} {a : α} (h : IsLocalExtr f a) (heq : f =ᶠ[𝓝 a] g) :
    IsLocalExtr g a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f g : α → β}
{a : α}
(h : IsLocalExtr f a)
(heq : f =ᶠ[𝓝 a] g)


protected theorem add_add_add_comm (a b c d : Nat) : (a + b) + (c + d) = (a + c) + (b + d)


@[simp] lemma preimage_subtype_val_Ico (a b : {x // p x}) : (↑) ⁻¹' (Ico a.1 b) = Ico a b

{α : Type u_1}
[Preorder α]
{p : α → Prop}
(a b : { x // p x })

Subtype.val ⁻¹' Set.Ico ↑a ↑b = Set.Ico a b


theorem coe_decompose_mul_of_left_mem_of_not_le (a_mem : a ∈ 𝒜 i) (h : ¬i ≤ n) :
    (decompose 𝒜 (a * b) n : A) = 0

{ι : Type u_1}
{A : Type u_3}
{σ : Type u_4}
[Semiring A]
[DecidableEq ι]
[CanonicallyOrderedAddCommMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
(𝒜 : ι → σ)
[GradedRing 𝒜]
{a b : A}
{n i : ι}
(a_mem : a ∈ 𝒜 i)
(h : ¬i ≤ n)

↑(((DirectSum.decompose 𝒜) (a * b)) n) = 0


@[simp] lemma snoc_castSucc (s : RelSeries r) (a : α) (connect : r s.last a)
    (i : Fin (s.length + 1)) : snoc s a connect (Fin.castSucc i) = s i

{α : Type u_1}
{r : Rel α α}
(s : RelSeries r)
(a : α)
(connect : r s.last a)
(i : Fin (s.length + 1))

(s.snoc a connect).toFun i.castSucc = s.toFun i


/-- If `R[M]` is of finite type, then there is a `G : Finset M` such that its
image generates, as algebra, `R[M]`. -/
theorem exists_finset_adjoin_eq_top [h : FiniteType R R[M]] :
    ∃ G : Finset M, Algebra.adjoin R (of' R M '' G) = ⊤

[h : Algebra.FiniteType R (AddMonoidAlgebra R M)]

∃ G, Algebra.adjoin R (AddMonoidAlgebra.of' R M '' ↑G) = ⊤


theorem mk_surjective : Function.Surjective (mk g)


@[simp] lemma toMul_uzpow (u : Additive ℤˣ) (r : R) :
  Additive.toMul (r • u) = Additive.toMul u ^ r

{R : Type u_1}
[CommSemiring R]
[Module R (Additive ℤˣ)]
(u : Additive ℤˣ)
(r : R)


protected theorem add_zero [NeZero n] (k : Fin n) : k + 0 = k


@[to_additive]
theorem ker_prod {M N : Type*} [MulOneClass M] [MulOneClass N] (f : G →* M) (g : G →* N) :
    (f.prod g).ker = f.ker ⊓ g.ker

{G : Type u_1}
[Group G]
{M : Type u_8}
{N : Type u_9}
[MulOneClass M]
[MulOneClass N]
(f : G →* M)
(g : G →* N)


nonrec theorem ContinuousAt.eventually_lt {x₀ : β} (hf : ContinuousAt f x₀) (hg : ContinuousAt g x₀)
    (hfg : f x₀ < g x₀) : ∀ᶠ x in 𝓝 x₀, f x < g x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{f g : β → α}
[TopologicalSpace β]
{x₀ : β}
(hf : ContinuousAt f x₀)
(hg : ContinuousAt g x₀)
(hfg : f x₀ < g x₀)


theorem Or.imp3 {d e c f : Prop} (had : a → d) (hbe : b → e) (hcf : c → f) :
    a ∨ b ∨ c → d ∨ e ∨ f

{a b d e c f : Prop}
(had : a → d)
(hbe : b → e)
(hcf : c → f)


/-- The natural isomorphism between functors `G ≅ F` induced by a natural isomorphism
between the opposite functors `F.op ≅ G.op`. -/
@[simps]
protected def removeOp (α : F.op ≅ G.op) : G ≅ F

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F G : CategoryTheory.Functor C D}
(α : F.op ≅ G.op)

(CategoryTheory.NatIso.removeOp α).inv = CategoryTheory.NatTrans.removeOp α.inv


theorem countable_cover_nhds_interior [LindelofSpace X] {U : X → Set X} (hU : ∀ x, U x ∈ 𝓝 x) :
    ∃ t : Set X, t.Countable ∧ ⋃ x ∈ t, interior (U x) = univ

{X : Type u}
[TopologicalSpace X]
[LindelofSpace X]
{U : X → Set X}
(hU : ∀ (x : X), U x ∈ 𝓝 x)

∃ t, t.Countable ∧ ⋃ x ∈ t, interior (U x) = Set.univ


/-- `x` is the only fixed point of `pointReflection x`. This lemma requires
`x + x = y + y ↔ x = y`. There is no typeclass to use here, so we add it as an explicit argument. -/
theorem pointReflection_fixed_iff_of_injective_bit0 {x y : P} (h : Injective (2 • · : G → G)) :
    pointReflection x y = y ↔ y = x

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[AddTorsor G P]
{x y : P}
(h : Function.Injective fun x => 2 • x)


theorem le_def {p q : Seminorm 𝕜 E} : p ≤ q ↔ ∀ x, p x ≤ q x

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddGroup E]
[SMul 𝕜 E]
{p q : Seminorm 𝕜 E}


theorem mem_sup (x : M) : x ∈ N ⊔ N' ↔ ∃ y ∈ N, ∃ z ∈ N', y + z = x

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


@[simp]
theorem Ideal.coe_closure (I : Ideal R) : (I.closure : Set R) = closure I

{R : Type u_1}
[TopologicalSpace R]
[Ring R]
[TopologicalRing R]
(I : Ideal R)


@[to_additive]
theorem mul_univ_of_one_mem (hs : (1 : α) ∈ s) : s * univ = univ

{α : Type u_2}
[Monoid α]
{s : Set α}
(hs : 1 ∈ s)


theorem tendsto_congr' {f₁ f₂ : α → β} {l₁ : Filter α} {l₂ : Filter β} (hl : f₁ =ᶠ[l₁] f₂) :
    Tendsto f₁ l₁ l₂ ↔ Tendsto f₂ l₁ l₂

{α : Type u}
{β : Type v}
{f₁ f₂ : α → β}
{l₁ : Filter α}
{l₂ : Filter β}
(hl : f₁ =ᶠ[l₁] f₂)

Filter.Tendsto f₁ l₁ l₂ ↔ Filter.Tendsto f₂ l₁ l₂


theorem Iio_union_Ici_of_le (h : a ≤ b) : Iio b ∪ Ici a = univ

{α : Type u_1}
[LinearOrder α]
{a b : α}
(h : a ≤ b)


@[simp]
lemma reverse_reverse (l : Language α) : l.reverse.reverse = l


theorem fold_add (b₁ b₂ : α) (s₁ s₂ : Multiset α) :
    (s₁ + s₂).fold op (b₁ * b₂) = s₁.fold op b₁ * s₂.fold op b₂

{α : Type u_1}
(op : α → α → α)
[hc : Std.Commutative op]
[ha : Std.Associative op]
(b₁ b₂ : α)
(s₁ s₂ : Multiset α)

Multiset.fold op (op b₁ b₂) (s₁ + s₂) = op (Multiset.fold op b₁ s₁) (Multiset.fold op b₂ s₂)


@[simp] protected theorem zero_add (a : Int) : 0 + a = a


@[simp] lemma flip_flip (h : IsReflexive R N := isReflexive_of_equiv_dual_of_isReflexive e) :
    e.flip.flip = e

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[Module.IsReflexive R M]
(e : N ≃ₗ[R] Module.Dual R M)
(h : Module.IsReflexive R N := ⋯)


theorem rpow_ne_top_of_nonneg {x : ℝ≥0∞} {y : ℝ} (hy0 : 0 ≤ y) (h : x ≠ ⊤) : x ^ y ≠ ⊤


/-- The angle ∡ABB at a point. -/
@[simp]
theorem oangle_self_right (p₁ p₂ : P) : ∡ p₁ p₂ p₂ = 0

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


theorem range_dualMap_eq_dualAnnihilator_ker_of_surjective (f : M →ₗ[R] M')
    (hf : Function.Surjective f) : LinearMap.range f.dualMap = f.ker.dualAnnihilator

{R : Type u_1}
{M : Type u_2}
{M' : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup M']
[Module R M']
(f : M →ₗ[R] M')
(hf : Function.Surjective ⇑f)

LinearMap.range f.dualMap = (LinearMap.ker f).dualAnnihilator


@[simp]
theorem Basis.ofRankEqZero_apply [Module.Free K V] {ι : Type*} [IsEmpty ι]
    (hV : Module.rank K V = 0) (i : ι) : Basis.ofRankEqZero hV i = 0

{K : Type u}
{V : Type v}
[Ring K]
[StrongRankCondition K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]
{ι : Type u_1}
[IsEmpty ι]
(hV : Module.rank K V = 0)
(i : ι)


lemma isBounded_iff_bddBelow_bddAbove : IsBounded s ↔ BddBelow s ∧ BddAbove s

{α : Type u_1}
[Bornology α]
{s : Set α}
[Preorder α]
[IsOrderBornology α]

Bornology.IsBounded s ↔ BddBelow s ∧ BddAbove s


@[to_additive]
theorem measurePreserving_div_left (μ : Measure G) [IsInvInvariant μ] [IsMulLeftInvariant μ]
    (g : G) : MeasurePreserving (fun t => g / t) μ μ

{G : Type u_2}
[MeasurableSpace G]
[DivisionMonoid G]
[MeasurableMul G]
[MeasurableInv G]
(μ : MeasureTheory.Measure G)
[μ.IsInvInvariant]
[μ.IsMulLeftInvariant]
(g : G)

MeasureTheory.MeasurePreserving (fun t => g / t) μ μ


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

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


theorem EuclideanSpace.ball_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≤ r) :
    Metric.ball (0 : EuclideanSpace ℝ n) r = {x | ∑ i, x i ^ 2 < r ^ 2}

{n : Type u_8}
[Fintype n]
(r : ℝ)
(hr : 0 ≤ r)

Metric.ball 0 r = {x | ∑ i : n, x i ^ 2 < r ^ 2}


theorem fromBlocks_smul [SMul R α] (x : R) (A : Matrix n l α) (B : Matrix n m α) (C : Matrix o l α)
    (D : Matrix o m α) : x • fromBlocks A B C D = fromBlocks (x • A) (x • B) (x • C) (x • D)

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{R : Type u_10}
{α : Type u_12}
[SMul R α]
(x : R)
(A : Matrix n l α)
(B : Matrix n m α)
(C : Matrix o l α)
(D : Matrix o m α)

x • Matrix.fromBlocks A B C D = Matrix.fromBlocks (x • A) (x • B) (x • C) (x • D)


@[simp]
theorem coe_linearMap_maxTrivLinearMapEquivLieModuleHom_symm (f : M →ₗ⁅R,L⁆ N) :
    (maxTrivLinearMapEquivLieModuleHom.symm f : M →ₗ[R] N) = (f : M →ₗ[R] N)

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[AddCommGroup N]
[Module R N]
[LieRingModule L N]
[LieModule R L N]
(f : M →ₗ⁅R,L⁆ N)

↑(LieModule.maxTrivLinearMapEquivLieModuleHom.symm f) = ↑f


theorem Iterator.sizeOf_next_lt_of_hasNext (i : String.Iterator) (h : i.hasNext) : sizeOf i.next < sizeOf i

(i : String.Iterator)
(h : i.hasNext = true)


@[mono]
theorem fin_mono {n} : Monotone (Finset.fin n)


theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
    algebraMap R S x = h.map (Polynomial.C x)

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
(h : IsAdjoinRoot S f)
(x : R)

(algebraMap R S) x = h.map (Polynomial.C x)


/-- If `k:ℕ` divides coprime `a` and `b` then `k = 1` -/
theorem eq_one_of_dvd_coprimes {a b k : ℕ} (h_ab_coprime : Coprime a b) (hka : k ∣ a)
    (hkb : k ∣ b) : k = 1

{a b k : ℕ}
(h_ab_coprime : a.Coprime b)
(hka : k ∣ a)
(hkb : k ∣ b)


/-- The functor `Group ⥤ AddGroup` by sending `X ↦ additive X` and `f ↦ f`.
-/
@[simps]
def toAddGrp : Grp ⥤ AddGrp

Grp.toAddGrp.map a = MonoidHom.toAdditive a


@[simp]
theorem mk_add_moveRight_inl {xl xr yl yr} {xL xR yL yR} {i} :
    (mk xl xr xL xR + mk yl yr yL yR).moveRight (Sum.inl i) =
      (mk xl xr xL xR).moveRight i + mk yl yr yL yR

{xl xr yl yr : Type u_1}
{xL : xl → SetTheory.PGame}
{xR : xr → SetTheory.PGame}
{yL : yl → SetTheory.PGame}
{yR : yr → SetTheory.PGame}
{i : xr}

(SetTheory.PGame.mk xl xr xL xR + SetTheory.PGame.mk yl yr yL yR).moveRight (Sum.inl i) =
  (SetTheory.PGame.mk xl xr xL xR).moveRight i + SetTheory.PGame.mk yl yr yL yR


theorem trinomial_natDegree (hkm : k < m) (hmn : m < n) (hw : w ≠ 0) :
    (trinomial k m n u v w).natDegree = n

{R : Type u_1}
[Semiring R]
{k m n : ℕ}
{u v w : R}
(hkm : k < m)
(hmn : m < n)
(hw : w ≠ 0)

(Polynomial.trinomial k m n u v w).natDegree = n


@[congr]
theorem dite_congr {_ : Decidable b} [Decidable c]
    {x : b → α} {u : c → α} {y : ¬b → α} {v : ¬c → α}
    (h₁ : b = c)
    (h₂ : (h : c)  → x (h₁.mpr_prop h) = u h)
    (h₃ : (h : ¬c) → y (h₁.mpr_not h)  = v h) :
    dite b x y = dite c u v

∀ {x : Decidable b} [inst : Decidable c] {x_1 : b → α} {u : c → α} {y : ¬b → α} {v : ¬c → α} (h₁ : b = c),
  (∀ (h : c), x_1 ⋯ = u h) → (∀ (h : ¬c), y ⋯ = v h) → dite b x_1 y = dite c u v


@[simp]
theorem mem_upperClosure : x ∈ upperClosure s ↔ ∃ a ∈ s, a ≤ x

{α : Type u_1}
[Preorder α]
{s : Set α}
{x : α}


/-- Swapping the two vectors passed to `oangle` negates the angle. -/
theorem oangle_rev (x y : V) : o.oangle y x = -o.oangle x y

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


theorem HasFDerivAt.log (hf : HasFDerivAt f f' x) (hx : f x ≠ 0) :
    HasFDerivAt (fun x => log (f x)) ((f x)⁻¹ • f') x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{f' : E →L[ℝ] ℝ}
(hf : HasFDerivAt f f' x)
(hx : f x ≠ 0)

HasFDerivAt (fun x => Real.log (f x)) ((f x)⁻¹ • f') x


lemma LSeriesHasSum_congr {f g : ℕ → ℂ} (s a : ℂ) (h : ∀ {n}, n ≠ 0 → f n = g n) :
    LSeriesHasSum f s a ↔ LSeriesHasSum g s a

{f g : ℕ → ℂ}
(s a : ℂ)
(h : ∀ {n : ℕ}, n ≠ 0 → f n = g n)


protected theorem pow_pos (h : 0 < a) : 0 < a^n


theorem empty_iff {s : Ordset α} : s = ∅ ↔ s.1.empty

{α : Type u_1}
[Preorder α]
{s : Ordset α}


@[simp]
lemma exact_op_iff : S.op.Exact ↔ S.Exact


theorem cprankMax_1 [Monoid α] [AddMonoid α] {x : Holor α ds} (h : CPRankMax1 x) :
    CPRankMax 1 x

{α : Type}
{ds : List ℕ}
[Monoid α]
[AddMonoid α]
{x : Holor α ds}
(h : x.CPRankMax1)


@[to_additive]
theorem MeasurableSet.inv {s : Set G} (hs : MeasurableSet s) : MeasurableSet s⁻¹

{G : Type u_2}
[Neg G]
[MeasurableSpace G]
[MeasurableNeg G]
{s : Set G}
(hs : MeasurableSet s)


theorem degree_mul_comm (hp : p.Monic) (q : R[X]) : (p * q).degree = (q * p).degree

{R : Type u}
[Semiring R]
{p : R[X]}
(hp : p.Monic)
(q : R[X])


lemma succAbove_of_succ_le (p : Fin (n + 1)) (i : Fin n) (h : succ i ≤ p) :
    p.succAbove i = castSucc i

{n : ℕ}
(p : Fin (n + 1))
(i : Fin n)
(h : i.succ ≤ p)


theorem cos_lt_cos_of_nonneg_of_le_pi {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y ≤ π) (hxy : x < y) :
    cos y < cos x

{x y : ℝ}
(hx₁ : 0 ≤ x)
(hy₂ : y ≤ Real.pi)
(hxy : x < y)


theorem HasGradientAt.congr_of_eventuallyEq (h : HasGradientAt f f' x) (h₁ : f₁ =ᶠ[𝓝 x] f) :
    HasGradientAt f₁ f' x

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{f' x : F}
{f₁ : F → 𝕜}
(h : HasGradientAt f f' x)
(h₁ : f₁ =ᶠ[𝓝 x] f)


@[reassoc (attr := simp)]
lemma ι_tensorHom {X₁ X₂ Y₁ Y₂ : GradedObject I C} (f : X₁ ⟶ X₂) (g : Y₁ ⟶ Y₂)
    [HasTensor X₁ Y₁] [HasTensor X₂ Y₂] (i₁ i₂ i₁₂ : I) (h : i₁ + i₂ = i₁₂) :
    ιTensorObj X₁ Y₁ i₁ i₂ i₁₂ h ≫ tensorHom f g i₁₂ =
      (f i₁ ⊗ g i₂) ≫ ιTensorObj X₂ Y₂ i₁ i₂ i₁₂ h

{X₁ X₂ Y₁ Y₂ : CategoryTheory.GradedObject I C}

CategoryTheory.CategoryStruct.comp (CategoryTheory.GradedObject.Monoidal.ιTensorObj X₁ Y₁ i₁ i₂ i₁₂ h)
    (CategoryTheory.GradedObject.Monoidal.tensorHom f g i₁₂) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom (f i₁) (g i₂))
    (CategoryTheory.GradedObject.Monoidal.ιTensorObj X₂ Y₂ i₁ i₂ i₁₂ h)


/-- See also `leOnePart_le_one`. -/
@[to_additive "See also `negPart_nonpos`."]
lemma leOnePart_le_one' : a⁻ᵐ ≤ 1 ↔ a⁻¹ ≤ 1

{α : Type u_1}
[Lattice α]
[AddGroup α]
{a : α}


theorem exists_model_card_eq (h : ∃ M : ModelType.{u, v, max u v} T, Infinite M) (κ : Cardinal.{w})
    (h1 : ℵ₀ ≤ κ) (h2 : Cardinal.lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) :
    ∃ N : ModelType.{u, v, w} T, #N = κ

(h2 : Cardinal.lift.{w, max u v} L.card ≤ Cardinal.lift.{max u v, w} κ)


theorem inseparable_iff_ker_uniformity {x y : α} : Inseparable x y ↔ (x, y) ∈ (𝓤 α).ker


/-- *Rademacher's theorem*: a function between finite-dimensional real vector spaces which is
Lipschitz on a set is differentiable almost everywere in this set. -/
theorem ae_differentiableWithinAt {f : E → F} (hf : LipschitzOnWith C f s)
    (hs : MeasurableSet s) :
    ∀ᵐ x ∂(μ.restrict s), DifferentiableWithinAt ℝ f s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{C : ℝ≥0}
{s : Set E}
{μ : MeasureTheory.Measure E}
[μ.IsAddHaarMeasure]
[FiniteDimensional ℝ F]
{f : E → F}
(hf : LipschitzOnWith C f s)
(hs : MeasurableSet s)

∀ᵐ (x : E) ∂μ.restrict s, DifferentiableWithinAt ℝ f s x


@[simp]
theorem norm_compMeasurePreserving (g : Lp E p μb) (hf : MeasurePreserving f μ μb) :
    ‖compMeasurePreserving f hf g‖ = ‖g‖

(hf : MeasureTheory.MeasurePreserving f μ μb)

‖(MeasureTheory.Lp.compMeasurePreserving f hf) g‖ = ‖g‖


theorem toSubalgebra_inj {S U : StarSubalgebra R A} : S.toSubalgebra = U.toSubalgebra ↔ S = U

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
{S U : StarSubalgebra R A}


/-- Being a nonempty initial segment of colex is equivalent to being an `initSeg`. -/
lemma isInitSeg_iff_exists_initSeg :
    IsInitSeg 𝒜 r ∧ 𝒜.Nonempty ↔ ∃ s : Finset α, s.card = r ∧ 𝒜 = initSeg s

{α : Type u_1}
[LinearOrder α]
{𝒜 : Finset (Finset α)}
{r : ℕ}
[Fintype α]

Finset.Colex.IsInitSeg 𝒜 r ∧ 𝒜.Nonempty ↔ ∃ s, s.card = r ∧ 𝒜 = Finset.Colex.initSeg s


theorem Finite.iSup_biInf_of_monotone {ι ι' α : Type*} [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (· ≤ ·)] [Order.Frame α] {s : Set ι} (hs : s.Finite) {f : ι → ι' → α}
    (hf : ∀ i ∈ s, Monotone (f i)) : ⨆ j, ⨅ i ∈ s, f i j = ⨅ i ∈ s, ⨆ j, f i j

{ι : Type u_1}
{ι' : Type u_2}
{α : Type u_3}
[Preorder ι']
[Nonempty ι']
[IsDirected ι' fun x x_1 => x ≤ x_1]
[Order.Frame α]
{s : Set ι}
(hs : s.Finite)
{f : ι → ι' → α}
(hf : ∀ i ∈ s, Monotone (f i))


theorem toMeasure_apply_of_finite (hs : s.Finite) : p.toMeasure s = ∑' x, s.indicator p x

{α : Type u_1}
[MeasurableSpace α]
(p : PMF α)
(s : Set α)
[MeasurableSingletonClass α]
(hs : s.Finite)

p.toMeasure s = ∑' (x : α), s.indicator (⇑p) x


/-- If `a` is a left identity for a binary operation `f`, then `some a` is a left identity for
`Option.map₂ f`. -/
lemma map₂_left_identity {f : α → β → β} {a : α} (h : ∀ b, f a b = b) (o : Option β) :
    map₂ f (some a) o = o

{α : Type u_1}
{β : Type u_2}
{f : α → β → β}
{a : α}
(h : ∀ (b : β), f a b = b)
(o : Option β)


@[simp]
protected theorem not_two_dvd_bit1 (n : ℕ) : ¬2 ∣ 2 * n + 1


theorem isBounded_le_of_top [Preorder α] [OrderTop α] {f : Filter α} : f.IsBounded (· ≤ ·)

{α : Type u_1}
[Preorder α]
[OrderTop α]
{f : Filter α}

Filter.IsBounded (fun x x_1 => x ≤ x_1) f


@[simp 1001]
theorem constantCoeff_smul {R : Type*} [SMulZeroClass R S₁] (a : R) (f : MvPolynomial σ S₁) :
    constantCoeff (a • f) = a • constantCoeff f

{S₁ : Type v}
{σ : Type u_1}
[CommSemiring S₁]
{R : Type u_2}
[SMulZeroClass R S₁]
(a : R)
(f : MvPolynomial σ S₁)

MvPolynomial.constantCoeff (a • f) = a • MvPolynomial.constantCoeff f


/-- A left homology data for a short complex `S` in the opposite category
induces a right homology data for `S.unop`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : S.LeftHomologyData) : S.unop.RightHomologyData


/-- If three points are not collinear, the second and third are different. -/
theorem ne₂₃_of_not_collinear {p₁ p₂ p₃ : P} (h : ¬Collinear k ({p₁, p₂, p₃} : Set P)) :
    p₂ ≠ p₃

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ p₃ : P}
(h : ¬Collinear k {p₁, p₂, p₃})


@[simp] theorem if_false {_ : Decidable False} (t e : α) : ite False t e = e

∀ {x : Decidable False} (t e : α), (if False then t else e) = e


lemma summable_jacobiTheta₂_term_fderiv_iff (z τ : ℂ) :
    Summable (jacobiTheta₂_term_fderiv · z τ) ↔ 0 < im τ

(Summable fun x => jacobiTheta₂_term_fderiv x z τ) ↔ 0 < τ.im


theorem AEMeasurable.ae_eq_of_forall_setLIntegral_eq {f g : α → ℝ≥0∞} (hf : AEMeasurable f μ)
    (hg : AEMeasurable g μ) (hfi : ∫⁻ x, f x ∂μ ≠ ∞) (hgi : ∫⁻ x, g x ∂μ ≠ ∞)
    (hfg : ∀ ⦃s⦄, MeasurableSet s → μ s < ∞ → ∫⁻ x in s, f x ∂μ = ∫⁻ x in s, g x ∂μ) :
    f =ᵐ[μ] g

(hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → μ s < ⊤ → ∫⁻ (x : α) in s, f x ∂μ = ∫⁻ (x : α) in s, g x ∂μ)


/-- The tail of a vector obtained by prepending is the vector prepended. to -/
theorem tail_cons (a : α) : ∀ v : Vector α n, tail (cons a v) = v

{α : Type u}
{n : ℕ}
(a : α)
(v : Mathlib.Vector α n)


@[simp, norm_cast] lemma coe_iInf (f : ι → Sublattice α) : ⨅ i, f i = ⋂ i, (f i : Set α)

{ι : Sort u_1}
{α : Type u_2}
[Lattice α]
(f : ι → Sublattice α)


/-- An `R`-algebra `A` is étale if it is formally étale and of finite presentation.

Note that the definition <https://stacks.math.columbia.edu/tag/00U1> in the stacks project is
different, but <https://stacks.math.columbia.edu/tag/00UR> shows that it is equivalent
to the definition here. -/
class Etale : Prop where
  formallyEtale : FormallyEtale R A := by infer_instance
  finitePresentation : FinitePresentation R A := by infer_instance

{R : Type u}
[CommSemiring R]
{A : Type u}
[Semiring A]
[Algebra R A]
[self : Algebra.Etale R A]


/-- For a fiber bundle `E` over `B` constructed using the `FiberPrebundle` mechanism,
continuity of a function `TotalSpace F E → X` on an open set `s` can be checked by precomposing at
each point with the pretrivialization used for the construction at that point. -/
theorem continuousOn_of_comp_right {X : Type*} [TopologicalSpace X] {f : TotalSpace F E → X}
    {s : Set B} (hs : IsOpen s) (hf : ∀ b ∈ s,
      ContinuousOn (f ∘ (a.pretrivializationAt b).toPartialEquiv.symm)
        ((s ∩ (a.pretrivializationAt b).baseSet) ×ˢ (Set.univ : Set F))) :
    @ContinuousOn _ _ a.totalSpaceTopology _ f (π F E ⁻¹' s)

(hf : ∀ b ∈ s, ContinuousOn (f ∘ ↑(a.pretrivializationAt b).symm) ((s ∩ (a.pretrivializationAt b).baseSet) ×ˢ Set.univ))

ContinuousOn f (Bundle.TotalSpace.proj ⁻¹' s)


@[simp]
theorem mk_eq_inl_mul_inr (g : G) (n : N) : (⟨n, g⟩ : N ⋊[φ] G) = inl n * inr g

{N : Type u_1}
{G : Type u_2}
[Group N]
[Group G]
{φ : G →* MulAut N}
(g : G)
(n : N)

{ left := n, right := g } = SemidirectProduct.inl n * SemidirectProduct.inr g


theorem clusterPt_iff_lift'_closure' {F : Filter X} :
    ClusterPt x F ↔ (F.lift' closure ⊓ pure x).NeBot

{X : Type u}
{x : X}
[TopologicalSpace X]
{F : Filter X}


@[simp] theorem exists_or_eq_left' (y : α) (p : α → Prop) : ∃ x : α, y = x ∨ p x


/-- In a linear ordered field, for positive `a` and `b` we have `a⁻¹ ≤ b ↔ b⁻¹ ≤ a`.
See also `inv_le_of_inv_le` for a one-sided implication with one fewer assumption. -/
theorem inv_le (ha : 0 < a) (hb : 0 < b) : a⁻¹ ≤ b ↔ b⁻¹ ≤ a

{α : Type u_2}
[LinearOrderedSemifield α]
{a b : α}
(ha : 0 < a)
(hb : 0 < b)

a⁻¹ ≤ b ↔ b⁻¹ ≤ a


/--
Proof that the equality of a compare function corresponds
to propositional equality with respect to a given function.
-/
class EqOfCmpWrt (α : Type u) {β : Type v} (f : α → β) (cmp : α → α → Ordering) where
  eq_of_cmp_wrt {a a' : α} : cmp a a' = .eq → f a = f a'

{α : Type u}
{β : Type v}
{f : α → β}
{cmp : α → α → Ordering}
[self : Lake.EqOfCmpWrt α f cmp]
{a a' : α}


/-- The identity is 1-Lipschitz. -/
protected theorem id : LipschitzWith 1 (@id α)


@[to_additive]
nonrec theorem SmoothWithinAt.div {f g : M → G} {s : Set M} {x₀ : M}
    (hf : SmoothWithinAt I' I f s x₀) (hg : SmoothWithinAt I' I g s x₀) :
    SmoothWithinAt I' I (fun x => f x / g x) s x₀

{𝕜 : 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_5}
[TopologicalSpace G]
[ChartedSpace H G]
[AddGroup G]
[LieAddGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{f g : M → G}
{s : Set M}
{x₀ : M}
(hf : SmoothWithinAt I' I f s x₀)
(hg : SmoothWithinAt I' I g s x₀)

SmoothWithinAt I' I (fun x => f x - g x) s x₀


/-- **Nakayama's Lemma** - A slightly more general version of (2) in
[Stacks 00DV](https://stacks.math.columbia.edu/tag/00DV).
See also `eq_bot_of_le_smul_of_le_jacobson_bot` for the special case when `J = ⊥`.  -/
theorem eq_smul_of_le_smul_of_le_jacobson {I J : Ideal R} {N : Submodule R M} (hN : N.FG)
    (hIN : N ≤ I • N) (hIjac : I ≤ jacobson J) : N = J • N

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I J : Ideal R}
{N : Submodule R M}
(hN : N.FG)
(hIN : N ≤ I • N)
(hIjac : I ≤ J.jacobson)


@[simp] theorem of_add (x y : HahnSeries Γ V) : of R (x + y) = of R x + of R y

{Γ : Type u_1}
{R : Type u_3}
{V : Type u_4}
[PartialOrder Γ]
[AddCommMonoid V]
[SMul R V]
(x y : HahnSeries Γ V)

(HahnModule.of R) (x + y) = (HahnModule.of R) x + (HahnModule.of R) y


protected theorem smul [WeaklyRegular μ] {x : ℝ≥0∞} (hx : x ≠ ∞) : (x • μ).WeaklyRegular

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[μ.WeaklyRegular]
{x : ℝ≥0∞}
(hx : x ≠ ⊤)


@[simp]
theorem liftFOne_zero_comm {Y Z : C} (f : Y ⟶ Z) (P : ProjectiveResolution Y)
    (Q : ProjectiveResolution Z) :
    liftFOne f P Q ≫ Q.complex.d 1 0 = P.complex.d 1 0 ≫ liftFZero f P Q

(P : CategoryTheory.ProjectiveResolution Y)

(Q : CategoryTheory.ProjectiveResolution Z)

CategoryTheory.CategoryStruct.comp (CategoryTheory.ProjectiveResolution.liftFOne f P Q) (Q.complex.d 1 0) =
  CategoryTheory.CategoryStruct.comp (P.complex.d 1 0) (CategoryTheory.ProjectiveResolution.liftFZero f P Q)


@[simp]
theorem length_mapIdx (l : List α) (f : ℕ → α → β) : (l.mapIdx f).length = l.length

{α : Type u}
{β : Type v}
(l : List α)
(f : ℕ → α → β)


theorem subperm_cons_diff {a : α} {l₁ l₂ : List α} : (a :: l₁).diff l₂ <+~ a :: l₁.diff l₂

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


theorem pred_inj : ∀ {a b}, 0 < a → 0 < b → pred a = pred b → a = b


theorem iSup_sigma {p : β → Type*} {f : Sigma p → α} : ⨆ x, f x = ⨆ (i) (j), f ⟨i, j⟩

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{p : β → Type u_9}
{f : Sigma p → α}


theorem ContDiffAt.csin {n} (hf : ContDiffAt ℂ n f x) :
    ContDiffAt ℂ n (fun x => Complex.sin (f x)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{x : E}
{n : ℕ∞}
(hf : ContDiffAt ℂ n f x)


@[simp]
theorem adjoin_adjoin_coe_preimage {s : Set A} : adjoin R (((↑) : adjoin R s → A) ⁻¹' s) = ⊤

{R : Type uR}
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{s : Set A}

Algebra.adjoin R (Subtype.val ⁻¹' s) = ⊤


theorem inner_self_ofReal_re (x : F) : (re ⟪x, x⟫ : 𝕜) = ⟪x, x⟫

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
(x : F)


theorem isBounded_ge_nhds (a : α) : (𝓝 a).IsBounded (· ≥ ·)

{α : Type u_2}
[Preorder α]
[TopologicalSpace α]
[BoundedGENhdsClass α]
(a : α)

Filter.IsBounded (fun x x_1 => x ≥ x_1) (𝓝 a)


theorem iSup_of_not_bddAbove {α : Sort*} {f : α → ℝ} (hf : ¬BddAbove (Set.range f)) :
    ⨆ i, f i = 0

{α : Sort u_1}
{f : α → ℝ}
(hf : ¬BddAbove (Set.range f))


@[to_additive (attr := simp)]
lemma mk_smul (g : G) (hg : g ∈ S) (a : α) : (⟨g, hg⟩ : S) • a = g • a

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{S : Subgroup G}
(g : G)
(hg : g ∈ S)
(a : α)


@[simp]
theorem contDiffAt_tan {x : ℂ} {n : ℕ∞} : ContDiffAt ℂ n tan x ↔ cos x ≠ 0

ContDiffAt ℂ n Complex.tan x ↔ Complex.cos x ≠ 0


/-- A `CFilter α σ` is a realization of a filter (base) on `α`,
  represented by a type `σ` together with operations for the top element and
  the binary `inf` operation. -/
structure CFilter (α σ : Type*) [PartialOrder α] where
  f : σ → α
  pt : σ
  inf : σ → σ → σ
  inf_le_left : ∀ a b : σ, f (inf a b) ≤ f a
  inf_le_right : ∀ a b : σ, f (inf a b) ≤ f b

{α : Type u_1}
{σ : Type u_2}
[PartialOrder α]
(self : CFilter α σ)
(a b : σ)


theorem vonMangoldt_sum {n : ℕ} : ∑ i ∈ n.divisors, Λ i = Real.log n

∑ i ∈ n.divisors, ArithmeticFunction.vonMangoldt i = Real.log ↑n


@[simp]
theorem inr_apply [Module R₁ M₂] (x : M₂) : inr R₁ M₁ M₂ x = (0, x)

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₁ M₂]
(x : M₂)

(ContinuousLinearMap.inr R₁ M₁ M₂) x = (0, x)


theorem append_ne_nil_of_left_ne_nil (a b : List α) (h0 : a ≠ []) : a ++ b ≠ []

{α : Type u_1}
(a b : List α)
(h0 : a ≠ [])


@[to_additive]
theorem IsCompl.prod_mul_prod {s t : Finset α} (h : IsCompl s t) (f : α → β) :
    (∏ i ∈ s, f i) * ∏ i ∈ t, f i = ∏ i, f i

{α : Type u_3}
{β : Type u_4}
[Fintype α]
[CommMonoid β]
{s t : Finset α}
(h : IsCompl s t)
(f : α → β)

(∏ i ∈ s, f i) * ∏ i ∈ t, f i = ∏ i : α, f i


theorem isPeriodicPt_iff_minimalPeriod_dvd : IsPeriodicPt f n x ↔ minimalPeriod f x ∣ n

{α : Type u_1}
{f : α → α}
{x : α}
{n : ℕ}

Function.IsPeriodicPt f n x ↔ Function.minimalPeriod f x ∣ n


theorem tr_copy (q) : tr (Λ'.copy q) = pop' rev (branch Option.isSome
    (push' main <| push' stack <| goto fun _ => Λ'.copy q) (goto fun _ => q))

Turing.PartrecToTM2.tr q.copy =
  Turing.PartrecToTM2.pop' Turing.PartrecToTM2.K'.rev
    (Turing.TM2.Stmt.branch Option.isSome
      (Turing.PartrecToTM2.push' Turing.PartrecToTM2.K'.main
        (Turing.PartrecToTM2.push' Turing.PartrecToTM2.K'.stack (Turing.TM2.Stmt.goto fun x => q.copy)))
      (Turing.TM2.Stmt.goto fun x => q))


@[reassoc (attr := simp)]
theorem sheafifyMap_sheafifyLift {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R)
    (hR : Presheaf.IsSheaf J R) :
    J.sheafifyMap η ≫ J.sheafifyLift γ hR = J.sheafifyLift (η ≫ γ) hR

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

(hR : CategoryTheory.Presheaf.IsSheaf J R)

CategoryTheory.CategoryStruct.comp (J.sheafifyMap η) (J.sheafifyLift γ hR) =
  J.sheafifyLift (CategoryTheory.CategoryStruct.comp η γ) hR


theorem hasColimits_of_hasLimits_op [HasLimits Cᵒᵖ] : HasColimits C

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasLimits Cᵒᵖ]


@[simp, reassoc]
theorem limitIsoLimitCurryCompLim_hom_π_π {j} {k} :
    (limitIsoLimitCurryCompLim G).hom ≫ limit.π _ j ≫ limit.π _ k = limit.π _ (j, k)

[CategoryTheory.Limits.HasLimit (CategoryTheory.curry.obj G ⋙ CategoryTheory.Limits.lim)]

(CategoryTheory.Limits.limitIsoLimitCurryCompLim G).hom ≫
    CategoryTheory.Limits.limit.π (CategoryTheory.curry.obj G ⋙ CategoryTheory.Limits.lim) j ≫
      CategoryTheory.Limits.limit.π ((CategoryTheory.curry.obj G).obj j) k =
  CategoryTheory.Limits.limit.π G (j, k)


theorem exists_ge_of_linear [LinearOrder α] (a b : α) : ∃ c, a ≤ c ∧ b ≤ c

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


/-- The auxiliary continuants before the squashed position stay the same. -/
theorem contsAux_eq_contsAux_squashGCF_of_le {m : ℕ} :
    m ≤ n → contsAux g m = (squashGCF g n).contsAux m

{K : Type u_1}
{n : ℕ}
{g : GenContFract K}
[DivisionRing K]
{m : ℕ}

m ≤ n → g.contsAux m = (g.squashGCF n).contsAux m


@[simp] theorem negSucc_mul_ofNat (m n : Nat) : -[m+1] * n = -↑(succ m * n)


theorem length_eq_length_filter_add {l : List (α)} (f : α → Bool) :
    l.length = (l.filter f).length + (l.filter (! f ·)).length

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

l.length = (List.filter f l).length + (List.filter (fun x => !f x) l).length


protected theorem ext_iff {s t : Set α} : s = t ↔ ∀ x, x ∈ s ↔ x ∈ t


@[to_additive]
theorem prod_eq_foldr : ∀ {l : List M}, l.prod = foldr (· * ·) 1 l

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

l.sum = List.foldr (fun x x_1 => x + x_1) 0 l


theorem setOf_forall (p : ι → β → Prop) : { x | ∀ i, p i x } = ⋂ i, { x | p i x }

{β : Type u_2}
{ι : Sort u_4}
(p : ι → β → Prop)

{x | ∀ (i : ι), p i x} = ⋂ i, {x | p i x}


/-- The circumradius of a simplex with at least two points is
positive. -/
theorem circumradius_pos {n : ℕ} (s : Simplex ℝ P (n + 1)) : 0 < s.circumradius

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{n : ℕ}
(s : Affine.Simplex ℝ P (n + 1))


theorem bounded_le_inter_le [LinearOrder α] (a : α) :
    Bounded (· ≤ ·) (s ∩ { b | a ≤ b }) ↔ Bounded (· ≤ ·) s

{α : Type u_1}
{s : Set α}
[LinearOrder α]
(a : α)

Set.Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a ≤ b}) ↔ Set.Bounded (fun x x_1 => x ≤ x_1) s


@[simp]
theorem piCongr_apply_apply (f : ∀ a, W a) (a : α) : h₁.piCongr h₂ f (h₁ a) = h₂ a (f a)

{α : Sort u_1}
{β : Sort u_2}
{W : α → Sort w}
{Z : β → Sort z}
(h₁ : α ≃ β)
(h₂ : (a : α) → W a ≃ Z (h₁ a))
(f : (a : α) → W a)
(a : α)


/-- Add extra postfix to context-free producing. -/
lemma Produces.append_right {v w : List (Symbol T g.NT)}
    (hvw : g.Produces v w) (p : List (Symbol T g.NT)) :
    g.Produces (v ++ p) (w ++ p)

{T : Type uT}
{g : ContextFreeGrammar T}
{v w : List (Symbol T g.NT)}
(hvw : g.Produces v w)
(p : List (Symbol T g.NT))


lemma map_distinguished [F.IsTriangulated] (T : Triangle C) (hT : T ∈ distTriang C) :
    F.mapTriangle.obj T ∈ distTriang D

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

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

F.mapTriangle.obj T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles


theorem isEquivalent_zero_iff_isBigO_zero : u ~[l] 0 ↔ u =O[l] (0 : α → β)

{α : Type u_1}
{β : Type u_2}
[NormedAddCommGroup β]
{u : α → β}
{l : Filter α}


/-- A sufficient condition to prove that `f ⋆[L, μ] g` exists.
We assume that `f` is integrable on a set `s` and `g` is bounded and ae strongly measurable
on `x₀ - s` (note that both properties hold if `g` is continuous with compact support). -/
theorem _root_.BddAbove.convolutionExistsAt' {x₀ : G} {s : Set G}
    (hbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => -t + x₀) ⁻¹' s))) (hs : MeasurableSet s)
    (h2s : (support fun t => L (f t) (g (x₀ - t))) ⊆ s) (hf : IntegrableOn f s μ)
    (hmg : AEStronglyMeasurable g <| map (fun t => x₀ - t) (μ.restrict s)) :
    ConvolutionExistsAt f g x₀ L μ

(h2s : (Function.support fun t => (L (f t)) (g (x₀ - t))) ⊆ s)

(hmg : MeasureTheory.AEStronglyMeasurable g (MeasureTheory.Measure.map (fun t => x₀ - t) (μ.restrict s)))

MeasureTheory.ConvolutionExistsAt f g x₀ L μ


/-- One can bound the `k`-th derivative of the Fourier integral of `f`, multiplied by `(L v w) ^ n`,
in terms of integrals of iterated derivatives of `f` (of order up to `n`) multiplied by `‖v‖ ^ i`
(for `i ≤ k`).
Auxiliary version in terms of the operator norm of `fourierPowSMulRight (-L.flip) ⬝`. For a version
in terms of `|L v w| ^ n * ⬝`, see `pow_mul_norm_iteratedFDeriv_fourierIntegral_le`.
-/
theorem norm_fourierPowSMulRight_iteratedFDeriv_fourierIntegral_le [FiniteDimensional ℝ V]
    {μ : Measure V} [Measure.IsAddHaarMeasure μ] {K N : ℕ∞} (hf : ContDiff ℝ N f)
    (h'f : ∀ (k n : ℕ), k ≤ K → n ≤ N → Integrable (fun v ↦ ‖v‖^k * ‖iteratedFDeriv ℝ n f v‖) μ)
    {k n : ℕ} (hk : k ≤ K) (hn : n ≤ N) {w : W} :
    ‖fourierPowSMulRight (-L.flip)
      (iteratedFDeriv ℝ k (fourierIntegral 𝐞 μ L.toLinearMap₂ f)) w n‖ ≤
    (2 * π) ^ k * (2 * k + 2) ^ n * ‖L‖ ^ k * ∑ p in Finset.range (k + 1) ×ˢ Finset.range (n + 1),
      ∫ v, ‖v‖ ^ p.1 * ‖iteratedFDeriv ℝ p.2 f v‖ ∂μ

(h'f : ∀ (k n : ℕ), ↑k ≤ K → ↑n ≤ N → MeasureTheory.Integrable (fun v => ‖v‖ ^ k * ‖iteratedFDeriv ℝ n f v‖) μ)

‖VectorFourier.fourierPowSMulRight (-L.flip) (iteratedFDeriv ℝ k (VectorFourier.fourierIntegral 𝐞 μ L.toLinearMap₂ f)) w
      n‖ ≤
  (2 * π) ^ k * (2 * ↑k + 2) ^ n * ‖L‖ ^ k *
    ∑ p ∈ Finset.range (k + 1) ×ˢ Finset.range (n + 1), ∫ (v : V), ‖v‖ ^ p.1 * ‖iteratedFDeriv ℝ p.2 f v‖ ∂μ


theorem diagonal_kronecker [MulZeroClass α] [DecidableEq l] (a : l → α) (B : Matrix m n α) :
    diagonal a ⊗ₖ B =
      Matrix.reindex (Equiv.prodComm _ _) (Equiv.prodComm _ _) (blockDiagonal fun i => a i • B)

{α : Type u_2}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
[MulZeroClass α]
[DecidableEq l]
(a : l → α)
(B : Matrix m n α)

Matrix.kroneckerMap (fun x x_1 => x * x_1) (Matrix.diagonal a) B =
  (Matrix.reindex (Equiv.prodComm m l) (Equiv.prodComm n l)) (Matrix.blockDiagonal fun i => a i • B)


@[simp]
theorem algebraMap_apply (x : ℤ_[p]) : algebraMap ℤ_[p] ℚ_[p] x = x

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(x : ℤ_[p])


theorem kroneckerMap_diagonal_diagonal [Zero α] [Zero β] [Zero γ] [DecidableEq m] [DecidableEq n]
    (f : α → β → γ) (hf₁ : ∀ b, f 0 b = 0) (hf₂ : ∀ a, f a 0 = 0) (a : m → α) (b : n → β) :
    kroneckerMap f (diagonal a) (diagonal b) = diagonal fun mn => f (a mn.1) (b mn.2)

{α : Type u_2}
{β : Type u_4}
{γ : Type u_6}
{m : Type u_9}
{n : Type u_10}
[Zero α]
[Zero β]
[Zero γ]
[DecidableEq m]
[DecidableEq n]
(f : α → β → γ)
(hf₁ : ∀ (b : β), f 0 b = 0)
(hf₂ : ∀ (a : α), f a 0 = 0)
(a : m → α)
(b : n → β)

Matrix.kroneckerMap f (Matrix.diagonal a) (Matrix.diagonal b) = Matrix.diagonal fun mn => f (a mn.1) (b mn.2)


lemma traceForm_eq_of_le_idealizer :
    traceForm R I N = (traceForm R L M).restrict I

{R : Type u_1}
{L : Type u_3}
{M : Type u_4}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[Module.Free R M]
[Module.Finite R M]
[IsDomain R]
[IsPrincipalIdealRing R]
(N : LieSubmodule R L M)
(I : LieIdeal R L)
(h : I ≤ N.idealizer)

LieModule.traceForm R ↥↑I ↥↑N = (LieModule.traceForm R L M).restrict (lieIdealSubalgebra R L I).toSubmodule


@[continuity]
theorem continuous_conj : Continuous (conj : K → K)


theorem count_eq_card {a : α} {s} : count a s = card s ↔ ∀ x ∈ s, a = x

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

Multiset.count a s = Multiset.card s ↔ ∀ x ∈ s, a = x


theorem lt_succ_castPred_iff {a b : Fin (n + 1)} (ha : a ≠ last n) :
    b < succ (a.castPred ha) ↔ b ≤ a

{n : ℕ}
{a b : Fin (n + 1)}
(ha : a ≠ Fin.last n)


@[simp]
theorem psum_zero : psum σ R 0 = Fintype.card σ

(σ : Type u_1)
(R : Type u_2)
[CommSemiring R]
[Fintype σ]

MvPolynomial.psum σ R 0 = ↑(Fintype.card σ)


/-- The reduction modulo `p` of the minimal polynomial of a root of unity `μ` is squarefree. -/
theorem squarefree_minpoly_mod {p : ℕ} [Fact p.Prime] (hdiv : ¬p ∣ n) :
    Squarefree (map (Int.castRingHom (ZMod p)) (minpoly ℤ μ))

{n : ℕ}
{K : Type u_1}
[CommRing K]
{μ : K}
(h : IsPrimitiveRoot μ n)
[IsDomain K]
[CharZero K]
{p : ℕ}
[Fact (Nat.Prime p)]
(hdiv : ¬p ∣ n)

Squarefree (Polynomial.map (Int.castRingHom (ZMod p)) (minpoly ℤ μ))


/-- `log` is analytic away from nonpositive reals -/
theorem analyticAt_clog (m : z ∈ slitPlane) : AnalyticAt ℂ log z


/-- A property ensuring that the tangent cone to `s` at `x` spans a dense subset of the whole space.
The main role of this property is to ensure that the differential within `s` at `x` is unique,
hence this name. The uniqueness it asserts is proved in `UniqueDiffWithinAt.eq` in `Fderiv.Basic`.
To avoid pathologies in dimension 0, we also require that `x` belongs to the closure of `s` (which
is automatic when `E` is not `0`-dimensional). -/
@[mk_iff]
structure UniqueDiffWithinAt (s : Set E) (x : E) : Prop where
  dense_tangentCone : Dense (Submodule.span 𝕜 (tangentConeAt 𝕜 s x) : Set E)
  mem_closure : x ∈ closure s

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[AddCommMonoid E]
[Module 𝕜 E]
[TopologicalSpace E]
(s : Set E)
(x : E)

UniqueDiffWithinAt 𝕜 s x ↔ Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 s x)) ∧ x ∈ closure s


theorem comul_tensorObj_tensorObj_right :
    Coalgebra.comul (R := R) (A := (CoalgebraCat.of R M ⊗
      (CoalgebraCat.of R N ⊗ CoalgebraCat.of R P) : CoalgebraCat R))
      = Coalgebra.comul (A := M ⊗[R] N ⊗[R] P)

{R : Type u}
[CommRing R]
{M N P : Type u}
[AddCommGroup M]
[AddCommGroup N]
[AddCommGroup P]
[Module R M]
[Module R N]
[Module R P]
[Coalgebra R M]
[Coalgebra R N]
[Coalgebra R P]


@[simp] lemma comp_le_comp : comp a ≤ comp b ↔ b ≤ a

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
{a b : α}

Booleanisation.comp a ≤ Booleanisation.comp b ↔ b ≤ a


theorem isRat_pow {α} [Ring α] {f : α → ℕ → α} {a : α} {an cn : ℤ} {ad b b' cd : ℕ} :
    f = HPow.hPow → IsRat a an ad → IsNat b b' →
    Int.pow an b' = cn → Nat.pow ad b' = cd →
    IsRat (f a b) cn cd

{α : Type u_1}
[Ring α]
{f : α → ℕ → α}
{a : α}
{an cn : ℤ}
{ad b b' cd : ℕ}

f = HPow.hPow →
  Mathlib.Meta.NormNum.IsRat a an ad →
    Mathlib.Meta.NormNum.IsNat b b' → an.pow b' = cn → ad.pow b' = cd → Mathlib.Meta.NormNum.IsRat (f a b) cn cd


theorem StrictAnti.mul_const [MulPosStrictMono α]
    (hf : StrictAnti f) (ha : 0 < a) : StrictAnti fun x => f x * a

{α : Type u}
{β : Type u_1}
[Semiring α]
[PartialOrder α]
{a : α}
[Preorder β]
{f : β → α}
[MulPosStrictMono α]
(hf : StrictAnti f)
(ha : 0 < a)


@[simp]
theorem fract_zero : fract (0 : α) = 0

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


/-- Constructs a partial function isomorphism between types from an equivalence between them. -/
@[simps]
def Iso.mk {α β : PartialFun.{u}} (e : α ≃ β) : α ≅ β

(PartialFun.Iso.mk e).inv x = ↑(some (e.symm x))


@[simp]
theorem smul_of [SMul R α] (r : R) (f : m → n → α) : r • of f = of (r • f)

{m : Type u_2}
{n : Type u_3}
{R : Type u_7}
{α : Type v}
[SMul R α]
(r : R)
(f : m → n → α)


@[to_additive]
theorem toWord_inv {x : FreeGroup α} : x⁻¹.toWord = invRev x.toWord

{α : Type u}
[DecidableEq α]
{x : FreeAddGroup α}

(-x).toWord = FreeAddGroup.negRev x.toWord


theorem convex_halfspace_re_gt (r : ℝ) : Convex ℝ { c : ℂ | r < c.re }


@[simp]
theorem self_mem_periodicOrbit (hx : x ∈ periodicPts f) : x ∈ periodicOrbit f x

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


@[simp]
theorem mem_inter : a ∈ s ∩ t ↔ a ∈ s ∧ a ∈ t

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


theorem add_const_nat {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStoppingTime f τ) {i : ℕ} :
    IsStoppingTime f fun ω => τ ω + i

{Ω : Type u_1}
{m : MeasurableSpace Ω}
{f : MeasureTheory.Filtration ℕ m}
{τ : Ω → ℕ}
(hτ : MeasureTheory.IsStoppingTime f τ)
{i : ℕ}

MeasureTheory.IsStoppingTime f fun ω => τ ω + i


/-- The resolution maps intertwine the lift of a morphism and that morphism. -/
@[reassoc (attr := simp)]
theorem lift_commutes {Y Z : C} (f : Y ⟶ Z) (P : ProjectiveResolution Y)
    (Q : ProjectiveResolution Z) : lift f P Q ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f

(P : CategoryTheory.ProjectiveResolution Y)

(Q : CategoryTheory.ProjectiveResolution Z)

CategoryTheory.CategoryStruct.comp (CategoryTheory.ProjectiveResolution.lift f P Q) Q.π =
  CategoryTheory.CategoryStruct.comp P.π ((ChainComplex.single₀ C).map f)


theorem limit.map_pre [HasLimitsOfShape K C] (E : K ⥤ J) :
    lim.map α ≫ limit.pre G E = limit.pre F E ≫ lim.map (whiskerLeft E α)

CategoryTheory.Limits.lim.map α ≫ CategoryTheory.Limits.limit.pre G E =
  CategoryTheory.Limits.limit.pre F E ≫ CategoryTheory.Limits.lim.map (CategoryTheory.whiskerLeft E α)


theorem IsColimit.descCoconeMorphism_eq_isInitial_to {F : J ⥤ C} {c : Cocone F} (hc : IsColimit c)
    (s : Cocone F) :
    hc.descCoconeMorphism s = IsInitial.to (Cocone.isColimitEquivIsInitial _ hc) _

(hc : CategoryTheory.Limits.IsColimit c)

hc.descCoconeMorphism s = (c.isColimitEquivIsInitial hc).to s


@[simp]
theorem map_pure (f : α →o β) (a : α) : (pure a).map f = pure (f a)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α →o β)
(a : α)

Interval.map f (Interval.pure a) = Interval.pure (f a)


theorem epi_iff_surjective {X Y : Profinite.{u}} (f : X ⟶ Y) : Epi f ↔ Function.Surjective f

CategoryTheory.Epi f ↔ Function.Surjective ⇑f


@[simp]
theorem card_lt_nat {o} {n : ℕ} : card o < n ↔ o < n


/-- Any injective endomorphism of an Artinian module is bijective. -/
theorem bijective_of_injective_endomorphism (f : M →ₗ[R] M) (s : Injective f) : Bijective f

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
[IsArtinian R M]
(f : M →ₗ[R] M)
(s : Function.Injective ⇑f)


lemma closure_eq_lowerClosure {s : Set α} : closure s = lowerClosure s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsUpperSet α]
{s : Set α}


theorem coe_coe (u : (𝓞 K)ˣ) : ((u : 𝓞 K) : K) = (u : K)


theorem le_generateFrom_iff_subset_isOpen {g : Set (Set α)} {t : TopologicalSpace α} :
    t ≤ generateFrom g ↔ g ⊆ { s | IsOpen[t] s }

{α : Type u}
{g : Set (Set α)}
{t : TopologicalSpace α}

t ≤ TopologicalSpace.generateFrom g ↔ g ⊆ {s | IsOpen s}


@[to_additive (attr := simp)]
theorem coe_of (R : Type u) [Group R] : ↑(Grp.of R) = R


theorem range_comp_le_range (f : A →ₙₐ[R] B) (g : B →ₙₐ[R] C) :
    NonUnitalAlgHom.range (g.comp f) ≤ NonUnitalAlgHom.range g

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


@[reassoc (attr := simp)]
theorem pentagon_inv_hom_hom_hom_inv (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : d ⟶ e) :
    (α_ (f ≫ g) h i).inv ≫ (α_ f g h).hom ▷ i ≫ (α_ f (g ≫ h) i).hom =
      (α_ f g (h ≫ i)).hom ≫ f ◁ (α_ g h i).inv

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c d e : B}
(f : a ⟶ b)
(g : b ⟶ c)
(h : c ⟶ d)
(i : d ⟶ e)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.associator (CategoryTheory.CategoryStruct.comp f g) h i).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.associator f g h).hom i)
      (CategoryTheory.Bicategory.associator f (CategoryTheory.CategoryStruct.comp g h) i).hom) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.associator f g (CategoryTheory.CategoryStruct.comp h i)).hom
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.associator g h i).inv)


/-- A variation of `of_equiv`: the assumption `Module.Free R P` here is explicit rather than an
instance. -/
theorem of_equiv' {P : Type v} [AddCommMonoid P] [Module R P] (_ : Module.Free R P)
    (e : P ≃ₗ[R] N) : Module.Free R N

{R : Type u}
{N : Type z}
[Semiring R]
[AddCommMonoid N]
[Module R N]
{P : Type v}
[AddCommMonoid P]
[Module R P]

Module.Free R P → (P ≃ₗ[R] N) → Module.Free R N


@[simp] theorem Bool.false_and (b : Bool) : (false && b) = false


theorem Expr.eq_of_toNormPoly_eq (ctx : Context) (e e' : Expr) (h : e.toNormPoly == e'.toPoly) : e.denote ctx = e'.denote ctx

(h : (e.toNormPoly == e'.toPoly) = true)

Nat.Linear.Expr.denote ctx e = Nat.Linear.Expr.denote ctx e'


theorem UInt64.le_antisymm_iff {x y : UInt64} : x = y ↔ x ≤ y ∧ y ≤ x


theorem measure_sUnion_null_iff {S : Set (Set α)} (hS : S.Countable) :
    μ (⋃₀ S) = 0 ↔ ∀ s ∈ S, μ s = 0

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{S : Set (Set α)}
(hS : S.Countable)


@[simp]
theorem sphere_zero_right (n k : ℕ) : sphere (n + 1) 0 k = ∅


theorem eq_of_mem_ordConnectedSection_of_uIcc_subset (hx : x ∈ ordConnectedSection s)
    (hy : y ∈ ordConnectedSection s) (h : [[x, y]] ⊆ s) : x = y

{α : Type u_1}
[LinearOrder α]
{s : Set α}
{x y : α}
(hx : x ∈ s.ordConnectedSection)
(hy : y ∈ s.ordConnectedSection)
(h : [[x, y]] ⊆ s)


/-- Let `f` be an `n` times continuously differentiable homeomorphism of a nontrivially normed
field.  Suppose that the derivative of `f` is never equal to zero. Then `f.symm` is `n` times
continuously differentiable.

This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem Homeomorph.contDiff_symm_deriv [CompleteSpace 𝕜] (f : 𝕜 ≃ₜ 𝕜) {f' : 𝕜 → 𝕜}
    (h₀ : ∀ x, f' x ≠ 0) (hf' : ∀ x, HasDerivAt f (f' x) x) (hf : ContDiff 𝕜 n (f : 𝕜 → 𝕜)) :
    ContDiff 𝕜 n (f.symm : 𝕜 → 𝕜)

(f : 𝕜 ≃ₜ 𝕜)

(hf' : ∀ (x : 𝕜), HasDerivAt (⇑f) (f' x) x)


@[simp]
theorem self_invAct_act_eq {x y : R} : (x ◃⁻¹ x) ◃ y = x ◃ y


/-- Subgroup closure of a set is monotone in its argument: if `h ⊆ k`,
then `closure h ≤ closure k`. -/
@[to_additive
      "Additive subgroup closure of a set is monotone in its argument: if `h ⊆ k`,
      then `closure h ≤ closure k`"]
theorem closure_mono ⦃h k : Set G⦄ (h' : h ⊆ k) : closure h ≤ closure k

{G : Type u_1}
[Group G]
⦃h k : Set G⦄
(h' : h ⊆ k)


/-- The reduction formula for the integral of `cos x ^ n` for any natural `n ≥ 2`. -/
theorem integral_cos_pow :
    (∫ x in a..b, cos x ^ (n + 2)) =
      (cos b ^ (n + 1) * sin b - cos a ^ (n + 1) * sin a) / (n + 2) +
        (n + 1) / (n + 2) * ∫ x in a..b, cos x ^ n

∫ (x : ℝ) in a..b, Real.cos x ^ (n + 2) =
  (Real.cos b ^ (n + 1) * Real.sin b - Real.cos a ^ (n + 1) * Real.sin a) / (↑n + 2) +
    (↑n + 1) / (↑n + 2) * ∫ (x : ℝ) in a..b, Real.cos x ^ n


@[to_additive (attr := simp)]
theorem mul_apply {M N} [Mul M] [CommSemigroup N] (f g : M →ₙ* N) (x : M) :
    (f * g) x = f x * g x

{M : Type u_9}
{N : Type u_10}
[Add M]
[AddCommSemigroup N]
(f g : AddHom M N)
(x : M)


/-- Reformulation of the uniform structure in terms of the extended distance -/
theorem uniformity_edist : 𝓤 γ = ⨅ ε > 0, 𝓟 { p : γ × γ | edist p.1 p.2 < ε }


@[simp]
theorem BoundedLatticeHom.asBoolRing_id : (BoundedLatticeHom.id α).asBoolRing = RingHom.id _

(BoundedLatticeHom.id α).asBoolRing = RingHom.id (AsBoolRing α)


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


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

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

(s + t).noncommSum comm = s.noncommSum ⋯ + t.noncommSum ⋯


theorem ground_not_base (M : Matroid α) [h : RkPos M✶] : ¬M.Base M.E

{α : Type u_1}
(M : Matroid α)
[h : M✶.RkPos]


@[to_additive (attr := simp)]
theorem coe_mk (f : α →* β) (h) : (OrderMonoidHom.mk f h : α → β) = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[AddZeroClass α]
[AddZeroClass β]
(f : α →+ β)
(h : Monotone (↑f).toFun)

⇑{ toAddMonoidHom := f, monotone' := h } = ⇑f


/-- From a functor `F : J ⥤ C`, given an initial object of `J`, construct a cocone for `J`,
provided that the morphisms in the diagram are isomorphisms.
In `colimitOfDiagramInitial` we show it is a colimit cocone. -/
@[simps]
def coconeOfDiagramInitial {X : J} (hX : IsInitial X) (F : J ⥤ C)
    [∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)] : Cocone F

(hX : CategoryTheory.Limits.IsInitial X)

[∀ (i j : J) (f : i ⟶ j), CategoryTheory.IsIso (F.map f)]

(CategoryTheory.Limits.coconeOfDiagramInitial hX F).ι.app i = CategoryTheory.inv (F.map (hX.to i))


/-- The finrank of the direct sum is the sum of the finranks. -/
@[simp]
theorem finrank_directSum {ι : Type v} [Fintype ι] (M : ι → Type w) [∀ i : ι, AddCommGroup (M i)]
    [∀ i : ι, Module R (M i)] [∀ i : ι, Module.Free R (M i)] [∀ i : ι, Module.Finite R (M i)] :
    finrank R (⨁ i, M i) = ∑ i, finrank R (M i)

(R : Type u)
[Ring R]
[StrongRankCondition R]
{ι : Type v}
[Fintype ι]
(M : ι → Type w)
[(i : ι) → AddCommGroup (M i)]
[(i : ι) → Module R (M i)]
[∀ (i : ι), Module.Free R (M i)]
[∀ (i : ι), Module.Finite R (M i)]

FiniteDimensional.finrank R (⨁ (i : ι), M i) = ∑ i : ι, FiniteDimensional.finrank R (M i)


theorem intervalIntegrable_const_iff {c : E} :
    IntervalIntegrable (fun _ => c) μ a b ↔ c = 0 ∨ μ (Ι a b) < ∞

{E : Type u_3}
[NormedAddCommGroup E]
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
{c : E}

IntervalIntegrable (fun x => c) μ a b ↔ c = 0 ∨ μ (Ι a b) < ⊤


@[simp]
theorem coe_mk (e h₃ h₄) : ⇑(⟨e, h₃, h₄⟩ : R ≃+* S) = e

(h₃ : ∀ (x y : R), e.toFun (x * y) = e.toFun x * e.toFun y)

(h₄ : ∀ (x y : R), e.toFun (x + y) = e.toFun x + e.toFun y)

⇑{ toEquiv := e, map_mul' := h₃, map_add' := h₄ } = ⇑e


theorem continuous (F : α →𝒄 β) (C : Chain α) : F (ωSup C) = ωSup (C.map F)

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
(F : α →𝒄 β)
(C : OmegaCompletePartialOrder.Chain α)

F (OmegaCompletePartialOrder.ωSup C) = OmegaCompletePartialOrder.ωSup (C.map ↑F)


@[to_additive]
theorem continuousMul_sInf {ts : Set (TopologicalSpace M)}
    (h : ∀ t ∈ ts, @ContinuousMul M t _) : @ContinuousMul M (sInf ts) _

{M : Type u_3}
[Mul M]
{ts : Set (TopologicalSpace M)}
(h : ∀ t ∈ ts, ContinuousMul M)


@[simp]
theorem norm_map_eq (A : Matrix m n α) (f : α → β) (hf : ∀ a, ‖f a‖ = ‖a‖) : ‖A.map f‖ = ‖A‖

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
{β : Type u_6}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
[SeminormedAddCommGroup β]
(A : Matrix m n α)
(f : α → β)
(hf : ∀ (a : α), ‖f a‖ = ‖a‖)


theorem list_ofFn :
    ∀ {n} {f : Fin n → α → σ},
      (∀ i, Computable (f i)) → Computable fun a => List.ofFn fun i => f i a

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
{n : ℕ}
{f : Fin n → α → σ}

(∀ (i : Fin n), Computable (f i)) → Computable fun a => List.ofFn fun i => f i a


theorem coeff_eq_zero_of_degree_lt (h : degree p < n) : coeff p n = 0

{R : Type u}
{n : ℕ}
[Semiring R]
{p : R[X]}
(h : p.degree < ↑n)


theorem one_sub_nonneg (x : Icc (0 : β) 1) : 0 ≤ 1 - (x : β)

{β : Type u_2}
[OrderedRing β]
(x : ↑(Set.Icc 0 1))


theorem integral_normed : ∫ x, f.normed μ x ∂μ = 1


@[to_additive (attr := simp, norm_cast)]
theorem coe_pow [Pow G M] (f : α → G) (n : M) : ↑(f ^ n) = (f : Germ l G) ^ n

{α : Type u_1}
{l : Filter α}
{M : Type u_5}
{G : Type u_6}
[Pow G M]
(f : α → G)
(n : M)


theorem sUnion_eq_compl_sInter_compl (S : Set (Set α)) : ⋃₀S = (⋂₀ (compl '' S))ᶜ


theorem lt_length_right_of_zip {i : ℕ} {l : List α} {l' : List β} (h : i < (zip l l').length) :
    i < l'.length

{α : Type u}
{β : Type u_1}
{i : ℕ}
{l : List α}
{l' : List β}
(h : i < (l.zip l').length)


@[to_additive] -- Porting note: was `@[simp]`
theorem integral_smul_eq_self {μ : Measure α} [SMulInvariantMeasure G α μ] (f : α → E) {g : G} :
    (∫ x, f (g • x) ∂μ) = ∫ x, f x ∂μ

[MeasureTheory.VAddInvariantMeasure G α μ]

∫ (x : α), f (g +ᵥ x) ∂μ = ∫ (x : α), f x ∂μ


/-- For any multiplicative function `f` and any `n > 0`,
we can evaluate `f n` by evaluating `f` at `p ^ k` over the factorization of `n` -/
nonrec  -- Porting note: added
theorem multiplicative_factorization [CommMonoidWithZero R] (f : ArithmeticFunction R)
    (hf : f.IsMultiplicative) {n : ℕ} (hn : n ≠ 0) :
    f n = n.factorization.prod fun p k => f (p ^ k)

{R : Type u_1}
[CommMonoidWithZero R]
(f : ArithmeticFunction R)
(hf : f.IsMultiplicative)
{n : ℕ}
(hn : n ≠ 0)


theorem ext_ring_iff [TopologicalSpace R] {f g : R →A[R] A} : f = g ↔ f 1 = g 1

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
[Algebra R A]
[TopologicalSpace R]
{f g : R →A[R] A}


/-- To construct an isomorphism of costructured arrows,
we need an isomorphism of the objects underlying the source,
and to check that the triangle commutes.
-/
@[simps!]
def isoMk {f f' : CostructuredArrow S T} (g : f.left ≅ f'.left)
    (w : S.map g.hom ≫ f'.hom = f.hom := by aesop_cat) : f ≅ f'

{f f' : CategoryTheory.CostructuredArrow S T}

(w : CategoryTheory.CategoryStruct.comp (S.map g.hom) f'.hom = f.hom := by aesop_cat)


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


theorem union_right (ht : AEDisjoint μ s t) (hu : AEDisjoint μ s u) : AEDisjoint μ s (t ∪ u)

{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t u : Set α}
(ht : MeasureTheory.AEDisjoint μ s t)
(hu : MeasureTheory.AEDisjoint μ s u)


theorem dvd_of_squarefree_of_mul_dvd_mul_left (hy : Squarefree y) (h : d * d ∣ x * y) : d ∣ x

{R : Type u_1}
[CancelCommMonoidWithZero R]
{x y d : R}
[DecompositionMonoid R]
(hy : Squarefree y)
(h : d * d ∣ x * y)


@[simp] protected theorem beq_false (m n : Name) : (m == n) = false ↔ ¬ (m = n)


theorem doublingGamma_eq_Gamma {s : ℝ} (hs : 0 < s) : doublingGamma s = Gamma s


@[to_additive]
theorem smul_ball'' : a • ball b r = ball (a • b) r

{E : Type u_6}
[SeminormedCommGroup E]
{a b : E}
{r : ℝ}

a • Metric.ball b r = Metric.ball (a • b) r


@[simp]
theorem Equiv.optionCongr_swap {α : Type*} [DecidableEq α] (x y : α) :
    optionCongr (swap x y) = swap (some x) (some y)

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

Equiv.optionCongr (Equiv.swap x y) = Equiv.swap (some x) (some y)


@[to_additive]
theorem injective_iff_trivial_ker {f : G → H} (hf : IsGroupHom f) :
    Function.Injective f ↔ ker f = trivial G

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

Function.Injective f ↔ IsAddGroupHom.ker f = IsAddSubgroup.trivial G


lemma isIso_toSpec (f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :
    IsIso (toSpec 𝒜 f)

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(f : A)
{m : ℕ}
(f_deg : f ∈ 𝒜 m)
(hm : 0 < m)

CategoryTheory.IsIso (AlgebraicGeometry.ProjectiveSpectrum.Proj.toSpec 𝒜 f)


/-- Characterization of the elements of the uniformity in terms of the extended distance -/
theorem mem_uniformity_edist {s : Set (α × α)} :
    s ∈ 𝓤 α ↔ ∃ ε > 0, ∀ {a b : α}, edist a b < ε → (a, b) ∈ s

{α : Type u}
[PseudoEMetricSpace α]
{s : Set (α × α)}


@[reassoc (attr := simp)]
theorem biprod.inl_map {W X Y Z : C} [HasBinaryBiproduct W X] [HasBinaryBiproduct Y Z] (f : W ⟶ Y)
    (g : X ⟶ Z) : biprod.inl ≫ biprod.map f g = f ≫ biprod.inl

CategoryTheory.Limits.biprod.inl ≫ CategoryTheory.Limits.biprod.map f g = f ≫ CategoryTheory.Limits.biprod.inl


/-- If Cᵒᵖ is cofiltered, then C is filtered. -/
lemma isFiltered_of_isCofiltered_op [IsCofiltered Cᵒᵖ] : IsFiltered C

(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.IsCofiltered Cᵒᵖ]


theorem zero_opow' (a : Ordinal) : 0 ^ a = 1 - a


@[simp]
theorem integrable_add_measure {f : α → β} :
    Integrable f (μ + ν) ↔ Integrable f μ ∧ Integrable f ν

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f : α → β}

MeasureTheory.Integrable f (μ + ν) ↔ MeasureTheory.Integrable f μ ∧ MeasureTheory.Integrable f ν


/-- **Integration by parts**. Special case of `integral_mul_deriv_eq_deriv_mul_of_hasDeriv_right`
where the functions have a two-sided derivative in the interior of the interval. -/
theorem integral_mul_deriv_eq_deriv_mul_of_hasDerivAt {u v u' v' : ℝ → A}
    (hu : ContinuousOn u [[a, b]])
    (hv : ContinuousOn v [[a, b]])
    (huu' : ∀ x ∈ Ioo (min a b) (max a b), HasDerivAt u (u' x) x)
    (hvv' : ∀ x ∈ Ioo (min a b) (max a b), HasDerivAt v (v' x) x)
    (hu' : IntervalIntegrable u' volume a b)
    (hv' : IntervalIntegrable v' volume a b) :
    ∫ x in a..b, u x * v' x = u b * v b - u a * v a - ∫ x in a..b, u' x * v x

(huu' : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivAt u (u' x) x)

(hvv' : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivAt v (v' x) x)

(hu' : IntervalIntegrable u' MeasureTheory.volume a b)

(hv' : IntervalIntegrable v' MeasureTheory.volume a b)

∫ (x : ℝ) in a..b, u x * v' x = u b * v b - u a * v a - ∫ (x : ℝ) in a..b, u' x * v x


@[simp]
lemma convolution_map_zero {R : Type*} [Semiring R] (f g : ℕ → R) : (f ⍟ g) 0 = 0

{R : Type u_1}
[Semiring R]
(f g : ℕ → R)


theorem is_ideal_adic_pow {J : Ideal R} (h : IsAdic J) {n : ℕ} (hn : 0 < n) : IsAdic (J ^ n)

{R : Type u_1}
[CommRing R]
[TopologicalSpace R]
[TopologicalRing R]
{J : Ideal R}
(h : IsAdic J)
{n : ℕ}
(hn : 0 < n)


theorem lift_aux (x : L) : ∃ y : ℕ × K, i y.2 = x ^ p ^ y.1

{K : Type u_1}
{L : Type u_2}
[CommSemiring K]
[CommSemiring L]
(i : K →+* L)
(p : ℕ)
[IsPRadical i p]
(x : L)


/-- Any `k`-algebra module which is 1-dimensional over `k` is simple. -/
theorem simple_of_finrank_eq_one {k : Type*} [Field k] [Algebra k R] {V : ModuleCat R}
    (h : finrank k V = 1) : Simple V

(h : FiniteDimensional.finrank k ↑V = 1)


@[simp, norm_cast]
theorem val_add (x y : s) : (↑(x + y) : R) = ↑x + ↑y

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


theorem IsTheta.sup (h : f' =Θ[l] g') (h' : f' =Θ[l'] g') : f' =Θ[l ⊔ l'] g'

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
{f' : α → E'}
{g' : α → F'}
{l l' : Filter α}
(h : f' =Θ[l] g')
(h' : f' =Θ[l'] g')


@[deprecated (since := "2024-04-26")]
theorem toLin'_apply (A : BilinForm R M) (x : M) : toLinHom (M := M) A x = A x

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(A : LinearMap.BilinForm R M)
(x : M)

(LinearMap.BilinForm.toLinHom A) x = A x


/-- The supremum of two subspaces is equal to the span of their union. -/
theorem span_union (S T : Set (ℙ K V)) : span (S ∪ T) = span S ⊔ span T

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
(S T : Set (Projectivization K V))

Projectivization.Subspace.span (S ∪ T) = Projectivization.Subspace.span S ⊔ Projectivization.Subspace.span T


@[refl, simp] -- Porting note: added `simp`
theorem refl : IntervalIntegrable f μ a a

{E : Type u_3}
[NormedAddCommGroup E]
{f : ℝ → E}
{a : ℝ}
{μ : MeasureTheory.Measure ℝ}


theorem cbiSup_eq_of_not_forall {p : ι → Prop} {f : Subtype p → α} (hp : ¬ (∀ i, p i)) :
    ⨆ (i) (h : p i), f ⟨i, h⟩ = iSup f ⊔ sSup ∅

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLinearOrder α]
{p : ι → Prop}
{f : Subtype p → α}
(hp : ¬∀ (i : ι), p i)

⨆ i, ⨆ (h : p i), f ⟨i, h⟩ = iSup f ⊔ sSup ∅


/-- An additive functor induces a functor between homological complexes.
This is sometimes called the "prolongation".
-/
@[simps]
def Functor.mapHomologicalComplex (F : W₁ ⥤ W₂) [F.PreservesZeroMorphisms] (c : ComplexShape ι) :
    HomologicalComplex W₁ c ⥤ HomologicalComplex W₂ c

((F.mapHomologicalComplex c).obj C).d i j = F.map (C.d i j)


/-- See also `EReal.add_lt_add_of_lt_of_le'` for a version with weaker but less convenient
assumptions. -/
theorem add_lt_add_of_lt_of_le {x y z t : EReal} (h : x < y) (h' : z ≤ t) (hz : z ≠ ⊥)
    (ht : t ≠ ⊤) : x + z < y + t


theorem image2_union_inter_subset_union :
    image2 f (s ∪ s') (t ∩ t') ⊆ image2 f s t ∪ image2 f s' t'

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{f : α → β → γ}
{s s' : Set α}
{t t' : Set β}

Set.image2 f (s ∪ s') (t ∩ t') ⊆ Set.image2 f s t ∪ Set.image2 f s' t'


theorem Context.evalList_removeNeutrals (ctx : Context α) (e : List Nat) : evalList α ctx (removeNeutrals ctx e) = evalList α ctx e

{α : Sort u_1}
(ctx : Lean.Data.AC.Context α)
(e : List Nat)

Lean.Data.AC.evalList α ctx (Lean.Data.AC.removeNeutrals ctx e) = Lean.Data.AC.evalList α ctx e


theorem count_cons (a b : α) (l : List α) :
    count a (b :: l) = count a l + if a = b then 1 else 0

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

List.count a (b :: l) = List.count a l + if a = b then 1 else 0


theorem Set.Finite.measurableSet_biInter {f : β → Set α} {s : Set β} (hs : s.Finite)
    (h : ∀ b ∈ s, MeasurableSet (f b)) : MeasurableSet (⋂ b ∈ s, f b)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{f : β → Set α}
{s : Set β}
(hs : s.Finite)
(h : ∀ b ∈ s, MeasurableSet (f b))


theorem isBridge_iff_adj_and_forall_walk_mem_edges {v w : V} :
    G.IsBridge s(v, w) ↔ G.Adj v w ∧ ∀ p : G.Walk v w, s(v, w) ∈ p.edges

{V : Type u}
{G : SimpleGraph V}
{v w : V}

G.IsBridge s(v, w) ↔ G.Adj v w ∧ ∀ (p : G.Walk v w), s(v, w) ∈ p.edges


theorem apriori_edist_iterate_efixedPoint_le (hf : ContractingWith K f) {x : α}
    (hx : edist x (f x) ≠ ∞) (n : ℕ) :
    edist (f^[n] x) (efixedPoint f hf x hx) ≤ edist x (f x) * (K : ℝ≥0∞) ^ n / (1 - K)

{α : Type u_1}
[EMetricSpace α]
[cs : CompleteSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
{x : α}
(hx : edist x (f x) ≠ ⊤)
(n : ℕ)

edist (f^[n] x) (ContractingWith.efixedPoint f hf x hx) ≤ edist x (f x) * ↑K ^ n / (1 - ↑K)


theorem specializes_of_eq (e : x = y) : x ⤳ y

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(e : x = y)


theorem monic_X_sub_C (x : R) : Monic (X - C x)


@[simp]
theorem composePath_toPath {X Y : C} (f : X ⟶ Y) : composePath f.toPath = f

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


@[simp]
theorem mk_ι_app_zero {W : C} (inl : Y ⟶ W) (inr : Z ⟶ W) (eq : f ≫ inl = g ≫ inr) :
    (mk inl inr eq).ι.app WalkingSpan.zero = f ≫ inl

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
{f : X ⟶ Y}
{g : X ⟶ Z}
{W : C}
(inl : Y ⟶ W)
(inr : Z ⟶ W)
(eq : f ≫ inl = g ≫ inr)

(CategoryTheory.Limits.PushoutCocone.mk inl inr eq).ι.app CategoryTheory.Limits.WalkingSpan.zero = f ≫ inl


/-- One additional inductive argument that supplies the last missing part of Theorem 8. -/
theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂

{x₁ x₂ y₁ y₂ : SetTheory.PGame}
(hx₁ : x₁.Numeric)
(hx₂ : x₂.Numeric)
(hy₁ : y₁.Numeric)
(hy₂ : y₂.Numeric)
(hx : x₁ < x₂)
(hy : y₁ < y₂)


theorem ite_and : ite (P ∧ Q) a b = ite P (ite Q a b) b

{α : Sort u_1}
(P Q : Prop)
[Decidable P]
[Decidable Q]
(a b : α)

(if P ∧ Q then a else b) = if P then if Q then a else b else b


lemma ProjectiveResolution.fromLeftDerivedZero_eq
    {X : C} (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.fromLeftDerivedZero.app X = (P.isoLeftDerivedObj F 0).hom ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫
        P.fromLeftDerivedZero' F

(P : CategoryTheory.ProjectiveResolution X)

F.fromLeftDerivedZero.app X =
  CategoryTheory.CategoryStruct.comp (P.isoLeftDerivedObj F 0).hom
    (CategoryTheory.CategoryStruct.comp
      (ChainComplex.isoHomologyι₀ ((F.mapHomologicalComplex (ComplexShape.down ℕ)).obj P.complex)).hom
      (P.fromLeftDerivedZero' F))


theorem mem_one_iff {x : P} : x ∈ (1 : FractionalIdeal S P) ↔ ∃ x' : R, algebraMap R P x' = x

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


theorem iterateFrobeniusEquiv_one_apply (x : R) : iterateFrobeniusEquiv R p 1 x = x ^ p

(R : Type u_1)
(p : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]
(x : R)


lemma UniformConvexOn.mono (hψφ : ψ ≤ φ) (hf : UniformConvexOn s φ f) : UniformConvexOn s ψ f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{φ ψ : ℝ → ℝ}
{s : Set E}
{f : E → ℝ}
(hψφ : ψ ≤ φ)
(hf : UniformConvexOn s φ f)


theorem exists_seq_separating (α : Type*) {p : Set α → Prop} {s₀} (hp : p s₀) (t : Set α)
    [HasCountableSeparatingOn α p t] :
    ∃ S : ℕ → Set α, (∀ n, p (S n)) ∧ ∀ x ∈ t, ∀ y ∈ t, (∀ n, x ∈ S n ↔ y ∈ S n) → x = y

(α : Type u_1)
{p : Set α → Prop}
{s₀ : Set α}
(hp : p s₀)
(t : Set α)
[HasCountableSeparatingOn α p t]

∃ S, (∀ (n : ℕ), p (S n)) ∧ ∀ x ∈ t, ∀ y ∈ t, (∀ (n : ℕ), x ∈ S n ↔ y ∈ S n) → x = y


@[simp]
theorem _root_.ContinuousLinearMap.compLeftContinuousBounded_apply (g : β →L[𝕜] γ) (f : α →ᵇ β)
    (x : α) : (g.compLeftContinuousBounded α f) x = g (f x)

(α : Type u)
{β : Type v}
{γ : Type w}
{𝕜 : Type u_2}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 β]
[SeminormedAddCommGroup γ]
[NormedSpace 𝕜 γ]
(g : β →L[𝕜] γ)
(f : BoundedContinuousFunction α β)
(x : α)

((ContinuousLinearMap.compLeftContinuousBounded α g) f) x = g (f x)


theorem indicator_mem_restrictDegree (c : σ → K) :
    indicator c ∈ restrictDegree σ K (Fintype.card K - 1)

{K : Type u_1}
{σ : Type u_2}
[Fintype K]
[Fintype σ]
[CommRing K]
(c : σ → K)

MvPolynomial.indicator c ∈ MvPolynomial.restrictDegree σ K (Fintype.card K - 1)


/-- The (identity) equivalence between `C` and its monoidal opposite. -/
@[simps] def MonoidalOpposite.mopEquiv : C ≌ Cᴹᵒᵖ

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

(CategoryTheory.MonoidalOpposite.mopEquiv C).inverse = CategoryTheory.unmopFunctor C


theorem condexp_const (hm : m ≤ m0) (c : F') [IsFiniteMeasure μ] :
    μ[fun _ : α => c|m] = fun _ => c

{α : Type u_1}
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(hm : m ≤ m0)
(c : F')
[MeasureTheory.IsFiniteMeasure μ]


@[to_additive]
theorem preimage_normal {f : G → H} (hf : IsGroupHom f) {s : Set H} (hs : IsNormalSubgroup s) :
    IsNormalSubgroup (f ⁻¹' s)

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{f : G → H}
(hf : IsGroupHom f)
{s : Set H}
(hs : IsNormalSubgroup s)


@[simp, norm_cast]
theorem coe_inf (I J : FractionalIdeal S P) : ↑(I ⊓ J) = (I ⊓ J : Submodule R P)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
(I J : FractionalIdeal S P)


/-- **Integration by parts on (-∞, ∞).**
With respect to a general bilinear form. For the specific case of multiplication, see
`integral_mul_deriv_eq_deriv_mul`. -/
theorem integral_bilinear_hasDerivAt_right_eq_sub [CompleteSpace G]
    (hu : ∀ x, HasDerivAt u (u' x) x) (hv : ∀ x, HasDerivAt v (v' x) x)
    (huv' : Integrable (fun x ↦ L (u x) (v' x))) (hu'v : Integrable (fun x ↦ L (u' x) (v x)))
    (h_bot : Tendsto (fun x ↦ L (u x) (v x)) atBot (𝓝 m))
    (h_top : Tendsto (fun x ↦ L (u x) (v x)) atTop (𝓝 n)) :
    ∫ (x : ℝ), L (u x) (v' x) = n - m - ∫ (x : ℝ), L (u' x) (v x)

(huv' : MeasureTheory.Integrable (fun x => (L (u x)) (v' x)) MeasureTheory.volume)

(hu'v : MeasureTheory.Integrable (fun x => (L (u' x)) (v x)) MeasureTheory.volume)

(h_bot : Filter.Tendsto (fun x => (L (u x)) (v x)) Filter.atBot (𝓝 m))

(h_top : Filter.Tendsto (fun x => (L (u x)) (v x)) Filter.atTop (𝓝 n))