/-- Transfer `IsBigOWith` over a `Homeomorph`. -/
theorem isBigOWith_congr (e : α ≃ₜ β) {b : β} {f : β → E} {g : β → F} {C : ℝ} :
    IsBigOWith C (𝓝 b) f g ↔ IsBigOWith C (𝓝 (e.symm b)) (f ∘ e) (g ∘ e)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{E : Type u_3}
[Norm E]
{F : Type u_4}
[Norm F]
(e : α ≃ₜ β)
{b : β}
{f : β → E}
{g : β → F}
{C : ℝ}

Asymptotics.IsBigOWith C (𝓝 b) f g ↔ Asymptotics.IsBigOWith C (𝓝 (e.symm b)) (f ∘ ⇑e) (g ∘ ⇑e)


theorem nthLe_rotate_one (l : List α) (k : ℕ) (hk : k < (l.rotate 1).length) :
    (l.rotate 1).nthLe k hk =
      l.nthLe ((k + 1) % l.length) (mod_lt _ (length_rotate l 1 ▸ k.zero_le.trans_lt hk))

{α : Type u}
(l : List α)
(k : ℕ)
(hk : k < (l.rotate 1).length)

(l.rotate 1).nthLe k hk = l.nthLe ((k + 1) % l.length) ⋯


@[to_additive]
theorem MonoidHomClass.uniformContinuous_of_bound [MonoidHomClass 𝓕 E F] (f : 𝓕) (C : ℝ)
    (h : ∀ x, ‖f x‖ ≤ C * ‖x‖) : UniformContinuous f

{𝓕 : Type u_1}
{E : Type u_3}
{F : Type u_4}
[SeminormedAddGroup E]
[SeminormedAddGroup F]
[FunLike 𝓕 E F]
[AddMonoidHomClass 𝓕 E F]
(f : 𝓕)
(C : ℝ)
(h : ∀ (x : E), ‖f x‖ ≤ C * ‖x‖)


/-- Preimage of interior or interior of preimage coincide for partial homeomorphisms,
when restricted to the source. -/
theorem preimage_interior (s : Set Y) :
    e.source ∩ e ⁻¹' interior s = e.source ∩ interior (e ⁻¹' s)

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

e.source ∩ ↑e ⁻¹' interior s = e.source ∩ interior (↑e ⁻¹' s)


theorem proj_pi (f : ∀ i, M₂ →L[R] φ i) (i : ι) : (proj i).comp (pi f) = f i

{R : Type u_1}
[Semiring R]
{M₂ : Type u_3}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R M₂]
{ι : Type u_4}
{φ : ι → Type u_5}
[(i : ι) → TopologicalSpace (φ i)]
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(f : (i : ι) → M₂ →L[R] φ i)
(i : ι)

(ContinuousLinearMap.proj i).comp (ContinuousLinearMap.pi f) = f i


theorem integrable_rnDeriv (c : ComplexMeasure α) (μ : Measure α) : Integrable (c.rnDeriv μ) μ

{α : Type u_1}
{m : MeasurableSpace α}
(c : MeasureTheory.ComplexMeasure α)
(μ : MeasureTheory.Measure α)

MeasureTheory.Integrable (c.rnDeriv μ) μ


@[to_additive]
lemma orbitRel_le_snd :
    orbitRel G (α × β) ≤ (orbitRel G β).comap Prod.snd

(G : Type u_1)
(α : Type u_2)
(β : Type u_3)
[Group G]
[MulAction G α]
[MulAction G β]

MulAction.orbitRel G (α × β) ≤ Setoid.comap Prod.snd (MulAction.orbitRel G β)


protected theorem Tendsto.eventually_lt_atBot [Preorder β] [NoMinOrder β] {f : α → β} {l : Filter α}
    (hf : Tendsto f l atBot) (c : β) : ∀ᶠ x in l, f x < c

{α : Type u_3}
{β : Type u_4}
[Preorder β]
[NoMinOrder β]
{f : α → β}
{l : Filter α}
(hf : Filter.Tendsto f l Filter.atBot)
(c : β)


theorem tendsto_cocompact_of_tendsto_dist_comp_atTop {f : β → α} {l : Filter β} (x : α)
    (h : Tendsto (fun y => dist (f y) x) l atTop) : Tendsto f l (cocompact α)

(h : Filter.Tendsto (fun y => dist (f y) x) l Filter.atTop)


/-- A binary bicone for a pair of objects `P Q : C` consists of the cone point `X`,
maps from `X` to both `P` and `Q`, and maps from both `P` and `Q` to `X`,
so that `inl ≫ fst = 𝟙 P`, `inl ≫ snd = 0`, `inr ≫ fst = 0`, and `inr ≫ snd = 𝟙 Q`
-/
-- @[nolint has_nonempty_instance] Porting note (#5171): removed
structure BinaryBicone (P Q : C) where
  pt : C
  fst : pt ⟶ P
  snd : pt ⟶ Q
  inl : P ⟶ pt
  inr : Q ⟶ pt
  inl_fst : inl ≫ fst = 𝟙 P := by aesop
  inl_snd : inl ≫ snd = 0 := by aesop
  inr_fst : inr ≫ fst = 0 := by aesop
  inr_snd : inr ≫ snd = 𝟙 Q := by aesop

(self : CategoryTheory.Limits.BinaryBicone P Q)


/-- A functor `F` commutes with the shift by a monoid `A` if it is equipped with
commutation isomorphisms with the shifts by all `a : A`, and these isomorphisms
satisfy coherence properties with respect to `0 : A` and the addition in `A`. -/
class CommShift where
  iso (a : A) : shiftFunctor C a ⋙ F ≅ F ⋙ shiftFunctor D a
  zero : iso 0 = CommShift.isoZero F A := by aesop_cat
  add (a b : A) : iso (a + b) = CommShift.isoAdd (iso a) (iso b) := by aesop_cat

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_6, u_1} C]
[CategoryTheory.Category.{u_7, u_2} D]
{F : CategoryTheory.Functor C D}
{A : Type u_4}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[CategoryTheory.HasShift D A]
[self : F.CommShift A]

CategoryTheory.Functor.CommShift.iso 0 = CategoryTheory.Functor.CommShift.isoZero F A


theorem hasLimits_of_hasColimits_op [HasColimits Cᵒᵖ] : HasLimits C

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


theorem lt_ofDual_iff {a : WithBot α} {b : WithTop αᵒᵈ} :
    a < WithTop.ofDual b ↔ b < WithBot.toDual a

{α : Type u_1}
[LT α]
{a : WithBot α}
{b : WithTop αᵒᵈ}


@[simp]
theorem sameRay_neg_smul_left_iff {v : M} {r : R} : SameRay R (r • v) (-v) ↔ r ≤ 0 ∨ v = 0

{R : Type u_1}
[LinearOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
{v : M}
{r : R}


lemma norm_smulRightL_le : ‖smulRightL 𝕜 E Fₗ‖ ≤ 1

{𝕜 : Type u_1}
{E : Type u_4}
{Fₗ : Type u_7}
[NormedAddCommGroup E]
[NormedAddCommGroup Fₗ]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 Fₗ]

‖ContinuousLinearMap.smulRightL 𝕜 E Fₗ‖ ≤ 1


@[to_additive]
theorem mclosure_subset {s : Set G} : Monoid.Closure s ⊆ closure s


theorem localization_comap_embedding [Algebra R S] (M : Submonoid R) [IsLocalization M S] :
    Embedding (comap (algebraMap R S))

{R : Type u}
(S : Type v)
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
(M : Submonoid R)
[IsLocalization M S]

Embedding ⇑(PrimeSpectrum.comap (algebraMap R S))


/-- The closure of a totally bounded set is totally bounded. -/
theorem TotallyBounded.closure {s : Set α} (h : TotallyBounded s) : TotallyBounded (closure s)

{α : Type u}
[uniformSpace : UniformSpace α]
{s : Set α}
(h : TotallyBounded s)


lemma ae_iff_prob_eq_one (hp : Measurable p) : (∀ᵐ a ∂μ, p a) ↔ μ {a | p a} = 1

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.IsProbabilityMeasure μ]
{p : α → Prop}
(hp : Measurable p)


@[simp]
theorem one_nadd : 1 ♯ a = succ a


/-- The inner product of two vectors is the product of the norms and the cosine of the oriented
angle between the vectors. -/
theorem inner_eq_norm_mul_norm_mul_cos_oangle (x y : V) :
    ⟪x, y⟫ = ‖x‖ * ‖y‖ * Real.Angle.cos (o.oangle x y)

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

⟪x, y⟫_ℝ = ‖x‖ * ‖y‖ * (o.oangle x y).cos


/-- The type `∀ (i : α), β i` can be split as a product by separating the indices in `α`
depending on whether they satisfy a predicate `p` or not. -/
@[simps]
def piEquivPiSubtypeProd {α : Type*} (p : α → Prop) (β : α → Type*) [DecidablePred p] :
    (∀ i : α, β i) ≃ (∀ i : { x // p x }, β i) × ∀ i : { x // ¬p x }, β i

(Equiv.piEquivPiSubtypeProd p β).symm f x = if h : p x then f.1 ⟨x, h⟩ else f.2 ⟨x, h⟩


theorem index_of_argmin :
    ∀ {l : List α} {m : α}, m ∈ argmin f l → ∀ {a}, a ∈ l → f a ≤ f m → l.indexOf m ≤ l.indexOf a

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

m ∈ List.argmin f l → ∀ {a : α}, a ∈ l → f a ≤ f m → List.indexOf m l ≤ List.indexOf a l


theorem toList_injective (a : V) : ∀ b, Injective (toList : Path a b → List V)

{V : Type u}
[Quiver V]
[∀ (a b : V), Subsingleton (a ⟶ b)]
(a b : V)


theorem piecewise_singleton (x : α) [∀ y, Decidable (y ∈ ({x} : Set α))] [DecidableEq α]
    (f g : α → β) : piecewise {x} f g = Function.update g x (f x)

{α : Type u_1}
{β : Type u_2}
(x : α)
[(y : α) → Decidable (y ∈ {x})]
[DecidableEq α]
(f g : α → β)

{x}.piecewise f g = Function.update g x (f x)


theorem norm_def (n : ℤ√d) : n.norm = n.re * n.re - d * n.im * n.im


/-- Note that this goal could also be stated `(Disjoint on f) a b` -/
theorem Disjoint.map_orderIso [SemilatticeInf α] [OrderBot α] [SemilatticeInf β] [OrderBot β]
    {a b : α} (f : α ≃o β) (ha : Disjoint a b) : Disjoint (f a) (f b)

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[OrderBot α]
[SemilatticeInf β]
[OrderBot β]
{a b : α}
(f : α ≃o β)
(ha : Disjoint a b)


theorem τ_apply_infinity : τ ∞ = fromCoset ⟨f.range, 1, one_leftCoset _⟩

(Grp.SurjectiveOfEpiAuxs.tau f) Grp.SurjectiveOfEpiAuxs.XWithInfinity.infinity =
  Grp.SurjectiveOfEpiAuxs.XWithInfinity.fromCoset ⟨↑(MonoidHom.range f), ⋯⟩


lemma nz_of_isRat {n : ℤ} {d : ℕ} [LinearOrderedRing A] :
    (NormNum.IsRat e n d) → (decide (n < 0)) → ((e : A) ≠ 0)

{A : Type u_1}
{e : A}
{n : ℤ}
{d : ℕ}
[LinearOrderedRing A]

Mathlib.Meta.NormNum.IsRat e n d → decide (n < 0) = true → e ≠ 0


theorem le_of_eq_or_lt {a b : α} (h : a = b ∨ a < b) : a ≤ b

{α : Type u}
[Preorder α]
{a b : α}
(h : a = b ∨ a < b)


@[simp]
theorem top_sub_one : (⊤ : ℕ∞) - 1 = ⊤


lemma sdiff_mem_diffs : a ∈ s → b ∈ t → a \ b ∈ s \\ t

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


theorem toFinset_surj_on : Set.SurjOn toFinset { l : List α | l.Nodup } Set.univ

Set.SurjOn List.toFinset {l | l.Nodup} Set.univ


@[simp] lemma _root_.finCongr_apply_coe (h : m = n) (k : Fin m) : (finCongr h k : ℕ) = k


@[simp, reassoc]
theorem colimitUncurryIsoColimitCompColim_ι_ι_inv {j} {k} :
    colimit.ι (F.obj j) k ≫ colimit.ι (F ⋙ colim) j ≫ (colimitUncurryIsoColimitCompColim F).inv =
      colimit.ι (uncurry.obj F) (j, k)

[CategoryTheory.Limits.HasColimit (F ⋙ CategoryTheory.Limits.colim)]

CategoryTheory.Limits.colimit.ι (F.obj j) k ≫
    CategoryTheory.Limits.colimit.ι (F ⋙ CategoryTheory.Limits.colim) j ≫
      (CategoryTheory.Limits.colimitUncurryIsoColimitCompColim F).inv =
  CategoryTheory.Limits.colimit.ι (CategoryTheory.uncurry.obj F) (j, k)


theorem le_degree (s : σ) (f : σ →₀ ℕ) : f s ≤ degree f


@[simp]
theorem constantCoeff_X (i : σ) : constantCoeff (X i : MvPolynomial σ R) = 0

(R : Type u)
{σ : Type u_1}
[CommSemiring R]
(i : σ)

MvPolynomial.constantCoeff (MvPolynomial.X i) = 0


/--
In a monoidal category, we can take the tensor product of objects, `X ⊗ Y` and of morphisms `f ⊗ g`.
Tensor product does not need to be strictly associative on objects, but there is a
specified associator, `α_ X Y Z : (X ⊗ Y) ⊗ Z ≅ X ⊗ (Y ⊗ Z)`. There is a tensor unit `𝟙_ C`,
with specified left and right unitor isomorphisms `λ_ X : 𝟙_ C ⊗ X ≅ X` and `ρ_ X : X ⊗ 𝟙_ C ≅ X`.
These associators and unitors satisfy the pentagon and triangle equations.

See <https://stacks.math.columbia.edu/tag/0FFK>.
-/
-- Porting note: The Mathport did not translate the temporary notation
class MonoidalCategory (C : Type u) [𝒞 : Category.{v} C] extends MonoidalCategoryStruct C where
  tensorHom_def {X₁ Y₁ X₂ Y₂ : C} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) :
    f ⊗ g = (f ▷ X₂) ≫ (Y₁ ◁ g) := by
      aesop_cat
  /-- Tensor product of identity maps is the identity: `(𝟙 X₁ ⊗ 𝟙 X₂) = 𝟙 (X₁ ⊗ X₂)` -/
  tensor_id : ∀ X₁ X₂ : C, 𝟙 X₁ ⊗ 𝟙 X₂ = 𝟙 (X₁ ⊗ X₂) := by aesop_cat
  /--
  Composition of tensor products is tensor product of compositions:
  `(f₁ ⊗ g₁) ∘ (f₂ ⊗ g₂) = (f₁ ∘ f₂) ⊗ (g₁ ⊗ g₂)`
  -/
  tensor_comp :
    ∀ {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁) (g₂ : Y₂ ⟶ Z₂),
      (f₁ ≫ g₁) ⊗ (f₂ ≫ g₂) = (f₁ ⊗ f₂) ≫ (g₁ ⊗ g₂) := by
    aesop_cat
  whiskerLeft_id : ∀ (X Y : C), X ◁ 𝟙 Y = 𝟙 (X ⊗ Y) := by
    aesop_cat
  id_whiskerRight : ∀ (X Y : C), 𝟙 X ▷ Y = 𝟙 (X ⊗ Y) := by
    aesop_cat
  /-- Naturality of the associator isomorphism: `(f₁ ⊗ f₂) ⊗ f₃ ≃ f₁ ⊗ (f₂ ⊗ f₃)` -/
  associator_naturality :
    ∀ {X₁ X₂ X₃ Y₁ Y₂ Y₃ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (f₃ : X₃ ⟶ Y₃),
      ((f₁ ⊗ f₂) ⊗ f₃) ≫ (α_ Y₁ Y₂ Y₃).hom = (α_ X₁ X₂ X₃).hom ≫ (f₁ ⊗ (f₂ ⊗ f₃)) := by
    aesop_cat
  /--
  Naturality of the left unitor, commutativity of `𝟙_ C ⊗ X ⟶ 𝟙_ C ⊗ Y ⟶ Y` and `𝟙_ C ⊗ X ⟶ X ⟶ Y`
  -/
  leftUnitor_naturality :
    ∀ {X Y : C} (f : X ⟶ Y), 𝟙_ _ ◁ f ≫ (λ_ Y).hom = (λ_ X).hom ≫ f := by
    aesop_cat
  /--
  Naturality of the right unitor: commutativity of `X ⊗ 𝟙_ C ⟶ Y ⊗ 𝟙_ C ⟶ Y` and `X ⊗ 𝟙_ C ⟶ X ⟶ Y`
  -/
  rightUnitor_naturality :
    ∀ {X Y : C} (f : X ⟶ Y), f ▷ 𝟙_ _ ≫ (ρ_ Y).hom = (ρ_ X).hom ≫ f := by
    aesop_cat
  /--
  The pentagon identity relating the isomorphism between `X ⊗ (Y ⊗ (Z ⊗ W))` and `((X ⊗ Y) ⊗ Z) ⊗ W`
  -/
  pentagon :
    ∀ W X Y Z : C,
      (α_ W X Y).hom ▷ Z ≫ (α_ W (X ⊗ Y) Z).hom ≫ W ◁ (α_ X Y Z).hom =
        (α_ (W ⊗ X) Y Z).hom ≫ (α_ W X (Y ⊗ Z)).hom := by
    aesop_cat
  /--
  The identity relating the isomorphisms between `X ⊗ (𝟙_ C ⊗ Y)`, `(X ⊗ 𝟙_ C) ⊗ Y` and `X ⊗ Y`
  -/
  triangle :
    ∀ X Y : C, (α_ X (𝟙_ _) Y).hom ≫ X ◁ (λ_ Y).hom = (ρ_ X).hom ▷ Y := by
    aesop_cat

[self : CategoryTheory.MonoidalCategory C]

CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id X₁) (CategoryTheory.CategoryStruct.id X₂) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategory.tensorObj X₁ X₂)


theorem comp_X_add_C_ne_zero_iff {p : R[X]} (t : R) :
    p.comp (X + C t) ≠ 0 ↔ p ≠ 0

{R : Type u}
[CommRing R]
{p : R[X]}
(t : R)

p.comp (Polynomial.X + Polynomial.C t) ≠ 0 ↔ p ≠ 0


theorem smoothOn_pi_space :
    SmoothOn I 𝓘(𝕜, ∀ i, Fi i) φ s ↔ ∀ i, SmoothOn I 𝓘(𝕜, Fi i) (fun x => φ x i) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{s : Set M}
{ι : Type u_21}
[Fintype ι]
{Fi : ι → Type u_22}
[(i : ι) → NormedAddCommGroup (Fi i)]
[(i : ι) → NormedSpace 𝕜 (Fi i)]
{φ : M → (i : ι) → Fi i}

SmoothOn I 𝓘(𝕜, (i : ι) → Fi i) φ s ↔ ∀ (i : ι), SmoothOn I 𝓘(𝕜, Fi i) (fun x => φ x i) s


@[simp]
theorem self_trans_symm (e : α ≃ᵐ β) : e.trans e.symm = refl α

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


@[simp]
theorem charmatrix_apply_ne (h : i ≠ j) : charmatrix M i j = -C (M i j)

{R : Type u_1}
[CommRing R]
{n : Type u_4}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)
(i j : n)
(h : i ≠ j)

M.charmatrix i j = -Polynomial.C (M i j)


/-- `castSucc` commutes with `predAbove`. -/
@[simp] lemma castSucc_predAbove_castSucc {n : ℕ} (a : Fin n) (b : Fin (n + 1)) :
    a.castSucc.predAbove b.castSucc = (a.predAbove b).castSucc


/-- A category "has enough injectives" if every object has an injective presentation,
i.e. if for every object `X` there is an injective object `J` and a monomorphism `X ↪ J`. -/
class EnoughInjectives : Prop where
  presentation : ∀ X : C, Nonempty (InjectivePresentation X)

[self : CategoryTheory.EnoughInjectives C]


@[reassoc]
lemma mapComp_assoc_right {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) :
    F.map f ◁ F.mapComp g h ≫ F.mapComp f (g ≫ h) =
      (α_ (F.map f) (F.map g) (F.map h)).inv ≫ F.mapComp f g ▷ F.map h ≫
        F.mapComp (f ≫ g) h ≫ F.map₂ (α_ f g h).hom

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.LaxFunctor B C)
{a b c d : B}
(f : a ⟶ b)
(g : b ⟶ c)
(h : c ⟶ d)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (F.map f) (F.mapComp g h))
    (F.mapComp f (CategoryTheory.CategoryStruct.comp g h)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator (F.map f) (F.map g) (F.map h)).inv
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (F.mapComp f g) (F.map h))
      (CategoryTheory.CategoryStruct.comp (F.mapComp (CategoryTheory.CategoryStruct.comp f g) h)
        (F.map₂ (CategoryTheory.Bicategory.associator f g h).hom)))


protected lemma Even.zpow_pos (hn : Even n) (ha : a ≠ 0) : 0 < a ^ n

{α : Type u_1}
[LinearOrderedField α]
{a : α}
{n : ℤ}
(hn : Even n)
(ha : a ≠ 0)


theorem algHom_eq (f : B →ₐ[A] B') (hf : Function.Injective f) (x : B) :
    minpoly A (f x) = minpoly A x

{A : Type u_1}
{B : Type u_2}
{B' : Type u_3}
[CommRing A]
[Ring B]
[Ring B']
[Algebra A B]
[Algebra A B']
(f : B →ₐ[A] B')
(hf : Function.Injective ⇑f)
(x : B)


/-- Build an isomorphism in the category `Grp` from a `MulEquiv` between `Group`s. -/
@[to_additive (attr := simps)]
def MulEquiv.toGrpIso {X Y : Grp} (e : X ≃* Y) : X ≅ Y


@[to_additive (attr := simp)]
theorem prod_sdiff_eq_div (h : s₁ ⊆ s₂) :
    ∏ x ∈ s₂ \ s₁, f x = (∏ x ∈ s₂, f x) / ∏ x ∈ s₁, f x

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[AddCommGroup β]
[DecidableEq α]
(h : s₁ ⊆ s₂)

∑ x ∈ s₂ \ s₁, f x = ∑ x ∈ s₂, f x - ∑ x ∈ s₁, f x


lemma biUnion_mem {ι : Type*} (hC : IsSetRing C) {s : ι → Set α}
    (S : Finset ι) (hs : ∀ n ∈ S, s n ∈ C) :
    ⋃ i ∈ S, s i ∈ C

{α : Type u_1}
{C : Set (Set α)}
{ι : Type u_2}
(hC : MeasureTheory.IsSetRing C)
{s : ι → Set α}
(S : Finset ι)
(hs : ∀ n ∈ S, s n ∈ C)


protected theorem le_max_right (a b : Nat) : b ≤ max a b


theorem eLpNorm_comp_measurePreserving {ν : MeasureTheory.Measure β} (hg : AEStronglyMeasurable g ν)
    (hf : MeasurePreserving f μ ν) : eLpNorm (g ∘ f) p μ = eLpNorm g p ν

(hg : MeasureTheory.AEStronglyMeasurable g ν)

(hf : MeasureTheory.MeasurePreserving f μ ν)

MeasureTheory.eLpNorm (g ∘ f) p μ = MeasureTheory.eLpNorm g p ν


lemma IsIntegralCurveAt.comp_mul_ne_zero (hγ : IsIntegralCurveAt γ v t₀) {a : ℝ} (ha : a ≠ 0) :
    IsIntegralCurveAt (γ ∘ (· * a)) (a • v) (t₀ / a)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type u_2}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type u_3}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{γ : ℝ → M}
{v : (x : M) → TangentSpace I x}
{t₀ : ℝ}
(hγ : IsIntegralCurveAt γ v t₀)
{a : ℝ}
(ha : a ≠ 0)

IsIntegralCurveAt (γ ∘ fun x => x * a) (a • v) (t₀ / a)


theorem coeAddMonoidHom_eq_dfinsupp_sum [DecidableEq ι]
    {M S : Type*} [DecidableEq M] [AddCommMonoid M]
    [SetLike S M] [AddSubmonoidClass S M] (A : ι → S) (x : DirectSum ι fun i => A i) :
    DirectSum.coeAddMonoidHom A x = DFinsupp.sum x fun i => (fun x : A i => ↑x)

{ι : Type v}
[DecidableEq ι]
{M : Type u_1}
{S : Type u_2}
[DecidableEq M]
[AddCommMonoid M]
[SetLike S M]
[AddSubmonoidClass S M]
(A : ι → S)
(x : DirectSum ι fun i => ↥(A i))

(DirectSum.coeAddMonoidHom A) x = DFinsupp.sum x fun i x => ↑x


@[simp]
theorem sameRay_smul_right_iff {v : M} {r : R} : SameRay R v (r • v) ↔ 0 ≤ r ∨ v = 0

{R : Type u_1}
[LinearOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
{v : M}
{r : R}


/-- The 'identity' equivalence between `Fin m` and `Fin n` when `m = n`. -/
@[simps]
def _root_.finCongr (eq : n = m) : Fin n ≃ Fin m


lemma antitone_smul_left (ha : a ≤ 0) : Antitone ((a • ·) : β → β)

{α : Type u_1}
{β : Type u_2}
{a : α}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulMono α β]
(ha : a ≤ 0)


@[simp]
theorem cons_inj_right (a : α) (s s' : Sym α n) : a ::ₛ s = a ::ₛ s' ↔ s = s'

{α : Type u_1}
{n : ℕ}
(a : α)
(s s' : Sym α n)


theorem StrictConvexOn.secant_strict_mono_aux2 (hf : StrictConvexOn 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s)
    (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f y - f x) / (y - x) < (f z - f x) / (z - x)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}
(hf : StrictConvexOn 𝕜 s f)
{x y z : 𝕜}
(hx : x ∈ s)
(hz : z ∈ s)
(hxy : x < y)
(hyz : y < z)


theorem lintegral_trim_ae {μ : Measure α} (hm : m ≤ m0) {f : α → ℝ≥0∞}
    (hf : AEMeasurable f (μ.trim hm)) : ∫⁻ a, f a ∂μ.trim hm = ∫⁻ a, f a ∂μ

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(hm : m ≤ m0)
{f : α → ℝ≥0∞}
(hf : AEMeasurable f (μ.trim hm))

∫⁻ (a : α), f a ∂μ.trim hm = ∫⁻ (a : α), f a ∂μ


/-- A special case of `to_span_singleton_smul'` for when `R` is commutative. -/
theorem toSpanSingleton_smul (R) {M₁} [CommSemiring R] [AddCommMonoid M₁] [Module R M₁]
    [TopologicalSpace R] [TopologicalSpace M₁] [ContinuousSMul R M₁] (c : R) (x : M₁) :
    toSpanSingleton R (c • x) = c • toSpanSingleton R x

(R : Type u_10)
{M₁ : Type u_11}
[CommSemiring R]
[AddCommMonoid M₁]
[Module R M₁]
[TopologicalSpace R]
[TopologicalSpace M₁]
[ContinuousSMul R M₁]
(c : R)
(x : M₁)

ContinuousLinearMap.toSpanSingleton R (c • x) = c • ContinuousLinearMap.toSpanSingleton R x


@[simp] theorem mem_toList : x ∈ s.toList ↔ x ∈ s

{α : Type u_1}
{r : Rel α α}
{s : RelSeries r}
{x : α}


@[simp] lemma conj_trivial [TrivialStar R] (a : R) : conj a = a

{R : Type u}
[CommSemiring R]
[StarRing R]
[TrivialStar R]
(a : R)


theorem eventually_measure_le_scaling_constant_mul' (K : ℝ) (hK : 0 < K) :
    ∀ᶠ r in 𝓝[>] 0, ∀ x,
      μ (closedBall x r) ≤ scalingConstantOf μ K⁻¹ * μ (closedBall x (K * r))

{α : Type u_1}
[MetricSpace α]
[MeasurableSpace α]
(μ : MeasureTheory.Measure α)
[IsUnifLocDoublingMeasure μ]
(K : ℝ)
(hK : 0 < K)

∀ᶠ (r : ℝ) in 𝓝[>] 0,
  ∀ (x : α),
    μ (Metric.closedBall x r) ≤ ↑(IsUnifLocDoublingMeasure.scalingConstantOf μ K⁻¹) * μ (Metric.closedBall x (K * r))


theorem sups_right_comm : s ⊻ t ⊻ u = s ⊻ u ⊻ t

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


/-- The embeddings of different blocks of a composition are disjoint. -/
theorem disjoint_range {i₁ i₂ : Fin c.length} (h : i₁ ≠ i₂) :
    Disjoint (Set.range (c.embedding i₁)) (Set.range (c.embedding i₂))

{n : ℕ}
(c : Composition n)
{i₁ i₂ : Fin c.length}
(h : i₁ ≠ i₂)

Disjoint (Set.range ⇑(c.embedding i₁)) (Set.range ⇑(c.embedding i₂))


@[simp] lemma restrictSubtype_ground_base_iff {B : Set M.E} :
    (M.restrictSubtype M.E).Base B ↔ M.Base B

{α : Type u_1}
{M : Matroid α}
{B : Set ↑M.E}

(M.restrictSubtype M.E).Base B ↔ M.Base ↑B


/-- The tensor of a family of linear maps from `Eᵢ` to `E'ᵢ`, as a continuous multilinear map of
the family.
-/
@[simps!]
noncomputable def mapLMultilinear : ContinuousMultilinearMap 𝕜 (fun (i : ι) ↦ E i →L[𝕜] E' i)
    ((⨂[𝕜] i, E i) →L[𝕜] ⨂[𝕜] i, E' i)

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

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

∀ (a : ⨂[𝕜] (i : ι), E i),
  ((PiTensorProduct.mapLMultilinear 𝕜 E E') f) a =
    (PiTensorProduct.liftAux ((PiTensorProduct.tprodL 𝕜).compContinuousLinearMap f).toMultilinearMap) a


theorem injective_pow_p {x y : R} (h : x ^ p = y ^ p) : x = y

(R : Type u_1)
(p : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]
{x y : R}
(h : x ^ p = y ^ p)


theorem epsilon_spec {α : Sort u} {p : α → Prop} (hex : ∃ y, p y) : p (@epsilon α (nonempty_of_exists hex) p)


/-- The canonical map `Φ.op.LeftResolution X₂ → Φ.RightResolution X₂`. -/
@[simps]
def LeftResolution.unop {X₂ : C₂ᵒᵖ} (L : Φ.op.LeftResolution X₂) :
    Φ.RightResolution X₂.unop

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}


/-- `M` acts pretransitively on `α` if for any `x y` there is `g` such that `g • x = y`.
  A transitive action should furthermore have `α` nonempty. -/
@[to_additive]
class MulAction.IsPretransitive (M α : Type*) [SMul M α] : Prop where
  /-- There is `g` such that `g • x = y`. -/
  exists_smul_eq : ∀ x y : α, ∃ g : M, g • x = y

{M : Type u_11}
{α : Type u_12}
[SMul M α]
[self : MulAction.IsPretransitive M α]
(x y : α)


theorem forall_sups_iff {p : α → Prop} : (∀ c ∈ s ⊻ t, p c) ↔ ∀ a ∈ s, ∀ b ∈ t, p (a ⊔ b)

{α : Type u_2}
[DecidableEq α]
[SemilatticeSup α]
{s t : Finset α}
{p : α → Prop}


/-- A dilation from an emetric space is injective -/
protected theorem injective {α : Type*} [EMetricSpace α] [FunLike F α β]  [DilationClass F α β]
    (f : F) :
    Injective f

{β : Type u_2}
{F : Type u_4}
[PseudoEMetricSpace β]
{α : Type u_6}
[EMetricSpace α]
[FunLike F α β]
[DilationClass F α β]
(f : F)


@[to_additive (attr := simp)] lemma one_ne_bot : (1 : WithBot α) ≠ ⊥


theorem append_inj_right' (h : s₁ ++ t₁ = s₂ ++ t₂) (hl : length t₁ = length t₂) : t₁ = t₂

∀ {α : Type u_1} {s₁ t₁ s₂ t₂ : List α}, s₁ ++ t₁ = s₂ ++ t₂ → t₁.length = t₂.length → t₁ = t₂


/-- Two equal natural transformations `L₁ ⟶ L₂` yield naturally isomorphic functors
    `Comma L₁ R ⥤ Comma L₂ R`. -/
@[simps!]
def mapLeftEq (l l' : L₁ ⟶ L₂) (h : l = l') : mapLeft R l ≅ mapLeft R l'

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(R : CategoryTheory.Functor B T)
{L₁ L₂ : CategoryTheory.Functor A T}
(l l' : L₁ ⟶ L₂)
(h : l = l')
(X : CategoryTheory.Comma L₂ R)

((CategoryTheory.Comma.mapLeftEq R l l' h).hom.app X).left = CategoryTheory.CategoryStruct.id X.left


lemma hasFDerivAt_fourierChar_neg_bilinear_left (v : V) (w : W) :
    HasFDerivAt (fun v ↦ (𝐞 (-L v w) : ℂ))
      ((-2 * π * I * 𝐞 (-L v w)) • (ofRealCLM ∘L (L.flip w))) v

{V : Type u_1}
{W : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[NormedAddCommGroup W]
[NormedSpace ℝ W]
(L : V →L[ℝ] W →L[ℝ] ℝ)
(v : V)
(w : W)

HasFDerivAt (fun v => ↑(𝐞 (-(L v) w))) ((-2 * ↑π * Complex.I * ↑(𝐞 (-(L v) w))) • Complex.ofRealCLM.comp (L.flip w)) v


theorem sum_mem_biSup {ι : Type*} {s : Finset ι} {f : ι → M} {p : ι → Submodule R M}
    (h : ∀ i ∈ s, f i ∈ p i) : (∑ i ∈ s, f i) ∈ ⨆ i ∈ s, p i

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{ι : Type u_4}
{s : Finset ι}
{f : ι → M}
{p : ι → Submodule R M}
(h : ∀ i ∈ s, f i ∈ p i)


@[to_additive]
theorem eq_bot_of_card_le (h : card S ≤ 1) : S = ⊥

{M : Type u_1}
[Monoid M]
{S : Submonoid M}
[Fintype ↥S]
(h : Fintype.card ↥S ≤ 1)


/-- `preimage_smul_setₛₗ` in the context of a `MonoidHom` -/
theorem MonoidHom.preimage_smul_setₛₗ (σ : R →* S)
    {F : Type*} [FunLike F M N] [MulActionSemiHomClass F ⇑σ M N] (h : F)
    {c : R} (hc : IsUnit c) (t : Set N) :
    h ⁻¹' (σ c • t) = c • h ⁻¹' t

{R : Type u_1}
{S : Type u_2}
(M : Type u_3)
(N : Type u_6)
[Monoid R]
[Monoid S]
[MulAction R M]
[MulAction S N]
(σ : R →* S)
{F : Type u_8}
[FunLike F M N]
[MulActionSemiHomClass F (⇑σ) M N]
(h : F)
{c : R}
(hc : IsUnit c)
(t : Set N)


theorem right_le_pair (a b : ℕ) : b ≤ pair a b


theorem comp_surjective (f : α → β) (e : β ≃ γ) : Surjective (e ∘ f) ↔ Surjective f

{α : Sort u}
{β : Sort v}
{γ : Sort w}
(f : α → β)
(e : β ≃ γ)

Function.Surjective (⇑e ∘ f) ↔ Function.Surjective f


@[reassoc (attr := simp)]
lemma pOpcyclesIso_inv_hom_id :
    (K.pOpcyclesIso i j hi h).inv ≫ K.pOpcycles j = 𝟙 _

(K.pOpcyclesIso i j hi h).inv ≫ K.pOpcycles j = 𝟙 (K.opcycles j)


theorem restrict_iUnion_apply_ae [Countable ι] {s : ι → Set α} (hd : Pairwise (AEDisjoint μ on s))
    (hm : ∀ i, NullMeasurableSet (s i) μ) {t : Set α} (ht : MeasurableSet t) :
    μ.restrict (⋃ i, s i) t = ∑' i, μ.restrict (s i) t

(hd : Pairwise (MeasureTheory.AEDisjoint μ on s))

(hm : ∀ (i : ι), MeasureTheory.NullMeasurableSet (s i) μ)

(μ.restrict (⋃ i, s i)) t = ∑' (i : ι), (μ.restrict (s i)) t


/-- `p ∧ q` occurs frequently along the product of two filters
iff both `p` and `q` occur frequently along the corresponding filters. -/
theorem frequently_prod_and {p : α → Prop} {q : β → Prop} :
    (∃ᶠ x in f ×ˢ g, p x.1 ∧ q x.2) ↔ (∃ᶠ a in f, p a) ∧ ∃ᶠ b in g, q b

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}
{p : α → Prop}
{q : β → Prop}

(∃ᶠ (x : α × β) in f ×ˢ g, p x.1 ∧ q x.2) ↔ (∃ᶠ (a : α) in f, p a) ∧ ∃ᶠ (b : β) in g, q b


/-- Ring homomorphisms preserve multiplication. -/
protected theorem map_mul (f : α →+* β) : ∀ a b, f (a * b) = f a * f b

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β} (f : α →+* β) (a b : α), f (a * b) = f a * f b


@[simp]
theorem Q_apply (r : ℝ) : Q r = -(r * r)


/-- If `τ` and `σ` are two stopping times with `σ ≤ τ` and `τ` is bounded, then the value of a
martingale `f` at `σ` is the conditional expectation of its value at `τ` with respect to the
σ-algebra generated by `σ`. -/
theorem stoppedValue_ae_eq_condexp_of_le [Countable ι] (h : Martingale f ℱ μ)
    (hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ) (hσ_le_τ : σ ≤ τ) (hτ_le : ∀ x, τ x ≤ n)
    [SigmaFinite (μ.trim hσ.measurableSpace_le)] :
    stoppedValue f σ =ᵐ[μ] μ[stoppedValue f τ|hσ.measurableSpace]

{τ σ : Ω → ι}

MeasureTheory.stoppedValue f σ =ᵐ[μ] μ[MeasureTheory.stoppedValue f τ|hσ.measurableSpace]


@[to_additive]
theorem eq_of_eqOn_topM {f g : M →* N} (h : Set.EqOn f g (⊤ : Submonoid M)) : f = g

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{f g : M →+ N}
(h : Set.EqOn ⇑f ⇑g ↑⊤)


@[simp]
theorem mem_support_iff {f : α →₀ M} : ∀ {a : α}, a ∈ f.support ↔ f a ≠ 0

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


/-- If `H ≤ K`, then `G/H ≃ G/K × K/H` nonconstructively.
The constructive version is `quotientEquivProdOfLE'`. -/
@[to_additive (attr := simps!) "If `H ≤ K`, then `G/H ≃ G/K × K/H` nonconstructively. The
 constructive version is `quotientEquivProdOfLE'`."]
noncomputable def quotientEquivProdOfLE (h_le : s ≤ t) : α ⧸ s ≃ (α ⧸ t) × t ⧸ s.subgroupOf t

{α : Type u_1}
[AddGroup α]
{s t : AddSubgroup α}
(h_le : s ≤ t)
(a : α ⧸ s)

(AddSubgroup.quotientEquivSumOfLE h_le) a =
  (Quotient.map' id ⋯ a, Quotient.map' (fun g => ⟨-(Quotient.mk'' g).out' + g, ⋯⟩) ⋯ a)


@[trans]
nonrec theorem trans (H0 : Homotopic f g) (H1 : Homotopic g h) : Homotopic f h

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
{f g h : ↑(Ω^ N X x)}
(H0 : GenLoop.Homotopic f g)
(H1 : GenLoop.Homotopic g h)


/-- The canonical isomorphism of triangles
`binaryProductTriangle X₁ X₂ ≅ binaryBiproductTriangle X₁ X₂`. -/
@[simps!]
def binaryProductTriangleIsoBinaryBiproductTriangle
    (X₁ X₂ : C) [HasZeroMorphisms C] [HasBinaryBiproduct X₁ X₂] :
    binaryProductTriangle X₁ X₂ ≅ binaryBiproductTriangle X₁ X₂

(CategoryTheory.Pretriangulated.binaryProductTriangleIsoBinaryBiproductTriangle X₁ X₂).hom.hom₃ = 𝟙 X₂


@[simp]
theorem powHalf_zero : powHalf 0 = 1


private theorem list_reverse' :
    haveI := prim H
    Primrec (@List.reverse β)

(H : Nat.Primrec fun n => Encodable.encode (Encodable.decode n))


@[simp]
theorem mul_star_self_eq_zero_iff (x : E) : x * x⋆ = 0 ↔ x = 0

{E : Type u_2}
[NonUnitalNormedRing E]
[StarRing E]
[CstarRing E]
(x : E)


@[simp]
theorem definable_univ : A.Definable L (univ : Set (α → M))

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


theorem Filter.EventuallyEq.contDiffWithinAt_iff (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) :
    ContDiffWithinAt 𝕜 n f₁ s x ↔ ContDiffWithinAt 𝕜 n f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f f₁ : E → F}
{x : E}
{n : ℕ∞}
(h₁ : f₁ =ᶠ[𝓝[s] x] f)
(hx : f₁ x = f x)


theorem get!_nil [Inhabited α] (n : Nat) : [].get! n = (default : α)


/-- We can move `qrSign m n` from one side of an equality to the other when `m` and `n` are odd. -/
theorem eq_iff_eq {m n : ℕ} (hm : Odd m) (hn : Odd n) (x y : ℤ) :
    qrSign m n * x = y ↔ x = qrSign m n * y


theorem iInter_union_of_monotone {ι α} [Preorder ι] [IsDirected ι (swap (· ≤ ·))] {s t : ι → Set α}
    (hs : Monotone s) (ht : Monotone t) : ⋂ i, s i ∪ t i = (⋂ i, s i) ∪ ⋂ i, t i

[IsDirected ι (Function.swap fun x x_1 => x ≤ x_1)]


@[reassoc (attr := simp)]
theorem inr_inl_pushoutAssoc_hom [HasPushout (g₃ ≫ (pushout.inr _ _ : X₂ ⟶ Y₁)) g₄]
    [HasPushout g₁ (g₂ ≫ (pushout.inl _ _ : X₂ ⟶ Y₂))] :
    pushout.inr _ _ ≫ pushout.inl _ _ ≫ (pushoutAssoc g₁ g₂ g₃ g₄).hom =
      pushout.inl _ _ ≫ pushout.inr _ _

[CategoryTheory.Limits.HasPushout (g₃ ≫ CategoryTheory.Limits.pushout.inr g₁ g₂) g₄]

[CategoryTheory.Limits.HasPushout g₁ (g₂ ≫ CategoryTheory.Limits.pushout.inl g₃ g₄)]

CategoryTheory.Limits.pushout.inr g₁ g₂ ≫
    CategoryTheory.Limits.pushout.inl (g₃ ≫ CategoryTheory.Limits.pushout.inr g₁ g₂) g₄ ≫
      (CategoryTheory.Limits.pushoutAssoc g₁ g₂ g₃ g₄).hom =
  CategoryTheory.Limits.pushout.inl g₃ g₄ ≫
    CategoryTheory.Limits.pushout.inr g₁ (g₂ ≫ CategoryTheory.Limits.pushout.inl g₃ g₄)


theorem limLax_obj' (F : J ⥤ C) : limLax.obj F = lim.obj F

CategoryTheory.Limits.limLax.obj F = CategoryTheory.Limits.lim.obj F


theorem range_nonempty_iff_nonempty : (range f).Nonempty ↔ Nonempty ι

{α : Type u_1}
{ι : Sort u_4}
{f : ι → α}


theorem opNorm_smul_le (c : 𝕜') : ‖c • f‖ ≤ ‖c‖ * ‖f‖

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

‖c • f‖ ≤ ‖c‖ * ‖f‖


theorem algebraMap_leftInverse :
    Function.LeftInverse algebraMapInv (algebraMap R <| TensorAlgebra R M)

{R : Type u_1}
[CommSemiring R]
(M : Type u_2)
[AddCommMonoid M]
[Module R M]

Function.LeftInverse ⇑TensorAlgebra.algebraMapInv ⇑(algebraMap R (TensorAlgebra R M))


theorem isSymm_dualProd : (dualProd R M).IsSymm

(R : Type u_1)
(M : Type u_2)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]

LinearMap.IsSymm (LinearMap.dualProd R M)


@[simp]
theorem isIso_inv_app (α : F ⟶ G) {_ : IsIso α} (X) : (inv α).app X = inv (α.app X)

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

∀ {x : CategoryTheory.IsIso α} (X : C), (CategoryTheory.inv α).app X = CategoryTheory.inv (α.app X)


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

(f : α → β → γ)

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

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


@[simp, norm_cast]
theorem coe_prod (f₁ : A →A[R] B) (f₂ : A →A[R] C) :
    (f₁.prod f₂ : A →ₐ[R] B × C) = AlgHom.prod f₁ f₂

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
{B : Type u_3}
[Semiring B]
[TopologicalSpace B]
[Algebra R A]
[Algebra R B]
{C : Type u_4}
[Semiring C]
[Algebra R C]
[TopologicalSpace C]
(f₁ : A →A[R] B)
(f₂ : A →A[R] C)


theorem pred_le_pred_iff : pred a ≤ pred b ↔ a ≤ b

{α : Type u_1}
[Preorder α]
[PredOrder α]
{a b : α}
[NoMinOrder α]


@[simp]
theorem coe_add (f g : ModularForm Γ k) : ⇑(f + g) = f + g

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(f g : ModularForm Γ k)


@[simp]
theorem toEquiv_inj {e₁ e₂ : A ≃ₗc[R] B} : e₁.toEquiv = e₂.toEquiv ↔ e₁ = e₂

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


/-- The left homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def leftHomologyData [HasZeroObject C] (s : S.Splitting) :
    LeftHomologyData S

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
[CategoryTheory.Limits.HasZeroObject C]
(s : S.Splitting)


lemma StrictMono.not_bddBelow_range [NoMinOrder α] [PredOrder β] [IsPredArchimedean β]
    (hf : StrictMono f) : ¬ BddBelow (Set.range f)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Nonempty α]
[Preorder β]
{f : α → β}
[NoMinOrder α]
[PredOrder β]
[IsPredArchimedean β]
(hf : StrictMono f)


@[simp] theorem testBit_and (x y i : Nat) : (x &&& y).testBit i = (x.testBit i && y.testBit i)


theorem insert_entries_of_neg {a : α} {b : β a} {s : Finmap β} :
    a ∉ s → (insert a b s).entries = ⟨a, b⟩ ::ₘ s.entries

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{b : β a}
{s : Finmap β}

a ∉ s → (Finmap.insert a b s).entries = ⟨a, b⟩ ::ₘ s.entries


@[to_additive (attr := simp 1001)]
-- Porting note: increase priority so that the left-hand side doesn't simplify
theorem preimage_mul_ball (a b : E) (r : ℝ) : (b * ·) ⁻¹' ball a r = ball (a / b) r

{E : Type u_6}
[SeminormedAddCommGroup E]
(a b : E)
(r : ℝ)

(fun x => b + x) ⁻¹' Metric.ball a r = Metric.ball (a - b) r


/--
Ring equivalence are isomorphisms in category of commutative semirings
-/
@[simps]
def _root_.RingEquiv.toCommSemiRingCatIso {X Y : Type u} [CommSemiring X] [CommSemiring Y]
    (e : X ≃+* Y) : CommSemiRingCat.of X ≅ CommSemiRingCat.of Y


@[simp, norm_cast]
theorem coe_coe : ⇑(e : A →ₗc[R] B) = e

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


@[simp]
theorem filter_single_of_neg {a : α} {b : M} (h : ¬p a) : (single a b).filter p = 0

{α : Type u_1}
{M : Type u_5}
[Zero M]
(p : α → Prop)
[DecidablePred p]
{a : α}
{b : M}
(h : ¬p a)

Finsupp.filter p (Finsupp.single a b) = 0


/-- A version of `Convex.sum_mem` for `finsum`s. If `s` is a convex set, `w : ι → R` is a family of
nonnegative weights with sum one and `z : ι → E` is a family of elements of a module over `R` such
that `z i ∈ s` whenever `w i ≠ 0`, then the sum `∑ᶠ i, w i • z i` belongs to `s`. See also
`PartitionOfUnity.finsum_smul_mem_convex`. -/
theorem Convex.finsum_mem {ι : Sort*} {w : ι → R} {z : ι → E} {s : Set E} (hs : Convex R s)
    (h₀ : ∀ i, 0 ≤ w i) (h₁ : ∑ᶠ i, w i = 1) (hz : ∀ i, w i ≠ 0 → z i ∈ s) :
    (∑ᶠ i, w i • z i) ∈ s

{R : Type u_1}
{E : Type u_3}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
{ι : Sort u_8}
{w : ι → R}
{z : ι → E}
{s : Set E}
(hs : Convex R s)
(h₀ : ∀ (i : ι), 0 ≤ w i)
(h₁ : ∑ᶠ (i : ι), w i = 1)
(hz : ∀ (i : ι), w i ≠ 0 → z i ∈ s)


@[simp, norm_cast]
theorem coe_range (n : ℕ) : (range n : Set ℕ) = Set.Iio n


lemma lt_mul_div_succ (a : ℕ) (hb : 0 < b) : a < b * (a / b + 1)


@[simp]
theorem liftIsometry_tprodL :
    liftIsometry 𝕜 E _ (tprodL 𝕜) = ContinuousLinearMap.id 𝕜 (⨂[𝕜] i, E i)

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

(PiTensorProduct.liftIsometry 𝕜 E (⨂[𝕜] (i : ι), E i)) (PiTensorProduct.tprodL 𝕜) =
  ContinuousLinearMap.id 𝕜 (⨂[𝕜] (i : ι), E i)


theorem upperCrossingTime_succ_eq (ω : Ω) : upperCrossingTime a b f N (n + 1) ω =
    hitting f (Set.Ici b) (lowerCrossingTime a b f N n ω) N ω

{Ω : Type u_1}
{ι : Type u_2}
[Preorder ι]
[OrderBot ι]
[InfSet ι]
{a b : ℝ}
{f : ι → Ω → ℝ}
{N : ι}
{n : ℕ}
(ω : Ω)

MeasureTheory.upperCrossingTime a b f N (n + 1) ω =
  MeasureTheory.hitting f (Set.Ici b) (MeasureTheory.lowerCrossingTime a b f N n ω) N ω


@[simp]
theorem assoc_symm_tmul (a : A) (b : B) (c : C) :
    (Algebra.TensorProduct.assoc R A B C).symm (a ⊗ₜ (b ⊗ₜ c)) = (a ⊗ₜ b) ⊗ₜ c

(R : Type uR)
{A : Type uA}
{B : Type uB}
{C : Type uC}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[Semiring C]
[Algebra R C]
(a : A)
(b : B)
(c : C)

(Algebra.TensorProduct.assoc R A B C).symm (a ⊗ₜ[R] b ⊗ₜ[R] c) = (a ⊗ₜ[R] b) ⊗ₜ[R] c


lemma Iso.isIso_hom (e : X ≅ Y) : IsIso e.hom

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


theorem image_subtype_val_Iio_subset (a : {x // p x}) :
    Subtype.val '' Iio a ⊆ Iio a.val

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


theorem isRoot_of_aeval_algebraMap_eq_zero [Algebra R S] {p : R[X]}
    (inj : Function.Injective (algebraMap R S)) {r : R} (hr : aeval (algebraMap R S r) p = 0) :
    p.IsRoot r

(inj : Function.Injective ⇑(algebraMap R S))

(hr : (Polynomial.aeval ((algebraMap R S) r)) p = 0)


theorem mem_pointwise_smul_iff_inv_smul_mem {a : α} {S : AddSubgroup A} {x : A} :
    x ∈ a • S ↔ a⁻¹ • x ∈ S

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[Group α]
[DistribMulAction α A]
{a : α}
{S : AddSubgroup A}
{x : A}

x ∈ a • S ↔ a⁻¹ • x ∈ S


theorem map_csInf (hf : RightOrdContinuous f) {s : Set α} (sne : s.Nonempty) (sbdd : BddBelow s) :
    f (sInf s) = sInf (f '' s)

{α : Type u}
{β : Type v}
[ConditionallyCompleteLattice α]
[ConditionallyCompleteLattice β]
{f : α → β}
(hf : RightOrdContinuous f)
{s : Set α}
(sne : s.Nonempty)
(sbdd : BddBelow s)


@[simp]
theorem toBlock_one_self (p : m → Prop) : Matrix.toBlock (1 : Matrix m m α) p p = 1

{m : Type u_2}
{α : Type u_12}
[DecidableEq m]
[Zero α]
[One α]
(p : m → Prop)


@[congr]
theorem map_congr {f g : α → β} {s : Sym2 α} (h : ∀ x ∈ s, f x = g x) : map f s = map g s

{α : Type u_1}
{β : Type u_2}
{f g : α → β}
{s : Sym2 α}
(h : ∀ x ∈ s, f x = g x)


lemma heq_iff_coe_heq {α β : Sort _} {p : α → Prop} {q : β → Prop} {a : {x // p x}}
    {b : {y // q y}} (h : α = β) (h' : HEq p q) : HEq a b ↔ HEq (a : α) (b : β)

{α β : Sort u_4}
{p : α → Prop}
{q : β → Prop}
{a : { x // p x }}
{b : { y // q y }}
(h : α = β)
(h' : HEq p q)


@[to_additive (attr := measurability)]
theorem _root_.Multiset.aestronglyMeasurable_prod' (l : Multiset (α → M))
    (hl : ∀ f ∈ l, AEStronglyMeasurable f μ) : AEStronglyMeasurable l.prod μ

(hl : ∀ f ∈ l, MeasureTheory.AEStronglyMeasurable f μ)


/-- If `p` and `q` are distinct primes that are both congruent to `3` mod `4`, then `q` is
a square mod `p` iff `p` is a nonsquare mod `q`. -/
theorem exists_sq_eq_prime_iff_of_mod_four_eq_three (hp3 : p % 4 = 3) (hq3 : q % 4 = 3)
    (hpq : p ≠ q) : IsSquare (q : ZMod p) ↔ ¬IsSquare (p : ZMod q)

{p q : ℕ}
[Fact (Nat.Prime p)]
[Fact (Nat.Prime q)]
(hp3 : p % 4 = 3)
(hq3 : q % 4 = 3)
(hpq : p ≠ q)


{α : Type u_2}
[LinearOrder α]
(s : Finset α)
(H : s.Nonempty)


/-- `-1 : ZMod n` lifts to `n - 1 : R`. This avoids the characteristic assumption in `cast_neg`. -/
theorem cast_neg_one {R : Type*} [Ring R] (n : ℕ) : cast (-1 : ZMod n) = (n - 1 : R)


@[elab_as_elim]
theorem induction_on₂ {p : Completion α → Completion β → Prop} (a : Completion α) (b : Completion β)
    (hp : IsClosed { x : Completion α × Completion β | p x.1 x.2 })
    (ih : ∀ (a : α) (b : β), p a b) : p a b

{p : UniformSpace.Completion α → UniformSpace.Completion β → Prop}

(ih : ∀ (a : α) (b : β), p (↑α a) (↑β b))


/-- Restatement of `single_mul_single`, which will simplify expressions in `simp` normal form,
  when associativity may otherwise need to be carefully applied. -/
@[simp]
theorem single_mul_single_right [Fintype n] [Fintype k] [DecidableEq n] [DecidableEq k]
    [DecidableEq m] [Semiring α] (a : m) (b : n) (c : k) (M : Matrix k l α) :
    (single a b).toMatrix * ((single b c).toMatrix * M) = (single a c).toMatrix * M

{k : Type u_1}
{l : Type u_2}
{m : Type u_3}
{n : Type u_4}
{α : Type v}
[Fintype n]
[Fintype k]
[DecidableEq n]
[DecidableEq k]
[DecidableEq m]
[Semiring α]
(a : m)
(b : n)
(c : k)
(M : Matrix k l α)

(PEquiv.single a b).toMatrix * ((PEquiv.single b c).toMatrix * M) = (PEquiv.single a c).toMatrix * M


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

{G : Type u_4}
{E : Type u_5}
[MeasurableSpace G]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure G}
{f : G → E}
{g : G}
[AddGroup G]
[MeasurableAdd G]
[μ.IsAddLeftInvariant]
(hf' : ∀ (x : G), f (g + x) = -f x)


/-- A special case of **Sylow's first theorem**. If `G` is a `p`-group and `H` a subgroup of size at
least `k` then there is a subgroup of `H` of cardinality between `k / p` and `k`. -/
lemma exists_subgroup_le_card_le {k p : ℕ} (hp : p.Prime) (h : IsPGroup p G) {H : Subgroup G}
    (hk : k ≤ Nat.card H) (hk₀ : k ≠ 0) : ∃ H' ≤ H, Nat.card H' ≤ k ∧ k < p * Nat.card H'

{G : Type u}
[Group G]
{k p : ℕ}
(hp : Nat.Prime p)
(h : IsPGroup p G)
{H : Subgroup G}
(hk : k ≤ Nat.card ↥H)
(hk₀ : k ≠ 0)

∃ H' ≤ H, Nat.card ↥H' ≤ k ∧ k < p * Nat.card ↥H'


/-- If `f` is continuous alternating, then `f (Σ_{j₁} g₁ j₁, ..., Σ_{jₙ} gₙ jₙ)` is the sum of
`f (g₁ (r 1), ..., gₙ (r n))` where `r` ranges over all functions `r`. This follows from
multilinearity by expanding successively with respect to each coordinate. -/
theorem map_sum [∀ i, Fintype (α i)] :
    (f fun i => ∑ j, g' i j) = ∑ r : ∀ i, α i, f fun i => g' i (r i)

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
(f : M [⋀^ι]→L[R] N)
{α : ι → Type u_7}
[Fintype ι]
[DecidableEq ι]
(g' : (i : ι) → α i → M)
[(i : ι) → Fintype (α i)]

(f fun i => ∑ j : α i, g' i j) = ∑ r : (i : ι) → α i, f fun i => g' i (r i)


theorem sum_add' {S : Type*} [AddCommMonoid S] (p : R[X]) (f g : ℕ → R → S) :
    p.sum (f + g) = p.sum f + p.sum g

{R : Type u}
[Semiring R]
{S : Type u_1}
[AddCommMonoid S]
(p : R[X])
(f g : ℕ → R → S)


/-- A technical lemma relating two different measures. This is basically [Halmos, §60 Th. A].
  Note that if `f` is the characteristic function of a measurable set `t` this states that
  `μ t = c * μ s` for a constant `c` that does not depend on `μ`.

  Note: There is a gap in the last step of the proof in [Halmos].
  In the last line, the equality `g(x⁻¹)ν(sx⁻¹) = f(x)` holds if we can prove that
  `0 < ν(sx⁻¹) < ∞`. The first inequality follows from §59, Th. D, but the second inequality is
  not justified. We prove this inequality for almost all `x` in
  `MeasureTheory.ae_measure_preimage_mul_right_lt_top_of_ne_zero`. -/
@[to_additive
"A technical lemma relating two different measures. This is basically [Halmos, §60 Th. A]. Note that
if `f` is the characteristic function of a measurable set `t` this states that `μ t = c * μ s` for a
constant `c` that does not depend on `μ`.

Note: There is a gap in the last step of the proof in [Halmos]. In the last line, the equality
`g(-x) + ν(s - x) = f(x)` holds if we can prove that `0 < ν(s - x) < ∞`. The first inequality
follows from §59, Th. D, but the second inequality is not justified. We prove this inequality for
almost all `x` in `MeasureTheory.ae_measure_preimage_add_right_lt_top_of_ne_zero`."]
theorem measure_lintegral_div_measure (sm : MeasurableSet s) (h2s : ν' s ≠ 0) (h3s : ν' s ≠ ∞)
    (f : G → ℝ≥0∞) (hf : Measurable f) :
    (μ' s * ∫⁻ y, f y⁻¹ / ν' ((· * y⁻¹) ⁻¹' s) ∂ν') = ∫⁻ x, f x ∂μ'

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
{s : Set G}
[MeasurableNeg G]
(μ' ν' : MeasureTheory.Measure G)
[MeasureTheory.SigmaFinite μ']
[MeasureTheory.SigmaFinite ν']
[μ'.IsAddLeftInvariant]
[ν'.IsAddLeftInvariant]
(sm : MeasurableSet s)
(h2s : ν' s ≠ 0)
(h3s : ν' s ≠ ⊤)
(f : G → ℝ≥0∞)
(hf : Measurable f)

μ' s * ∫⁻ (y : G), f (-y) / ν' ((fun x => x + -y) ⁻¹' s) ∂ν' = ∫⁻ (x : G), f x ∂μ'


/-- We verify that the biproduct we've just defined is isomorphic to the `AddCommGrp` structure
on the dependent function type.
-/
@[simps! hom_apply]
noncomputable def biproductIsoPi (f : J → AddCommGrp.{u}) :
    (⨁ f : AddCommGrp) ≅ AddCommGrp.of (∀ j, f j)

(x : ↑(CategoryTheory.Limits.biproduct.bicone f).toCone.pt)

(AddCommGrp.biproductIsoPi f).hom x j = (CategoryTheory.Limits.biproduct.π f j) x


/-- If `A` is qualified as an adjacency matrix,
    then the adjacency matrix of the graph induced by `A` is itself. -/
theorem adjMatrix_toGraph_eq [DecidableEq α] : h.toGraph.adjMatrix α = A

{V : Type u_1}
{α : Type u_2}
[MulZeroOneClass α]
[Nontrivial α]
{A : Matrix V V α}
(h : A.IsAdjMatrix)
[DecidableEq α]


theorem EqOn.congr_strictAntiOn (h : s.EqOn f₁ f₂) : StrictAntiOn f₁ s ↔ StrictAntiOn f₂ s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f₁ f₂ : α → β}
[Preorder α]
[Preorder β]
(h : Set.EqOn f₁ f₂ s)


theorem mkSkipLeft {α : Type u} {β : Type v} {b₁ b₂ : β} {s : β → β → Prop} (a₁ a₂ : α) (h : s b₁ b₂) : SkipLeft α s ⟨a₁, b₁⟩ ⟨a₂, b₂⟩


theorem zmodeq_ofDigits_digits (b b' : ℕ) (c : ℤ) (h : b' ≡ c [ZMOD b]) (n : ℕ) :
    n ≡ ofDigits c (digits b' n) [ZMOD b]

(b b' : ℕ)
(c : ℤ)
(h : ↑b' ≡ c [ZMOD ↑b])
(n : ℕ)

↑n ≡ Nat.ofDigits c (b'.digits n) [ZMOD ↑b]


@[simp]
theorem inf_eq_left : a ⊓ b = a ↔ a ≤ b

{α : Type u}
[SemilatticeInf α]
{a b : α}


theorem uniformContinuous_uniformly_extend [CompleteSpace γ] : UniformContinuous ψ

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[UniformSpace α]
[UniformSpace β]
[UniformSpace γ]
{e : β → α}
(h_e : UniformInducing e)
(h_dense : DenseRange e)
{f : β → γ}
(h_f : UniformContinuous f)
[CompleteSpace γ]


theorem eq_of_eqOn_dense (hs : closure L s = ⊤) {f g : M →[L] N} (h : s.EqOn f g) : f = g

(hs : (FirstOrder.Language.Substructure.closure L).toFun s = ⊤)


@[simp]
lemma piecewise_idem_left (f₁ f₂ g : ∀ a, π a) :
    s.piecewise (s.piecewise f₁ f₂) g = s.piecewise f₁ g

{ι : Type u_1}
{π : ι → Sort u_2}
(s : Finset ι)
[(j : ι) → Decidable (j ∈ s)]
(f₁ f₂ g : (a : ι) → π a)


@[simp]
theorem coe_vaddConst_symm (p : P) : ⇑(vaddConst 𝕜 p).symm = fun p' => p' -ᵥ p

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(p : P)

⇑(AffineIsometryEquiv.vaddConst 𝕜 p).symm = fun p' => p' -ᵥ p


/-- The morphism `snakeInput hS₁ i j hij ⟶ snakeInput hS₂ i j hij` induced by
a morphism `φ : S₁ ⟶ S₂` of short complexes of homological complexes, that
are short exact (`hS₁ : S₁.ShortExact` and `hS₂ : S₁.ShortExact`). -/
@[simps]
noncomputable def mapSnakeInput (i j : ι) (hij : c.Rel i j) :
    snakeInput hS₁ i j hij ⟶ snakeInput hS₂ i j hij

{S₁ S₂ : CategoryTheory.ShortComplex (HomologicalComplex C c)}

(HomologicalComplex.HomologySequence.mapSnakeInput φ hS₁ hS₂ i j hij).f₁ =
  (HomologicalComplex.opcyclesFunctor C c i).mapShortComplex.map φ


protected theorem of_nsmul : a ≡ b [PMOD n • p] → a ≡ b [PMOD p]

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


/-- A topological space is called a *regular space* if for any closed set `s` and `a ∉ s`, there
exist disjoint open sets `U ⊇ s` and `V ∋ a`. We formulate this condition in terms of `Disjoint`ness
of filters `𝓝ˢ s` and `𝓝 a`. -/
@[mk_iff]
class RegularSpace (X : Type u) [TopologicalSpace X] : Prop where
  /-- If `a` is a point that does not belong to a closed set `s`, then `a` and `s` admit disjoint
  neighborhoods.  -/
  regular : ∀ {s : Set X} {a}, IsClosed s → a ∉ s → Disjoint (𝓝ˢ s) (𝓝 a)

{X : Type u}
[TopologicalSpace X]
[self : RegularSpace X]
{s : Set X}
{a : X}


theorem norm_le_iff [NumberField K] (x : K) (r : ℝ) :
    ‖canonicalEmbedding K x‖ ≤ r ↔ ∀ φ : K →+* ℂ, ‖φ x‖ ≤ r

{K : Type u_1}
[Field K]
[NumberField K]
(x : K)
(r : ℝ)

‖(NumberField.canonicalEmbedding K) x‖ ≤ r ↔ ∀ (φ : K →+* ℂ), ‖φ x‖ ≤ r


/-- Linear isometry between continuous linear maps from `G` to `G'`
and continuous `1`-multilinear maps from `G` to `G'`. -/
@[simps apply symm_apply]
def ofSubsingletonₗᵢ [Subsingleton ι] (i : ι) :
    (G →L[𝕜] G') ≃ₗᵢ[𝕜] ContinuousMultilinearMap 𝕜 (fun _ : ι ↦ G) G'

(𝕜 : Type u)
{ι : Type v}
(G : Type wG)
{G' : Type wG'}
[Fintype ι]
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup G]
[NormedSpace 𝕜 G]
[SeminormedAddCommGroup G']
[NormedSpace 𝕜 G']
[Subsingleton ι]
(i : ι)

∀ (a : G →L[𝕜] G'),
  (ContinuousMultilinearMap.ofSubsingletonₗᵢ 𝕜 G i) a = (ContinuousMultilinearMap.ofSubsingleton 𝕜 G G' i).toFun a


theorem perfectField_of_perfectClosure_eq_bot [h : PerfectField E] (eq : perfectClosure F E = ⊥) :
    PerfectField F

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
[h : PerfectField E]
(eq : perfectClosure F E = ⊥)


theorem ContDiffOn.fst {f : E → F × G} {s : Set E} (hf : ContDiffOn 𝕜 n f s) :
    ContDiffOn 𝕜 n (fun x => (f x).1) s

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


theorem one_def : 1 = DirectSum.of A 0 GradedMonoid.GOne.one

{ι : Type u_1}
[DecidableEq ι]
(A : ι → Type u_2)
[Zero ι]
[GradedMonoid.GOne A]
[(i : ι) → AddCommMonoid (A i)]

1 = (DirectSum.of A 0) GradedMonoid.GOne.one


theorem ofWithBot_mono {boxes₁ : Finset (WithBot (Box ι))}
    {le_of_mem₁ : ∀ J ∈ boxes₁, (J : WithBot (Box ι)) ≤ I}
    {pairwise_disjoint₁ : Set.Pairwise (boxes₁ : Set (WithBot (Box ι))) Disjoint}
    {boxes₂ : Finset (WithBot (Box ι))} {le_of_mem₂ : ∀ J ∈ boxes₂, (J : WithBot (Box ι)) ≤ I}
    {pairwise_disjoint₂ : Set.Pairwise (boxes₂ : Set (WithBot (Box ι))) Disjoint}
    (H : ∀ J ∈ boxes₁, J ≠ ⊥ → ∃ J' ∈ boxes₂, J ≤ J') :
    ofWithBot boxes₁ le_of_mem₁ pairwise_disjoint₁ ≤
      ofWithBot boxes₂ le_of_mem₂ pairwise_disjoint₂

{boxes₁ : Finset (WithBot (BoxIntegral.Box ι))}

{pairwise_disjoint₁ : (↑boxes₁).Pairwise Disjoint}

{boxes₂ : Finset (WithBot (BoxIntegral.Box ι))}

{pairwise_disjoint₂ : (↑boxes₂).Pairwise Disjoint}

BoxIntegral.Prepartition.ofWithBot boxes₁ le_of_mem₁ pairwise_disjoint₁ ≤
  BoxIntegral.Prepartition.ofWithBot boxes₂ le_of_mem₂ pairwise_disjoint₂


/-- Evaluation as a `MonoidHom` -/
@[to_additive (attr := simps!) "Evaluation as an `AddMonoidHom`"]
def evalMonoidHom [MulOneClass Y] (x : X) : LocallyConstant X Y →* Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[AddZeroClass Y]
(x : X)

∀ (a : LocallyConstant X Y), (LocallyConstant.evalAddMonoidHom x) a = a x


theorem RepresentablyFlat.id : RepresentablyFlat (𝟭 C)

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


@[mfld_simps]
theorem refl_restr_target (s : Set α) : ((PartialEquiv.refl α).restr s).target = s


@[simp]
theorem Submodule.finrank_map_subtype_eq (p : Submodule R M) (q : Submodule R p) :
    finrank R (q.map p.subtype) = finrank R q

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)
(q : Submodule R ↥p)

FiniteDimensional.finrank R ↥(Submodule.map p.subtype q) = FiniteDimensional.finrank R ↥q


@[gcongr] lemma smul_le_smul_of_nonneg_right [SMulPosMono α β] (ha : a₁ ≤ a₂) (hb : 0 ≤ b) :
    a₁ • b ≤ a₂ • b

{α : Type u_1}
{β : Type u_2}
{a₁ a₂ : α}
{b : β}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero β]
[SMulPosMono α β]
(ha : a₁ ≤ a₂)
(hb : 0 ≤ b)

a₁ • b ≤ a₂ • b


theorem J_mem : J l R ∈ symplecticGroup l R

(l : Type u_1)
(R : Type u_2)
[DecidableEq l]
[Fintype l]
[CommRing R]

Matrix.J l R ∈ Matrix.symplecticGroup l R


theorem hausdorffMeasure_measurePreserving_funUnique [Unique ι]
    [SecondCountableTopology X] (d : ℝ) :
    MeasurePreserving (MeasurableEquiv.funUnique ι X) μH[d] μH[d]

(ι : Type u_1)
(X : Type u_2)
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
[Unique ι]
[SecondCountableTopology X]
(d : ℝ)

MeasureTheory.MeasurePreserving ⇑(MeasurableEquiv.funUnique ι X) μH[d] μH[d]


theorem Ici_iSup₂ (f : ∀ i, κ i → α) : Ici (⨆ (i) (j), f i j) = ⨆ (i) (j), Ici (f i j)

{α : Type u_1}
{ι : Sort u_4}
{κ : ι → Sort u_5}
[CompleteLattice α]
(f : (i : ι) → κ i → α)

UpperSet.Ici (⨆ i, ⨆ j, f i j) = ⨆ i, ⨆ j, UpperSet.Ici (f i j)


theorem drop_eq_nil_of_eq_nil : ∀ {as : List α} {i}, as = [] → as.drop i = []


@[to_additive (attr := simp)]
theorem one_toGerm [One β] : (1 : α →ₘ[μ] β).toGerm = 1

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]
[One β]


/-- `TensorProduct.assoc` corresponds to a permutation of the identity matrix. -/
theorem TensorProduct.toMatrix_assoc :
    toMatrix ((bM.tensorProduct bN).tensorProduct bP) (bM.tensorProduct (bN.tensorProduct bP))
        (TensorProduct.assoc R M N P) =
      (1 : Matrix (ι × κ × τ) (ι × κ × τ) R).submatrix _root_.id (Equiv.prodAssoc _ _ _)

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
{ι : Type u_7}
{κ : Type u_8}
{τ : Type u_9}
[DecidableEq ι]
[DecidableEq κ]
[DecidableEq τ]
[Fintype ι]
[Fintype κ]
[Fintype τ]
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[AddCommGroup P]
[Module R M]
[Module R N]
[Module R P]
(bM : Basis ι R M)
(bN : Basis κ R N)
(bP : Basis τ R P)

(LinearMap.toMatrix ((bM.tensorProduct bN).tensorProduct bP) (bM.tensorProduct (bN.tensorProduct bP)))
    ↑(TensorProduct.assoc R M N P) =
  Matrix.submatrix 1 id ⇑(Equiv.prodAssoc ι κ τ)


lemma Pi.induced_restrict_sUnion (𝔖 : Set (Set ι)) :
    induced (⋃₀ 𝔖).restrict (Pi.topologicalSpace (Y := fun i : (⋃₀ 𝔖) ↦ π i)) =
    ⨅ S ∈ 𝔖, induced S.restrict Pi.topologicalSpace

{ι : Type u_5}
{π : ι → Type u_6}
[T : (i : ι) → TopologicalSpace (π i)]
(𝔖 : Set (Set ι))

TopologicalSpace.induced (⋃₀ 𝔖).restrict Pi.topologicalSpace =
  ⨅ S ∈ 𝔖, TopologicalSpace.induced S.restrict Pi.topologicalSpace


lemma lt_iff (I J : TwoSidedIdeal R) : I < J ↔ (I : Set R) ⊂ (J : Set R)

{R : Type u_1}
[NonUnitalNonAssocRing R]
(I J : TwoSidedIdeal R)


theorem eqOn_Ico_of_ae_eq [DenselyOrdered X] {a b : X} {f g : X → Y}
    (hfg : f =ᵐ[μ.restrict (Ico a b)] g) (hf : ContinuousOn f (Ico a b))
    (hg : ContinuousOn g (Ico a b)) : EqOn f g (Ico a b)

(hfg : f =ᵐ[μ.restrict (Set.Ico a b)] g)


@[to_additive]
theorem IsCyclic.exponent_eq_card [Group α] [IsCyclic α] [Fintype α] :
    exponent α = Fintype.card α

{α : Type u}
[AddGroup α]
[IsAddCyclic α]
[Fintype α]


/-- An oriented angle is not zero or `π` if and only if the three points are affinely
independent. -/
theorem oangle_ne_zero_and_ne_pi_iff_affineIndependent {p₁ p₂ p₃ : P} :
    ∡ p₁ p₂ p₃ ≠ 0 ∧ ∡ p₁ p₂ p₃ ≠ π ↔ AffineIndependent ℝ ![p₁, p₂, p₃]

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

∡ p₁ p₂ p₃ ≠ 0 ∧ ∡ p₁ p₂ p₃ ≠ ↑π ↔ AffineIndependent ℝ ![p₁, p₂, p₃]


@[to_additive]
protected theorem exists_inv_mem_iff_exists_mem (K : Subgroup G) {P : G → Prop} :
    (∃ x : G, x ∈ K ∧ P x⁻¹) ↔ ∃ x ∈ K, P x

{G : Type u_1}
[Group G]
(K : Subgroup G)
{P : G → Prop}


theorem coe_ne_one {x : I} : (x : ℝ) ≠ 1 ↔ x ≠ 1

↑x ≠ 1 ↔ x ≠ 1


theorem bounded_inter_not (H : ∀ a b, ∃ m, ∀ c, r c a ∨ r c b → r c m) (a : α) :
    Bounded r (s ∩ { b | ¬r b a }) ↔ Bounded r s

(H : ∀ (a b : α), ∃ m, ∀ (c : α), r c a ∨ r c b → r c m)

Set.Bounded r (s ∩ {b | ¬r b a}) ↔ Set.Bounded r s


theorem Left.neg_of_mul_neg_left [PosMulMono α] (h : a * b < 0) (b0 : 0 ≤ b) : a < 0

{α : Type u_1}
{a b : α}
[MulZeroClass α]
[LinearOrder α]
[PosMulMono α]
(h : a * b < 0)
(b0 : 0 ≤ b)


@[to_additive]
theorem _root_.Set.mulIndicator_ae_eq_one {M : Type*} [One M] {f : α → M} {s : Set α} :
    s.mulIndicator f =ᵐ[μ] 1 ↔ μ (s ∩ f.mulSupport) = 0

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{M : Type u_4}
[One M]
{f : α → M}
{s : Set α}

s.mulIndicator f =ᵐ[μ] 1 ↔ μ (s ∩ Function.mulSupport f) = 0


theorem Semiconj.mapsTo_periodicPts {g : α → β} (h : Semiconj g fa fb) :
    MapsTo g (periodicPts fa) (periodicPts fb)

{α : Type u_1}
{β : Type u_2}
{fa : α → α}
{fb : β → β}
{g : α → β}
(h : Function.Semiconj g fa fb)

Set.MapsTo g (Function.periodicPts fa) (Function.periodicPts fb)


@[simp] theorem beq_eq : (Nat.beq x y = true) = (x = y)


lemma isCornerFree_image (hf : IsAddFreimanIso 2 s t f) (hAs : A ⊆ s ×ˢ s) :
    IsCornerFree (Prod.map f f '' A) ↔ IsCornerFree A

{G : Type u_1}
{H : Type u_2}
[AddCommMonoid G]
[AddCommMonoid H]
{A : Set (G × G)}
{s : Set G}
{t : Set H}
{f : G → H}
(hf : IsAddFreimanIso 2 s t f)
(hAs : A ⊆ s ×ˢ s)


/-- Uniform convergence on the empty set is vacuously true -/
theorem tendstoUniformlyOn_empty : TendstoUniformlyOn F f p ∅

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


theorem comp_sup_eq_sup_comp [SemilatticeSup γ] [OrderBot γ] {s : Finset β} {f : β → α} (g : α → γ)
    (g_sup : ∀ x y, g (x ⊔ y) = g x ⊔ g y) (bot : g ⊥ = ⊥) : g (s.sup f) = s.sup (g ∘ f)

(g_sup : ∀ (x y : α), g (x ⊔ y) = g x ⊔ g y)


/-- `sUnion` is monotone under taking a subset of each set. -/
lemma sUnion_mono_subsets {s : Set (Set α)} {f : Set α → Set α} (hf : ∀ t : Set α, t ⊆ f t) :
    ⋃₀ s ⊆ ⋃₀ (f '' s)

{α : Type u_1}
{s : Set (Set α)}
{f : Set α → Set α}
(hf : ∀ (t : Set α), t ⊆ f t)


/-- An `R`-finite torsion-free module has positive `finrank` iff it is nontrivial. -/
theorem FiniteDimensional.finrank_pos_iff [NoZeroSMulDivisors R M] :
    0 < finrank R M ↔ Nontrivial M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[Nontrivial R]
[StrongRankCondition R]
[Module.Finite R M]
[NoZeroSMulDivisors R M]

0 < FiniteDimensional.finrank R M ↔ Nontrivial M


theorem pow_ne_of_irreducible_X_pow_sub_C {n : ℕ} {a : K}
    (H : Irreducible (X ^ n - C a)) {m : ℕ} (hm : m ∣ n) (hm' : m ≠ 1) (b : K) : b ^ m ≠ a

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


/-- If each `f₀ i : C(X, Y i)` is homotopic to `f₁ i : C(X, Y i)`, then `ContinuousMap.pi f₀` is
homotopic to `ContinuousMap.pi f₁`. -/
protected theorem pi {Y : ι → Type*} [∀ i, TopologicalSpace (Y i)] {f₀ f₁ : ∀ i, C(X, Y i)}
    (F : ∀ i, Homotopic (f₀ i) (f₁ i)) :
    Homotopic (.pi f₀) (.pi f₁)

(F : ∀ (i : ι), (f₀ i).Homotopic (f₁ i))

(ContinuousMap.pi f₀).Homotopic (ContinuousMap.pi f₁)


/-- In a monoid with zero, either zero and one are nonequal, or zero is the only element. -/
theorem zero_ne_one_or_forall_eq_0 : (0 : M₀) ≠ 1 ∨ ∀ a : M₀, a = 0


@[simp]
theorem bind₁_zero_wittPolynomial [Fact p.Prime] (n : ℕ) :
    bind₁ (0 : ℕ → MvPolynomial ℕ R) (wittPolynomial p R n) = 0

{p : ℕ}
{R : Type u}
[CommRing R]
[Fact (Nat.Prime p)]
(n : ℕ)

(MvPolynomial.bind₁ 0) (wittPolynomial p R n) = 0


/-- Conditions for an element to be additively central -/
structure IsAddCentral [Add M] (z : M) : Prop where
  /-- addition commutes -/
  comm (a : M) : z + a = a + z
  /-- associative property for left addition -/
  left_assoc (b c : M) : z + (b + c) = (z + b) + c
  /-- middle associative addition property -/
  mid_assoc (a c : M) : (a + z) + c = a + (z + c)
  /-- associative property for right addition -/
  right_assoc (a b : M) : (a + b) + z = a + (b + z)

{M : Type u_1}
[Add M]
{z : M}
(self : IsAddCentral z)
(b c : M)


/-- A point is in the `affineSpan` of an indexed family if and only
if it is an `affineCombination` with sum of weights 1, provided the
underlying ring is nontrivial. -/
theorem mem_affineSpan_iff_eq_affineCombination [Nontrivial k] {p1 : P} {p : ι → P} :
    p1 ∈ affineSpan k (Set.range p) ↔
      ∃ (s : Finset ι) (w : ι → k), ∑ i ∈ s, w i = 1 ∧ p1 = s.affineCombination k p w

{ι : Type u_1}
(k : Type u_2)
(V : Type u_3)
{P : Type u_4}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
[Nontrivial k]
{p1 : P}
{p : ι → P}

p1 ∈ affineSpan k (Set.range p) ↔ ∃ s w, ∑ i ∈ s, w i = 1 ∧ p1 = (Finset.affineCombination k s p) w


@[simp]
theorem X_mul_monomial (n : ℕ) (r : R) : X * monomial n r = monomial (n + 1) r

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

Polynomial.X * (Polynomial.monomial n) r = (Polynomial.monomial (n + 1)) r


theorem coe_injective : Function.Injective (coe : R → ℍ[R])


/-- The product of a family of triangles. -/
@[simps!]
def productTriangle : Triangle C

(T : J → CategoryTheory.Pretriangulated.Triangle C)

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₁]

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₂]

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₃]

[CategoryTheory.Limits.HasProduct fun j => (CategoryTheory.shiftFunctor C 1).obj (T j).obj₁]

(CategoryTheory.Pretriangulated.productTriangle T).mor₁ = CategoryTheory.Limits.Pi.map fun j => (T j).mor₁


@[simp] protected theorem mul_one (x : BitVec w) : x * 1#w = x


lemma coe_ne_coe {a b : Subtype p} : (a : α) ≠ b ↔ a ≠ b

{α : Sort u_1}
{p : α → Prop}
{a b : Subtype p}

↑a ≠ ↑b ↔ a ≠ b


@[simp]
theorem comp_id (f : BoundedOrderHom α β) : f.comp (BoundedOrderHom.id α) = f

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


/-- A version of the **Borel-Cantelli lemma**: if `pᵢ` is a sequence of predicates such that
`∑ μ {x | pᵢ x}` is finite, then the measure of `x` such that `pᵢ x` holds frequently as `i → ∞` (or
equivalently, `pᵢ x` holds for infinitely many `i`) is equal to zero. -/
theorem measure_setOf_frequently_eq_zero {p : ℕ → α → Prop} (hp : ∑' i, μ { x | p i x } ≠ ∞) :
    μ { x | ∃ᶠ n in atTop, p n x } = 0

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p : ℕ → α → Prop}
(hp : ∑' (i : ℕ), μ {x | p i x} ≠ ⊤)

μ {x | ∃ᶠ (n : ℕ) in Filter.atTop, p n x} = 0


@[simp] theorem not_nonempty_empty  : ¬Nonempty Empty


theorem prod_apply_inl_fst (i) : (b.prod b' (Sum.inl i)).1 = b i

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


theorem subset_balancedHull [NormOneClass 𝕜] {s : Set E} : s ⊆ balancedHull 𝕜 s

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


@[simp]
lemma map_dualAnnihilator_linearEquiv_flip_symm (p : Submodule R N) :
    p.dualAnnihilator.map e.flip.symm = (p.map e).dualCoannihilator

{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)
(p : Submodule R N)

Submodule.map e.flip.symm p.dualAnnihilator = (Submodule.map e p).dualCoannihilator


@[simp]
theorem orthogonalProjectionFn_eq (v : E) :
    orthogonalProjectionFn K v = (orthogonalProjection K v : E)

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

orthogonalProjectionFn K v = ↑((orthogonalProjection K) v)


theorem toWithTop_some (n : ℕ) : toWithTop (some n) = n


theorem all_ae_ofReal_F_le_bound (h : ∀ n, ∀ᵐ a ∂μ, ‖F n a‖ ≤ bound a) :
    ∀ n, ∀ᵐ a ∂μ, ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)

{F : ℕ → α → β}

(h : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a)

∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖F n a‖ ≤ ENNReal.ofReal (bound a)


@[simp] theorem foldl_cons (l : List α) (b : β) : (a :: l).foldl f b = l.foldl f (f b a)

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

List.foldl f b (a :: l) = List.foldl f (f b a) l


lemma setLIntegral_tilted [SFinite μ] (f : α → ℝ) (g : α → ℝ≥0∞) (s : Set α) :
    ∫⁻ x in s, g x ∂(μ.tilted f)
      = ∫⁻ x in s, ENNReal.ofReal (exp (f x) / ∫ x, exp (f x) ∂μ) * g x ∂μ

{α : Type u_1}
{mα : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.SFinite μ]
(f : α → ℝ)
(g : α → ℝ≥0∞)
(s : Set α)

∫⁻ (x : α) in s, g x ∂μ.tilted f = ∫⁻ (x : α) in s, ENNReal.ofReal (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * g x ∂μ


theorem frontier_closedBall' (x : E) (r : ℝ) : frontier (closedBall x r) = sphere x r

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[Nontrivial E]
(x : E)
(r : ℝ)

frontier (Metric.closedBall x r) = Metric.sphere x r


theorem support_inf_union_support_sup : (f ⊓ g).support ∪ (f ⊔ g).support = f.support ∪ g.support

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


lemma integral_llr_tilted_left [IsProbabilityMeasure μ] [SigmaFinite ν]
    (hμν : μ ≪ ν) (hf : Integrable f μ) (h_int : Integrable (llr μ ν) μ)
    (hfμ : Integrable (fun x ↦ exp (f x)) μ) (hfν : AEMeasurable f ν) :
    ∫ x, llr (μ.tilted f) ν x ∂μ = ∫ x, llr μ ν x ∂μ + ∫ x, f x ∂μ - log (∫ x, exp (f x) ∂μ)

(h_int : MeasureTheory.Integrable (MeasureTheory.llr μ ν) μ)

(hfμ : MeasureTheory.Integrable (fun x => rexp (f x)) μ)

∫ (x : α), MeasureTheory.llr (μ.tilted f) ν x ∂μ =
  ∫ (x : α), MeasureTheory.llr μ ν x ∂μ + ∫ (x : α), f x ∂μ - Real.log (∫ (x : α), rexp (f x) ∂μ)


@[fun_prop, continuity]
theorem continuous_mk : Continuous (mk : X → SeparationQuotient X)


/-- If `Γ₀ˣ` is nontrivial and `f : Γ₀ →*₀ ℝ≥0` is strictly monotone, then for any positive
  real `r`, there exists `d : Γ₀ˣ` with `f d < r`. -/
theorem Real.exists_lt_of_strictMono [h : Nontrivial Γ₀ˣ] {f : Γ₀ →*₀ ℝ≥0} (hf : StrictMono f)
    {r : ℝ} (hr : 0 < r) : ∃ d : Γ₀ˣ, (f d : ℝ) < r

{Γ₀ : Type u_1}
[LinearOrderedCommGroupWithZero Γ₀]
[h : Nontrivial Γ₀ˣ]
{f : Γ₀ →*₀ ℝ≥0}
(hf : StrictMono ⇑f)
{r : ℝ}
(hr : 0 < r)


theorem isIdempotentElem_one_sub_one_sub_pow_pow
    (x : R) (n : ℕ) (hx : (x - x ^ 2) ^ n = 0) :
    IsIdempotentElem (1 - (1 - x ^ n) ^ n)


theorem liftP_iff' {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (a : P.A) (f : P.B a ⟹ α) :
    @LiftP.{u} _ P.Obj _ α p ⟨a, f⟩ ↔ ∀ i x, p (f i x)

{n : ℕ}
{P : MvPFunctor.{u} n}
{α : TypeVec.{u} n}
(p : ⦃i : Fin2 n⦄ → α i → Prop)
(a : P.A)
(f : P.B a ⟹ α)

MvFunctor.LiftP p ⟨a, f⟩ ↔ ∀ (i : Fin2 n) (x : P.B a i), p (f i x)


theorem log_opow_mul_add {b u v w : Ordinal} (hb : 1 < b) (hv : v ≠ 0) (hvb : v < b)
    (hw : w < b ^ u) : log b (b ^ u * v + w) = u

{b u v w : Ordinal.{u_1}}
(hb : 1 < b)
(hv : v ≠ 0)
(hvb : v < b)
(hw : w < b ^ u)


@[simp]
theorem coprime_add_mul_left_left (m n k : ℕ) : Coprime (m + n * k) n ↔ Coprime m n


/-- Continuity from below: the measure of the union of a sequence of (not necessarily measurable)
sets is the limit of the measures of the partial unions. -/
theorem tendsto_measure_iUnion' {α ι : Type*} [MeasurableSpace α] {μ : Measure α} [Countable ι]
    [Preorder ι] [IsDirected ι (· ≤ ·)] {f : ι → Set α} :
    Tendsto (fun i ↦ μ (Accumulate f i)) atTop (𝓝 (μ (⋃ i, f i)))

{α : Type u_8}
{ι : Type u_9}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[Countable ι]
[Preorder ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{f : ι → Set α}

Filter.Tendsto (fun i => μ (Set.Accumulate f i)) Filter.atTop (nhds (μ (⋃ i, f i)))


@[simp] lemma map₂_bot_left (f : α → β → γ) (b) : map₂ f ⊥ b = ⊥

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β → γ)
(b : WithBot β)


theorem ptendsto'_of_ptendsto {f : α →. β} {l₁ : Filter α} {l₂ : Filter β} (h : f.Dom ∈ l₁) :
    PTendsto f l₁ l₂ → PTendsto' f l₁ l₂

{α : Type u}
{β : Type v}
{f : α →. β}
{l₁ : Filter α}
{l₂ : Filter β}
(h : f.Dom ∈ l₁)

Filter.PTendsto f l₁ l₂ → Filter.PTendsto' f l₁ l₂


@[to_additive]
theorem tendsto_const_smul_iff {f : β → α} {l : Filter β} {a : α} (c : G) :
    Tendsto (fun x => c • f x) l (𝓝 <| c • a) ↔ Tendsto f l (𝓝 a)

{α : Type u_2}
{β : Type u_3}
{G : Type u_4}
[TopologicalSpace α]
[Group G]
[MulAction G α]
[ContinuousConstSMul G α]
{f : β → α}
{l : Filter β}
{a : α}
(c : G)

Filter.Tendsto (fun x => c • f x) l (𝓝 (c • a)) ↔ Filter.Tendsto f l (𝓝 a)


theorem iInf_def {ι} (s : ι → Closeds α) :
    ⨅ i, s i = ⟨⋂ i, s i, isClosed_iInter fun i => (s i).2⟩

{α : Type u_2}
[TopologicalSpace α]
{ι : Sort u_4}
(s : ι → TopologicalSpace.Closeds α)

⨅ i, s i = { carrier := ⋂ i, ↑(s i), closed' := ⋯ }


@[to_additive (attr := measurability)]
theorem _root_.List.stronglyMeasurable_prod' (l : List (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) : StronglyMeasurable l.prod

(hl : ∀ f ∈ l, MeasureTheory.StronglyMeasurable f)


@[simp] theorem toFin_add (x y : BitVec w) : (x + y).toFin = toFin x + toFin y


lemma cfcHom_eq_of_continuous_of_map_id [UniqueContinuousFunctionalCalculus R A]
    (φ : C(spectrum R a, R) →⋆ₐ[R] A) (hφ₁ : Continuous φ)
    (hφ₂ : φ (.restrict (spectrum R a) <| .id R) = a) : cfcHom ha = φ

(hφ₂ : φ (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) = a)


@[simp]
theorem summable_matrix_diagonal [DecidableEq n] {f : X → n → R} :
    (Summable fun x => diagonal (f x)) ↔ Summable f

{X : Type u_1}
{n : Type u_5}
{R : Type u_8}
[AddCommMonoid R]
[TopologicalSpace R]
[DecidableEq n]
{f : X → n → R}

(Summable fun x => Matrix.diagonal (f x)) ↔ Summable f


theorem Basis.sum_equivFun [Fintype ι] (b : Basis ι R M) (u : M) :
    ∑ i, b.equivFun u i • b i = u

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


@[to_additive]
theorem prod_isUnit_iff {α : Type*} [CommMonoid α] {L : List α} :
    IsUnit L.prod ↔ ∀ m ∈ L, IsUnit m

{α : Type u_8}
[CommMonoid α]
{L : List α}


/-- This property implies `IsRatCondKernelCDF`. The measurability, integrability and integral
conditions are the same, but the limit properties of `IsRatCondKernelCDF` are replaced by
limits of integrals. -/
structure IsRatCondKernelCDFAux (f : α × β → ℚ → ℝ) (κ : Kernel α (β × ℝ)) (ν : Kernel α β) :
    Prop :=
  measurable : Measurable f
  mono' (a : α) {q r : ℚ} (_hqr : q ≤ r) : ∀ᵐ c ∂(ν a), f (a, c) q ≤ f (a, c) r
  nonneg' (a : α) (q : ℚ) : ∀ᵐ c ∂(ν a), 0 ≤ f (a, c) q
  le_one' (a : α) (q : ℚ) : ∀ᵐ c ∂(ν a), f (a, c) q ≤ 1
  /- Same as `Tendsto (fun q : ℚ ↦ ∫ c, f (a, c) q ∂(ν a)) atBot (𝓝 0)` but slightly easier
  to prove in the current applications of this definition (some integral convergence lemmas
  currently apply only to `ℕ`, not `ℚ`) -/
  tendsto_integral_of_antitone (a : α) (seq : ℕ → ℚ) (_hs : Antitone seq)
    (_hs_tendsto : Tendsto seq atTop atBot) :
    Tendsto (fun m ↦ ∫ c, f (a, c) (seq m) ∂(ν a)) atTop (𝓝 0)
  /- Same as `Tendsto (fun q : ℚ ↦ ∫ c, f (a, c) q ∂(ν a)) atTop (𝓝 (ν a univ).toReal)` but
  slightly easier to prove in the current applications of this definition (some integral convergence
  lemmas currently apply only to `ℕ`, not `ℚ`) -/
  tendsto_integral_of_monotone (a : α) (seq : ℕ → ℚ) (_hs : Monotone seq)
    (_hs_tendsto : Tendsto seq atTop atTop) :
    Tendsto (fun m ↦ ∫ c, f (a, c) (seq m) ∂(ν a)) atTop (𝓝 (ν a univ).toReal)
  integrable (a : α) (q : ℚ) : Integrable (fun c ↦ f (a, c) q) (ν a)
  setIntegral (a : α) {A : Set β} (_hA : MeasurableSet A) (q : ℚ) :
    ∫ c in A, f (a, c) q ∂(ν a) = (κ a (A ×ˢ Iic ↑q)).toReal

{f : α × β → ℚ → ℝ}

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

(self : ProbabilityTheory.IsRatCondKernelCDFAux f κ ν)

MeasureTheory.Integrable (fun c => f (a, c) q) (ν a)


theorem smoothLeftMul_one : (𝑳 I g') 1 = g'

{𝕜 : 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_8}
[Monoid G']
[TopologicalSpace G']
[ChartedSpace H G']
[SmoothMul I G']
(g' : G')


@[simp]
theorem trans_cast {a₁ a₂ b₁ b₂ c₁ c₂ : X} (γ : Path a₂ b₂)
    (γ' : Path b₂ c₂) (ha : a₁ = a₂) (hb : b₁ = b₂) (hc : c₁ = c₂) :
    (γ.cast ha hb).trans (γ'.cast hb hc) = (γ.trans γ').cast ha hc

{X : Type u_1}
[TopologicalSpace X]
{a₁ a₂ b₁ b₂ c₁ c₂ : X}
(γ : Path a₂ b₂)
(γ' : Path b₂ c₂)
(ha : a₁ = a₂)
(hb : b₁ = b₂)
(hc : c₁ = c₂)


lemma normalClosure_def' : normalClosure F K L = ⨆ f : L →ₐ[F] L, K.map f

{F : Type u_1}
{L : Type u_3}
[Field F]
[Field L]
[Algebra F L]
(K : IntermediateField F L)
[Normal F L]

normalClosure F (↥K) L = ⨆ f, IntermediateField.map f K


@[to_additive]
protected theorem MulLECancellable.isLeftRegular [PartialOrder R] {a : R}
    (ha : MulLECancellable a) : IsLeftRegular a

{R : Type u_1}
[Add R]
[PartialOrder R]
{a : R}
(ha : AddLECancellable a)


theorem length_of_sublistsLen :
    ∀ {n} {l l' : List α}, l' ∈ sublistsLen n l → length l' = n

l' ∈ List.sublistsLen n l → l'.length = n


@[simp] theorem length_take : ∀ (i : Nat) (l : List α), length (take i l) = min i (length l)


@[to_additive]
theorem Red.reduce_right (h : Red L₁ L₂) : Red L₁ (reduce L₂)

{α : Type u}
{L₁ L₂ : List (α × Bool)}
[DecidableEq α]
(h : FreeAddGroup.Red L₁ L₂)

FreeAddGroup.Red L₁ (FreeAddGroup.reduce L₂)


@[field_simps]
theorem div_add_div_same (a b c : α) : a / c + b / c = (a + b) / c

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


/-- Two `MonoidHom`s from a quotient group are equal if their compositions with
`QuotientGroup.mk'` are equal.

See note [partially-applied ext lemmas]. -/
@[to_additive (attr := ext 1100) "Two `AddMonoidHom`s from an additive quotient group are equal if
 their compositions with `AddQuotientGroup.mk'` are equal.

 See note [partially-applied ext lemmas]. "]
theorem monoidHom_ext ⦃f g : G ⧸ N →* M⦄ (h : f.comp (mk' N) = g.comp (mk' N)) : f = g

(h : f.comp (QuotientAddGroup.mk' N) = g.comp (QuotientAddGroup.mk' N))


@[fun_prop]
protected theorem hasFDerivAt : HasFDerivAt iso (iso : E →L[𝕜] F) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
(iso : E ≃ₗᵢ[𝕜] F)

HasFDerivAt (⇑iso) (↑{ toLinearEquiv := iso.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }) x


nonrec theorem HasDerivWithinAt.const_sub (c : F) (hf : HasDerivWithinAt f f' s x) :
    HasDerivWithinAt (fun x => c - f x) (-f') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{s : Set 𝕜}
(c : F)
(hf : HasDerivWithinAt f f' s x)


@[to_additive]
theorem isComplement_singleton_univ {g : G} : IsComplement ({g} : Set G) univ


theorem Exists.imp (h : ∀ a, p a → q a) : (∃ a, p a) → ∃ a, q a

{α : Sort u_1}
{p q : α → Prop}
(h : ∀ (a : α), p a → q a)


/-- An idempotent semiring is a semiring with the additional property that addition is idempotent.
-/
class IdemSemiring (α : Type u) extends Semiring α, SemilatticeSup α where
  protected sup := (· + ·)
  protected add_eq_sup : ∀ a b : α, a + b = a ⊔ b := by
    intros
    rfl
  /-- The bottom element of an idempotent semiring: `0` by default -/
  protected bot : α := 0
  protected bot_le : ∀ a, bot ≤ a

{α : Type u}
[self : IdemSemiring α]
(a b : α)


theorem commProb_pi {α : Type*} (i : α → Type*) [Fintype α] [∀ a, Mul (i a)] :
    commProb (∀ a, i a) = ∏ a, commProb (i a)

{α : Type u_2}
(i : α → Type u_3)
[Fintype α]
[(a : α) → Mul (i a)]

commProb ((a : α) → i a) = ∏ a : α, commProb (i a)


@[deprecated (since := "2024-02-15")]
lemma ClosedIciTopology.isClosed_ge' (a : α) : IsClosed {x | a ≤ x}

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


@[to_additive eq_sub_of_add_eq]
theorem eq_div_of_mul_eq' (h : a * c = b) : a = b / c

{G : Type u_3}
[AddGroup G]
{a b c : G}
(h : a + c = b)


@[to_additive]
lemma mem_ofUnits_iff (S : Subgroup Mˣ) (x : M) : x ∈ S.ofUnits ↔ ∃ y ∈ S, y = x

{M : Type u_1}
[AddMonoid M]
(S : AddSubgroup (AddUnits M))
(x : M)


@[simp]
theorem one_apply (x : L₁) : (1 : L₁ ≃ₗ⁅R⁆ L₁) x = x

{R : Type u}
{L₁ : Type v}
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]
(x : L₁)


theorem Gamma1_in_Gamma0 (N : ℕ) : Gamma1 N ≤ Gamma0 N

CongruenceSubgroup.Gamma1 N ≤ CongruenceSubgroup.Gamma0 N


@[simp]
theorem round_intCast (n : ℤ) : round (n : α) = n

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(n : ℤ)


/-- `LinearMap.bound_of_ball_bound'` is a version of this lemma over a field satisfying `RCLike`
that produces a concrete bound.
-/
theorem bound_of_ball_bound {r : ℝ} (r_pos : 0 < r) (c : ℝ) (f : E →ₗ[𝕜] Fₗ)
    (h : ∀ z ∈ Metric.ball (0 : E) r, ‖f z‖ ≤ c) : ∃ C, ∀ z : E, ‖f z‖ ≤ C * ‖z‖

{𝕜 : Type u_1}
{E : Type u_4}
{Fₗ : Type u_7}
[NormedAddCommGroup E]
[NormedAddCommGroup Fₗ]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 Fₗ]
{r : ℝ}
(r_pos : 0 < r)
(c : ℝ)
(f : E →ₗ[𝕜] Fₗ)
(h : ∀ z ∈ Metric.ball 0 r, ‖f z‖ ≤ c)


theorem dif_ctx_simp_congr {α : Sort u} {b c : Prop} [Decidable b]
    {x : b → α} {u : c → α} {y : ¬b → α} {v : ¬c → α}
    (h_c : b ↔ c) (h_t : ∀ h : c, x (Iff.mpr h_c h) = u h)
    (h_e : ∀ h : ¬c, y (Iff.mpr (not_congr h_c) h) = v h) :
    -- FIXME: after https://github.com/leanprover/lean4/issues/1867 is fixed,
    -- this should be changed back to:
    -- dite b x y = dite c (h := decidable_of_decidable_of_iff h_c) u v :=
    dite b x y = @dite _ c (decidable_of_decidable_of_iff h_c) u v

{α : Sort u}
{b c : Prop}
[Decidable b]
{x : b → α}
{u : c → α}
{y : ¬b → α}
{v : ¬c → α}
(h_c : b ↔ c)
(h_t : ∀ (h : c), x ⋯ = u h)
(h_e : ∀ (h : ¬c), y ⋯ = v h)


theorem enumFrom_append (xs ys : List α) (n : ℕ) :
    enumFrom n (xs ++ ys) = enumFrom n xs ++ enumFrom (n + xs.length) ys

List.enumFrom n (xs ++ ys) = List.enumFrom n xs ++ List.enumFrom (n + xs.length) ys


theorem digits_zero_zero : digits 0 0 = []


lemma linearIndependent_algHom_toLinearMap' (K M L) [CommRing K]
    [Semiring M] [Algebra K M] [CommRing L] [IsDomain L] [Algebra K L] [NoZeroSMulDivisors K L] :
    LinearIndependent K (AlgHom.toLinearMap : (M →ₐ[K] L) → M →ₗ[K] L)

(K : Type u_8)
(M : Type u_9)
(L : Type u_10)
[CommRing K]
[Semiring M]
[Algebra K M]
[CommRing L]
[IsDomain L]
[Algebra K L]
[NoZeroSMulDivisors K L]


theorem valuation_unit (a : Aˣ) : A.valuation a = 1

{K : Type u}
[Field K]
(A : ValuationSubring K)
(a : (↥A)ˣ)


/-- The subpresheaf as a presheaf. -/
@[simps!]
def Subpresheaf.toPresheaf : Cᵒᵖ ⥤ Type w

(G : CategoryTheory.GrothendieckTopology.Subpresheaf F)


@[simp]
theorem cycleRange_symm_succ {n : ℕ} (i : Fin (n + 1)) (j : Fin n) :
    i.cycleRange.symm j.succ = i.succAbove j

(Equiv.symm i.cycleRange) j.succ = i.succAbove j


@[simp]
theorem pointReflection_vsub_right (x y : P) : pointReflection x y -ᵥ y = 2 • (x -ᵥ y)

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[AddTorsor G P]
(x y : P)

(Equiv.pointReflection x) y -ᵥ y = 2 • (x -ᵥ y)


@[to_additive]
protected theorem map_div : (f / g).map m = f.map m / g.map m

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Group α]
[DivisionMonoid β]
[FunLike F α β]
[MonoidHomClass F α β]
(m : F)
{f g : Filter α}

Filter.map (⇑m) (f / g) = Filter.map (⇑m) f / Filter.map (⇑m) g


theorem isColimit_rep_eq_of_exists {D : Cocone F} {i j : J} (x : F.obj i) (y : F.obj j)
    (h : ∃ (k : _) (f : i ⟶ k) (g : j ⟶ k), F.map f x = F.map g y) :
    D.ι.app i x = D.ι.app j y

(x : (CategoryTheory.forget C).obj (F.obj i))

(y : (CategoryTheory.forget C).obj (F.obj j))

(h : ∃ k f g, (F.map f) x = (F.map g) y)


@[simp]
theorem mem_star [Star α] : a ∈ s⋆ ↔ a⋆ ∈ s

{α : Type u_1}
{s : Set α}
{a : α}
[Star α]


@[to_additive]
theorem partialProd_left_inv {G : Type*} [Group G] (f : Fin (n + 1) → G) :
    (f 0 • partialProd fun i : Fin n => (f i)⁻¹ * f i.succ) = f

{n : ℕ}
{G : Type u_3}
[Group G]
(f : Fin (n + 1) → G)

(f 0 • Fin.partialProd fun i => (f ↑↑i)⁻¹ * f i.succ) = f


theorem sin_add_int_mul_two_pi (x : ℂ) (n : ℤ) : sin (x + n * (2 * π)) = sin x

Complex.sin (x + ↑n * (2 * ↑Real.pi)) = Complex.sin x


theorem whiskerLeft_sum (P : C) {Q R : C} {J : Type*} (s : Finset J) (g : J → (Q ⟶ R)) :
    P ◁ ∑ j ∈ s, g j = ∑ j ∈ s, P ◁ g j

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.MonoidalPreadditive C]
(P : C)
{Q R : C}
{J : Type u_2}
(s : Finset J)
(g : J → (Q ⟶ R))

CategoryTheory.MonoidalCategory.whiskerLeft P (∑ j ∈ s, g j) =
  ∑ j ∈ s, CategoryTheory.MonoidalCategory.whiskerLeft P (g j)


theorem exp_def (x : tsze R M) : exp 𝕜 x = inl (exp 𝕜 x.fst) + inr (exp 𝕜 x.fst • x.snd)

(𝕜 : Type u_1)
{R : Type u_3}
{M : Type u_4}
[Field 𝕜]
[CharZero 𝕜]
[CommRing R]
[AddCommGroup M]
[Algebra 𝕜 R]
[Module 𝕜 M]
[Module R M]
[Module Rᵐᵒᵖ M]
[IsCentralScalar R M]
[IsScalarTower 𝕜 R M]
[TopologicalSpace R]
[TopologicalSpace M]
[TopologicalRing R]
[TopologicalAddGroup M]
[ContinuousSMul R M]
[ContinuousSMul Rᵐᵒᵖ M]
[T2Space R]
[T2Space M]
(x : tsze R M)

NormedSpace.exp 𝕜 x = TrivSqZeroExt.inl (NormedSpace.exp 𝕜 x.fst) + TrivSqZeroExt.inr (NormedSpace.exp 𝕜 x.fst • x.snd)


theorem finiteType_respectsIso : RingHom.RespectsIso @RingHom.FiniteType


theorem count_lt_card {n : ℕ} (hp : (setOf p).Finite) (hpn : p n) : count p n < hp.toFinset.card

{p : ℕ → Prop}
[DecidablePred p]
{n : ℕ}
(hp : (setOf p).Finite)
(hpn : p n)


lemma exists_norm_mul_eq_self (x : K) : ∃ c, ‖c‖ = 1 ∧ c * ‖x‖ = x


@[simp]
theorem eval_zero (F : Homotopy p₀ p₁) : F.eval 0 = p₀

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ : X}
{p₀ p₁ : Path x₀ x₁}
(F : p₀.Homotopy p₁)


/-- A family is affinely independent if and only if any affine
combinations (with sum of weights 1) that evaluate to the same point
have equal `Set.indicator`. -/
theorem affineIndependent_iff_indicator_eq_of_affineCombination_eq (p : ι → P) :
    AffineIndependent k p ↔
      ∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
        ∑ i ∈ s1, w1 i = 1 →
          ∑ i ∈ s2, w2 i = 1 →
            s1.affineCombination k p w1 = s2.affineCombination k p w2 →
              Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{ι : Type u_4}
(p : ι → P)

AffineIndependent k p ↔
  ∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
    ∑ i ∈ s1, w1 i = 1 →
      ∑ i ∈ s2, w2 i = 1 →
        (Finset.affineCombination k s1 p) w1 = (Finset.affineCombination k s2 p) w2 →
          (↑s1).indicator w1 = (↑s2).indicator w2


lemma AntivaryOn.mul_left₀ (hf₁ : ∀ i ∈ s, 0 ≤ f₁ i) (hf₂ : ∀ i ∈ s, 0 ≤ f₂ i)
    (h₁ : AntivaryOn f₁ g s) (h₂ : AntivaryOn f₂ g s) : AntivaryOn (f₁ * f₂) g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedSemiring α]
[OrderedSemiring β]
{s : Set ι}
{f₁ f₂ : ι → α}
{g : ι → β}
(hf₁ : ∀ i ∈ s, 0 ≤ f₁ i)
(hf₂ : ∀ i ∈ s, 0 ≤ f₂ i)
(h₁ : AntivaryOn f₁ g s)
(h₂ : AntivaryOn f₂ g s)


/-- Constructor for `ComposableArrows C 1`. -/
@[simps]
def mk₁ {X₀ X₁ : C} (f : X₀ ⟶ X₁) : ComposableArrows C 1

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

∀ {X Y : Fin (1 + 1)} (g : X ⟶ Y),
  (CategoryTheory.ComposableArrows.mk₁ f).map g = CategoryTheory.ComposableArrows.Mk₁.map f X Y ⋯


theorem OrdConnected.dual {s : Set α} (hs : OrdConnected s) :
    OrdConnected (OrderDual.ofDual ⁻¹' s)

{α : Type u_1}
[Preorder α]
{s : Set α}
(hs : s.OrdConnected)


theorem sum_divisors_mul {m n : ℕ} (hmn : m.Coprime n) :
    ∑ d ∈ (m * n).divisors, d = (∑ d ∈ m.divisors, d) * ∑ d ∈ n.divisors, d


@[to_additive (attr := simp)]
theorem map_bot (f : G →* N) : (⊥ : Subgroup G).map f = ⊥

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : G →+ N)


@[simp, norm_cast]
theorem coe_comp' (h : B →A[R] C) (f : A →A[R] B) : ⇑(h.comp f) = h ∘ f

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
{B : Type u_3}
[Semiring B]
[TopologicalSpace B]
[Algebra R A]
[Algebra R B]
{C : Type u_4}
[Semiring C]
[Algebra R C]
[TopologicalSpace C]
(h : B →A[R] C)
(f : A →A[R] B)


theorem vanishingIdeal_union (t t' : Set (ProjectiveSpectrum 𝒜)) :
    vanishingIdeal (t ∪ t') = vanishingIdeal t ⊓ vanishingIdeal t'

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(t t' : Set (ProjectiveSpectrum 𝒜))

ProjectiveSpectrum.vanishingIdeal (t ∪ t') = ProjectiveSpectrum.vanishingIdeal t ⊓ ProjectiveSpectrum.vanishingIdeal t'


@[simp]
theorem preimage_mul_const_Ioo (a b : α) {c : α} (h : 0 < c) :
    (fun x => x * c) ⁻¹' Ioo a b = Ioo (a / c) (b / c)

{α : Type u_1}
[LinearOrderedField α]
(a b : α)
{c : α}
(h : 0 < c)

(fun x => x * c) ⁻¹' Set.Ioo a b = Set.Ioo (a / c) (b / c)


/-- The canonical isomorphism `G/(ker φ) ≃* H` induced by a homomorphism `φ : G →* H`
with a right inverse `ψ : H → G`. -/
@[to_additive (attr := simps) "The canonical isomorphism `G/(ker φ) ≃+ H` induced by a homomorphism
`φ : G →+ H` with a right inverse `ψ : H → G`."]
def quotientKerEquivOfRightInverse (ψ : H → G) (hφ : RightInverse ψ φ) : G ⧸ ker φ ≃* H

{G : Type u}
[Group G]
{H : Type v}
[Group H]
(φ : G →* H)
(ψ : H → G)
(hφ : Function.RightInverse ψ ⇑φ)
(a : G ⧸ φ.ker)

(QuotientGroup.quotientKerEquivOfRightInverse φ ψ hφ) a = (QuotientGroup.kerLift φ) a


theorem option_some_iff {f : α → σ} : (Computable fun a => Option.some (f a)) ↔ Computable f

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

(Computable fun a => some (f a)) ↔ Computable f


/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
theorem ContDiffWithinAt.prod_map' {s : Set E} {t : Set E'} {f : E → F} {g : E' → F'} {p : E × E'}
    (hf : ContDiffWithinAt 𝕜 n f s p.1) (hg : ContDiffWithinAt 𝕜 n g t p.2) :
    ContDiffWithinAt 𝕜 n (Prod.map f g) (s ×ˢ t) p

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{s : Set E}
{t : Set E'}
{f : E → F}
{g : E' → F'}
{p : E × E'}
(hf : ContDiffWithinAt 𝕜 n f s p.1)
(hg : ContDiffWithinAt 𝕜 n g t p.2)


/-- A morphism between source objects `S ⟶ S'`
contravariantly induces a functor between structured arrows,
`StructuredArrow S' T ⥤ StructuredArrow S T`.

Ideally this would be described as a 2-functor from `D`
(promoted to a 2-category with equations as 2-morphisms)
to `Cat`.
-/
@[simps!]
def map (f : S ⟶ S') : StructuredArrow S' T ⥤ StructuredArrow S T

(X : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit S') T)

((CategoryTheory.StructuredArrow.map f).obj X).hom = CategoryTheory.CategoryStruct.comp f X.hom


@[simp]
theorem selfZPow_sub_natCast {n m : ℕ} :
    selfZPow x B (n - m) = mk' _ (x ^ n) (Submonoid.pow x m)

{R : Type u_1}
[CommRing R]
(x : R)
(B : Type u_2)
[CommRing B]
[Algebra R B]
[IsLocalization.Away x B]
{n m : ℕ}

selfZPow x B (↑n - ↑m) = IsLocalization.mk' B (x ^ n) (Submonoid.pow x m)


@[simp]
theorem single_mul_single [Fintype n] [DecidableEq k] [DecidableEq m] [DecidableEq n] [Semiring α]
    (a : m) (b : n) (c : k) :
    ((single a b).toMatrix : Matrix _ _ α) * (single b c).toMatrix = (single a c).toMatrix

{k : Type u_1}
{m : Type u_3}
{n : Type u_4}
{α : Type v}
[Fintype n]
[DecidableEq k]
[DecidableEq m]
[DecidableEq n]
[Semiring α]
(a : m)
(b : n)
(c : k)

(PEquiv.single a b).toMatrix * (PEquiv.single b c).toMatrix = (PEquiv.single a c).toMatrix


theorem cylinder_eq_cylinder_of_le_firstDiff (x y : ∀ n, E n) {n : ℕ} (hn : n ≤ firstDiff x y) :
    cylinder x n = cylinder y n

{E : ℕ → Type u_1}
(x y : (n : ℕ) → E n)
{n : ℕ}
(hn : n ≤ PiNat.firstDiff x y)


@[to_additive]
theorem subgroupOf_normalizer_eq {H N : Subgroup G} (h : H.normalizer ≤ N) :
    H.normalizer.subgroupOf N = (H.subgroupOf N).normalizer

{G : Type u_1}
[Group G]
{H N : Subgroup G}
(h : H.normalizer ≤ N)


@[simp]
theorem map_kstar (f : α → β) (l : Language α) : map f l∗ = (map f l)∗

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

(Language.map f) l∗ = ((Language.map f) l)∗


@[simp]
theorem closure_Iic (a : α) : closure (Iic a) = Iic a

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


@[simp]
theorem cast_to_num (n : PosNum) : ↑n = Num.pos n


theorem map_smul [Module R₁ M₂] (e : M₁ ≃L[R₁] M₂) (c : R₁) (x : M₁) : e (c • x) = c • e 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₂]
(e : M₁ ≃L[R₁] M₂)
(c : R₁)
(x : M₁)


/-- The counit isomorphism of the equivalence -/
@[simps]
def counitIso : inverse C ⋙ toKaroubi (Karoubi C) ≅ 𝟭 (Karoubi (Karoubi C))

(P : CategoryTheory.Idempotents.Karoubi (CategoryTheory.Idempotents.Karoubi C))

((CategoryTheory.Idempotents.KaroubiKaroubi.counitIso C).hom.app P).f.f = P.p.f


/-- If the image of a family of vectors under a linear map is linearly independent, then so is
the original family. -/
theorem LinearIndependent.of_comp (f : M →ₗ[R] M') (hfv : LinearIndependent R (f ∘ v)) :
    LinearIndependent R v

{ι : Type u'}
{R : Type u_2}
{M : Type u_4}
{M' : Type u_5}
{v : ι → M}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
(hfv : LinearIndependent R (⇑f ∘ v))


lemma eq_zero_of_mul_le (hb : 2 ≤ n) (h : n * m ≤ m) : m = 0


theorem ConcaveOn.convex_hypograph (hf : ConcaveOn 𝕜 s f) :
    Convex 𝕜 { p : E × β | p.1 ∈ s ∧ p.2 ≤ f p.1 }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConcaveOn 𝕜 s f)


@[symm]
theorem Fuzzy.swap {x y : PGame} : x ‖ y → y ‖ x


theorem toLinearMap_injective : Function.Injective (toLinearMap : _ → A₁ →ₗ[R] A₂)

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]


/-- If `f` is injective, then `Nat.card α ≤ Nat.card β`. We must also assume
  `Nat.card β = 0 → Nat.card α = 0` since `Nat.card` is defined to be `0` for infinite types. -/
theorem card_le_of_injective' {f : α → β} (hf : Function.Injective f)
    (h : Nat.card β = 0 → Nat.card α = 0) : Nat.card α ≤ Nat.card β

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
(h : Nat.card β = 0 → Nat.card α = 0)


@[to_additive]
theorem SemiconjBy.pi {x y z : ∀ i, f i} (h : ∀ i, SemiconjBy (x i) (y i) (z i)) :
    SemiconjBy x y z

(h : ∀ (i : I), SemiconjBy (x i) (y i) (z i))


/-- `TrivSqZeroExt.fst` as a continuous linear map. -/
@[simps]
def fstCLM [CommSemiring R] [AddCommMonoid M] [Module R M] : tsze R M →L[R] R

(R : Type u_3)
(M : Type u_4)
[TopologicalSpace R]
[TopologicalSpace M]
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(x : tsze R M)


private lemma zero_hom' : (0 : Ext X Y n).hom' = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[CategoryTheory.HasExt C]
(X Y : C)
(n : ℕ)


@[simp]
theorem dual_comp (g : InfTopHom β γ) (f : InfTopHom α β) :
    InfTopHom.dual (g.comp f) = (InfTopHom.dual g).comp (InfTopHom.dual f)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Inf α]
[Top α]
[Inf β]
[Top β]
[Inf γ]
[Top γ]
(g : InfTopHom β γ)
(f : InfTopHom α β)


@[simp]
theorem add_oreDiv {r r' : X} {s : S} : r /ₒ s + r' /ₒ s = (r + r') /ₒ s

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[AddMonoid X]
[DistribMulAction R X]
{r r' : X}
{s : ↥S}


@[to_additive (attr := simp)]
theorem lift_of (x : α) : lift f (of x) = f x

{α : Type u}
{β : Type v}
[AddSemigroup β]
(f : α → β)
(x : α)

(FreeAddSemigroup.lift f) (FreeAddSemigroup.of x) = f x


@[simp]
theorem minimum_singleton (a : α) : minimum [a] = a

{α : Type u_1}
[Preorder α]
[DecidableRel fun x x_1 => x < x_1]
(a : α)


theorem Equiv.graph_inv (f : α ≃ β) : (f.symm : β → α).graph = Rel.inv (f : α → β).graph

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

Function.graph ⇑f.symm = (Function.graph ⇑f).inv


theorem Coprime.pow {k l : Nat} (m n : Nat) (H1 : Coprime k l) : Coprime (k ^ m) (l ^ n)

{k l : Nat}
(m n : Nat)
(H1 : k.Coprime l)


@[simp]
theorem coe_comp_ofNat_range : Set.range ((↑) ∘ ofNat s : ℕ → ℕ) = s

{s : Set ℕ}
[Infinite ↑s]
[DecidablePred fun x => x ∈ s]

Set.range (Subtype.val ∘ Nat.Subtype.ofNat s) = s


@[simp]
theorem symm_mk {X Y : C} (hom : X ⟶ Y) (inv : Y ⟶ X) (hom_inv_id) (inv_hom_id) :
    Iso.symm { hom, inv, hom_inv_id := hom_inv_id, inv_hom_id := inv_hom_id } =
      { hom := inv, inv := hom, hom_inv_id := inv_hom_id, inv_hom_id := hom_inv_id }

(hom_inv_id : CategoryTheory.CategoryStruct.comp hom inv = CategoryTheory.CategoryStruct.id X)

(inv_hom_id : CategoryTheory.CategoryStruct.comp inv hom = CategoryTheory.CategoryStruct.id Y)

{ hom := hom, inv := inv, hom_inv_id := hom_inv_id, inv_hom_id := inv_hom_id }.symm =
  { hom := inv, inv := hom, hom_inv_id := inv_hom_id, inv_hom_id := hom_inv_id }


protected theorem exists_eq_mk (C : G.ComponentCompl K) :
    ∃ (v : _) (h : v ∉ K), G.componentComplMk h = C

{V : Type u}
{G : SimpleGraph V}
{K : Set V}
(C : G.ComponentCompl K)

∃ v, ∃ (h : v ∉ K), G.componentComplMk h = C


@[simp] lemma isAtom_singleton (a : α) : IsAtom ({a} : Multiset α)


theorem tensor_comp {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : Dial C}
    (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁) (g₂ : Y₂ ⟶ Z₂) :
    tensorHom (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom f₁ f₂ ≫ tensorHom g₁ g₂

{X₁ Y₁ Z₁ X₂ Y₂ Z₂ : CategoryTheory.Dial C}

CategoryTheory.Dial.tensorHom (CategoryTheory.CategoryStruct.comp f₁ g₁) (CategoryTheory.CategoryStruct.comp f₂ g₂) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Dial.tensorHom f₁ f₂) (CategoryTheory.Dial.tensorHom g₁ g₂)


@[simp]
theorem coe_toAddSubgroup : (p.toAddSubgroup : Set M) = p

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
{module_M : Module R M}
(p : Submodule R M)


/-- If a null-measurable subset of the circle is almost invariant under rotation by a family of
rational angles with denominators tending to infinity, then it must be almost empty or almost full.
-/
theorem ae_empty_or_univ_of_forall_vadd_ae_eq_self {s : Set <| AddCircle T}
    (hs : NullMeasurableSet s volume) {ι : Type*} {l : Filter ι} [l.NeBot] {u : ι → AddCircle T}
    (hu₁ : ∀ i, (u i +ᵥ s : Set _) =ᵐ[volume] s) (hu₂ : Tendsto (addOrderOf ∘ u) l atTop) :
    s =ᵐ[volume] (∅ : Set <| AddCircle T) ∨ s =ᵐ[volume] univ

(hs : MeasureTheory.NullMeasurableSet s MeasureTheory.volume)

(hu₁ : ∀ (i : ι), u i +ᵥ s =ᵐ[MeasureTheory.volume] s)

(hu₂ : Filter.Tendsto (addOrderOf ∘ u) l Filter.atTop)

s =ᵐ[MeasureTheory.volume] ∅ ∨ s =ᵐ[MeasureTheory.volume] Set.univ


theorem hasFiniteIntegral_iff_norm (f : α → β) :
    HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) < ∞

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

MeasureTheory.HasFiniteIntegral f μ ↔ ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ < ⊤


theorem ball_zero_eq : ball p 0 r = { y : E | p y < r }

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
(p : Seminorm 𝕜 E)
{r : ℝ}


theorem one_mem_properDivisors_iff_one_lt : 1 ∈ n.properDivisors ↔ 1 < n


theorem iInf_sum {α : Type*} {f : ι → α → ℝ≥0∞} {s : Finset α} [Nonempty ι]
    (h : ∀ (t : Finset α) (i j : ι), ∃ k, ∀ a ∈ t, f k a ≤ f i a ∧ f k a ≤ f j a) :
    ⨅ i, ∑ a ∈ s, f i a = ∑ a ∈ s, ⨅ i, f i a

{f : ι → α → ℝ≥0∞}


theorem _root_.Batteries.RBNode.cmpEq.RootOrdered_congr
    {cmp : α → α → Ordering} (h : cmpEq cmp a b) :
    ∀ {t : Path α}, t.RootOrdered cmp a ↔ t.RootOrdered cmp b

{α : Type u_1}
{a b : α}
{cmp : α → α → Ordering}
(h : Batteries.RBNode.cmpEq cmp a b)
{t : Batteries.RBNode.Path α}

Batteries.RBNode.Path.RootOrdered cmp t a ↔ Batteries.RBNode.Path.RootOrdered cmp t b


/-- For nonzero regular left invariant measures, the integral of a continuous nonnegative function
  `f` is 0 iff `f` is 0. -/
@[to_additive
      "For nonzero regular left invariant measures, the integral of a continuous nonnegative
      function `f` is 0 iff `f` is 0."]
theorem lintegral_eq_zero_of_isMulLeftInvariant [Regular μ] [NeZero μ] {f : G → ℝ≥0∞}
    (hf : Continuous f) : ∫⁻ x, f x ∂μ = 0 ↔ f = 0

{G : Type u_1}
[MeasurableSpace G]
{μ : MeasureTheory.Measure G}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
[BorelSpace G]
[μ.IsAddLeftInvariant]
[μ.Regular]
[NeZero μ]
{f : G → ENNReal}
(hf : Continuous f)


theorem iUnion_Iic_eq_Iio_iSup {R : Type*} [CompleteLinearOrder R] {f : ι → R}
    (no_greatest_elem : (⨆ i, f i) ∉ range f) : ⋃ i : ι, Iic (f i) = Iio (⨆ i, f i)

(no_greatest_elem : ⨆ i, f i ∉ Set.range f)


@[simp]
theorem List.dProd_cons (fι : α → ι) (fA : ∀ a, A (fι a)) (a : α) (l : List α) :
    (a :: l).dProd fι fA = (GradedMonoid.GMul.mul (fA a) (l.dProd fι fA) : _)

{ι : Type u_1}
{α : Type u_2}
{A : ι → Type u_3}
[AddMonoid ι]
[GradedMonoid.GMonoid A]
(fι : α → ι)
(fA : (a : α) → A (fι a))
(a : α)
(l : List α)

(a :: l).dProd fι fA = GradedMonoid.GMul.mul (fA a) (l.dProd fι fA)


theorem not_isRight {x : α ⊕ β} : ¬x.isRight ↔ x.isLeft

{α : Type u_1}
{β : Type u_2}
{x : α ⊕ β}


theorem ord_aleph_isLimit (o : Ordinal) : (aleph o).ord.IsLimit


theorem cons_inter_distrib (a : α) (s t : Multiset α) : a ::ₘ s ∩ t = (a ::ₘ s) ∩ (a ::ₘ t)

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


lemma im_eq_zero (h : I = (0 : K)) (z : K) : im z = 0

{K : Type u_1}
[RCLike K]
(h : RCLike.I = 0)
(z : K)


/-- Lagrange interpolation: given a finset `s : Finset ι`, a nodal map `v : ι → F` injective on
`s` and a value function `r : ι → F`, `interpolate s v r` is the unique
polynomial of degree `< s.card` that takes value `r i` on `v i` for all `i` in `s`. -/
@[simps]
def interpolate (s : Finset ι) (v : ι → F) : (ι → F) →ₗ[F] F[X]

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
(s : Finset ι)
(v r : ι → F)

(Lagrange.interpolate s v) r = ∑ i ∈ s, Polynomial.C (r i) * Lagrange.basis s v i


@[simp]
theorem zero_lt_top : (0 : ℕ∞) < ⊤


@[simp] theorem and_self_right : ∀(a b : Bool), ((a && b) && b) = (a && b)


theorem segment_eq_image' (x y : E) :
    [x -[𝕜] y] = (fun θ : 𝕜 => x + θ • (y - x)) '' Icc (0 : 𝕜) 1

(𝕜 : Type u_1)
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(x y : E)


lemma div_div_cancel' (ha : a ≠ 0) : a / (a / b) = b

{G₀ : Type u_3}
[CommGroupWithZero G₀]
{a b : G₀}
(ha : a ≠ 0)


@[to_additive]
theorem comp_lift (g : M →* N) (f : α → M) : g.comp (lift f) = lift (g ∘ f)

{α : Type u_1}
{M : Type u_4}
[AddMonoid M]
{N : Type u_5}
[AddMonoid N]
(g : M →+ N)
(f : α → M)

g.comp (FreeAddMonoid.lift f) = FreeAddMonoid.lift (⇑g ∘ f)