@[simp]
theorem coe_ofVectorSpace : ⇑(ofVectorSpace K V) = ((↑) : _ → _ )

(K : Type u_3)
(V : Type u_4)
[DivisionRing K]
[AddCommGroup V]
[Module K V]

⇑(Basis.ofVectorSpace K V) = Subtype.val


theorem div_lt_one_of_neg (hb : b < 0) : a / b < 1 ↔ b < a

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


theorem Disjoint.card_support_mul (h : Disjoint f g) :
    (f * g).support.card = f.support.card + g.support.card

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


theorem ofRat_add (x y : β) :
    ofRat (x + y) = (ofRat x + ofRat y : Cauchy abv)

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

CauSeq.Completion.ofRat (x + y) = CauSeq.Completion.ofRat x + CauSeq.Completion.ofRat y


/-- If `r` is a negative constant, `fun x ↦ f x * r` tends to negative infinity along a filter `l`
if and only if `f` tends to infinity along `l`. -/
theorem tendsto_mul_const_atBot_of_neg (hr : r < 0) :
    Tendsto (fun x => f x * r) l atBot ↔ Tendsto f l atTop

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
(hr : r < 0)

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


lemma setIntegral_toReal_rnDeriv_eq_withDensity' [SigmaFinite μ]
    {s : Set α} (hs : MeasurableSet s) :
    ∫ x in s, (μ.rnDeriv ν x).toReal ∂ν = (ν.withDensity (μ.rnDeriv ν) s).toReal

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.SigmaFinite μ]
{s : Set α}
(hs : MeasurableSet s)

∫ (x : α) in s, (μ.rnDeriv ν x).toReal ∂ν = ((ν.withDensity (μ.rnDeriv ν)) s).toReal


theorem iSup_ennreal {α : Type*} [CompleteLattice α] {f : ℝ≥0∞ → α} :
    ⨆ n, f n = (⨆ n : ℝ≥0, f n) ⊔ f ∞

{α : Type u_2}
[CompleteLattice α]
{f : ℝ≥0∞ → α}


@[simp]
lemma Cotangent.val_smul (r : S) (x : P.Cotangent) : (r • x).val = P.σ r • x.val

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}
(r : S)
(x : P.Cotangent)


@[simp]
theorem spanCompIso_inv_app_right : (spanCompIso F f g).inv.app WalkingSpan.right = 𝟙 _

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

(CategoryTheory.Limits.spanCompIso F f g).inv.app CategoryTheory.Limits.WalkingSpan.right =
  𝟙 ((CategoryTheory.Limits.span (F.map f) (F.map g)).obj CategoryTheory.Limits.WalkingSpan.right)


protected theorem Integrable.hasIntegral (h : Integrable I l f vol) :
    HasIntegral I l f vol (integral I l f vol)

{ι : Type u}
{E : Type v}
{F : Type w}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{I : BoxIntegral.Box ι}
[Fintype ι]
{l : BoxIntegral.IntegrationParams}
{f : (ι → ℝ) → E}
{vol : ι →ᵇᵃ[⊤] E →L[ℝ] F}
(h : BoxIntegral.Integrable I l f vol)

BoxIntegral.HasIntegral I l f vol (BoxIntegral.integral I l f vol)


@[ext]
lemma yonedaPairingExt {X : Cᵒᵖ × (Cᵒᵖ ⥤ Type v₁)} {x y : (yonedaPairing C).obj X}
    (w : ∀ Y, x.app Y = y.app Y) : x = y

{X : Cᵒᵖ × CategoryTheory.Functor Cᵒᵖ (Type v₁)}

{x y : (CategoryTheory.yonedaPairing C).obj X}


/-- An `S`-torsion module is a module whose `S`-torsion submodule is the full space. -/
theorem isTorsion'_iff_torsion'_eq_top : IsTorsion' M S ↔ torsion' R M S = ⊤

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(S : Type u_3)
[CommMonoid S]
[DistribMulAction S M]
[SMulCommClass S R M]

Module.IsTorsion' M S ↔ Submodule.torsion' R M S = ⊤


theorem WCovBy.trans_antisymm_rel (hab : a ⩿ b) (hbc : AntisymmRel (· ≤ ·) b c) : a ⩿ c

(hbc : AntisymmRel (fun x x_1 => x ≤ x_1) b c)


@[simp]
theorem extendScalars_toSubfield : (extendScalars h).toSubfield = E.toSubfield

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

(IntermediateField.extendScalars h).toSubfield = E.toSubfield


@[to_additive mker_prod_map]
theorem mker_prod_map {M' : Type*} {N' : Type*} [MulOneClass M'] [MulOneClass N'] (f : M →* N)
    (g : M' →* N') : mker (prodMap f g) = f.mker.prod (mker g)

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{M' : Type u_6}
{N' : Type u_7}
[AddZeroClass M']
[AddZeroClass N']
(f : M →+ N)
(g : M' →+ N')

AddMonoidHom.mker (f.prodMap g) = (AddMonoidHom.mker f).prod (AddMonoidHom.mker g)


@[simp]
theorem map_cons (f : α ↪ β) (a : α) (s : Finset α) (ha : a ∉ s) :
    (cons a s ha).map f = cons (f a) (s.map f) (by simpa using ha)

{α : Type u_1}
{β : Type u_2}
(f : α ↪ β)
(a : α)
(s : Finset α)
(ha : a ∉ s)

Finset.map f (Finset.cons a s ha) = Finset.cons (f a) (Finset.map f s) ⋯


@[simp] theorem map_data (f : α → β) (arr : Array α) : (arr.map f).data = arr.data.map f

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(arr : Array α)

(Array.map f arr).data = List.map f arr.data


theorem zero_lt_of_ne_zero {a : Nat} (h : a ≠ 0) : 0 < a


theorem toLex_strictMono : StrictMono (@toLex (∀ i, β i))

{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]


theorem isCountablySpanning_measurableSet [MeasurableSpace α] :
    IsCountablySpanning { s : Set α | MeasurableSet s }

IsCountablySpanning {s | MeasurableSet s}


theorem congr_symm (f : M ≃ₗ[A] P) (g : N ≃ₗ[R] Q) : congr f.symm g.symm = (congr f g).symm

{R : Type uR}
{A : Type uA}
{M : Type uM}
{N : Type uN}
{P : Type uP}
{Q : Type uQ}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
[Module A P]
[IsScalarTower R A P]
[AddCommMonoid Q]
[Module R Q]
(f : M ≃ₗ[A] P)
(g : N ≃ₗ[R] Q)

TensorProduct.AlgebraTensorModule.congr f.symm g.symm = (TensorProduct.AlgebraTensorModule.congr f g).symm


theorem bind_smallSets_gc :
    GaloisConnection (fun L : Filter (Set α) ↦ L.bind principal) smallSets

GaloisConnection (fun L => L.bind 𝓟) Filter.smallSets


theorem mapsTo_extChartAt {x : M} (hs : s ⊆ (chartAt H x).source) :
    MapsTo (extChartAt I x) s ((extChartAt I x).symm ⁻¹' s ∩ range I)

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
{s : Set M}
[ChartedSpace H M]
{x : M}
(hs : s ⊆ (chartAt H x).source)

Set.MapsTo (↑(extChartAt I x)) s (↑(extChartAt I x).symm ⁻¹' s ∩ Set.range ↑I)


theorem comap_le_map_of_inv_on (g : G) (I : Ideal S) (hf : Set.LeftInvOn g f (f ⁻¹' I)) :
    I.comap f ≤ I.map g

(hf : Set.LeftInvOn (⇑g) (⇑f) (⇑f ⁻¹' ↑I))


@[simp] theorem Subsequent.moveLeft_mk_left {xR : xr → PGame} {i : xl} (xL : xl → PGame) (j) :
    Subsequent ((xL i).moveLeft j) (mk xl xr xL xR)

{xl xr : Type u}
{xR : xr → SetTheory.PGame}
{i : xl}
(xL : xl → SetTheory.PGame)
(j : (xL i).LeftMoves)

((xL i).moveLeft j).Subsequent (SetTheory.PGame.mk xl xr xL xR)


/-- The (identity) equivalence between `Cᴹᵒᵖ` and `C`. -/
@[simps!] def MonoidalOpposite.unmopEquiv : Cᴹᵒᵖ ≌ C

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

((CategoryTheory.MonoidalOpposite.unmopEquiv C).inverse.obj unmop).unmop = unmop


/-- An action of a monoid with zero `R` on a Type `M`, also with `0`, extends `MulAction` and
is compatible with `0` (both in `R` and in `M`), with `1 ∈ R`, and with associativity of
multiplication on the monoid `M`. -/
class MulActionWithZero extends MulAction R M where
  -- these fields are copied from `SMulWithZero`, as `extends` behaves poorly
  /-- Scalar multiplication by any element send `0` to `0`. -/
  smul_zero : ∀ r : R, r • (0 : M) = 0
  /-- Scalar multiplication by the scalar `0` is `0`. -/
  zero_smul : ∀ m : M, (0 : R) • m = 0

{R : Type u_1}
{M : Type u_3}
[MonoidWithZero R]
[Zero M]
[self : MulActionWithZero R M]
(m : M)


theorem Lex.mono (hr : ∀ a b, r₁ a b → r₂ a b) (hs : ∀ i a b, s₁ i a b → s₂ i a b) {a b : Σ i, α i}
    (h : Lex r₁ s₁ a b) : Lex r₂ s₂ a b

(hs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b)


/-- Summing the series `p.changeOrigin x` at a point `y` gives back `p (x + y)`. -/
theorem changeOrigin_eval (h : (‖x‖₊ + ‖y‖₊ : ℝ≥0∞) < p.radius) :
    (p.changeOrigin x).sum y = p.sum (x + y)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
(p : FormalMultilinearSeries 𝕜 E F)
{x y : E}
(h : ↑‖x‖₊ + ↑‖y‖₊ < p.radius)


theorem uniformEmbedding_iff_uniformInducing [T0Space α] {f : α → β} :
    UniformEmbedding f ↔ UniformInducing f

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
[T0Space α]
{f : α → β}


@[to_additive]
theorem leftInverse_inv : LeftInverse (fun a : G ↦ a⁻¹) fun a ↦ a⁻¹

Function.LeftInverse (fun a => a⁻¹) fun a => a⁻¹


@[to_additive (attr := simp)]
theorem one_left (a : M) : Commute 1 a


@[to_additive (attr := congr)]
theorem prod_congr (h : s₁ = s₂) : (∀ x ∈ s₂, f x = g x) → s₁.prod f = s₂.prod g

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f g : α → β}
[CommMonoid β]
(h : s₁ = s₂)


lemma addContent_eq_add_diffFinset₀_of_subset (hC : IsSetSemiring C)
    (hs : s ∈ C) (hI : ↑I ⊆ C) (hI_ss : ∀ t ∈ I, t ⊆ s)
    (h_dis : PairwiseDisjoint (I : Set (Set α)) id) :
    m s = ∑ i ∈ I, m i + ∑ i ∈ hC.diffFinset₀ hs hI, m i

{α : Type u_1}
{C : Set (Set α)}
{s : Set α}
{I : Finset (Set α)}
{m : MeasureTheory.AddContent C}
(hC : MeasureTheory.IsSetSemiring C)
(hs : s ∈ C)
(hI : ↑I ⊆ C)
(hI_ss : ∀ t ∈ I, t ⊆ s)
(h_dis : (↑I).PairwiseDisjoint id)


@[simp, norm_cast]
protected theorem coe_natCast (n : ℕ) : (↑(↑n : ℝ≥0) : ℝ) = n


theorem re_eq_self_of_le {a : K} (h : ‖a‖ ≤ re a) : (re a : K) = a

{K : Type u_1}
[RCLike K]
{a : K}
(h : ‖a‖ ≤ RCLike.re a)


theorem logb_nonpos_iff' (hx : 0 ≤ x) : logb b x ≤ 0 ↔ x ≤ 1


protected theorem eq_of_dist_eq_zero (x y : ∀ n, E n) (hxy : dist x y = 0) : x = y

{E : ℕ → Type u_1}
(x y : (n : ℕ) → E n)
(hxy : dist x y = 0)


protected theorem zsmul_mem {x : R} (hx : x ∈ s) (n : ℤ) : n • x ∈ s

{R : Type u}
[NonUnitalNonAssocRing R]
(s : NonUnitalSubring R)
{x : R}
(hx : x ∈ s)
(n : ℤ)


@[simp]
theorem rightUnitor_hom_apply {X : Type u} {x : X} {p : PUnit} :
    ((ρ_ X).hom : X ⊗ 𝟙_ (Type u) → X) (x, p) = x

{X : Type u}
{x : X}
{p : PUnit.{u + 1}}


theorem ConcreteCategory.congr_arg {X Y : C} (f : X ⟶ Y) {x x' : X} (h : x = x') : f x = f x'

{x x' : (CategoryTheory.forget C).obj X}


/-- `Equiv.curry` for `p`-ary heterogeneous functions. -/
@[simps]
def curryEquiv (p : Fin n → Type u) : (((i : Fin n) → p i) → τ) ≃ FromTypes p τ

{n : ℕ}
{τ : Type u}
(p : Fin n → Type u)

∀ (a : ((i : Fin n) → p i) → τ), (Function.FromTypes.curryEquiv p) a = Function.FromTypes.curry a


theorem BddBelow.exists_le [SemilatticeInf γ] {s : Set γ} (hs : BddBelow s) (x₀ : γ) :
    ∃ x, x ≤ x₀ ∧ ∀ y ∈ s, x ≤ y

{γ : Type w}
[SemilatticeInf γ]
{s : Set γ}
(hs : BddBelow s)
(x₀ : γ)


@[simp]
theorem nullHomotopicMap_f_of_not_rel_right {k₁ k₀ : ι} (r₁₀ : c.Rel k₁ k₀)
    (hk₁ : ∀ l : ι, ¬c.Rel l k₁) (hom : ∀ i j, C.X i ⟶ D.X j) :
    (nullHomotopicMap hom).f k₁ = C.d k₁ k₀ ≫ hom k₀ k₁

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
{k₁ k₀ : ι}
(r₁₀ : c.Rel k₁ k₀)
(hk₁ : ∀ (l : ι), ¬c.Rel l k₁)
(hom : (i j : ι) → C.X i ⟶ D.X j)

(Homotopy.nullHomotopicMap hom).f k₁ = C.d k₁ k₀ ≫ hom k₀ k₁


@[to_additive]
nonrec theorem IsUnit.op {M} [Monoid M] {m : M} (h : IsUnit m) : IsUnit (op m)

{M : Type u_2}
[AddMonoid M]
{m : M}
(h : IsAddUnit m)


/-- The composition of `(J ⥤ C) ⥤ Karoubi (J ⥤ C)` and `Karoubi (J ⥤ C) ⥤ (J ⥤ Karoubi C)`
equals the functor `(J ⥤ C) ⥤ (J ⥤ Karoubi C)` given by the composition with
`toKaroubi C : C ⥤ Karoubi C`. -/
theorem toKaroubi_comp_karoubiFunctorCategoryEmbedding :
    toKaroubi _ ⋙ karoubiFunctorCategoryEmbedding J C =
      (whiskeringRight J _ _).obj (toKaroubi C)

(J : Type u_1)
(C : Type u_2)
[CategoryTheory.Category.{u_3, u_1} J]
[CategoryTheory.Category.{u_4, u_2} C]

CategoryTheory.Idempotents.toKaroubi (J ⥤ C) ⋙ CategoryTheory.Idempotents.karoubiFunctorCategoryEmbedding J C =
  (CategoryTheory.whiskeringRight J C (CategoryTheory.Idempotents.Karoubi C)).obj
    (CategoryTheory.Idempotents.toKaroubi C)


@[simp] theorem USize.toNat_ofNat (n) :
    (no_index (OfNat.ofNat n) : USize).toNat = n % USize.size


lemma ltTrichotomy_not_gt (h : ¬ y < x) :
    ltTrichotomy x y p q r = if x < y then p else q

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
{p q r : P}
(h : ¬y < x)


theorem Specializes.eq [T1Space X] {x y : X} (h : x ⤳ y) : x = y

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
{x y : X}
(h : x ⤳ y)


/-- Build an isomorphism in the category `CoalgebraCat R` from a
`CoalgEquiv`. -/
@[simps]
def toCoalgebraCatIso (e : X ≃ₗc[R] Y) : CoalgebraCat.of R X ≅ CoalgebraCat.of R Y

{R : Type u}
[CommRing R]
{X Y : Type v}
[AddCommGroup X]
[Module R X]
[AddCommGroup Y]
[Module R Y]
[Coalgebra R X]
[Coalgebra R Y]
(e : X ≃ₗc[R] Y)


theorem finite_prime_left {a b : R} (ha : Prime a) (hb : b ≠ 0) : multiplicity.Finite a b

{R : Type u_1}
[CancelCommMonoidWithZero R]
[WfDvdMonoid R]
{a b : R}
(ha : Prime a)
(hb : b ≠ 0)


lemma mul_self_le_mul_self_iff : m * m ≤ n * n ↔ m ≤ n


@[simp]
theorem mk_multiset_of_nonempty (α : Type u) [Nonempty α] : #(Multiset α) = max #α ℵ₀


lemma comm_comp_rTensor_comp_comm_eq (g : N →ₗ[R] P) :
    TensorProduct.comm R P Q ∘ₗ rTensor Q g ∘ₗ TensorProduct.comm R Q N =
      lTensor Q g

{R : Type u_1}
[CommSemiring R]
{N : Type u_5}
{P : Type u_6}
{Q : Type u_7}
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R N]
[Module R P]
[Module R Q]
(g : N →ₗ[R] P)

↑(TensorProduct.comm R P Q) ∘ₗ LinearMap.rTensor Q g ∘ₗ ↑(TensorProduct.comm R Q N) = LinearMap.lTensor Q g


/-- A family `f` of mutually-orthogonal elements of `E` is summable, if and only if
`(fun i ↦ ‖f i‖ ^ 2)` is summable. -/
theorem OrthogonalFamily.summable_iff_norm_sq_summable [CompleteSpace E] (f : ∀ i, G i) :
    (Summable fun i => V i (f i)) ↔ Summable fun i => ‖f i‖ ^ 2

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{G : ι → Type u_5}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
{V : (i : ι) → G i →ₗᵢ[𝕜] E}
(hV : OrthogonalFamily 𝕜 G V)
[CompleteSpace E]
(f : (i : ι) → G i)

(Summable fun i => (V i) (f i)) ↔ Summable fun i => ‖f i‖ ^ 2


theorem integral_cexp_neg_mul_sq_norm (hb : 0 < b.re) :
    ∫ v : V, cexp (- b * ‖v‖^2) = (π / b) ^ (FiniteDimensional.finrank ℝ V / 2 : ℂ)

{b : ℂ}
{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[FiniteDimensional ℝ V]
[MeasurableSpace V]
[BorelSpace V]
(hb : 0 < b.re)

∫ (v : V), cexp (-b * ↑‖v‖ ^ 2) = (↑π / b) ^ (↑(FiniteDimensional.finrank ℝ V) / 2)


theorem comap_measurable {m : MeasurableSpace β} (f : α → β) : Measurable[m.comap f] f

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace β}
(f : α → β)


/-- Auxiliary definition for the proof of the shrinking lemma. A partial refinement of a covering
`⋃ i, u i` of a set `s` is a map `v : ι → Set X` and a set `carrier : Set ι` such that

* `s ⊆ ⋃ i, v i`;
* all `v i` are open;
* if `i ∈ carrier v`, then `closure (v i) ⊆ u i`;
* if `i ∉ carrier`, then `v i = u i`.

This type is equipped with the following partial order: `v ≤ v'` if `v.carrier ⊆ v'.carrier`
and `v i = v' i` for `i ∈ v.carrier`. We will use Zorn's lemma to prove that this type has
a maximal element, then show that the maximal element must have `carrier = univ`. -/
-- Porting note(#5171): this linter isn't ported yet. @[nolint has_nonempty_instance]
@[ext] structure PartialRefinement (u : ι → Set X) (s : Set X) where
  /-- A family of sets that form a partial refinement of `u`. -/
  toFun : ι → Set X
  /-- The set of indexes `i` such that `i`-th set is already shrunk. -/
  carrier : Set ι
  /-- Each set from the partially refined family is open. -/
  protected isOpen : ∀ i, IsOpen (toFun i)
  /-- The partially refined family still covers the set. -/
  subset_iUnion : s ⊆ ⋃ i, toFun i
  /-- For each `i ∈ carrier`, the original set includes the closure of the refined set. -/
  closure_subset : ∀ {i}, i ∈ carrier → closure (toFun i) ⊆ u i
  /-- Sets that correspond to `i ∉ carrier` are not modified. -/
  apply_eq : ∀ {i}, i ∉ carrier → toFun i = u i

(self : ShrinkingLemma.PartialRefinement u s)


@[simp]
lemma totallyBounded_closure {s : Set α} : TotallyBounded (closure s) ↔ TotallyBounded s

{α : Type u}
[uniformSpace : UniformSpace α]
{s : Set α}


theorem of_eq_of_gradedMonoid_eq {A : ι → Type*} [∀ i : ι, AddCommMonoid (A i)] {i j : ι} {a : A i}
    {b : A j} (h : GradedMonoid.mk i a = GradedMonoid.mk j b) :
    DirectSum.of A i a = DirectSum.of A j b

(DirectSum.of A i) a = (DirectSum.of A j) b


theorem union_preimage_subset (s : Set α) (t : Set β) (f : α → β) :
    s ∪ f ⁻¹' t ⊆ f ⁻¹' (f '' s ∪ t)

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


/-- Two submodules in an orthogonal family with different indices are orthogonal. -/
theorem OrthogonalFamily.isOrtho {ι} {V : ι → Submodule 𝕜 E}
    (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) {i j : ι} (hij : i ≠ j) :
    V i ⟂ V j

(hV : OrthogonalFamily 𝕜 (fun i => ↥(V i)) fun i => (V i).subtypeₗᵢ)


/-- A bundled map `f : G → H` such that `f (x + a) = f x + b` for all `x`.

One can think about `f` as a lift to `G` of a map between two `AddCircle`s. -/
structure AddConstMap (G H : Type*) [Add G] [Add H] (a : G) (b : H) where
  /-- The underlying function of an `AddConstMap`.
  Use automatic coercion to function instead. -/
  protected toFun : G → H
  /-- An `AddConstMap` satisfies `f (x + a) = f x + b`. Use `map_add_const` instead. -/
  map_add_const' (x : G) : toFun (x + a) = toFun x + b

{G : Type u_1}
{H : Type u_2}
[Add G]
[Add H]
{a : G}
{b : H}
(self : AddConstMap G H a b)
(x : G)


theorem IsLocalExtrOn.elim {p : Prop} :
    IsLocalExtrOn f s a → (IsLocalMinOn f s a → p) → (IsLocalMaxOn f s a → p) → p

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
{p : Prop}


@[to_additive]
lemma iIndepFun.indepFun_div_left (hf_indep : iIndepFun (fun _ ↦ m) f κ μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) :
    IndepFun (f i / f j) (f k) κ μ

{f : ι → Ω → β}

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

ProbabilityTheory.Kernel.IndepFun (f i / f j) (f k) κ μ


theorem mul_def : p * q = p.sum fun m a => q.sum fun n b => monomial (m + n) (a * b)

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{p q : MvPolynomial σ R}

p * q = Finsupp.sum p fun m a => Finsupp.sum q fun n b => (MvPolynomial.monomial (m + n)) (a * b)


@[to_additive]
theorem disjoint_iff_mul_eq_one {H₁ H₂ : Subgroup G} :
    Disjoint H₁ H₂ ↔ ∀ {x y : G}, x ∈ H₁ → y ∈ H₂ → x * y = 1 → x = 1 ∧ y = 1

{G : Type u_1}
[AddGroup G]
{H₁ H₂ : AddSubgroup G}

Disjoint H₁ H₂ ↔ ∀ {x y : G}, x ∈ H₁ → y ∈ H₂ → x + y = 0 → x = 0 ∧ y = 0


/-- A function `-f` is convex iff `f` is concave. -/
@[simp]
theorem neg_convexOn_iff : ConvexOn 𝕜 s (-f) ↔ ConcaveOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommGroup β]
[SMul 𝕜 E]
[Module 𝕜 β]
{s : Set E}
{f : E → β}


theorem EventuallyEq.filter_mono {l l' : Filter α} {f g : α → β} (h₁ : f =ᶠ[l] g) (h₂ : l' ≤ l) :
    f =ᶠ[l'] g

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


@[csimp] theorem bind_eq_bindTR : @List.bind = @bindTR

(α : Type u_2)
(β : Type u_1)
(f : α → List β)
(as : List α)
(acc : Array β)

List.bindTR.go f as acc = acc.data ++ as.bind f


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

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)
{α : Type u_1}
[Zero α]
{ι : Type u_2}
(f : ι →₀ α)
(g : ι → α → A₁)


@[simp]
lemma natCast_lt_ofReal {n : ℕ} {r : ℝ} : n < ENNReal.ofReal r ↔ n < r


theorem nhds_ne_subtype_eq_bot_iff {S : Set X} {x : S} :
    𝓝[≠] x = ⊥ ↔ 𝓝[≠] (x : X) ⊓ 𝓟 S = ⊥

{X : Type u}
[TopologicalSpace X]
{S : Set X}
{x : ↑S}

𝓝[≠] x = ⊥ ↔ 𝓝[≠] ↑x ⊓ 𝓟 S = ⊥


@[to_additive]
lemma IsOfFinOrder.mem_powers_iff_mem_zpowers (hx : IsOfFinOrder x) :
    y ∈ powers x ↔ y ∈ zpowers x

{G : Type u_1}
[AddGroup G]
{x y : G}
(hx : IsOfFinAddOrder x)

y ∈ AddSubmonoid.multiples x ↔ y ∈ AddSubgroup.zmultiples x


@[simp]
theorem monomial_mul_C : monomial n a * C b = monomial n (a * b)

{R : Type u}
{a b : R}
{n : ℕ}
[Semiring R]

(Polynomial.monomial n) a * Polynomial.C b = (Polynomial.monomial n) (a * b)


theorem mapRange.linearMap_comp (f : N →ₗ[R] P) (f₂ : M →ₗ[R] N) :
    (mapRange.linearMap (f.comp f₂) : (α →₀ _) →ₗ[R] _) =
      (mapRange.linearMap f).comp (mapRange.linearMap f₂)

{α : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
(f : N →ₗ[R] P)
(f₂ : M →ₗ[R] N)

Finsupp.mapRange.linearMap (f ∘ₗ f₂) = Finsupp.mapRange.linearMap f ∘ₗ Finsupp.mapRange.linearMap f₂


@[simp]
theorem basis_apply (h : IsAdjoinRootMonic S f) (i) : h.basis i = h.root ^ (i : ℕ)

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
(h : IsAdjoinRootMonic S f)
(i : Fin f.natDegree)


@[to_additive]
theorem map_ne_one_iff {M N} [MulOneClass M] [MulOneClass N] [EquivLike F M N] [MulEquivClass F M N]
    (h : F) {x : M} :
    h x ≠ 1 ↔ x ≠ 1

{F : Type u_1}
{M : Type u_12}
{N : Type u_13}
[AddZeroClass M]
[AddZeroClass N]
[EquivLike F M N]
[AddEquivClass F M N]
(h : F)
{x : M}


/-- (implementation) The constructured limit cone. -/
@[simps]
noncomputable def liftedCone : Cone F

(F : CategoryTheory.Functor I A.Elements)

(CategoryTheory.CategoryOfElements.CreatesLimitsAux.liftedCone F).pt.fst =
  CategoryTheory.Limits.limit (F.comp (CategoryTheory.CategoryOfElements.π A))


theorem pairwise_of_forall_mem_list {l : List α} {r : α → α → Prop} (h : ∀ a ∈ l, ∀ b ∈ l, r a b) :
    l.Pairwise r

(h : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → r a b)


theorem gfp_const_inf_le (x : α) : gfp (const α x ⊓ f) ≤ x

{α : Type u}
[CompleteLattice α]
(f : α →o α)
(x : α)

OrderHom.gfp ((OrderHom.const α) x ⊓ f) ≤ x


/-- A component of a transposed form of the conjugation definition. -/
theorem unit_conjugateEquiv (α : L₂ ⟶ L₁) (c : C) :
    adj₁.unit.app _ ≫ (conjugateEquiv adj₁ adj₂ α).app _ =
      adj₂.unit.app c ≫ R₂.map (α.app _)

{C : Type u₁}
{D : Type u₂}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Category.{v₂, u₂} D]
{L₁ L₂ : CategoryTheory.Functor C D}
{R₁ R₂ : CategoryTheory.Functor D C}
(adj₁ : L₁ ⊣ R₁)
(adj₂ : L₂ ⊣ R₂)
(α : L₂ ⟶ L₁)
(c : C)

CategoryTheory.CategoryStruct.comp (adj₁.unit.app c) (((CategoryTheory.conjugateEquiv adj₁ adj₂) α).app (L₁.obj c)) =
  CategoryTheory.CategoryStruct.comp (adj₂.unit.app c) (R₂.map (α.app c))


theorem Sigma.ι_comp_toFiniteCoproduct (a : α) :
    (Limits.Sigma.ι X a) ≫ (coproductIsoCoproduct X).inv = finiteCoproduct.ι X a

{α : Type w}
[Finite α]
(X : α → CompHaus)
(a : α)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Sigma.ι X a) (CompHaus.coproductIsoCoproduct X).inv =
  CompHaus.finiteCoproduct.ι X a


@[simp]
lemma productEquiv_apply_apply (x : (forget C).obj (∏ᶜ F)) (j : J) :
    productEquiv F x j = Pi.π F j x

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Discrete.functor F) (CategoryTheory.forget C)]

(x : (CategoryTheory.forget C).obj (∏ᶜ F))

(CategoryTheory.Limits.Concrete.productEquiv F) x j = (CategoryTheory.Limits.Pi.π F j) x


/-- Regarding the `LieRing` of a `LieAlgebra` as a `NonUnitalNonAssocSemiring`, we can
regard a `LieHom` as a `NonUnitalAlgHom`. -/
@[simps]
def toNonUnitalAlgHom (f : L →ₗ⁅R⁆ L₂) : CommutatorRing L →ₙₐ[R] CommutatorRing L₂

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{L₂ : Type w}
[LieRing L₂]
[LieAlgebra R L₂]
(f : L →ₗ⁅R⁆ L₂)
(a : L)


theorem star_eq_neg {c₁ c₂ : R} {a : ℍ[R,c₁,c₂]} : star a = -a ↔ a.re = 0

{R : Type u_3}
[CommRing R]
[NoZeroDivisors R]
[CharZero R]
{c₁ c₂ : R}
{a : ℍ[R,c₁,c₂]}


lemma IsPullback.map (h : sq.IsPullback) (F : C ⥤ D) [PreservesLimit (cospan sq.f₂₄ sq.f₃₄) F] :
    (sq.map F).IsPullback

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan sq.f₂₄ sq.f₃₄) F]


@[simp]
theorem wittMul_zero : wittMul p 0 = X (0, 0) * X (1, 0)

WittVector.wittMul p 0 = MvPolynomial.X (0, 0) * MvPolynomial.X (1, 0)


@[simp]
theorem isPWO_bUnion [Preorder α] (s : Finset ι) {f : ι → Set α} :
    (⋃ i ∈ s, f i).IsPWO ↔ ∀ i ∈ s, (f i).IsPWO

{ι : Type u_1}
{α : Type u_2}
[Preorder α]
(s : Finset ι)
{f : ι → Set α}


@[simp]
theorem of_apply {i : ι} {x : G i} : of L ι G f i x = ⟦.mk f i x⟧

[DirectedSystem G fun i j h => ⇑(f i j h)]

(FirstOrder.Language.DirectLimit.of L ι G f i) x = ⟦FirstOrder.Language.Structure.Sigma.mk f i x⟧


/-- Two vertices are adjacent in the complete bipartite graph on two vertex types
if and only if they are not from the same side.
Any bipartite graph may be regarded as a subgraph of one of these. -/
@[simps]
def completeBipartiteGraph (V W : Type*) : SimpleGraph (V ⊕ W)

(V : Type u_1)
(W : Type u_2)
(v w : V ⊕ W)

(completeBipartiteGraph V W).Adj v w = (v.isLeft = true ∧ w.isRight = true ∨ v.isRight = true ∧ w.isLeft = true)


@[simp]
theorem isBoundedUnder_ge_exp_comp (l : Filter α) (f : α → ℝ) :
    IsBoundedUnder (· ≥ ·) l fun x => exp (f x)

{α : Type u_1}
(l : Filter α)
(f : α → ℝ)

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


protected theorem mul_comm (a b : Rat) : a * b = b * a


theorem isClosed_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) :
    IsClosed { b | f b ≤ g b }

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder α]
[t : OrderClosedTopology α]
[TopologicalSpace β]
{f g : β → α}
(hf : Continuous f)
(hg : Continuous g)


/-- Decomposing `fourierPowSMulRight L f v n` as a composition of continuous bilinear and
multilinear maps, to deduce easily its continuity and differentiability properties. -/
lemma fourierPowSMulRight_eq_comp {f : V → E} {v : V} {n : ℕ} :
    fourierPowSMulRight L f v n = (- (2 * π * I))^n • smulRightL ℝ (fun (_ : Fin n) ↦ W) E
      (compContinuousLinearMapLRight
        (ContinuousMultilinearMap.mkPiAlgebra ℝ (Fin n) ℝ) (fun _ ↦ L v)) (f v)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
{W : Type u_3}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[NormedAddCommGroup W]
[NormedSpace ℝ W]
(L : V →L[ℝ] W →L[ℝ] ℝ)
{f : V → E}
{v : V}
{n : ℕ}

VectorFourier.fourierPowSMulRight L f v n =
  (-(2 * ↑π * Complex.I)) ^ n •
    ((ContinuousMultilinearMap.smulRightL ℝ (fun x => W) E)
        ((ContinuousMultilinearMap.mkPiAlgebra ℝ (Fin n) ℝ).compContinuousLinearMapLRight fun x => L v))
      (f v)


theorem liftIsometry_comp_mapL (h : ContinuousMultilinearMap 𝕜 E' F) :
    liftIsometry 𝕜 E' F h ∘L mapL f = liftIsometry 𝕜 E F (h.compContinuousLinearMap f)

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

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

((PiTensorProduct.liftIsometry 𝕜 E' F) h).comp (PiTensorProduct.mapL f) =
  (PiTensorProduct.liftIsometry 𝕜 E F) (h.compContinuousLinearMap f)


theorem iIndepFun.indepFun {β : ι → Type*}
    {m : ∀ x, MeasurableSpace (β x)} {f : ∀ i, Ω → β i} (hf_Indep : iIndepFun m f μ) {i j : ι}
    (hij : i ≠ j) :
    IndepFun (f i) (f j) μ

(hf_Indep : ProbabilityTheory.iIndepFun m f μ)

ProbabilityTheory.IndepFun (f i) (f j) μ


@[simp]
theorem degree_mul_X : degree (p * X) = degree p + 1

{R : Type u}
[Semiring R]
[Nontrivial R]
{p : R[X]}

(p * Polynomial.X).degree = p.degree + 1


lemma IntermediateField.adjoin_root_eq_top_of_isSplittingField :
    K⟮α⟯ = ⊤

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

[Polynomial.IsSplittingField K L (Polynomial.X ^ n - Polynomial.C a)]


@[simp, norm_cast]
theorem toCoalgHom_inj {e₁ e₂ : A ≃ₗc[R] B} : (↑e₁ : A →ₗc[R] B) = e₂ ↔ 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}

↑e₁ = ↑e₂ ↔ e₁ = e₂


theorem aemeasurable_of_tendsto_metrizable_ae' {μ : Measure α} {f : ℕ → α → β} {g : α → β}
    (hf : ∀ n, AEMeasurable (f n) μ)
    (h_ae_tendsto : ∀ᵐ x ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))) : AEMeasurable g μ

{f : ℕ → α → β}

(h_ae_tendsto : ∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 (g x)))


@[simp]
protected theorem eq {v w : V} :
    G.connectedComponentMk v = G.connectedComponentMk w ↔ G.Reachable v w

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


theorem lindelofSpace_of_countable_subfamily_closed
    (h : ∀ {ι : Type u} (t : ι → Set X), (∀ i, IsClosed (t i)) → ⋂ i, t i = ∅ →
      ∃ u : Set ι, u.Countable ∧ ⋂ i ∈ u, t i = ∅) :
    LindelofSpace X

(h : ∀ {ι : Type u} (t : ι → Set X), (∀ (i : ι), IsClosed (t i)) → ⋂ i, t i = ∅ → ∃ u, u.Countable ∧ ⋂ i ∈ u, t i = ∅)


/-- A homotopy between two morphisms of short complexes `S₁ ⟶ S₂` consists of various
maps and conditions which will be sufficient to show that they induce the same morphism
in homology. -/
@[ext]
structure Homotopy where
  /-- a morphism `S₁.X₁ ⟶ S₂.X₁` -/
  h₀ : S₁.X₁ ⟶ S₂.X₁
  h₀_f : h₀ ≫ S₂.f = 0 := by aesop_cat
  /-- a morphism `S₁.X₂ ⟶ S₂.X₁` -/
  h₁ : S₁.X₂ ⟶ S₂.X₁
  /-- a morphism `S₁.X₃ ⟶ S₂.X₂` -/
  h₂ : S₁.X₃ ⟶ S₂.X₂
  /-- a morphism `S₁.X₃ ⟶ S₂.X₃` -/
  h₃ : S₁.X₃ ⟶ S₂.X₃
  g_h₃ : S₁.g ≫ h₃ = 0 := by aesop_cat
  comm₁ : φ₁.τ₁ = S₁.f ≫ h₁ + h₀ + φ₂.τ₁ := by aesop_cat
  comm₂ : φ₁.τ₂ = S₁.g ≫ h₂ + h₁ ≫ S₂.f + φ₂.τ₂ := by aesop_cat
  comm₃ : φ₁.τ₃ = h₃ + h₂ ≫ S₂.g + φ₂.τ₃ := by aesop_cat

{φ₁ φ₂ : S₁ ⟶ S₂}

(self : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)

φ₁.τ₂ = CategoryTheory.CategoryStruct.comp S₁.g self.h₂ + CategoryTheory.CategoryStruct.comp self.h₁ S₂.f + φ₂.τ₂


lemma dblU_smul (P : Fin 3 → R) (u : R) : W'.dblU (u • P) = u ^ 4 * W'.dblU P

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
(P : Fin 3 → R)
(u : R)


theorem image_subset_infs_left : b ∈ t → (fun a => a ⊓ b) '' s ⊆ s ⊼ t

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


lemma comp_inv {M N : Type*} {φ : M → N} {ψ : N → M}
    (h : Function.RightInverse φ ψ) {χ : M → M} [IsId χ] :
    CompTriple φ ψ χ

{M : Type u_1}
{N : Type u_2}
{φ : M → N}
{ψ : N → M}
(h : Function.RightInverse φ ψ)
{χ : M → M}
[CompTriple.IsId χ]


theorem wellFounded_antisymmetrization_iff :
    WellFounded (@LT.lt (Antisymmetrization α (· ≤ ·)) _) ↔ WellFounded (@LT.lt α _)


theorem isLinearMap_sub [AddCommGroup M] [Module R M] :
    IsLinearMap R fun x : M × M => x.1 - x.2

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommGroup M]
[Module R M]


nonrec theorem cosh_add : cosh (x + y) = cosh x * cosh y + sinh x * sinh y

Real.cosh (x + y) = Real.cosh x * Real.cosh y + Real.sinh x * Real.sinh y


lemma norm_smulRightL_le : ‖smulRightL 𝕜 E G‖ ≤ 1

‖ContinuousMultilinearMap.smulRightL 𝕜 E G‖ ≤ 1


theorem mem_div_iff_forall_mul_mem {x : A} {I J : Submodule R A} : x ∈ I / J ↔ ∀ y ∈ J, x * y ∈ I

{R : Type u}
[CommSemiring R]
{A : Type v}
[CommSemiring A]
[Algebra R A]
{x : A}
{I J : Submodule R A}


protected theorem one_smul (x : M ⊗[R] N) : (1 : R') • x = x

{R : Type u_1}
[CommSemiring R]
{R' : Type u_2}
[Monoid R']
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
[DistribMulAction R' M]
[SMulCommClass R R' M]
(x : TensorProduct R M N)


@[to_additive (attr := simp)]
theorem inf_subgroupOf_left (H K : Subgroup G) : (K ⊓ H).subgroupOf K = H.subgroupOf K

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

(K ⊓ H).addSubgroupOf K = H.addSubgroupOf K


/-- If `f` and `g` are surjective morphisms of algebras, then
  the kernel of `Algebra.TensorProduct.map f g` is generated by the kernels of `f` and `g` -/
theorem Algebra.TensorProduct.map_ker (hf : Function.Surjective f) (hg : Function.Surjective g) :
    RingHom.ker (map f g) =
      (RingHom.ker f).map (Algebra.TensorProduct.includeLeft : A →ₐ[R] A ⊗[R] C) ⊔
        (RingHom.ker g).map (Algebra.TensorProduct.includeRight : C →ₐ[R] A ⊗[R] C)

{R : Type u_4}
[CommRing R]
{A : Type u_5}
{B : Type u_6}
{C : Type u_7}
{D : Type u_8}
[Ring A]
[Ring B]
[Ring C]
[Ring D]
[Algebra R A]
[Algebra R B]
[Algebra R C]
[Algebra R D]
(f : A →ₐ[R] B)
(g : C →ₐ[R] D)
(hf : Function.Surjective ⇑f)
(hg : Function.Surjective ⇑g)

RingHom.ker (Algebra.TensorProduct.map f g) =
  Ideal.map Algebra.TensorProduct.includeLeft (RingHom.ker f) ⊔
    Ideal.map Algebra.TensorProduct.includeRight (RingHom.ker g)


@[simp] theorem append_nil (as : List α) : as ++ [] = as


@[simp] lemma ofEpiOfIsIsoOfMono'_Q : (ofEpiOfIsIsoOfMono' φ h).Q = h.Q

(CategoryTheory.ShortComplex.RightHomologyData.ofEpiOfIsIsoOfMono' φ h).Q = h.Q


/-- Multiplication and `scaleRoots` commute up to a power of `r`. The factor disappears if we
assume that the product of the leading coeffs does not vanish. See `Polynomial.mul_scaleRoots'`. -/
lemma mul_scaleRoots (p q : R[X]) (r : R) :
    r ^ (natDegree p + natDegree q - natDegree (p * q)) • (p * q).scaleRoots r =
      p.scaleRoots r * q.scaleRoots r

{R : Type u_1}
[CommSemiring R]
(p q : Polynomial R)
(r : R)

r ^ (p.natDegree + q.natDegree - (p * q).natDegree) • (p * q).scaleRoots r = p.scaleRoots r * q.scaleRoots r


@[ext]
lemma ext' {F G : BraidedFunctor C D} {α β : F ⟶ G} (w : ∀ X : C, α.app X = β.app X) : α = β

{F G : CategoryTheory.BraidedFunctor C D}


theorem eventually_lt_of_limsup_lt {f : Filter α} [ConditionallyCompleteLinearOrder β] {u : α → β}
    {b : β} (h : limsup u f < b)
    (hu : f.IsBoundedUnder (· ≤ ·) u := by isBoundedDefault) :
    ∀ᶠ a in f, u a < b

(hu : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f u := by isBoundedDefault)


theorem Coprime.gcd_mul_left_cancel_right (m : ℕ+) {n k : ℕ+} :
    k.Coprime m → m.gcd (k * n) = m.gcd n


lemma norm_fourierPowSMulRight_le (f : V → E) (v : V) (n : ℕ) :
    ‖fourierPowSMulRight L f v n‖ ≤ (2 * π * ‖L‖) ^ n * ‖v‖ ^ n * ‖f v‖

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
{W : Type u_3}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[NormedAddCommGroup W]
[NormedSpace ℝ W]
(L : V →L[ℝ] W →L[ℝ] ℝ)
(f : V → E)
(v : V)
(n : ℕ)

‖VectorFourier.fourierPowSMulRight L f v n‖ ≤ (2 * π * ‖L‖) ^ n * ‖v‖ ^ n * ‖f v‖


@[ext] theorem AddCommMonoidWithOne.ext ⦃inst₁ inst₂ : AddCommMonoidWithOne R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_one : (letI := inst₁; One.one : R) = (letI := inst₂; One.one : R)) :
    inst₁ = inst₂

{R : Type u}
⦃inst₁ inst₂ : AddCommMonoidWithOne R⦄
(h_add : HAdd.hAdd = HAdd.hAdd)
(h_one : One.one = One.one)


theorem pathConnectedSpace_iff_connectedSpace [LocPathConnectedSpace X] :
    PathConnectedSpace X ↔ ConnectedSpace X

{X : Type u_1}
[TopologicalSpace X]
[LocPathConnectedSpace X]


theorem Surjective.surjOn (hf : Surjective f) (s : Set β) : SurjOn f univ s

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Surjective f)
(s : Set β)


@[simp]
lemma decomposeAddEquiv_apply (a : M) :
    decomposeAddEquiv ℳ a = decompose ℳ a

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommMonoid M]
[SetLike σ M]
[AddSubmonoidClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
(a : M)

(DirectSum.decomposeAddEquiv ℳ) a = (DirectSum.decompose ℳ) a


theorem CompleteLattice.independent_sUnion_of_directed {s : Set (Set α)} (hs : DirectedOn (· ⊆ ·) s)
    (h : ∀ a ∈ s, CompleteLattice.SetIndependent a) : CompleteLattice.SetIndependent (⋃₀ s)

(hs : DirectedOn (fun x x_1 => x ⊆ x_1) s)


/-- An induction principle for closure membership. If `p` holds for `0`, `1`, and all elements
of `s`, and is preserved under addition and multiplication, then `p` holds for all elements
of the closure of `s`. -/
@[elab_as_elim]
theorem closure_induction {s : Set R} {p : R → Prop} {x} (h : x ∈ closure s) (mem : ∀ x ∈ s, p x)
    (zero : p 0) (one : p 1) (add : ∀ x y, p x → p y → p (x + y))
    (mul : ∀ x y, p x → p y → p (x * y)) : p x

(add : ∀ (x y : R), p x → p y → p (x + y))

(mul : ∀ (x y : R), p x → p y → p (x * y))


@[simp]
theorem isWF_insert {a} : IsWF (insert a s) ↔ IsWF s

{α : Type u_2}
[Preorder α]
{s : Set α}
{a : α}


theorem filterMap_eq_map (f : α → β) : filterMap (some ∘ f) = map f

Multiset.filterMap (some ∘ f) = Multiset.map f


theorem invertible_iff_generator_nonzero (I : FractionalIdeal R₁⁰ K)
    [Submodule.IsPrincipal (I : Submodule R₁ K)] :
    I * I⁻¹ = 1 ↔ generator (I : Submodule R₁ K) ≠ 0

(K : Type u_3)
[Field K]
{R₁ : Type u_4}
[CommRing R₁]
[IsDomain R₁]
[Algebra R₁ K]
[IsFractionRing R₁ K]
(I : FractionalIdeal R₁⁰ K)
[(↑I).IsPrincipal]

I * I⁻¹ = 1 ↔ Submodule.IsPrincipal.generator ↑I ≠ 0


@[simp]
theorem bot_lie : ⁅(⊥ : LieIdeal R L), N⁆ = ⊥

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


@[to_additive]
theorem lift_unique {f : M →* P} {g : N →* P} {fg : M ∗ N →* P} (h₁ : fg.comp inl = f)
    (h₂ : fg.comp inr = g) : fg = lift f g

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass N]
[AddMonoid P]
{f : M →+ P}
{g : N →+ P}
{fg : AddMonoid.Coprod M N →+ P}
(h₁ : fg.comp AddMonoid.Coprod.inl = f)
(h₂ : fg.comp AddMonoid.Coprod.inr = g)


theorem isUnit_iff {x : HahnSeries Γ R} : IsUnit x ↔ IsUnit (x.leadingCoeff)

{Γ : Type u_1}
{R : Type u_2}
[LinearOrderedAddCommGroup Γ]
[CommRing R]
[IsDomain R]
{x : HahnSeries Γ R}


theorem measure_closedBall_lt_top [PseudoMetricSpace α] [ProperSpace α] {μ : Measure α}
    [IsFiniteMeasureOnCompacts μ] {x : α} {r : ℝ} : μ (Metric.closedBall x r) < ∞


theorem image_coe_Iio : (some : α → WithBot α) '' Iio a = Ioo (⊥ : WithBot α) a

WithBot.some '' Set.Iio a = Set.Ioo ⊥ ↑a


@[simp]
theorem degree_one : degree (1 : R[X]) = (0 : WithBot ℕ)

{R : Type u}
[Semiring R]
[Nontrivial R]


theorem intCast_eq_intCast_iff (a b : ℤ) (c : ℕ) : (a : ZMod c) = (b : ZMod c) ↔ a ≡ b [ZMOD c]


@[simp]
theorem singleton_pi (i : ι) (t : ∀ i, Set (α i)) : pi {i} t = eval i ⁻¹' t i

{ι : Type u_1}
{α : ι → Type u_2}
(i : ι)
(t : (i : ι) → Set (α i))


theorem cocompact_le_atBot_atTop [CompactIccSpace α] :
    cocompact α ≤ atBot ⊔ atTop

{α : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[CompactIccSpace α]

Filter.cocompact α ≤ Filter.atBot ⊔ Filter.atTop


theorem directed_id_iff : Directed r id ↔ IsDirected α r


@[simp] lemma map_freeOn (f : α → β) (hf) : (freeOn E).map f hf = freeOn (f '' E)

{α : Type u_1}
{β : Type u_2}
{E : Set α}
(f : α → β)
(hf : Set.InjOn f (Matroid.freeOn E).E)

(Matroid.freeOn E).map f hf = Matroid.freeOn (f '' E)


theorem Integrable.right_of_add_measure {f : α → β} (h : Integrable f (μ + ν)) :
    Integrable f ν

(h : MeasureTheory.Integrable f (μ + ν))


@[simp]
lemma associator_hom_app_apply (K L M : SSet.{u}) {Δ : SimplexCategoryᵒᵖ}
    (x : ((K ⊗ L) ⊗ M).obj Δ) :
    (α_ K L M).hom.app Δ x = ⟨x.1.1, x.1.2, x.2⟩

(K L M : SSet)
{Δ : SimplexCategoryᵒᵖ}
(x : ((K ⊗ L) ⊗ M).obj Δ)


theorem toMatrix_map_vecMul {S : Type*} [Ring S] [Algebra R S] [Fintype ι] (b : Basis ι R S)
    (v : ι' → S) : b ᵥ* ((b.toMatrix v).map <| algebraMap R S) = v

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_5}
[CommSemiring R]
{S : Type u_9}
[Ring S]
[Algebra R S]
[Fintype ι]
(b : Basis ι R S)
(v : ι' → S)

⇑b ᵥ* (b.toMatrix v).map ⇑(algebraMap R S) = v


@[to_additive]
theorem prod_erase_attach [DecidableEq ι] {s : Finset ι} (f : ι → α) (i : ↑s) :
    ∏ j ∈ s.attach.erase i, f ↑j = ∏ j ∈ s.erase ↑i, f j

{ι : Type u_1}
{α : Type u_3}
[CommMonoid α]
[DecidableEq ι]
{s : Finset ι}
(f : ι → α)
(i : { x // x ∈ s })


@[to_additive]
theorem UniformGroup.ext_iff {G : Type*} [Group G] {u v : UniformSpace G}
    (hu : @UniformGroup G u _) (hv : @UniformGroup G v _) :
    u = v ↔ @nhds _ u.toTopologicalSpace 1 = @nhds _ v.toTopologicalSpace 1

{G : Type u_3}
[AddGroup G]
{u v : UniformSpace G}
(hu : UniformAddGroup G)
(hv : UniformAddGroup G)


theorem Prop.forall_iff {p : Prop → Prop} : (∀ h, p h) ↔ p False ∧ p True


theorem IsStoppingTime.measurableSet_eq_le (hτ : IsStoppingTime f τ) {i j : ι} (hle : i ≤ j) :
    MeasurableSet[f j] {ω | τ ω = i}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
[TopologicalSpace ι]
[OrderTopology ι]
[FirstCountableTopology ι]
(hτ : MeasureTheory.IsStoppingTime f τ)
{i j : ι}
(hle : i ≤ j)


/-- The Čech nerve construction, as a functor from `Arrow C`. -/
@[simps]
def cechNerve : Arrow C ⥤ SimplicialObject C

[∀ (n : ℕ) (f : CategoryTheory.Arrow C), CategoryTheory.Limits.HasWidePullback f.right (fun x => f.left) fun x => f.hom]

CategoryTheory.SimplicialObject.cechNerve.obj f = f.cechNerve


theorem finprod_cond_nonneg {R : Type*} [OrderedCommSemiring R] {p : α → Prop} {f : α → R}
    (hf : ∀ x, p x → 0 ≤ f x) : 0 ≤ ∏ᶠ (x) (_ : p x), f x

{α : Type u_1}
{R : Type u_7}
[OrderedCommSemiring R]
{p : α → Prop}
{f : α → R}
(hf : ∀ (x : α), p x → 0 ≤ f x)


lemma rotate_distinguished_triangle (T : Triangle Cᵒᵖ) :
    T ∈ distinguishedTriangles C ↔ T.rotate ∈ distinguishedTriangles C

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

(T : CategoryTheory.Pretriangulated.Triangle Cᵒᵖ)

T ∈ CategoryTheory.Pretriangulated.Opposite.distinguishedTriangles C ↔
  T.rotate ∈ CategoryTheory.Pretriangulated.Opposite.distinguishedTriangles C


theorem isClosed_sum_iff {s : Set (X ⊕ Y)} :
    IsClosed s ↔ IsClosed (inl ⁻¹' s) ∧ IsClosed (inr ⁻¹' s)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set (X ⊕ Y)}

IsClosed s ↔ IsClosed (Sum.inl ⁻¹' s) ∧ IsClosed (Sum.inr ⁻¹' s)


theorem hasStrictFDerivAt_exp_smul_const_of_mem_ball' (x : 𝔸) (t : 𝕊)
    (htx : t • x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasStrictFDerivAt (fun u : 𝕊 => exp 𝕂 (u • x))
      (((1 : 𝕊 →L[𝕂] 𝕊).smulRight x).smulRight (exp 𝕂 (t • x))) t

(htx : t • x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

HasStrictFDerivAt (fun u => NormedSpace.exp 𝕂 (u • x))
  ((ContinuousLinearMap.smulRight 1 x).smulRight (NormedSpace.exp 𝕂 (t • x))) t


protected theorem iUnion_eq_of_caratheodory {s : ℕ → Set α}
    (h : ∀ i, MeasurableSet[OuterMeasure.caratheodory m] (s i)) (hd : Pairwise (Disjoint on s)) :
    m (⋃ i, s i) = ∑' i, m (s i)

{α : Type u}
(m : MeasureTheory.OuterMeasure α)
{s : ℕ → Set α}
(h : ∀ (i : ℕ), MeasurableSet (s i))
(hd : Pairwise (Disjoint on s))


theorem utf8Len_le_of_infix (h : cs₁ <:+: cs₂) : utf8Len cs₁ ≤ utf8Len cs₂

{cs₁ cs₂ : List Char}
(h : cs₁ <:+: cs₂)


@[simp] lemma strongConvexOn_zero : StrongConvexOn s 0 f ↔ ConvexOn ℝ s f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{s : Set E}
{f : E → ℝ}


/-- The double opposite category is equivalent to the original. -/
@[simps]
def opOpEquivalence : Cᵒᵖᵒᵖ ≌ C

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

(CategoryTheory.opOpEquivalence C).counitIso =
  CategoryTheory.Iso.refl ((CategoryTheory.opOp C).comp (CategoryTheory.unopUnop C))


@[simp]
protected theorem sup_lt_iff (ha : ⊥ < a) : s.sup f < a ↔ ∀ b ∈ s, f b < a

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
[OrderBot α]
{s : Finset ι}
{f : ι → α}
{a : α}
(ha : ⊥ < a)


@[simp]
theorem image.isoStrongEpiMono_hom_comp_ι {I' : C} (e : X ⟶ I') (m : I' ⟶ Y) (comm : e ≫ m = f)
    [StrongEpi e] [Mono m] : (image.isoStrongEpiMono e m comm).hom ≫ image.ι f = m

(CategoryTheory.Limits.image.isoStrongEpiMono e m comm).hom ≫ CategoryTheory.Limits.image.ι f = m


theorem RCLike.nonUnitalContinuousFunctionalCalculus :
    NonUnitalContinuousFunctionalCalculus 𝕜 (p : A → Prop)

{𝕜 : Type u_1}
{A : Type u_2}
[RCLike 𝕜]
[NonUnitalNormedRing A]
[StarRing A]
[CstarRing A]
[CompleteSpace A]
[NormedSpace 𝕜 A]
[IsScalarTower 𝕜 A A]
[SMulCommClass 𝕜 A A]
[StarModule 𝕜 A]
{p : A → Prop}
{p₁ : Unitization 𝕜 A → Prop}
(hp₁ : ∀ {x : A}, p₁ ↑x ↔ p x)
[ContinuousFunctionalCalculus 𝕜 p₁]


@[to_additive]
lemma iIndepFun.indepFun_div_right (hf_indep : iIndepFun (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hij : i ≠ j) (hik : i ≠ k) :
    IndepFun (f i) (f j / f k) μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.iIndepFun (fun x => m) f μ)

ProbabilityTheory.IndepFun (f i) (f j - f k) μ


@[simp]
theorem simple_mul_simple_cancel_right {w : W} (i : B) : w * s i * s i = w

{B : Type u_1}
{W : Type u_3}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
{w : W}
(i : B)


theorem card_biUnion_star_le_m_add_one_card_star_mul :
    (((star hP G ε hU V).biUnion id).card : ℝ) ≤ (star hP G ε hU V).card * (m + 1)

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{P : Finpartition Finset.univ}
{hP : P.IsEquipartition}
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε : ℝ}
{U : Finset α}
{hU : U ∈ P.parts}
{V : Finset α}

↑((SzemerediRegularity.star hP G ε hU V).biUnion id).card ≤
  ↑(SzemerediRegularity.star hP G ε hU V).card * (↑(Fintype.card α / SzemerediRegularity.stepBound P.parts.card) + 1)


theorem botEquiv_def (x : F) : botEquiv F E (algebraMap F (⊥ : IntermediateField F E) x) = x

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(x : F)

(IntermediateField.botEquiv F E) ((algebraMap F ↥⊥) x) = x


@[simp]
theorem bot_apply (a : α) : (⊥ : SupBotHom α β) a = ⊥

{α : Type u_3}
{β : Type u_4}
[Sup α]
[Bot α]
[SemilatticeSup β]
[OrderBot β]
(a : α)


theorem fg_bot : (⊥ : IntermediateField F E).FG

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]


@[simp]
theorem blockDiag_neg [AddGroup α] (M : Matrix (m × o) (n × o) α) : blockDiag (-M) = -blockDiag M

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
[AddGroup α]
(M : Matrix (m × o) (n × o) α)


theorem isUnit_of_mem_nonZeroDivisors {G₀ : Type*} [GroupWithZero G₀] {x : G₀}
    (hx : x ∈ nonZeroDivisors G₀) : IsUnit x

{G₀ : Type u_8}
[GroupWithZero G₀]
{x : G₀}
(hx : x ∈ G₀⁰)


@[simp]
theorem castPred_mk (i : ℕ) (h₁ : i < n) (h₂ := h₁.trans (Nat.lt_succ_self _))
    (h₃ : ⟨i, h₂⟩ ≠ last _ := (ne_iff_vne _ _).mpr (val_last _ ▸ h₁.ne)) :
  castPred ⟨i, h₂⟩ h₃ = ⟨i, h₁⟩

{n : ℕ}
(i : ℕ)
(h₁ : i < n)
(h₂ : i < n.succ := ⋯)
(h₃ : ⟨i, h₂⟩ ≠ Fin.last n := ⋯)


{α : Type u}
(s : Computation α)
[h : s.Terminates]


theorem get?_tail (s : WSeq α) (n) : get? (tail s) n = get? s (n + 1)

{α : Type u}
(s : Stream'.WSeq α)
(n : ℕ)


theorem eq_inv_of_inv_hom_id {f : X ⟶ Y} [IsIso f] {g : Y ⟶ X} (inv_hom_id : g ≫ f = 𝟙 Y) :
    g = inv f

(inv_hom_id : CategoryTheory.CategoryStruct.comp g f = CategoryTheory.CategoryStruct.id Y)


@[simp]
theorem Tape.map_fst {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : PointedMap Γ Γ') :
    ∀ T : Tape Γ, (T.map f).1 = f T.1

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Turing.PointedMap Γ Γ')
(T : Turing.Tape Γ)


@[to_additive] lemma lt_mabs : a < |b|ₘ ↔ a < b ∨ a < b⁻¹

{α : Type u_1}
[Group α]
[LinearOrder α]
{a b : α}


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

{m : α → β' → γ}

{m' : α → β → δ}

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

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


theorem Memℒp.add {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) : Memℒp (f + g) p μ

{α : Type u_1}
{E : Type u_2}
{m : MeasurableSpace α}
[NormedAddCommGroup E]
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
{f g : α → E}
(hf : MeasureTheory.Memℒp f p μ)
(hg : MeasureTheory.Memℒp g p μ)


@[to_additive]
theorem swap_injective : Injective (swap M N)

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]

Function.Injective ⇑(Monoid.Coprod.swap M N)


/-- If `f : R ≃+* S` is a ring isomorphism and `I : Ideal R`, then `comap f.symm I = map f I`. -/
@[simp]
theorem comap_symm (I : Ideal R) (f : R ≃+* S) : I.comap f.symm = I.map f

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(I : Ideal R)
(f : R ≃+* S)


theorem transpose_reindex (eₘ : m ≃ l) (eₙ : n ≃ o) (M : Matrix m n α) :
    (reindex eₘ eₙ M)ᵀ = reindex eₙ eₘ Mᵀ

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
(eₘ : m ≃ l)
(eₙ : n ≃ o)
(M : Matrix m n α)

((Matrix.reindex eₘ eₙ) M)ᵀ = (Matrix.reindex eₙ eₘ) Mᵀ


/-- Homeomorphism between `X² = Fin 2 → X` and `X × X`. -/
@[simps! (config := .asFn)]
def finTwoArrow : (Fin 2 → X) ≃ₜ X × X

⇑Homeomorph.finTwoArrow.symm = fun x => ![x.1, x.2]


theorem ciInf_set_le {f : β → α} {s : Set β} (H : BddBelow (f '' s)) {c : β} (hc : c ∈ s) :
    ⨅ i : s, f i ≤ f c

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
{f : β → α}
{s : Set β}
(H : BddBelow (f '' s))
{c : β}
(hc : c ∈ s)


lemma restrictStalkIso_inv_eq_germ_apply (y) :
    (X.restrictStalkIso h x).inv
      (X.presheaf.germ ⟨f x, show f x ∈ h.isOpenMap.functor.obj V from ⟨x, hx, rfl⟩⟩ y) =
        (X.restrict h).presheaf.germ ⟨x, hx⟩ y

(y : ↑(X.presheaf.obj (Opposite.op (⋯.functor.obj V))))

(X.restrictStalkIso h x).inv ((X.presheaf.germ ⟨f x, ⋯⟩) y) = ((X.restrict h).presheaf.germ ⟨x, hx⟩) y


@[to_additive finsum_pos']
theorem one_lt_finprod' {M : Type*} [OrderedCancelCommMonoid M] {f : ι → M}
    (h : ∀ i, 1 ≤ f i) (h' : ∃ i, 1 < f i) (hf : (mulSupport f).Finite) : 1 < ∏ᶠ i, f i

{ι : Type u_3}
{M : Type u_7}
[OrderedCancelCommMonoid M]
{f : ι → M}
(h : ∀ (i : ι), 1 ≤ f i)
(h' : ∃ i, 1 < f i)
(hf : (Function.mulSupport f).Finite)


@[reassoc (attr := simp)]
theorem pullbackIsoUnopPushout_hom_inr {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) [HasPullback f g]
    [HasPushout f.op g.op] : pushout.inr _ _ ≫ (pullbackIsoUnopPushout f g).hom.op =
    (pullback.snd f g).op

CategoryTheory.Limits.pushout.inr f.op g.op ≫ (CategoryTheory.Limits.pullbackIsoUnopPushout f g).hom.op =
  (CategoryTheory.Limits.pullback.snd f g).op


theorem lt_blsub_iff {o : Ordinal.{u}} {f : ∀ b < o, Ordinal.{max u v}} {a} :
    a < blsub.{_, v} o f ↔ ∃ i hi, a ≤ f i hi

{f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v}}

a < o.blsub f ↔ ∃ i, ∃ (hi : i < o), a ≤ f i hi


@[to_additive]
theorem MeasurePreserving.zpow [CompactSpace G] [RootableBy G ℤ]
    {n : ℤ} (hn : n ≠ 0) {X : Type*}
    [MeasurableSpace X] {μ' : Measure X} {f : X → G} (hf : MeasurePreserving f μ' μ) :
    MeasurePreserving (fun x => f x ^ n) μ' μ

(hf : MeasureTheory.MeasurePreserving f μ' μ)

MeasureTheory.MeasurePreserving (fun x => n • f x) μ' μ


@[simp]
theorem PreservesInitial.iso_hom : (PreservesInitial.iso G).inv = initialComparison G

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Functor.empty C) G]

(CategoryTheory.Limits.PreservesInitial.iso G).inv = CategoryTheory.Limits.initialComparison G


theorem mem_pow {l : Language α} {x : List α} {n : ℕ} :
    x ∈ l ^ n ↔ ∃ S : List (List α), x = S.join ∧ S.length = n ∧ ∀ y ∈ S, y ∈ l

{α : Type u_1}
{l : Language α}
{x : List α}
{n : ℕ}

x ∈ l ^ n ↔ ∃ S, x = S.join ∧ S.length = n ∧ ∀ y ∈ S, y ∈ l


@[simp]
theorem swapLeft_apply (κ : Kernel (α × β) γ) (a : β × α) : swapLeft κ a = κ a.swap

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


/-- The range of a strongly measurable function is separable. -/
protected theorem isSeparable_range {m : MeasurableSpace α} [TopologicalSpace β]
    (hf : StronglyMeasurable f) : TopologicalSpace.IsSeparable (range f)

(hf : MeasureTheory.StronglyMeasurable f)


theorem Basis.parallelepiped_map (b : Basis ι ℝ E) (e : E ≃ₗ[ℝ] F) :
    (b.map e).parallelepiped = b.parallelepiped.map e
    (have := FiniteDimensional.of_fintype_basis b
    -- Porting note: Lean cannot infer the instance above
    LinearMap.continuous_of_finiteDimensional e.toLinearMap)
    (have := FiniteDimensional.of_fintype_basis (b.map e)
    -- Porting note: Lean cannot infer the instance above
    LinearMap.isOpenMap_of_finiteDimensional _ e.surjective)

{ι : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Fintype ι]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace ℝ E]
[NormedSpace ℝ F]
(b : Basis ι ℝ E)
(e : E ≃ₗ[ℝ] F)

(b.map e).parallelepiped = TopologicalSpace.PositiveCompacts.map ⇑e ⋯ ⋯ b.parallelepiped


theorem isMinFilter_dual_iff : IsMinFilter (toDual ∘ f) l a ↔ IsMaxFilter f l a

{α : Type u}
{β : Type v}
[Preorder β]
{f : α → β}
{l : Filter α}
{a : α}

IsMinFilter (⇑OrderDual.toDual ∘ f) l a ↔ IsMaxFilter f l a


/-- The anti-equivalence between cosimplicial objects and simplicial objects. -/
@[simps!]
def cosimplicialSimplicialEquiv : (CosimplicialObject C)ᵒᵖ ≌ SimplicialObject Cᵒᵖ

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

∀ {X Y : (SimplexCategory ⥤ C)ᵒᵖ} (α : X ⟶ Y) (X_1 : SimplexCategoryᵒᵖ),
  ((CategoryTheory.cosimplicialSimplicialEquiv C).functor.map α).app X_1 = (α.unop.app (Opposite.unop X_1)).op


@[simp]
theorem image_sub_const_Ioi : (fun x => x - a) '' Ioi b = Ioi (b - a)

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

(fun x => x - a) '' Set.Ioi b = Set.Ioi (b - a)


@[to_additive]
theorem Multipliable.subtype (hf : Multipliable f) (s : Set β) : Multipliable (f ∘ (↑) : s → α)

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[UniformSpace α]
[UniformGroup α]
{f : β → α}
[CompleteSpace α]
(hf : Multipliable f)
(s : Set β)


/-- Any three points in an orthocentric system span the same subspace
as the whole orthocentric system. -/
theorem affineSpan_of_orthocentricSystem {s : Set P} (ho : OrthocentricSystem s) {p : Fin 3 → P}
    (hps : Set.range p ⊆ s) (hpi : Function.Injective p) :
    affineSpan ℝ (Set.range p) = affineSpan ℝ s

(ho : EuclideanGeometry.OrthocentricSystem s)


lemma Exact.linearMap_comp_eq_zero (h : Exact f g) : g.comp f = 0

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{P : Type u_6}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
{f : M →ₗ[R] N}
{g : N →ₗ[R] P}
(h : Function.Exact ⇑f ⇑g)


/-- A stronger version of `Polynomial.exists_degree_le_of_mem_span` under the assumption that the
  set `s : R[X]` is finite. There exists a polynomial `p' ∈ s` whose degree dominates the degree of
  every element of `p ∈ span R s`-/
theorem exists_degree_le_of_mem_span_of_finite {s : Set R[X]} (s_fin : s.Finite) (hs : s.Nonempty) :
    ∃ p' ∈ s, ∀ (p : R[X]), p ∈ Submodule.span R s → degree p ≤ degree p'

{R : Type u}
[Semiring R]
{s : Set R[X]}
(s_fin : s.Finite)
(hs : s.Nonempty)

∃ p' ∈ s, ∀ p ∈ Submodule.span R s, p.degree ≤ p'.degree


/-- Multilinear maps over the ring `R`, from `∀ i, M₁ i` to `M₂` where `M₁ i` and `M₂` are modules
over `R`. -/
structure MultilinearMap (R : Type uR) {ι : Type uι} (M₁ : ι → Type v₁) (M₂ : Type v₂) [Semiring R]
  [∀ i, AddCommMonoid (M₁ i)] [AddCommMonoid M₂] [∀ i, Module R (M₁ i)] [Module R M₂] where
  /-- The underlying multivariate function of a multilinear map. -/
  toFun : (∀ i, M₁ i) → M₂
  /-- A multilinear map is additive in every argument. -/
  map_add' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x y : M₁ i),
      toFun (update m i (x + y)) = toFun (update m i x) + toFun (update m i y)
  /-- A multilinear map is compatible with scalar multiplication in every argument. -/
  map_smul' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (c : R) (x : M₁ i),
      toFun (update m i (c • x)) = c • toFun (update m i x)

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(self : MultilinearMap R M₁ M₂)
[DecidableEq ι]
(m : (i : ι) → M₁ i)
(i : ι)
(c : R)
(x : M₁ i)

self.toFun (Function.update m i (c • x)) = c • self.toFun (Function.update m i x)


@[simp]
theorem lowerClosure_infs [SemilatticeInf α] (s t : Set α) :
    lowerClosure (s ⊼ t) = lowerClosure s ⊓ lowerClosure t

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


theorem eq_of_dist_eq_zero {x y : γ} : dist x y = 0 → x = y


theorem inf'_induction {p : α → Prop} (hp : ∀ a₁, p a₁ → ∀ a₂, p a₂ → p (a₁ ⊓ a₂))
    (hs : ∀ b ∈ s, p (f b)) : p (s.inf' H f)

(hp : ∀ (a₁ : α), p a₁ → ∀ (a₂ : α), p a₂ → p (a₁ ⊓ a₂))


@[simp]
theorem Ioc_eq_empty_of_le (h : b ≤ a) : Ioc a b = ∅

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}
(h : b ≤ a)


theorem update_mono : Monotone (update f i)

{ι : Type u_1}
{π : ι → Type u_3}
[DecidableEq ι]
[(i : ι) → Preorder (π i)]
{f : (i : ι) → π i}
{i : ι}


@[simp]
theorem blsub_eq_zero_iff {o} {f : ∀ a < o, Ordinal} : blsub o f = 0 ↔ o = 0

{f : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}}


@[to_additive]
theorem ContMDiffAt.inv {f : M → G} {x₀ : M} (hf : ContMDiffAt I' I n f x₀) :
    ContMDiffAt I' I n (fun x => (f x)⁻¹) x₀

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[TopologicalSpace G]
[ChartedSpace H G]
[Group G]
[LieGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{n : ℕ∞}
{f : M → G}
{x₀ : M}
(hf : ContMDiffAt I' I n f x₀)


theorem image2_image_right (f : α → γ → δ) (g : β → γ) :
    image2 f s (g '' t) = image2 (fun a b => f a (g b)) s t

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{δ : Type u_7}
{s : Set α}
{t : Set β}
(f : α → γ → δ)
(g : β → γ)

Set.image2 f s (g '' t) = Set.image2 (fun a b => f a (g b)) s t


/-- Construct a functor out of the wide pullback shape given a J-indexed collection of arrows to a
fixed object.
-/
@[simps]
def wideCospan (B : C) (objs : J → C) (arrows : ∀ j : J, objs j ⟶ B) : WidePullbackShape J ⥤ C

(j : CategoryTheory.Limits.WidePullbackShape J)

(CategoryTheory.Limits.WidePullbackShape.wideCospan B objs arrows).obj j = Option.casesOn j B objs


lemma biUnion_image_inf_left : s.biUnion (fun a ↦ t.image (a ⊓ ·)) = s ⊼ t

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

(s.biUnion fun a => Finset.image (fun x => a ⊓ x) t) = s ⊼ t


@[simp]
theorem comp_apply
    (g : Y →ₑ[ψ] Z) (f : X →ₑ[φ] Y) [CompTriple φ ψ χ] (x : X) :
    g.comp f x = g (f x)

{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
{φ : M → N}
{ψ : N → P}
{χ : M → P}
{X : Type u_5}
[SMul M X]
{Y : Type u_6}
[SMul N Y]
{Z : Type u_7}
[SMul P Z]
(g : Y →ₑ[ψ] Z)
(f : X →ₑ[φ] Y)
[CompTriple φ ψ χ]
(x : X)


theorem pow_mem_of_mem (ha : a ∈ I) (n : ℕ) (hn : 0 < n) : a ^ n ∈ I

{α : Type u}
{a : α}
[CommSemiring α]
(I : Ideal α)
(ha : a ∈ I)
(n : ℕ)
(hn : 0 < n)


/-- `star` as a `MulEquiv` from `R` to `Rᵐᵒᵖ` -/
@[simps apply]
def starMulEquiv [Mul R] [StarMul R] : R ≃* Rᵐᵒᵖ

{R : Type u}
[Mul R]
[StarMul R]
(x : R)

starMulEquiv x = MulOpposite.op (star x)


@[to_additive]
theorem iUnion₂_mul (s : ∀ i, κ i → Set α) (t : Set α) :
    (⋃ (i) (j), s i j) * t = ⋃ (i) (j), s i j * t

{α : Type u_2}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[Mul α]
(s : (i : ι) → κ i → Set α)
(t : Set α)

(⋃ i, ⋃ j, s i j) * t = ⋃ i, ⋃ j, s i j * t


lemma Units.mk0_prod [CommGroupWithZero G₀] (s : Finset ι) (f : ι → G₀) (h) :
    Units.mk0 (∏ i ∈ s, f i) h =
      ∏ i ∈ s.attach, Units.mk0 (f i) fun hh ↦ h (Finset.prod_eq_zero i.2 hh)

{ι : Type u_1}
{G₀ : Type u_3}
[CommGroupWithZero G₀]
(s : Finset ι)
(f : ι → G₀)
(h : ∏ i ∈ s, f i ≠ 0)

Units.mk0 (∏ i ∈ s, f i) h = ∏ i ∈ s.attach, Units.mk0 (f ↑i) ⋯


theorem LinearMap.exists_antilipschitzWith [FiniteDimensional 𝕜 E] (f : E →ₗ[𝕜] F)
    (hf : LinearMap.ker f = ⊥) : ∃ K > 0, AntilipschitzWith K f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type w}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace 𝕜]
[FiniteDimensional 𝕜 E]
(f : E →ₗ[𝕜] F)
(hf : LinearMap.ker f = ⊥)


theorem UpperHalfPlane.abs_exp_two_pi_I_lt_one (z : ℍ) :
    ‖(Complex.exp (2 * π * Complex.I * z))‖ < 1


/-- If `b` is odd, then `J(2 | b)` is given by `χ₈ b`. -/
theorem at_two {b : ℕ} (hb : Odd b) : J(2 | b) = χ₈ b


theorem leftInverse_generateFrom :
    LeftInverse generateFrom fun t : TopologicalSpace α => { s | IsOpen[t] s }

Function.LeftInverse TopologicalSpace.generateFrom fun t => {s | IsOpen s}


theorem eLpNormEssSup_trim (hm : m ≤ m0) {f : α → E} (hf : StronglyMeasurable[m] f) :
    eLpNormEssSup f (μ.trim hm) = eLpNormEssSup f μ

(hf : MeasureTheory.StronglyMeasurable f)

MeasureTheory.eLpNormEssSup f (μ.trim hm) = MeasureTheory.eLpNormEssSup f μ


/-- Multiplication as a monoid homomorphism. -/
@[to_additive (attr := simps) "Addition as an additive monoid homomorphism."]
def mulMonoidHom [CommMonoid α] : α × α →* α

∀ (a : α × α), mulMonoidHom a = mulMulHom.toFun a


theorem flip₂_continuous' (f : γ → ∀ x, β x) (hf : ∀ x, Continuous' fun g => f g x) :
    Continuous' f

[(x : α) → OmegaCompletePartialOrder (β x)]

(hf : ∀ (x : α), OmegaCompletePartialOrder.Continuous' fun g => f g x)


lemma MeasurableSet.measurableAtom_of_countable [Countable β] (x : β) :
    MeasurableSet (measurableAtom x)

{β : Type u_2}
[MeasurableSpace β]
[Countable β]
(x : β)


@[simp] theorem length_set (as : List α) (i : Nat) (a : α) : (as.set i a).length = as.length

{α : Type u}
(as : List α)
(i : Nat)
(a : α)


@[simp]
theorem diagonal_transpose [Zero α] (v : n → α) : (diagonal v)ᵀ = diagonal v

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
(v : n → α)

(Matrix.diagonal v)ᵀ = Matrix.diagonal v


/-- If `0 < n`, then `sr i` has order 2.
-/
@[simp]
theorem orderOf_sr (i : ZMod n) : orderOf (sr i) = 2


theorem Ioc_subset_Ioo_right (h : b₁ < b₂) : Ioc a b₁ ⊆ Ioo a b₂

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


/-- Given a function `f : E → F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = ∑' pₙ yⁿ` for all `‖y‖ < r`.
-/
structure HasFPowerSeriesOnBall (f : E → F) (p : FormalMultilinearSeries 𝕜 E F) (x : E) (r : ℝ≥0∞) :
    Prop where
  r_le : r ≤ p.radius
  r_pos : 0 < r
  hasSum :
    ∀ {y}, y ∈ EMetric.ball (0 : E) r → HasSum (fun n : ℕ => p n fun _ : Fin n => y) (f (x + y))

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{r : ℝ≥0∞}
(self : HasFPowerSeriesOnBall f p x r)
{y : E}

y ∈ EMetric.ball 0 r → HasSum (fun n => (p n) fun x => y) (f (x + y))


/-- Given an isomorphism `S₁ ≅ S₂` of short complexes and homology data `h₁` and `h₂`
for `S₁` and `S₂` respectively, this is the induced homology isomorphism `h₁.left.H ≅ h₁.left.H`. -/
@[simps]
def homologyMapIso' (e : S₁ ≅ S₂) (h₁ : S₁.HomologyData)
    (h₂ : S₂.HomologyData) : h₁.left.H ≅ h₂.left.H

(CategoryTheory.ShortComplex.homologyMapIso' e h₁ h₂).inv = CategoryTheory.ShortComplex.homologyMap' e.inv h₂ h₁


/-- The complement to a Lindelöf set belongs to a filter `f` with the countable intersection
  property if each `x ∈ s` has a neighborhood `t` within `s` such that `tᶜ` belongs to `f`. -/
theorem IsLindelof.compl_mem_sets_of_nhdsWithin (hs : IsLindelof s) {f : Filter X}
    [CountableInterFilter f] (hf : ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f) : sᶜ ∈ f

{X : Type u}
[TopologicalSpace X]
{s : Set X}
(hs : IsLindelof s)
{f : Filter X}
[CountableInterFilter f]
(hf : ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f)


@[simp]
theorem coe_inducedOrderRingIso : ⇑(inducedOrderRingIso β γ) = inducedMap β γ

⇑(LinearOrderedField.inducedOrderRingIso β γ) = LinearOrderedField.inducedMap β γ


@[simp]
theorem evalFrom_empty (x : List α) : M.evalFrom ∅ x = ∅

{α : Type u}
{σ : Type v}
(M : εNFA α σ)
(x : List α)


/-- A copy of `DirectedSystem.map_map` specialized to linear maps, as otherwise the
`fun i j h ↦ f i j h` can confuse the simplifier. -/
nonrec theorem DirectedSystem.map_map [DirectedSystem G fun i j h => f i j h] {i j k} (hij hjk x) :
    f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x

[DirectedSystem G fun i j h => ⇑(f i j h)]

(f j k hjk) ((f i j hij) x) = (f i k ⋯) x


/-- The right adjoint of the adjunction which induces the monad `(T, η_ T, μ_ T)`. -/
@[simps]
def fromKleisli : Kleisli T ⥤ C

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(T : CategoryTheory.Monad C)
(X : CategoryTheory.Kleisli T)

(CategoryTheory.Kleisli.Adjunction.fromKleisli T).obj X = T.obj X


@[to_additive (attr := simp)]
theorem comap_rel {f : M → N} (H : ∀ x y, f (x * y) = f x * f y) {c : Con N} {x y : M} :
    comap f H c x y ↔ c (f x) (f y)

(H : ∀ (x y : M), f (x + y) = f x + f y)

(AddCon.comap f H c) x y ↔ c (f x) (f y)


@[simp]
theorem Orthonormal.equiv_symm {v : Basis ι 𝕜 E} (hv : Orthonormal 𝕜 v) {v' : Basis ι' 𝕜 E'}
    (hv' : Orthonormal 𝕜 v') (e : ι ≃ ι') : (hv.equiv hv' e).symm = hv'.equiv hv e.symm

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{ι' : Type u_5}
{E' : Type u_7}
[NormedAddCommGroup E']
[InnerProductSpace 𝕜 E']
{v : Basis ι 𝕜 E}
(hv : Orthonormal 𝕜 ⇑v)
{v' : Basis ι' 𝕜 E'}
(hv' : Orthonormal 𝕜 ⇑v')
(e : ι ≃ ι')


@[to_additive]
theorem mulSupport_along_fiber_subset (f : α × β → M) (a : α) :
    (mulSupport fun b => f (a, b)) ⊆ (mulSupport f).image Prod.snd

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[One M]
(f : α × β → M)
(a : α)

(Function.mulSupport fun b => f (a, b)) ⊆ Prod.snd '' Function.mulSupport f


theorem RingHom.injective_int {α : Type*} [NonAssocRing α] (f : ℤ →+* α) [CharZero α] :
    Function.Injective f

{α : Type u_3}
[NonAssocRing α]
(f : ℤ →+* α)
[CharZero α]


theorem prime_ne_zero (p q : ℕ) [hp : Fact p.Prime] [hq : Fact q.Prime] (hpq : p ≠ q) :
    (q : ZMod p) ≠ 0

(p q : ℕ)
[hp : Fact (Nat.Prime p)]
[hq : Fact (Nat.Prime q)]
(hpq : p ≠ q)


@[to_additive (attr := simp)]
protected theorem inv_mul_cancel : IsUnit a → a⁻¹ * a = 1


theorem top_isEquipartition [Decidable (s = ⊥)] : (⊤ : Finpartition s).IsEquipartition

{α : Type u_1}
[DecidableEq α]
(s : Finset α)
[Decidable (s = ⊥)]


@[simp]
theorem continuousAt_codRestrict_iff {f : X → Y} {t : Set Y} (h1 : ∀ x, f x ∈ t) {x : X} :
    ContinuousAt (codRestrict f t h1) x ↔ ContinuousAt f x

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{t : Set Y}
(h1 : ∀ (x : X), f x ∈ t)
{x : X}

ContinuousAt (Set.codRestrict f t h1) x ↔ ContinuousAt f x


theorem Antitone.le_of_tendsto [TopologicalSpace α] [Preorder α] [OrderClosedTopology α]
    [SemilatticeSup β] {f : β → α} {a : α} (hf : Antitone f) (ha : Tendsto f atTop (𝓝 a)) (b : β) :
    a ≤ f b

(ha : Filter.Tendsto f Filter.atTop (𝓝 a))


theorem finrank_le_finrank_of_rank_le_rank
    (h : lift.{w} (Module.rank R M) ≤ Cardinal.lift.{v} (Module.rank R N))
    (h' : Module.rank R N < ℵ₀) : finrank R M ≤ finrank R N

(h : Cardinal.lift.{w, v} (Module.rank R M) ≤ Cardinal.lift.{v, w} (Module.rank R N))

FiniteDimensional.finrank R M ≤ FiniteDimensional.finrank R N


theorem IsBigO.not_isLittleO (h : f'' =O[l] g') (hf : ∃ᶠ x in l, f'' x ≠ 0) :
    ¬g' =o[l] f''

{α : Type u_1}
{F' : Type u_7}
{E'' : Type u_9}
[SeminormedAddCommGroup F']
[NormedAddCommGroup E'']
{g' : α → F'}
{f'' : α → E''}
{l : Filter α}
(h : f'' =O[l] g')
(hf : ∃ᶠ (x : α) in l, f'' x ≠ 0)


theorem IsDiag.smul [Monoid R] [AddMonoid α] [DistribMulAction R α] (k : R) {A : Matrix n n α}
    (ha : A.IsDiag) : (k • A).IsDiag

{α : Type u_1}
{R : Type u_3}
{n : Type u_4}
[Monoid R]
[AddMonoid α]
[DistribMulAction R α]
(k : R)
{A : Matrix n n α}
(ha : A.IsDiag)


@[simps!]
instance : Category (Augmented C)

(X : CategoryTheory.Comma (𝟭 (CategoryTheory.SimplicialObject C)) (CategoryTheory.SimplicialObject.const C))

∀ (X_1 : SimplexCategoryᵒᵖ), (𝟙 X).left.app X_1 = 𝟙 (X.left.obj X_1)


@[simp] lemma exp_coe (x : ℝ) : exp x = ENNReal.ofReal (Real.exp x)


theorem IsIntegral.pow {x : B} (h : IsIntegral R x) (n : ℕ) : IsIntegral R (x ^ n)

{R : Type u_1}
{B : Type u_3}
[CommRing R]
[Ring B]
[Algebra R B]
{x : B}
(h : IsIntegral R x)
(n : ℕ)


theorem eval_det (M : Matrix n n R[X]) (r : R) :
    Polynomial.eval r M.det = (Polynomial.eval (scalar n r) (matPolyEquiv M)).det

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

Polynomial.eval r M.det = (Polynomial.eval ((Matrix.scalar n) r) (matPolyEquiv M)).det


theorem iCondIndepSet.condIndep_generateFrom_lt [Preorder ι] {s : ι → Set Ω}
    (hsm : ∀ n, MeasurableSet (s n)) (hs : iCondIndepSet m' hm' s μ) (i : ι) :
    CondIndep m' (generateFrom {s i}) (generateFrom { t | ∃ j < i, s j = t }) hm' μ

(hs : ProbabilityTheory.iCondIndepSet m' hm' s μ)

ProbabilityTheory.CondIndep m' (MeasurableSpace.generateFrom {s i})
  (MeasurableSpace.generateFrom {t | ∃ j < i, s j = t}) hm' μ


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

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

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


theorem exists_large_sphere (n d : ℕ) :
    ∃ k, ((d ^ n :) / (n * d ^ 2 :) : ℝ) ≤ (sphere n d k).card

∃ k, ↑(d ^ n) / ↑(n * d ^ 2) ≤ ↑(Behrend.sphere n d k).card


@[simp]
theorem noMinOrder_iff [LT α] [LT β] : NoMinOrder (α ⊕ β) ↔ NoMinOrder α ∧ NoMinOrder β

{α : Type u_1}
{β : Type u_2}
[LT α]
[LT β]


@[simp]
theorem coe_comp (g : β →ₙ+* γ) (f : α →ₙ+* β) : ⇑(g.comp f) = g ∘ f

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[NonUnitalNonAssocSemiring α]
[NonUnitalNonAssocSemiring β]
[NonUnitalNonAssocSemiring γ]
(g : β →ₙ+* γ)
(f : α →ₙ+* β)


theorem trunc_derivative (f : R⟦X⟧) (n : ℕ) :
    trunc n (d⁄dX R f) = Polynomial.derivative (trunc (n + 1) f)

{R : Type u_1}
[CommSemiring R]
(f : PowerSeries R)
(n : ℕ)

PowerSeries.trunc n ((PowerSeries.derivative R) f) = Polynomial.derivative (PowerSeries.trunc (n + 1) f)


/-- The isomorphism between `(lift F _ _).obj WithTerminal.star` with `Z`. -/
@[simps!]
def liftStar {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : (lift F M hM).obj star ≅ Z

(hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x)

(CategoryTheory.WithTerminal.liftStar F M hM).inv = CategoryTheory.CategoryStruct.id Z


@[simp]
theorem isAtom [IsSimpleModule R m] : IsAtom m

{R : Type u_2}
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
{m : Submodule R M}
[IsSimpleModule R ↥m]


@[simp]
theorem Cotrident.ofCocone_ι {F : WalkingParallelFamily J ⥤ C} (t : Cocone F) (j) :
    (Cotrident.ofCocone t).ι.app j = eqToHom (by cases j <;> aesop_cat) ≫ t.ι.app j

{F : CategoryTheory.Functor (CategoryTheory.Limits.WalkingParallelFamily J) C}

(j : CategoryTheory.Limits.WalkingParallelFamily J)

(CategoryTheory.Limits.Cotrident.ofCocone t).ι.app j =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯) (t.ι.app j)


@[simp]
theorem neg_eq_zero_iff {x : EReal} : -x = 0 ↔ x = 0


theorem Base.finite_of_finite {B' : Set α}
    (hB : M.Base B) (h : B.Finite) (hB' : M.Base B') : B'.Finite

{α : Type u_1}
{M : Matroid α}
{B B' : Set α}
(hB : M.Base B)
(h : B.Finite)
(hB' : M.Base B')


/-- Projection to `ContinuousMultilinearMap`s as a bundled `AddMonoidHom`. -/
@[simps]
def toMultilinearAddHom : M [⋀^ι]→L[R] N →+ ContinuousMultilinearMap R (fun _ : ι => M) N

{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]
[ContinuousAdd N]
(f : M [⋀^ι]→L[R] N)

ContinuousAlternatingMap.toMultilinearAddHom f = f.toContinuousMultilinearMap


@[simp]
theorem eventually_or_distrib_left {f : Filter α} {p : Prop} {q : α → Prop} :
    (∀ᶠ x in f, p ∨ q x) ↔ p ∨ ∀ᶠ x in f, q x

{α : Type u}
{f : Filter α}
{p : Prop}
{q : α → Prop}

(∀ᶠ (x : α) in f, p ∨ q x) ↔ p ∨ ∀ᶠ (x : α) in f, q x


theorem lt_find (n : ℕ) (h : ∀ m ≤ n, ¬P m) : (n : PartENat) < find P

(P : ℕ → Prop)
[DecidablePred P]
(n : ℕ)
(h : ∀ m ≤ n, ¬P m)


/-- The power basis `1, root g, ..., root g ^ (d - 1)` for `AdjoinRoot g`,
where `g` is a monic polynomial of degree `d`. -/
@[simps]
def powerBasis' (hg : g.Monic) : PowerBasis R (AdjoinRoot g)

{R : Type u}
[CommRing R]
{g : R[X]}
(hg : g.Monic)

(AdjoinRoot.powerBasis' hg).gen = AdjoinRoot.root g


@[simp]
theorem range_quotient_mk' {s : Setoid α} : range (Quotient.mk' : α → Quotient s) = univ


theorem num_ne_zero {x : RatFunc K} (hx : x ≠ 0) : num x ≠ 0

{K : Type u}
[Field K]
{x : RatFunc K}
(hx : x ≠ 0)


theorem pointwise_smul_subset_iff {a : M} {S T : Subsemiring R} : a • S ≤ T ↔ S ≤ a⁻¹ • T

{M : Type u_1}
{R : Type u_2}
[Group M]
[Semiring R]
[MulSemiringAction M R]
{a : M}
{S T : Subsemiring R}

a • S ≤ T ↔ S ≤ a⁻¹ • T


@[reassoc, simp]
theorem braiding_tensorUnit_right (X : C) : (β_ X (𝟙_ C)).hom = (ρ_ X).hom ≫ (λ_ X).inv

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


/-- Non-unital star algebra homomorphisms from `A` into a unital star `R`-algebra `C` lift uniquely
to `Unitization R A →⋆ₐ[R] C`. This is the universal property of the unitization. -/
@[simps! apply symm_apply apply_apply]
def starLift : (A →⋆ₙₐ[R] C) ≃ (Unitization R A →⋆ₐ[R] C)

{R : Type u_1}
{A : Type u_2}
{C : Type u_3}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
[Semiring C]
[Algebra R C]
[StarRing C]
[StarModule R C]
(φ : Unitization R A →⋆ₐ[R] C)

Unitization.starLift.symm φ = φ.toNonUnitalStarAlgHom.comp (Unitization.inrNonUnitalStarAlgHom R A)


theorem compl_subset_iff_union {s t : Set α} : sᶜ ⊆ t ↔ s ∪ t = univ


@[simp]
theorem coe_to_submodule_eq_iff (L₁' L₂' : LieSubalgebra R L) :
    (L₁' : Submodule R L) = (L₂' : Submodule R L) ↔ L₁' = L₂'

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

L₁'.toSubmodule = L₂'.toSubmodule ↔ L₁' = L₂'


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

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


theorem abs_add' (a b : α) : |a| ≤ |b| + |b + a|

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


theorem sUnion_subset {S : Set (Set α)} {t : Set α} (h : ∀ t' ∈ S, t' ⊆ t) : ⋃₀S ⊆ t

{α : Type u_1}
{S : Set (Set α)}
{t : Set α}
(h : ∀ t' ∈ S, t' ⊆ t)


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

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


@[simp, norm_cast]
theorem coe_bot : ((⊥ : L.DefinableSet A α) : Set (α → M)) = ∅

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


theorem adhesive_of_preserves_and_reflects (F : C ⥤ D) [Adhesive D]
    [H₁ : ∀ {X Y S : C} (f : X ⟶ S) (g : Y ⟶ S) [Mono f], HasPullback f g]
    [H₂ : ∀ {X Y S : C} (f : S ⟶ X) (g : S ⟶ Y) [Mono f], HasPushout f g]
    [PreservesLimitsOfShape WalkingCospan F]
    [ReflectsLimitsOfShape WalkingCospan F]
    [PreservesColimitsOfShape WalkingSpan F]
    [ReflectsColimitsOfShape WalkingSpan F] :
    Adhesive C

[H₁ : ∀ {X Y S : C} (f : X ⟶ S) (g : Y ⟶ S) [inst : CategoryTheory.Mono f], CategoryTheory.Limits.HasPullback f g]

[H₂ : ∀ {X Y S : C} (f : S ⟶ X) (g : S ⟶ Y) [inst : CategoryTheory.Mono f], CategoryTheory.Limits.HasPushout f g]


theorem inf_neBot_iff :
    NeBot (l ⊓ l') ↔ ∀ ⦃s : Set α⦄, s ∈ l → ∀ ⦃s'⦄, s' ∈ l' → (s ∩ s').Nonempty

(l ⊓ l').NeBot ↔ ∀ ⦃s : Set α⦄, s ∈ l → ∀ ⦃s' : Set α⦄, s' ∈ l' → (s ∩ s').Nonempty


theorem nadd_assoc (a b c) : a ♯ b ♯ c = a ♯ (b ♯ c)


theorem ite_eq_iff : ite P a b = c ↔ P ∧ a = c ∨ ¬P ∧ b = c

{α : Sort u_1}
{P : Prop}
[Decidable P]
{a b c : α}

(if P then a else b) = c ↔ P ∧ a = c ∨ ¬P ∧ b = c


lemma negAddY_neg {P : Fin 3 → R} (hP : W'.Equation P) :
    W'.negAddY P (W'.neg P) = W'.dblZ P ^ 3

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P : Fin 3 → R}
(hP : W'.Equation P)


theorem image_restrictPreimage :
    t.restrictPreimage f '' (Subtype.val ⁻¹' s) = Subtype.val ⁻¹' (f '' s)

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


theorem _root_.IsOpen.measure_pos_iff (hU : IsOpen U) : 0 < μ U ↔ U.Nonempty

{X : Type u_1}
[TopologicalSpace X]
{m : MeasurableSpace X}
(μ : MeasureTheory.Measure X)
[μ.IsOpenPosMeasure]
{U : Set X}
(hU : IsOpen U)


lemma IsOpen.exterior_subset (ht : IsOpen t) : exterior s ⊆ t ↔ s ⊆ t

{α : Type u_3}
[TopologicalSpace α]
{s t : Set α}
(ht : IsOpen t)


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

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[LE α]
[OrderBot α]
[LE β]
[OrderBot β]
[LE γ]
[OrderBot γ]
(g : BotHom β γ)
(f : BotHom α β)

BotHom.dual (g.comp f) = (BotHom.dual g).comp (BotHom.dual f)


lemma Polynomial.mul_star_dvd_of_aeval_eq_zero_im_ne_zero (p : ℝ[X]) {z : ℂ} (h0 : aeval z p = 0)
    (hz : z.im ≠ 0) : (X - C ((starRingEnd ℂ) z)) * (X - C z) ∣ map (algebraMap ℝ ℂ) p

(p : ℝ[X])
{z : ℂ}
(h0 : (Polynomial.aeval z) p = 0)
(hz : z.im ≠ 0)

(Polynomial.X - Polynomial.C ((starRingEnd ℂ) z)) * (Polynomial.X - Polynomial.C z) ∣ Polynomial.map (algebraMap ℝ ℂ) p


lemma borelMarkovFromReal_apply (Ω : Type*) [Nonempty Ω] [MeasurableSpace Ω] [StandardBorelSpace Ω]
    (η : Kernel α ℝ) (a : α) :
    borelMarkovFromReal Ω η a
      = if η a (range (embeddingReal Ω))ᶜ = 0 then (η a).comap (embeddingReal Ω)
        else (Measure.dirac (range_nonempty (embeddingReal Ω)).choose).comap (embeddingReal Ω)

{α : Type u_1}
{mα : MeasurableSpace α}
(Ω : Type u_5)
[Nonempty Ω]
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
(η : ProbabilityTheory.Kernel α ℝ)
(a : α)

(ProbabilityTheory.Kernel.borelMarkovFromReal Ω η) a =
  if (η a) (Set.range (MeasureTheory.embeddingReal Ω))ᶜ = 0 then
    MeasureTheory.Measure.comap (MeasureTheory.embeddingReal Ω) (η a)
  else MeasureTheory.Measure.comap (MeasureTheory.embeddingReal Ω) (MeasureTheory.Measure.dirac (Exists.choose ⋯))


theorem Opens.compl_bijective : Function.Bijective (@Opens.compl α _)


@[simp]
theorem ofEq_rfl : ofEq S₁ S₁ rfl = AffineEquiv.refl k S₁

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(S₁ : AffineSubspace k P₁)
[Nonempty ↥S₁]

AffineEquiv.ofEq S₁ S₁ ⋯ = AffineEquiv.refl k ↥S₁


theorem locallySmall_congr {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
    (e : C ≌ D) : LocallySmall.{w} C ↔ LocallySmall.{w} D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u'}
[CategoryTheory.Category.{v', u'} D]
(e : C ≌ D)

CategoryTheory.LocallySmall.{w, v, u} C ↔ CategoryTheory.LocallySmall.{w, v', u'} D


theorem Fintype.univ_pempty : @univ PEmpty _ = ∅


/-- The edge of `Λ[n, i]` with endpoints `j` and `j+1`.

This constructor assumes `0 < i < n`,
which is the type of horn that occurs in the horn-filling condition of quasicategories. -/
@[simps!]
def primitiveEdge {n : ℕ} {i : Fin (n+1)}
    (h₀ : 0 < i) (hₙ : i < Fin.last n) (j : Fin n) :
    Λ[n, i] _[1]

{n : ℕ}
{i : Fin (n + 1)}
(h₀ : 0 < i)
(hₙ : i < Fin.last n)
(j : Fin n)

(↑(SSet.horn.primitiveEdge h₀ hₙ j)).down = SimplexCategory.Hom.mk { toFun := ![j.castSucc, j.succ], monotone' := ⋯ }


@[simp, norm_cast]
lemma ofReal_qsmul (q : ℚ) (r : ℝ) : ofReal' (q • r) = q • r


/-- If `x`, `y`, `z` are functions `Π i : ι, α i`, then
the set difference between the box `[x, z]` and the product of the intervals `(y i, z i]`
is covered by the union of the boxes `[x, update z i (y i)]`.

E.g., if `x = y`, then this lemma states that the difference between a closed box
`[x, y]` and the product of half-open intervals `{z | ∀ i, x i < z i ≤ y i}` is covered by the union
of the faces of `[x, y]` adjacent to `x`. -/
theorem Icc_diff_pi_univ_Ioc_subset (x y z : ∀ i, α i) :
    (Icc x z \ pi univ fun i ↦ Ioc (y i) (z i)) ⊆ ⋃ i : ι, Icc x (update z i (y i))

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → LinearOrder (α i)]
(x y z : (i : ι) → α i)

(Set.Icc x z \ Set.univ.pi fun i => Set.Ioc (y i) (z i)) ⊆ ⋃ i, Set.Icc x (Function.update z i (y i))


@[reassoc (attr := simp)]
lemma ι_mapTrifunctorMapMap {X₁ Y₁ : GradedObject I₁ C₁} (f₁ : X₁ ⟶ Y₁)
    {X₂ Y₂ : GradedObject I₂ C₂} (f₂ : X₂ ⟶ Y₂)
    {X₃ Y₃ : GradedObject I₃ C₃} (f₃ : X₃ ⟶ Y₃)
    [HasMap ((((mapTrifunctor F I₁ I₂ I₃).obj X₁).obj X₂).obj X₃) p]
    [HasMap ((((mapTrifunctor F I₁ I₂ I₃).obj Y₁).obj Y₂).obj Y₃) p]
    (i₁ : I₁) (i₂ : I₂) (i₃ : I₃) (j : J) (h : p ⟨i₁, i₂, i₃⟩ = j) :
  ιMapTrifunctorMapObj F p X₁ X₂ X₃ i₁ i₂ i₃ j h ≫ mapTrifunctorMapMap F p f₁ f₂ f₃ j =
    ((F.map (f₁ i₁)).app (X₂ i₂)).app (X₃ i₃) ≫
      ((F.obj (Y₁ i₁)).map (f₂ i₂)).app (X₃ i₃) ≫
      ((F.obj (Y₁ i₁)).obj (Y₂ i₂)).map (f₃ i₃) ≫
      ιMapTrifunctorMapObj F p Y₁ Y₂ Y₃ i₁ i₂ i₃ j h

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

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

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

{X₃ Y₃ : CategoryTheory.GradedObject I₃ C₃}

[((((CategoryTheory.GradedObject.mapTrifunctor F I₁ I₂ I₃).obj X₁).obj X₂).obj X₃).HasMap p]

[((((CategoryTheory.GradedObject.mapTrifunctor F I₁ I₂ I₃).obj Y₁).obj Y₂).obj Y₃).HasMap p]

CategoryTheory.CategoryStruct.comp (CategoryTheory.GradedObject.ιMapTrifunctorMapObj F p X₁ X₂ X₃ i₁ i₂ i₃ j h)
    (CategoryTheory.GradedObject.mapTrifunctorMapMap F p f₁ f₂ f₃ j) =
  CategoryTheory.CategoryStruct.comp (((F.map (f₁ i₁)).app (X₂ i₂)).app (X₃ i₃))
    (CategoryTheory.CategoryStruct.comp (((F.obj (Y₁ i₁)).map (f₂ i₂)).app (X₃ i₃))
      (CategoryTheory.CategoryStruct.comp (((F.obj (Y₁ i₁)).obj (Y₂ i₂)).map (f₃ i₃))
        (CategoryTheory.GradedObject.ιMapTrifunctorMapObj F p Y₁ Y₂ Y₃ i₁ i₂ i₃ j h)))


theorem convexOn_rpow {p : ℝ} (hp : 1 ≤ p) : ConvexOn ℝ (Ici 0) fun x : ℝ ↦ x ^ p


/-- The natural `ContinuousLinearEquiv` from `ℂ` to `ℝ × ℝ`. -/
@[simps! (config := { simpRhs := true }) apply symm_apply_re symm_apply_im]
def equivRealProdCLM : ℂ ≃L[ℝ] ℝ × ℝ

∀ (a : ℝ × ℝ), (Complex.equivRealProdCLM.symm a).im = a.2


/-- If the second of three points is strictly between the other two, the angle at the first point
(reversed) is zero. -/
theorem _root_.Sbtw.angle₃₁₂_eq_zero {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) : ∠ p₃ p₁ p₂ = 0

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ p₃ : P}
(h : Sbtw ℝ p₁ p₂ p₃)


theorem ContinuousAt.congr {g : X → Y} (hf : ContinuousAt f x) (h : f =ᶠ[𝓝 x] g) :
    ContinuousAt g x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{x : X}
{g : X → Y}
(hf : ContinuousAt f x)
(h : f =ᶠ[𝓝 x] g)


@[simp] theorem sqrt_pos : 0 < sqrt x ↔ 0 < x


@[simp]
theorem trans_top [IsTrans γ t] (f : r ≺i s) (g : s ≺i t) : (f.trans g).top = g f.top

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
{t : γ → γ → Prop}
[IsTrans γ t]
(f : r ≺i s)
(g : s ≺i t)

(f.trans g).top = g.toRelEmbedding f.top


lemma iSup_genEigenspace_le_smul (f : Module.End R M) (μ t : R) :
    (⨆ k, f.genEigenspace μ k) ≤ ⨆ k, (t • f).genEigenspace (t * μ) k

{R : Type v}
{M : Type w}
[CommRing R]
[AddCommGroup M]
[Module R M]
(f : Module.End R M)
(μ t : R)

⨆ k, (f.genEigenspace μ) k ≤ ⨆ k, ((t • f).genEigenspace (t * μ)) k


theorem le_ofWithBot {boxes : Finset (WithBot (Box ι))}
    {le_of_mem : ∀ J ∈ boxes, (J : WithBot (Box ι)) ≤ I}
    {pairwise_disjoint : Set.Pairwise (boxes : Set (WithBot (Box ι))) Disjoint}
    (H : ∀ J ∈ π, ∃ J' ∈ boxes, ↑J ≤ J') : π ≤ ofWithBot boxes le_of_mem pairwise_disjoint

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

{pairwise_disjoint : (↑boxes).Pairwise Disjoint}

π ≤ BoxIntegral.Prepartition.ofWithBot boxes le_of_mem pairwise_disjoint


theorem eval₂_finset_sum (s : Finset ι) (g : ι → R[X]) (x : S) :
    (∑ i ∈ s, g i).eval₂ f x = ∑ i ∈ s, (g i).eval₂ f x

{R : Type u}
{S : Type v}
{ι : Type y}
[Semiring R]
[Semiring S]
(f : R →+* S)
(s : Finset ι)
(g : ι → R[X])
(x : S)

Polynomial.eval₂ f x (∑ i ∈ s, g i) = ∑ i ∈ s, Polynomial.eval₂ f x (g i)


theorem setToSimpleFunc_sub (T : Set α → E →L[ℝ] F) (h_add : FinMeasAdditive μ T) {f g : α →ₛ E}
    (hf : Integrable f μ) (hg : Integrable g μ) :
    setToSimpleFunc T (f - g) = setToSimpleFunc T f - setToSimpleFunc T g

(h_add : MeasureTheory.FinMeasAdditive μ T)

MeasureTheory.SimpleFunc.setToSimpleFunc T (f - g) =
  MeasureTheory.SimpleFunc.setToSimpleFunc T f - MeasureTheory.SimpleFunc.setToSimpleFunc T g


theorem Filter.Tendsto.midpoint [Invertible (2 : R)] {l : Filter α} {f₁ f₂ : α → P} {p₁ p₂ : P}
    (h₁ : Tendsto f₁ l (𝓝 p₁)) (h₂ : Tendsto f₂ l (𝓝 p₂)) :
    Tendsto (fun x => midpoint R (f₁ x) (f₂ x)) l (𝓝 <| midpoint R p₁ p₂)

{α : Type u_1}
{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{R : Type u_6}
[Ring R]
[TopologicalSpace R]
[Module R V]
[ContinuousSMul R V]
[Invertible 2]
{l : Filter α}
{f₁ f₂ : α → P}
{p₁ p₂ : P}
(h₁ : Filter.Tendsto f₁ l (𝓝 p₁))
(h₂ : Filter.Tendsto f₂ l (𝓝 p₂))

Filter.Tendsto (fun x => midpoint R (f₁ x) (f₂ x)) l (𝓝 (midpoint R p₁ p₂))


/-- This core description of a uniform space is outside of the type class hierarchy. It is useful
  for constructions of uniform spaces, when the topology is derived from the uniform space. -/
structure UniformSpace.Core (α : Type u) where
  /-- The uniformity filter. Once `UniformSpace` is defined, `𝓤 α` (`_root_.uniformity`) becomes the
  normal form. -/
  uniformity : Filter (α × α)
  /-- Every set in the uniformity filter includes the diagonal. -/
  refl : 𝓟 idRel ≤ uniformity
  /-- If `s ∈ uniformity`, then `Prod.swap ⁻¹' s ∈ uniformity`. -/
  symm : Tendsto Prod.swap uniformity uniformity
  /-- For every set `u ∈ uniformity`, there exists `v ∈ uniformity` such that `v ○ v ⊆ u`. -/
  comp : (uniformity.lift' fun s => s ○ s) ≤ uniformity

{α : Type u}
(self : UniformSpace.Core α)

Filter.Tendsto Prod.swap self.uniformity self.uniformity


theorem Finite.infsep_pos_iff_nontrivial (hs : s.Finite) : 0 < s.infsep ↔ s.Nontrivial

{α : Type u_1}
[MetricSpace α]
{s : Set α}
(hs : s.Finite)


/-- Given natural transformations `F₁ ⟶ F` and `F₂ ⟶ F`, construct
a natural transformation `coprod F₁ F₂ ⟶ F`. -/
@[simps]
def coprod.desc {F₁ F₂ : C ⥤ Type w} (τ₁ : F₁ ⟶ F) (τ₂ : F₂ ⟶ F) :
    coprod F₁ F₂ ⟶ F

{F F₁ F₂ : CategoryTheory.Functor C (Type w)}

(x : (CategoryTheory.FunctorToTypes.coprod F₁ F₂).obj a)

(CategoryTheory.FunctorToTypes.coprod.desc τ₁ τ₂).app a x =
  Sum.casesOn (motive := fun t => x = t → F.obj a) x (fun x_1 h => τ₁.app a x_1) (fun x_1 h => τ₂.app a x_1) ⋯


lemma pred_le_iff : pred m ≤ n ↔ m ≤ succ n


theorem dist_le_mul_of_le (hf : LipschitzWith K f) (hr : dist x y ≤ r) : dist (f x) (f y) ≤ K * r

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{K : ℝ≥0}
{f : α → β}
{x y : α}
{r : ℝ}
(hf : LipschitzWith K f)
(hr : dist x y ≤ r)


theorem opow_mul_add_lt_opow_mul_succ {b u w : Ordinal} (v : Ordinal) (hw : w < b ^ u) :
    b ^ u * v + w < b ^ u * succ v

{b u w : Ordinal.{u_1}}
(v : Ordinal.{u_1})
(hw : w < b ^ u)


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

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

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


@[to_additive (attr := simp)]
theorem prod_toList (s : Multiset α) : s.toList.prod = s.prod

{α : Type u_3}
[AddCommMonoid α]
(s : Multiset α)


@[simp]
theorem ofAdd_multiset_prod (s : Multiset α) : ofAdd s.sum = (s.map ofAdd).prod

Multiplicative.ofAdd s.sum = (Multiset.map (⇑Multiplicative.ofAdd) s).prod


theorem Submodule.finrank_le_finrank_of_le {s t : Submodule R M} [Module.Finite R t] (hst : s ≤ t) :
    finrank R s ≤ finrank R t

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
{s t : Submodule R M}
[Module.Finite R ↥t]
(hst : s ≤ t)

FiniteDimensional.finrank R ↥s ≤ FiniteDimensional.finrank R ↥t


/-- If `f` and `g` are isomorphic arrows, then a mono factorisation of `f` that is an image
gives a mono factorisation of `g` that is an image -/
@[simps]
def ofArrowIso {f g : Arrow C} {F : MonoFactorisation f.hom} (hF : IsImage F) (sq : f ⟶ g)
    [IsIso sq] : IsImage (F.ofArrowIso sq)

{F : CategoryTheory.Limits.MonoFactorisation f.hom}

(F' : CategoryTheory.Limits.MonoFactorisation g.hom)

(hF.ofArrowIso sq).lift F' = hF.lift (F'.ofArrowIso (CategoryTheory.inv sq))


theorem countP_le_card (s) : countP p s ≤ card s

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
(s : Multiset α)


/--
To check that the kernel of a ring homomorphism is finitely generated,
it suffices to check this after localizing at a spanning set of the source.
-/
lemma RingHom.ker_fg_of_localizationSpan (t : Set R) (ht : Ideal.span t = ⊤)
    (H : ∀ g : t, (RingHom.ker (Localization.awayMap f g.val)).FG) :
    (RingHom.ker f).FG

(H : ∀ (g : ↑t), (RingHom.ker (Localization.awayMap f ↑g)).FG)


theorem vars_add_of_disjoint [DecidableEq σ] (h : Disjoint p.vars q.vars) :
    (p + q).vars = p.vars ∪ q.vars

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{p q : MvPolynomial σ R}
[DecidableEq σ]
(h : Disjoint p.vars q.vars)


theorem Icc_prod_eq (a b : α × β) : Icc a b = Icc a.1 b.1 ×ˢ Icc a.2 b.2

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(a b : α × β)

Set.Icc a b = Set.Icc a.1 b.1 ×ˢ Set.Icc a.2 b.2


theorem eq_iff_sign_eq_and_abs_toReal_eq {θ ψ : Angle} :
    θ = ψ ↔ θ.sign = ψ.sign ∧ |θ.toReal| = |ψ.toReal|


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


theorem range_comp (f : M →[L] N) (g : N →[L] P) : range (g.comp f : M →[L] P) = map g (range f)

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
{P : Type u_2}
[L.Structure M]
[L.Structure N]
[L.Structure P]
(f : L.Hom M N)
(g : L.Hom N P)

(g.comp f).range = FirstOrder.Language.Substructure.map g f.range


/-- Helper function for constructing morphisms between wide equalizer tridents.
-/
@[simps]
def Trident.mkHom [Nonempty J] {s t : Trident f} (k : s.pt ⟶ t.pt)
    (w : k ≫ t.ι = s.ι := by aesop_cat) : s ⟶ t

(w : CategoryTheory.CategoryStruct.comp k t.ι = s.ι := by aesop_cat)

(CategoryTheory.Limits.Trident.mkHom k w).hom = k


theorem min_commutative : Commutative (min : α → α → α)


theorem le_mul_of_le_of_one_le' [PosMulMono α] [MulPosMono α] (bc : b ≤ c) (ha : 1 ≤ a)
    (a0 : 0 ≤ a) (b0 : 0 ≤ b) : b ≤ c * a

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
[MulPosMono α]
(bc : b ≤ c)
(ha : 1 ≤ a)
(a0 : 0 ≤ a)
(b0 : 0 ≤ b)


/-- The product of a list of elements of a submonoid is an element of the submonoid. -/
@[to_additive
      "The sum of a list of elements of an `AddSubmonoid` is an element of the `AddSubmonoid`."]
theorem list_prod_mem (hs : IsSubmonoid s) : ∀ {l : List M}, (∀ x ∈ l, x ∈ s) → l.prod ∈ s

{M : Type u_1}
[Monoid M]
{s : Set M}
(hs : IsSubmonoid s)
{l : List M}


theorem cyclotomic.eval_apply {R S : Type*} (q : R) (n : ℕ) [Ring R] [Ring S] (f : R →+* S) :
    eval (f q) (cyclotomic n S) = f (eval q (cyclotomic n R))

{R : Type u_1}
{S : Type u_2}
(q : R)
(n : ℕ)
[Ring R]
[Ring S]
(f : R →+* S)

Polynomial.eval (f q) (Polynomial.cyclotomic n S) = f (Polynomial.eval q (Polynomial.cyclotomic n R))


lemma coe_mem_spectrum_real_of_nonneg [Algebra ℝ A] [NonnegSpectrumClass ℝ A] {a : A} {x : ℝ≥0}
    (ha : 0 ≤ a := by cfc_tac) :
    (x : ℝ) ∈ spectrum ℝ a ↔ x ∈ spectrum ℝ≥0 a

{A : Type u_3}
[Ring A]
[PartialOrder A]
[Algebra ℝ A]
[NonnegSpectrumClass ℝ A]
{a : A}
{x : ℝ≥0}
(ha : 0 ≤ a := by cfc_tac)


theorem pow_dvd (p n : ℕ) : p ^ (p.maxPowDiv n) ∣ n


(R : Type u_1)
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
(a : A)
(ha : p a := by cfc_tac)


@[simp]
theorem mem_zeroLocus_iff {I : Ideal (MvPolynomial σ k)} {x : σ → k} :
    x ∈ zeroLocus I ↔ ∀ p ∈ I, eval x p = 0

{k : Type u_1}
[Field k]
{σ : Type u_2}
{I : Ideal (MvPolynomial σ k)}
{x : σ → k}

x ∈ MvPolynomial.zeroLocus I ↔ ∀ p ∈ I, (MvPolynomial.eval x) p = 0


lemma mem_bot {x : R} : x ∈ (⊥ : TwoSidedIdeal R) ↔ x = 0

(R : Type u_1)
[NonUnitalNonAssocRing R]
{x : R}


lemma proj_comp_transitionMap (n : ℕ) :
    S.proj (n + 1) ≫ S.diagram.map ⟨homOfLE (Nat.le_succ _)⟩ = S.proj n

S.proj (n + 1) ≫ S.diagram.map (Opposite.op (CategoryTheory.homOfLE ⋯)) = S.proj n


@[simp]
theorem KleisliCat.id_def {m} [Monad m] (α : KleisliCat m) : 𝟙 α = @pure m _ α

{m : Type u_1 → Type u_2}
[Monad m]
(α : CategoryTheory.KleisliCat m)

CategoryTheory.CategoryStruct.id α = pure


private theorem comp_gen : (((𝓤 α).lift' gen).lift' fun s => compRel s s) ≤ (𝓤 α).lift' gen

(((𝓤 α).lift' CauchyFilter.gen).lift' fun s => s ○ s) ≤ (𝓤 α).lift' CauchyFilter.gen


@[to_additive const_add]
theorem StrictAnti.const_mul' (hf : StrictAnti f) (c : α) : StrictAnti fun x => c * f x

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


/-- Application of a `ContinuousMultilinearMap` to a constant commutes with `fderivWithin`. -/
theorem fderivWithin_continuousMultilinear_apply_const_apply (hxs : UniqueDiffWithinAt 𝕜 s x)
    (hc : DifferentiableWithinAt 𝕜 c s x) (u : ∀ i, M i) (m : E) :
    (fderivWithin 𝕜 (fun y ↦ (c y) u) s x) m = (fderivWithin 𝕜 c s x) m u

{c : E → ContinuousMultilinearMap 𝕜 M H}

(fderivWithin 𝕜 (fun y => (c y) u) s x) m = ((fderivWithin 𝕜 c s x) m) u


lemma inv_nonneg_of_nonneg {a : EReal} (h : 0 ≤ a) : 0 ≤ a⁻¹


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

{α : Type u_1}
{l m r : List Char}
(f : Char → α → α)
(init : α)
{s : Substring}

Substring.ValidFor l m r s → Substring.foldr f init s = List.foldr f init m


theorem prime_of_mem_primeFactorsList {n : ℕ} : ∀ {p : ℕ}, p ∈ primeFactorsList n → Prime p


@[reassoc (attr := simp)]
theorem isoIsPullback_inv_fst (h : IsPullback fst snd f g) (h' : IsPullback fst' snd' f g) :
    (h.isoIsPullback h').inv ≫ fst = fst'

(h : CategoryTheory.IsPullback fst snd f g)

(h' : CategoryTheory.IsPullback fst' snd' f g)

(CategoryTheory.IsPullback.isoIsPullback X Y h h').inv ≫ fst = fst'


theorem isClopen_iUnion_of_finite [Finite Y] {s : Y → Set X} (h : ∀ i, IsClopen (s i)) :
    IsClopen (⋃ i, s i)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[Finite Y]
{s : Y → Set X}
(h : ∀ (i : Y), IsClopen (s i))


@[simp]
theorem two_nsmul_coe_div_two (θ : ℝ) : (2 : ℕ) • (↑(θ / 2) : Angle) = θ


theorem extChartAt_to_inv (x : M) : (extChartAt I x).symm ((extChartAt I x) x) = x

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
[ChartedSpace H M]
(x : M)

↑(extChartAt I x).symm (↑(extChartAt I x) x) = x


/-- (Implementation Detail) The glue data associated to a disjoint union. -/
@[simps! J V U f t]
noncomputable
def disjointGlueData : Scheme.GlueData

(ij : (AlgebraicGeometry.disjointGlueData' f).J × (AlgebraicGeometry.disjointGlueData' f).J)

(AlgebraicGeometry.disjointGlueData f).V ij = if ij.1 = ij.2 then f ij.1 else ∅


@[simp]
theorem mem_neighborFinset (w : V) : w ∈ G.neighborFinset v ↔ G.Adj v w

{V : Type u_1}
(G : SimpleGraph V)
(v : V)
[Fintype ↑(G.neighborSet v)]
(w : V)


@[mono]
theorem map_mono {f : α → β} (h : μ ≤ ν) (hf : Measurable f) : μ.map f ≤ ν.map f

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ ν : MeasureTheory.Measure α}
{f : α → β}
(h : μ ≤ ν)
(hf : Measurable f)

MeasureTheory.Measure.map f μ ≤ MeasureTheory.Measure.map f ν


/-- The map on stalks induced by the unit commutes with maps from `Γ(X)` to
    stalks (in `Spec Γ(X)` and in `X`). -/
theorem toStalk_stalkMap_toΓSpec (x : X) :
    toStalk _ _ ≫ X.toΓSpecSheafedSpace.stalkMap x = X.presheaf.Γgerm x

CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.StructureSheaf.toStalk
      (↑(Opposite.unop (Opposite.op (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))))
      (X.toΓSpecSheafedSpace.base x))
    (AlgebraicGeometry.PresheafedSpace.Hom.stalkMap X.toΓSpecSheafedSpace x) =
  X.presheaf.Γgerm x


/-- The set in `enumOrd_def` is nonempty. -/
theorem enumOrd_def_nonempty (hS : Unbounded (· < ·) S) {o} :
    { x | x ∈ S ∧ ∀ c, c < o → enumOrd S c < x }.Nonempty

(hS : Set.Unbounded (fun x x_1 => x < x_1) S)

{x | x ∈ S ∧ ∀ c < o, Ordinal.enumOrd S c < x}.Nonempty


@[to_additive]
theorem mul_eq {x y : PUnit} : x * y = unit


theorem rel_mem (hr : BiUnique R) : (R ⇒ Forall₂ R ⇒ Iff) (· ∈ ·) (· ∈ ·)

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
(hr : Relator.BiUnique R)

(R ⇒ List.Forall₂ R ⇒ Iff) (fun x x_1 => x ∈ x_1) fun x x_1 => x ∈ x_1


lemma Module.finitePresentation_iff_finite [IsNoetherianRing R] :
    Module.FinitePresentation R M ↔ Module.Finite R M

(R : Type u_1)
(M : Type u_2)
[Ring R]
[AddCommGroup M]
[Module R M]
[IsNoetherianRing R]


@[simp]
theorem inr_neg [SubNegZeroMonoid R] [Neg M] (m : M) : (inr (-m) : tsze R M) = -inr m

(R : Type u)
{M : Type v}
[SubNegZeroMonoid R]
[Neg M]
(m : M)

TrivSqZeroExt.inr (-m) = -TrivSqZeroExt.inr m


theorem and_rotate : a ∧ b ∧ c ↔ b ∧ c ∧ a


theorem powersetCard_succ_insert [DecidableEq α] {x : α} {s : Finset α} (h : x ∉ s) (n : ℕ) :
    powersetCard n.succ (insert x s) =
    powersetCard n.succ s ∪ (powersetCard n s).image (insert x)

{α : Type u_1}
[DecidableEq α]
{x : α}
{s : Finset α}
(h : x ∉ s)
(n : ℕ)

Finset.powersetCard n.succ (insert x s) =
  Finset.powersetCard n.succ s ∪ Finset.image (insert x) (Finset.powersetCard n s)


/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains.

See note [bundled maps over different rings] for why separate `R` and `S` semirings are used. -/
@[simps]
def prodEquiv [Module S M₂] [Module S M₃] [SMulCommClass R S M₂] [SMulCommClass R S M₃] :
    ((M →ₗ[R] M₂) × (M →ₗ[R] M₃)) ≃ₗ[S] M →ₗ[R] M₂ × M₃

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
(S : Type u_3)
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
[Module S M₂]
[Module S M₃]
[SMulCommClass R S M₂]
[SMulCommClass R S M₃]
(f : M →ₗ[R] M₂ × M₃)

(LinearMap.prodEquiv S).symm f = (LinearMap.fst R M₂ M₃ ∘ₗ f, LinearMap.snd R M₂ M₃ ∘ₗ f)


theorem List.toFinset_card_of_nodup {l : List α} (h : l.Nodup) : l.toFinset.card = l.length

{α : Type u_1}
[DecidableEq α]
{l : List α}
(h : l.Nodup)


@[to_additive] theorem closedEmbedding_mk : ClosedEmbedding (@mk M)


theorem trop_mul_def [Add R] (x y : Tropical R) : x * y = trop (untrop x + untrop y)

x * y = Tropical.trop (Tropical.untrop x + Tropical.untrop y)


/-- The minimal distance to a set `s` is `< r` iff there exists a point in `s` at distance `< r`. -/
theorem infDist_lt_iff {r : ℝ} (hs : s.Nonempty) : infDist x s < r ↔ ∃ y ∈ s, dist x y < r

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
{x : α}
{r : ℝ}
(hs : s.Nonempty)

Metric.infDist x s < r ↔ ∃ y ∈ s, dist x y < r


theorem _root_.integral_eq_zero_of_forall_integral_inner_eq_zero (f : α → E) (hf : Integrable f μ)
    (hf_int : ∀ c : E, ∫ x, ⟪c, f x⟫ ∂μ = 0) : ∫ x, f x ∂μ = 0

(hf_int : ∀ (c : E), ∫ (x : α), ⟪c, f x⟫_𝕜 ∂μ = 0)


@[simp]
theorem apply_symm_apply (f : M ≃[L] N) (a : N) : f (f.symm a) = a

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


@[to_additive (attr := simp)]
theorem toEquiv_mulRight (g : G) : (mulRight g).toEquiv = Equiv.mulRight g

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd G]
(g : G)

(MeasurableEquiv.addRight g).toEquiv = Equiv.addRight g