theorem span_gramSchmidtNormed_range (f : ι → E) :
    span 𝕜 (range (gramSchmidtNormed 𝕜 f)) = span 𝕜 (range (gramSchmidt 𝕜 f))

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

Submodule.span 𝕜 (Set.range (gramSchmidtNormed 𝕜 f)) = Submodule.span 𝕜 (Set.range (gramSchmidt 𝕜 f))


theorem eq_C_of_natDegree_eq_zero (h : natDegree p = 0) : p = C (coeff p 0)

{R : Type u}
[Semiring R]
{p : R[X]}
(h : p.natDegree = 0)


theorem tendsto_of_seq_tendsto {f : α → β} {k : Filter α} {l : Filter β} [k.IsCountablyGenerated] :
    (∀ x : ℕ → α, Tendsto x atTop k → Tendsto (f ∘ x) atTop l) → Tendsto f k l

{α : Type u_3}
{β : Type u_4}
{f : α → β}
{k : Filter α}
{l : Filter β}
[k.IsCountablyGenerated]

(∀ (x : ℕ → α), Filter.Tendsto x Filter.atTop k → Filter.Tendsto (f ∘ x) Filter.atTop l) → Filter.Tendsto f k l


/-- Given two perfectly-paired `R`-modules `M` and `N`, a root pairing with indexing set `ι`
is the data of an `ι`-indexed subset of `M` ("the roots"), an `ι`-indexed subset of `N`
("the coroots"), and an `ι`-indexed set of permutations of `ι`, such that each root-coroot pair
evaluates to `2`, and the permutation attached to each element of `ι` is compatible with the
reflections on the corresponding roots and coroots.

It exists to allow for a convenient unification of the theories of root systems and root data. -/
structure RootPairing extends PerfectPairing R M N :=
  /-- A parametrized family of vectors, called roots. -/
  root : ι ↪ M
  /-- A parametrized family of dual vectors, called coroots. -/
  coroot : ι ↪ N
  root_coroot_two : ∀ i, toLin (root i) (coroot i) = 2
  /-- A parametrized family of permutations, induced by reflection. -/
  reflection_perm : ι → (ι ≃ ι)
  reflection_perm_root : ∀ i j,
    root j - toLin (root j) (coroot i) • root i = root (reflection_perm i j)
  reflection_perm_coroot : ∀ i j,
    coroot j - toLin (root i) (coroot j) • coroot i = coroot (reflection_perm i j)

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(self : RootPairing ι R M N)
(i : ι)

(self.toLin (self.root i)) (self.coroot i) = 2


theorem continuousAt_arg_coe_angle (h : x ≠ 0) : ContinuousAt ((↑) ∘ arg : ℂ → Real.Angle) x

ContinuousAt (Real.Angle.coe ∘ Complex.arg) x


theorem mem_range_self [RingHomSurjective τ₁₂] (f : F) (x : M) : f x ∈ range f

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_6}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_11}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
[RingHomSurjective τ₁₂]
(f : F)
(x : M)


/-- A family is linearly independent if and only if all of its finite subfamily is
linearly independent. -/
theorem linearIndependent_iff_finset_linearIndependent :
    LinearIndependent R v ↔ ∀ (s : Finset ι), LinearIndependent R (v ∘ (Subtype.val : s → ι))

{ι : Type u'}
{R : Type u_2}
{M : Type u_4}
{v : ι → M}
[Semiring R]
[AddCommMonoid M]
[Module R M]

LinearIndependent R v ↔ ∀ (s : Finset ι), LinearIndependent R (v ∘ Subtype.val)


theorem Kernel.indep_iSup_directed_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) :
    Indep (⨆ a, ⨆ n ∈ ns a, s n) (limsup s f) κ μα

{α : Type u_1}
{Ω : Type u_2}
{ι : Type u_3}
{_mα : MeasurableSpace α}
{s : ι → MeasurableSpace Ω}
{m0 : MeasurableSpace Ω}
{κ : ProbabilityTheory.Kernel α Ω}
{μα : MeasureTheory.Measure α}
[ProbabilityTheory.IsMarkovKernel κ]

∀ {α_1 : Type u_4} {p : Set ι → Prop} {f : Filter ι} {ns : α_1 → Set ι},
  (∀ (n : ι), s n ≤ m0) →
    ProbabilityTheory.Kernel.iIndep s κ μα →
      (∀ (t : Set ι), p t → tᶜ ∈ f) →
        Directed (fun x x_1 => x ≤ x_1) ns →
          (∀ (a : α_1), p (ns a)) → ProbabilityTheory.Kernel.Indep (⨆ a, ⨆ n ∈ ns a, s n) (Filter.limsup s f) κ μα


theorem inv_smul_eq_iff₀ {a : α} (ha : a ≠ 0) {x y : β} : a⁻¹ • x = y ↔ x = a • y

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


theorem Continuous.stronglyMeasurableAtFilter [TopologicalSpace α] [OpensMeasurableSpace α]
    [TopologicalSpace β] [PseudoMetrizableSpace β] [SecondCountableTopologyEither α β] {f : α → β}
    (hf : Continuous f) (μ : Measure α) (l : Filter α) : StronglyMeasurableAtFilter f l μ


protected theorem neg_le_sub_right_of_le_add {a b c : Int} (h : c ≤ a + b) : -b ≤ a - c


theorem rpow_lt_one_iff_of_pos (hx : 0 < x) : x ^ y < 1 ↔ 1 < x ∧ y < 0 ∨ x < 1 ∧ 0 < y


/-- Sending `Fin (n+1)` to `Fin n` by subtracting one from anything above `p`
then back to `Fin (n+1)` with a gap around `p` is the identity away from `p`. -/
@[simp]
lemma succAbove_predAbove {p : Fin n} {i : Fin (n + 1)} (h : i ≠ castSucc p) :
    p.castSucc.succAbove (p.predAbove i) = i

{n : ℕ}
{p : Fin n}
{i : Fin (n + 1)}
(h : i ≠ p.castSucc)


theorem chineseRemainderOfList_modEq_unique (l : List ι)
    (co : l.Pairwise (Coprime on s)) {z} (hz : ∀ i ∈ l, z ≡ a i [MOD s i]) :
    z ≡ chineseRemainderOfList a s l co [MOD (l.map s).prod]

(co : List.Pairwise (Nat.Coprime on s) l)

z ≡ ↑(Nat.chineseRemainderOfList a s l co) [MOD (List.map s l).prod]


theorem AffineMap.restrict.injective {φ : P₁ →ᵃ[k] P₂} (hφ : Function.Injective φ)
    {E : AffineSubspace k P₁} {F : AffineSubspace k P₂} [Nonempty E] [Nonempty F]
    (hEF : E.map φ ≤ F) : Function.Injective (AffineMap.restrict φ hEF)

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[AddCommGroup V₂]
[Module k V₁]
[Module k V₂]
[AddTorsor V₁ P₁]
[AddTorsor V₂ P₂]
{φ : P₁ →ᵃ[k] P₂}
(hφ : Function.Injective ⇑φ)
{E : AffineSubspace k P₁}
{F : AffineSubspace k P₂}
[Nonempty ↥E]
[Nonempty ↥F]
(hEF : AffineSubspace.map φ E ≤ F)


theorem nhds_ne_subtype_neBot_iff {S : Set X} {x : S} :
    (𝓝[≠] x).NeBot ↔ (𝓝[≠] (x : X) ⊓ 𝓟 S).NeBot

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


theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
    ↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det

↑n.superFactorial ∣ (Matrix.vandermonde v).det


lemma isEquivalent_deriv_rpow_p_mul_one_sub_smoothingFn {p : ℝ} (hp : p ≠ 0) :
    deriv (fun z => z ^ p * (1 - ε z)) ~[atTop] fun z => p * z ^ (p-1)

(deriv fun z => z ^ p * (1 - AkraBazziRecurrence.smoothingFn z)) ~[Filter.atTop] fun z => p * z ^ (p - 1)


/-- The obvious triangle `X₁ ⟶ X₁ ⨯ X₂ ⟶ X₂ ⟶ X₁⟦1⟧`. -/
@[simps!]
def binaryProductTriangle (X₁ X₂ : C) [HasZeroMorphisms C] [HasBinaryProduct X₁ X₂] :
    Triangle C

(CategoryTheory.Pretriangulated.binaryProductTriangle X₁ X₂).mor₁ = CategoryTheory.Limits.prod.lift (𝟙 X₁) 0


@[to_additive]
theorem map_map (g : N →* P) (f : M →* N) : (S.map f).map g = S.map (g.comp f)

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass N]
[AddZeroClass P]
(S : AddSubmonoid M)
(g : N →+ P)
(f : M →+ N)

AddSubmonoid.map g (AddSubmonoid.map f S) = AddSubmonoid.map (g.comp f) S


theorem succ (n : ℕ) (f : K[X]) :
    SplittingFieldAux (n + 1) f = SplittingFieldAux n f.removeFactor

{K : Type v}
[Field K]
(n : ℕ)
(f : K[X])

Polynomial.SplittingFieldAux (n + 1) f = Polynomial.SplittingFieldAux n f.removeFactor


theorem adjugate_fin_succ_eq_det_submatrix {n : ℕ} (A : Matrix (Fin n.succ) (Fin n.succ) α) (i j) :
    adjugate A i j = (-1) ^ (j + i : ℕ) * det (A.submatrix j.succAbove i.succAbove)

A.adjugate i j = (-1) ^ (↑j + ↑i) * (A.submatrix j.succAbove i.succAbove).det


theorem subtype_coe (hs : MeasurableSet s) : MeasurableEmbedding ((↑) : s → α)

{α : Type u_1}
{s : Set α}
{mα : MeasurableSpace α}
(hs : MeasurableSet s)


protected theorem IsIntegral.algebraMap [Algebra A B] [IsScalarTower R A B] {x : A}
    (h : IsIntegral R x) : IsIntegral R (algebraMap A B x)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommRing R]
[CommRing A]
[Ring B]
[Algebra R A]
[Algebra R B]
[Algebra A B]
[IsScalarTower R A B]
{x : A}
(h : IsIntegral R x)


lemma div_pos [PosMulStrictMono α] (ha : 0 < a) (hb : 0 < b) : 0 < a / b

{α : Type u_1}
[Semifield α]
[LinearOrder α]
[PosMulReflectLT α]
[ZeroLEOneClass α]
{a b : α}
[PosMulStrictMono α]
(ha : 0 < a)
(hb : 0 < b)


@[higher_order]
theorem tfst_eq_fst_id {α α' β} (f : α → α') (x : t α β) :
    tfst (F := Id) (pure ∘ f) x = pure (fst f x)

{t : Type u → Type u → Type u}
[Bitraversable t]
[LawfulBitraversable t]
{α α' β : Type u}
(f : α → α')
(x : t α β)

Bitraversable.tfst (pure ∘ f) x = pure (Bifunctor.fst f x)


@[simp]
theorem sign_neg (θ : Angle) : (-θ).sign = -θ.sign


theorem rpow_left_bijective {x : ℝ} (hx : x ≠ 0) : Function.Bijective fun y : ℝ≥0 => y ^ x


@[simp, mfld_simps]
theorem coe_coe : (e.toPartialEquiv : X → Y) = e

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


@[simp] theorem set_map {f : α → β} {l : List α} {n : Nat} {a : α} :
    (map f l).set n (f a) = map f (l.set n a)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{l : List α}
{n : Nat}
{a : α}

(List.map f l).set n (f a) = List.map f (l.set n a)


@[to_additive pi_norm_le_iff_of_nonempty]
lemma pi_norm_le_iff_of_nonempty' [Nonempty ι] : ‖f‖ ≤ r ↔ ∀ b, ‖f b‖ ≤ r

{ι : Type u_1}
{π : ι → Type u_4}
[Fintype ι]
[(i : ι) → SeminormedAddGroup (π i)]
(f : (i : ι) → π i)
{r : ℝ}
[Nonempty ι]


@[to_additive AddSemiconjBy.prod]
theorem SemiconjBy.prod {x y z : M × N}
    (hm : SemiconjBy x.1 y.1 z.1) (hn : SemiconjBy x.2 y.2 z.2) : SemiconjBy x y z

{M : Type u_5}
{N : Type u_6}
[Add M]
[Add N]
{x y z : M × N}
(hm : AddSemiconjBy x.1 y.1 z.1)
(hn : AddSemiconjBy x.2 y.2 z.2)


theorem Products.evalCons {l : List I} {a : I}
    (hla : (a::l).Chain' (·>·)) : Products.eval C ⟨a::l,hla⟩ =
    (e C a) * Products.eval C ⟨l,List.Chain'.sublist hla (List.tail_sublist (a::l))⟩

(hla : List.Chain' (fun x x_1 => x > x_1) (a :: l))

Profinite.NobelingProof.Products.eval C ⟨a :: l, hla⟩ =
  Profinite.NobelingProof.e C a * Profinite.NobelingProof.Products.eval C ⟨l, ⋯⟩


lemma le_iff_pos_of_dvd (ha : 0 < a) (hab : a ∣ b) : a ≤ b ↔ 0 < b


/-- `MvPolynomial.rename` induces an isomorphism between the symmetric subalgebras. -/
@[simps!]
def renameSymmetricSubalgebra [CommSemiring R] (e : σ ≃ τ) :
    symmetricSubalgebra σ R ≃ₐ[R] symmetricSubalgebra τ R

(a : ↥(MvPolynomial.symmetricSubalgebra σ R))

↑((MvPolynomial.renameSymmetricSubalgebra e) a) = (MvPolynomial.rename ⇑e) ↑a


theorem IsConnected.preimage_of_isOpenMap [TopologicalSpace β] {s : Set β} (hs : IsConnected s)
    {f : α → β} (hinj : Function.Injective f) (hf : IsOpenMap f) (hsf : s ⊆ range f) :
    IsConnected (f ⁻¹' s)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
{s : Set β}
(hs : IsConnected s)
{f : α → β}
(hinj : Function.Injective f)
(hf : IsOpenMap f)
(hsf : s ⊆ Set.range f)


theorem verschiebung_shift (x : 𝕎 R) (k : ℕ) (h : ∀ i < k + 1, x.coeff i = 0) :
    verschiebung (x.shift k.succ) = x.shift k

{p : ℕ}
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
[CommRing R]
(x : WittVector p R)
(k : ℕ)
(h : ∀ i < k + 1, x.coeff i = 0)

WittVector.verschiebung (x.shift k.succ) = x.shift k


theorem toNonUnitalNonAssocSemiring_injective :
    Function.Injective (@toNonUnitalNonAssocSemiring R)


theorem memℒp_iff [NormedAddCommGroup γ] [BorelSpace γ] {p : ℝ≥0∞} (h : IdentDistrib f g μ ν) :
    Memℒp f p μ ↔ Memℒp g p ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

MeasureTheory.Memℒp f p μ ↔ MeasureTheory.Memℒp g p ν


/-- This is an auxiliary data structure useful for constructing adjunctions.
See `Adjunction.mkOfUnitCounit`.
This structure won't typically be used anywhere else.
-/
-- Porting note(#5171): `has_nonempty_instance` linter not ported yet
-- @[nolint has_nonempty_instance]
structure CoreUnitCounit (F : C ⥤ D) (G : D ⥤ C) where
  /-- The unit of an adjunction between `F` and `G` -/
  unit : 𝟭 C ⟶ F.comp G
  /-- The counit of an adjunction between `F` and `G`s -/
  counit : G.comp F ⟶ 𝟭 D
  /-- Equality of the composition of the unit, associator, and counit with the identity
  `F ⟶ (F G) F ⟶ F (G F) ⟶ F = NatTrans.id F` -/
  left_triangle :
    whiskerRight unit F ≫ (Functor.associator F G F).hom ≫ whiskerLeft F counit =
      NatTrans.id (𝟭 C ⋙ F) := by
    aesop_cat
  /-- Equality of the composition of the unit, associator, and counit with the identity
  `G ⟶ G (F G) ⟶ (F G) F ⟶ G = NatTrans.id G` -/
  right_triangle :
    whiskerLeft G unit ≫ (Functor.associator G F G).inv ≫ whiskerRight counit G =
      NatTrans.id (G ⋙ 𝟭 C) := by
    aesop_cat

(self : CategoryTheory.Adjunction.CoreUnitCounit F G)

CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight self.unit F)
    (CategoryTheory.CategoryStruct.comp (F.associator G F).hom (CategoryTheory.whiskerLeft F self.counit)) =
  CategoryTheory.NatTrans.id ((CategoryTheory.Functor.id C).comp F)


/-- Constructs an equivalence between finite Boolean algebras from an order isomorphism between
them. -/
@[simps]
def Iso.mk {α β : FinBoolAlg.{u}} (e : α ≃o β) : α ≅ β

{α β : FinBoolAlg}
(e : ↑α.toBoolAlg ≃o ↑β.toBoolAlg)
(a : ↑β.toBoolAlg)

(FinBoolAlg.Iso.mk e).inv.toSupHom a = e.symm a


lemma dens_le_dens (h : s ⊆ t) : dens s ≤ dens t

{α : Type u_2}
[Fintype α]
{s t : Finset α}
(h : s ⊆ t)


/-- The functor `HomologicalComplex C c ⥤ ComposableArrows C 3` that maps `K` to the
diagram `K.homology i ⟶ K.opcycles i ⟶ K.cycles j ⟶ K.homology j`. -/
@[simps]
noncomputable def composableArrows₃Functor [CategoryWithHomology C] :
    HomologicalComplex C c ⥤ ComposableArrows C 3

(C : Type u_1)
{ι : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{c : ComplexShape ι}
(i j : ι)
[CategoryTheory.CategoryWithHomology C]
{K L : HomologicalComplex C c}
(φ : K ⟶ L)

(HomologicalComplex.HomologySequence.composableArrows₃Functor C i j).map φ =
  CategoryTheory.ComposableArrows.homMk₃ (HomologicalComplex.homologyMap φ i) (HomologicalComplex.opcyclesMap φ i)
    (HomologicalComplex.cyclesMap φ j) (HomologicalComplex.homologyMap φ j) ⋯ ⋯ ⋯


/-- If self-maps `f` and `g` commute, then `g` is bijective on the set of fixed points of `f ∘ g`.
This is a particular case of `Function.bijOn_fixedPoints_comp`. -/
theorem Commute.right_bijOn_fixedPoints_comp (h : Commute f g) :
    Set.BijOn g (fixedPoints <| f ∘ g) (fixedPoints <| f ∘ g)

{α : Type u}
{f g : α → α}
(h : Function.Commute f g)

Set.BijOn g (Function.fixedPoints (f ∘ g)) (Function.fixedPoints (f ∘ g))


theorem leftMoves_add_cases {x y : PGame} (k) {P : (x + y).LeftMoves → Prop}
    (hl : ∀ i, P <| toLeftMovesAdd (Sum.inl i)) (hr : ∀ i, P <| toLeftMovesAdd (Sum.inr i)) :
    P k

(hl : ∀ (i : x.LeftMoves), P (SetTheory.PGame.toLeftMovesAdd (Sum.inl i)))

(hr : ∀ (i : y.LeftMoves), P (SetTheory.PGame.toLeftMovesAdd (Sum.inr i)))


@[to_additive succ_nsmul]
theorem pow_succ (a : M) (n : ℕ) : a ^ (n + 1) = a ^ n * a

{M : Type u_2}
[AddMonoid M]
(a : M)
(n : ℕ)


/-- A T₃ topological space with second countable topology can be embedded into `l^∞ = ℕ →ᵇ ℝ`. -/
theorem exists_embedding_l_infty : ∃ f : X → ℕ →ᵇ ℝ, Embedding f

(X : Type u_1)
[TopologicalSpace X]
[T3Space X]
[SecondCountableTopology X]


lemma _root_.MeasureTheory.Measure.iInf_rat_gt_prod_Iic {ρ : Measure (α × ℝ)} [IsFiniteMeasure ρ]
    {s : Set α} (hs : MeasurableSet s) (t : ℚ) :
    ⨅ r : { r' : ℚ // t < r' }, ρ (s ×ˢ Iic (r : ℝ)) = ρ (s ×ˢ Iic (t : ℝ))

{α : Type u_1}
{mα : MeasurableSpace α}
{ρ : MeasureTheory.Measure (α × ℝ)}
[MeasureTheory.IsFiniteMeasure ρ]
{s : Set α}
(hs : MeasurableSet s)
(t : ℚ)

⨅ r, ρ (s ×ˢ Set.Iic ↑↑r) = ρ (s ×ˢ Set.Iic ↑t)


@[to_additive add_conv]
theorem add_mconv [MeasurableMul₂ M] (μ : Measure M) (ν : Measure M) (ρ : Measure M) [SFinite μ]
    [SFinite ν] [SFinite ρ] : (μ + ν) ∗ ρ = μ ∗ ρ + ν ∗ ρ

{M : Type u_1}
[Monoid M]
[MeasurableSpace M]
[MeasurableMul₂ M]
(μ ν ρ : MeasureTheory.Measure M)
[MeasureTheory.SFinite μ]
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite ρ]


/-- If `M ⟶ N` is an epimorphisms and that `M` is generated by some sections,
then `N` is generated by the images of these sections. -/
@[simps]
def ofEpi (σ : M.GeneratingSections) (p : M ⟶ N) [Epi p] :
    N.GeneratingSections

{J : CategoryTheory.GrothendieckTopology C}

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

(σ.ofEpi p).s i = SheafOfModules.sectionsMap p (σ.s i)


@[simp] lemma unmop_leftUnitor (X : Cᴹᵒᵖ) : (λ_ X).unmop = ρ_ (unmop X)

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

(CategoryTheory.MonoidalCategory.leftUnitor X).unmop = CategoryTheory.MonoidalCategory.rightUnitor X.unmop


@[simp]
theorem lt_mul_iff_one_lt_left [MulPosStrictMono α] [MulPosReflectLT α] (a0 : 0 < a) :
    a < b * a ↔ 1 < b

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


theorem blsub_lt_ord_lift {o : Ordinal.{u}} {f : ∀ a < o, Ordinal} {c : Ordinal}
    (ho : Cardinal.lift.{v, u} o.card < c.cof) (hf : ∀ i hi, f i hi < c) : blsub.{u, v} o f < c

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

(hf : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi < c)


theorem subset_insert_iff {s t : Set α} {x : α} :
    s ⊆ insert x t ↔ s ⊆ t ∨ (x ∈ s ∧ s \ {x} ⊆ t)

s ⊆ insert x t ↔ s ⊆ t ∨ x ∈ s ∧ s \ {x} ⊆ t


@[simp, rclike_simps]
theorem conjCLE_apply : (conjCLE : K → K) = conj


theorem cons_get_drop_succ {l : List α} {n} :
    l.get n :: l.drop (n.1 + 1) = l.drop n.1

{α : Type u}
{l : List α}
{n : Fin l.length}

l.get n :: List.drop (↑n + 1) l = List.drop (↑n) l


/-- Functional equation for the even Hurwitz zeta function with poles removed. -/
lemma completedHurwitzZetaEven₀_one_sub (a : UnitAddCircle) (s : ℂ) :
    completedHurwitzZetaEven₀ a (1 - s) = completedCosZeta₀ a s

HurwitzZeta.completedHurwitzZetaEven₀ a (1 - s) = HurwitzZeta.completedCosZeta₀ a s


theorem Nat.pow_sub_pow {x y : ℕ} (hxy : p ∣ x - y) (hx : ¬p ∣ x) (n : ℕ) :
    multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y) + multiplicity p n

{p : ℕ}
(hp : Nat.Prime p)
(hp1 : Odd p)
{x y : ℕ}
(hxy : p ∣ x - y)
(hx : ¬p ∣ x)
(n : ℕ)


@[simp]
theorem convexJoin_singleton_left (t : Set E) (x : E) :
    convexJoin 𝕜 {x} t = ⋃ y ∈ t, segment 𝕜 x y

{𝕜 : Type u_2}
{E : Type u_3}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
(t : Set E)
(x : E)


@[simp]
theorem mk_mul_moveLeft_inl {xl xr yl yr} {xL xR yL yR} {i j} :
    (mk xl xr xL xR * mk yl yr yL yR).moveLeft (Sum.inl (i, j)) =
      xL i * mk yl yr yL yR + mk xl xr xL xR * yL j - xL i * yL j

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

(SetTheory.PGame.mk xl xr xL xR * SetTheory.PGame.mk yl yr yL yR).moveLeft (Sum.inl (i, j)) =
  xL i * SetTheory.PGame.mk yl yr yL yR + SetTheory.PGame.mk xl xr xL xR * yL j - xL i * yL j


@[simp] protected theorem zero_mul (a : Rat) : 0 * a = 0


/-- **Blichfeldt's Theorem**. If the volume of the set `s` is larger than the covolume of the
countable subgroup `L` of `E`, then there exist two distinct points `x, y ∈ L` such that `(x + s)`
and `(y + s)` are not disjoint. -/
theorem exists_pair_mem_lattice_not_disjoint_vadd [AddCommGroup L] [Countable L] [AddAction L E]
    [MeasurableSpace L] [MeasurableVAdd L E] [VAddInvariantMeasure L E μ]
    (fund : IsAddFundamentalDomain L F μ) (hS : NullMeasurableSet s μ) (h : μ F < μ s) :
    ∃ x y : L, x ≠ y ∧ ¬Disjoint (x +ᵥ s) (y +ᵥ s)

[MeasureTheory.VAddInvariantMeasure L E μ]

(fund : MeasureTheory.IsAddFundamentalDomain L F μ)

(hS : MeasureTheory.NullMeasurableSet s μ)

∃ x y, x ≠ y ∧ ¬Disjoint (x +ᵥ s) (y +ᵥ s)


@[reassoc (attr := simp)]
lemma liftH_ι (k : A ⟶ h.Q) (hk : k ≫ h.g' = 0) : h.liftH k hk ≫ h.ι = k

(hk : CategoryTheory.CategoryStruct.comp k h.g' = 0)

CategoryTheory.CategoryStruct.comp (h.liftH k hk) h.ι = k


theorem ContDiffWithinAt.arctan (h : ContDiffWithinAt ℝ n f s x) :
    ContDiffWithinAt ℝ n (fun x => arctan (f x)) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{s : Set E}
{n : ℕ∞}
(h : ContDiffWithinAt ℝ n f s x)

ContDiffWithinAt ℝ n (fun x => Real.arctan (f x)) s x


@[simp]
theorem add_product (s t : Multiset α) (u : Multiset β) : (s + t) ×ˢ u = s ×ˢ u + t ×ˢ u

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


theorem right_dom_of_sdiff_dom [SDiff α] {a b : Part α} (hab : Dom (a \ b)) : b.Dom

{α : Type u_1}
[SDiff α]
{a b : Part α}
(hab : (a \ b).Dom)


lemma two_pow_succ (n : ℕ) : 2 ^ (n + 1) = 2 ^ n + 2 ^ n


@[simp] lemma lift_le_comp : lift a ≤ comp b ↔ Disjoint a b

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

Booleanisation.lift a ≤ Booleanisation.comp b ↔ Disjoint a b


theorem setIntegral_compLp (L : E →L[𝕜] F) (φ : Lp E p μ) {s : Set X} (hs : MeasurableSet s) :
    ∫ x in s, (L.compLp φ) x ∂μ = ∫ x in s, L (φ x) ∂μ

{X : Type u_1}
{E : Type u_3}
{F : Type u_4}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{𝕜 : Type u_5}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : ℝ≥0∞}
[NormedSpace ℝ F]
(L : E →L[𝕜] F)
(φ : ↥(MeasureTheory.Lp E p μ))
{s : Set X}
(hs : MeasurableSet s)

∫ (x : X) in s, ↑↑(L.compLp φ) x ∂μ = ∫ (x : X) in s, L (↑↑φ x) ∂μ


theorem inverse_apply_eq {y : (inverse f).domain} {x : f.domain} (hxy : f x = y) :
    (inverse f) y = x

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{f : E →ₗ.[R] F}
(hf : LinearMap.ker f.toFun = ⊥)
{y : ↥f.inverse.domain}
{x : ↥f.domain}
(hxy : ↑f x = ↑y)


theorem mk_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : P.obj (op X)) (I : S.Arrow) :
    mk S x I = P.map I.f.op x

{J : CategoryTheory.GrothendieckTopology C}

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

(x : (CategoryTheory.forget D).obj (P.obj (Opposite.op X)))

↑(CategoryTheory.Meq.mk S x) I = (P.map I.f.op) x


theorem find_dom (h : ∃ n, P n) : (find P).Dom

(P : ℕ → Prop)
[DecidablePred P]
(h : ∃ n, P n)


theorem is_greatest {a b : α} {m : ℕ} (hm : multiplicity a b < m) : ¬a ^ m ∣ b

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a b : α}
{m : ℕ}
(hm : multiplicity a b < ↑m)


theorem coLindelof_le_coclosedLindelof : coLindelof X ≤ coclosedLindelof X

Filter.coLindelof X ≤ Filter.coclosedLindelof X


@[simp]
lemma imaginaryPart_imaginaryPart {x : A} : ℑ (ℑ x : A) = 0

{A : Type u_1}
[AddCommGroup A]
[Module ℂ A]
[StarAddMonoid A]
[StarModule ℂ A]
{x : A}


theorem SetCoe.exists' {s : Set α} {p : ∀ x, x ∈ s → Prop} :
    (∃ (x : _) (h : x ∈ s), p x h) ↔ ∃ x : s, p x.1 x.2

{α : Type u}
{s : Set α}
{p : (x : α) → x ∈ s → Prop}

(∃ x, ∃ (h : x ∈ s), p x h) ↔ ∃ x, p ↑x ⋯


protected theorem le_sub_of_add_le' {n k m : Nat} : m + n ≤ k → n ≤ k - m


@[simp]
theorem rid_symm_apply (m : M) : (TensorProduct.rid R M).symm m = m ⊗ₜ 1

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

(TensorProduct.rid R M).symm m = m ⊗ₜ[R] 1


theorem summable_pow_mul_geometric_of_norm_lt_one {R : Type*} [NormedRing R] [CompleteSpace R]
    (k : ℕ) {r : R} (hr : ‖r‖ < 1) : Summable (fun n ↦ (n : R) ^ k * r ^ n : ℕ → R)

{R : Type u_4}
[NormedRing R]
[CompleteSpace R]
(k : ℕ)
{r : R}
(hr : ‖r‖ < 1)


protected theorem min (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
    LipschitzWith (max Kf Kg) fun x => min (f x) (g x)

{α : Type u}
[PseudoEMetricSpace α]
{f g : α → ℝ}
{Kf Kg : ℝ≥0}
(hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g)


theorem left_ne_zero_of_mul_eq_one (h : a * b = 1) : a ≠ 0

{M₀ : Type u_2}
[MulZeroOneClass M₀]
[Nontrivial M₀]
{a b : M₀}
(h : a * b = 1)


theorem nth_le_nth' {m n : ℕ} (hle : m ≤ n) (h : ∀ hf : (setOf p).Finite, n < hf.toFinset.card) :
    nth p m ≤ nth p n

(h : ∀ (hf : (setOf p).Finite), n < hf.toFinset.card)


/-- A star `R`-algebra `A` has a *continuous functional calculus* for elements satisfying the
property `p : A → Prop` if

+ for every such element `a : A` there is a star algebra homomorphism
  `cfcHom : C(spectrum R a, R) →⋆ₐ[R] A` sending the (restriction of) the identity map to `a`.
+ `cfcHom` is a closed embedding for which the spectrum of the image of function `f` is its range.
+ `cfcHom` preserves the property `p`.
+ `p 0` is true, which ensures among other things that `p ≠ fun _ ↦ False`.

The property `p` is marked as an `outParam` so that the user need not specify it. In practice,

+ for `R := ℂ`, we choose `p := IsStarNormal`,
+ for `R := ℝ`, we choose `p := IsSelfAdjoint`,
+ for `R := ℝ≥0`, we choose `p := (0 ≤ ·)`.

Instead of directly providing the data we opt instead for a `Prop` class. In all relevant cases,
the continuous functional calculus is uniquely determined, and utilizing this approach
prevents diamonds or problems arising from multiple instances. -/
class ContinuousFunctionalCalculus (R : Type*) {A : Type*} (p : outParam (A → Prop))
    [CommSemiring R] [StarRing R] [MetricSpace R] [TopologicalSemiring R] [ContinuousStar R]
    [Ring A] [StarRing A] [TopologicalSpace A] [Algebra R A] : Prop where
  predicate_zero : p 0
  exists_cfc_of_predicate : ∀ a, p a → ∃ φ : C(spectrum R a, R) →⋆ₐ[R] A,
    ClosedEmbedding φ ∧ φ ((ContinuousMap.id R).restrict <| spectrum R a) = a ∧
      (∀ f, spectrum R (φ f) = Set.range f) ∧ ∀ f, p (φ f)

[self : ContinuousFunctionalCalculus R p]

p a →
  ∃ φ,
    ClosedEmbedding ⇑φ ∧
      φ (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) = a ∧
        (∀ (f : C(↑(spectrum R a), R)), spectrum R (φ f) = Set.range ⇑f) ∧ ∀ (f : C(↑(spectrum R a), R)), p (φ f)


lemma quasiIso_eq_quasiIso_map_quotient :
    quasiIso C c = (HomologicalComplex.quasiIso C c).map (quotient C c)

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

HomotopyCategory.quasiIso C c = (HomologicalComplex.quasiIso C c).map (HomotopyCategory.quotient C c)


theorem Subgroup.commProb_quotient_le [H.Normal] : commProb (G ⧸ H) ≤ commProb G * Nat.card H

{G : Type u_2}
[Group G]
[Finite G]
(H : Subgroup G)
[H.Normal]

commProb (G ⧸ H) ≤ commProb G * ↑(Nat.card ↥H)


@[simp, nolint simpNF] -- Porting note: linter claims that LHS doesn't simplify. It does.
theorem tendsto_comp_val_Iio_atBot [SemilatticeInf α] [NoMinOrder α] {a : α} {f : α → β}
    {l : Filter β} : Tendsto (fun x : Iio a => f x) atBot l ↔ Tendsto f atBot l

{α : Type u_3}
{β : Type u_4}
[SemilatticeInf α]
[NoMinOrder α]
{a : α}
{f : α → β}
{l : Filter β}

Filter.Tendsto (fun x => f ↑x) Filter.atBot l ↔ Filter.Tendsto f Filter.atBot l


theorem commutator_mono (h₁ : H₁ ≤ K₁) (h₂ : H₂ ≤ K₂) : ⁅H₁, H₂⁆ ≤ ⁅K₁, K₂⁆

{G : Type u_1}
[Group G]
{H₁ H₂ K₁ K₂ : Subgroup G}
(h₁ : H₁ ≤ K₁)
(h₂ : H₂ ≤ K₂)

⁅H₁, H₂⁆ ≤ ⁅K₁, K₂⁆


theorem IsCoprime.prod_right : (∀ i ∈ t, IsCoprime x (s i)) → IsCoprime x (∏ i ∈ t, s i)

{R : Type u}
{I : Type v}
[CommSemiring R]
{x : R}
{s : I → R}
{t : Finset I}


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

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


@[simp]
theorem sigmaFinsuppEquivDFinsupp_smul {R} [Monoid R] [AddMonoid N] [DistribMulAction R N] (r : R)
    (f : (Σ i, η i) →₀ N) :
    sigmaFinsuppEquivDFinsupp (r • f) = r • sigmaFinsuppEquivDFinsupp f

{ι : Type u_1}
{η : ι → Type u_4}
{N : Type u_5}
{R : Type u_6}
[Monoid R]
[AddMonoid N]
[DistribMulAction R N]
(r : R)
(f : (i : ι) × η i →₀ N)


theorem coe_prod (f : A →⋆ₐ[R] B) (g : A →⋆ₐ[R] C) : ⇑(f.prod g) = Pi.prod f g

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


theorem sum_apply {ι : Type*} (s : Finset ι) (f : ι → α →ᵇ β) (a : α) :
    (∑ i ∈ s, f i) a = ∑ i ∈ s, f i a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
[AddCommMonoid β]
[BoundedAdd β]
[ContinuousAdd β]
{ι : Type u_2}
(s : Finset ι)
(f : ι → BoundedContinuousFunction α β)
(a : α)


/-- The square of the symbol is 1 if `p ∤ a`. -/
theorem sq_one {a : ℤ} (ha : (a : ZMod p) ≠ 0) : legendreSym p a ^ 2 = 1

(p : ℕ)
[Fact (Nat.Prime p)]
{a : ℤ}
(ha : ↑a ≠ 0)


@[reassoc]
theorem p_comm_f : P.p.f n ≫ f.f.f n = f.f.f n ≫ Q.p.f n

{P Q : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C c)}

CategoryTheory.CategoryStruct.comp (P.p.f n) (f.f.f n) = CategoryTheory.CategoryStruct.comp (f.f.f n) (Q.p.f n)


@[simp]
theorem coe_prodCongr (h₁ : α ≃ᵤ β) (h₂ : γ ≃ᵤ δ) : ⇑(h₁.prodCongr h₂) = Prod.map h₁ h₂

{α : Type u}
{β : Type u_1}
{γ : Type u_2}
{δ : Type u_3}
[UniformSpace α]
[UniformSpace β]
[UniformSpace γ]
[UniformSpace δ]
(h₁ : α ≃ᵤ β)
(h₂ : γ ≃ᵤ δ)


@[simp]
theorem funLeft_id (g : n → M) : funLeft R M _root_.id g = g

(R : Type u_1)
(M : Type u_8)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{n : Type u_18}
(g : n → M)


@[simp] lemma mul_tprod_tprod (x y : (i : ι) → A i) :
    mul (tprod R x) (tprod R y) = tprod R (x * y)

[(i : ι) → NonUnitalNonAssocSemiring (A i)]

[∀ (i : ι), SMulCommClass R (A i) (A i)]

[∀ (i : ι), IsScalarTower R (A i) (A i)]

(PiTensorProduct.mul ((PiTensorProduct.tprod R) x)) ((PiTensorProduct.tprod R) y) = (PiTensorProduct.tprod R) (x * y)


theorem zeroLocus_bot : zeroLocus ((⊥ : Ideal R) : Set R) = Set.univ


/-- Triangles with triangle morphisms form a category.
-/
@[simps]
instance triangleCategory : Category (Triangle C)

(A : CategoryTheory.Pretriangulated.Triangle C)

𝟙 A = CategoryTheory.Pretriangulated.triangleMorphismId A


theorem locallyIntegrableOn_const [IsLocallyFiniteMeasure μ] (c : E) :
    LocallyIntegrableOn (fun _ => c) s μ

MeasureTheory.LocallyIntegrableOn (fun x => c) s μ


@[to_additive]
theorem transfer_def [FiniteIndex H] (g : G) : transfer ϕ g = diff ϕ T (g • T)

(T : ↑(AddSubgroup.leftTransversals ↑H))

ϕ.transfer g = AddSubgroup.leftTransversals.diff ϕ T (g +ᵥ T)


@[simp]
theorem zipLeft'_cons_cons :
    zipLeft' (a :: as) (b :: bs) =
      let r := zipLeft' as bs
      ((a, some b) :: r.fst, r.snd)

{α : Type u}
{β : Type v}
(a : α)
(as : List α)
(b : β)
(bs : List β)

(a :: as).zipLeft' (b :: bs) =
  let r := as.zipLeft' bs;
  ((a, some b) :: r.1, r.2)


theorem rightUnitor_naturality {X₁ X₂ : C} (f : X₁ ⟶ X₂) :
    tensorHom ℬ f (𝟙 𝒯.cone.pt) ≫ (BinaryFan.rightUnitor 𝒯.isLimit (ℬ X₂ 𝒯.cone.pt).isLimit).hom =
      (BinaryFan.rightUnitor 𝒯.isLimit (ℬ X₁ 𝒯.cone.pt).isLimit).hom ≫ f

(𝒯 : CategoryTheory.Limits.LimitCone (CategoryTheory.Functor.empty C))

(ℬ : (X Y : C) → CategoryTheory.Limits.LimitCone (CategoryTheory.Limits.pair X Y))

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalOfChosenFiniteProducts.tensorHom ℬ f (CategoryTheory.CategoryStruct.id 𝒯.cone.pt))
    (CategoryTheory.Limits.BinaryFan.rightUnitor 𝒯.isLimit (ℬ X₂ 𝒯.cone.pt).isLimit).hom =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Limits.BinaryFan.rightUnitor 𝒯.isLimit (ℬ X₁ 𝒯.cone.pt).isLimit).hom f


/-- A well-founded relation. Not to be confused with `IsWellOrder`. -/
@[mk_iff] class IsWellFounded (α : Type u) (r : α → α → Prop) : Prop where
  /-- The relation is `WellFounded`, as a proposition. -/
  wf : WellFounded r


theorem get!_len_le [Inhabited α] : ∀ {l : List α} {n}, length l ≤ n → l.get! n = (default : α)

{α : Type u_1}
[Inhabited α]
{l : List α}
{n : Nat}


@[ext] theorem ext ⦃inst₁ inst₂ : NonUnitalCommRing R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂

{R : Type u}
⦃inst₁ inst₂ : NonUnitalCommRing R⦄
(h_add : HAdd.hAdd = HAdd.hAdd)
(h_mul : HMul.hMul = HMul.hMul)


@[gcongr, mono]
theorem ucs_mono (k : ℕ) (h : N₁ ≤ N₂) : N₁.ucs k ≤ N₂.ucs k

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{N₁ N₂ : LieSubmodule R L M}
(k : ℕ)
(h : N₁ ≤ N₂)

LieSubmodule.ucs k N₁ ≤ LieSubmodule.ucs k N₂


@[to_additive]
lemma inf_mul (a b c : α) : (a ⊓ b) * c = a * c ⊓ b * c

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


theorem condIndep_of_condIndep_of_le_left {m' m₁ m₂ m₃ : MeasurableSpace Ω}
    {mΩ : MeasurableSpace Ω} [StandardBorelSpace Ω] [Nonempty Ω]
    {hm' : m' ≤ mΩ} {μ : Measure Ω} [IsFiniteMeasure μ]
    (h_indep : CondIndep m' m₁ m₂ hm' μ) (h31 : m₃ ≤ m₁) :
    CondIndep m' m₃ m₂ hm' μ

(h_indep : ProbabilityTheory.CondIndep m' m₁ m₂ hm' μ)

ProbabilityTheory.CondIndep m' m₃ m₂ hm' μ


/-- The monad induced by the Eilenberg-Moore adjunction is the original monad.  -/
@[simps!]
def adjToMonadIso (T : Monad C) : T.adj.toMonad ≅ T

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

(CategoryTheory.Adjunction.adjToMonadIso T).inv.app X = CategoryTheory.CategoryStruct.id (T.obj X)


@[simp]
theorem map_compl (a : α) : f aᶜ = (f a)ᶜ

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[FunLike F α β]
[HeytingAlgebra α]
[HeytingAlgebra β]
[HeytingHomClass F α β]
(f : F)
(a : α)


@[simp, norm_cast]
theorem coe_prod [Module R₁ M₂] [Module R₁ M₃] [Module R₁ M₄] (e : M₁ ≃L[R₁] M₂)
    (e' : M₃ ≃L[R₁] M₄) :
    (e.prod e' : M₁ × M₃ →L[R₁] M₂ × M₄) = (e : M₁ →L[R₁] M₂).prodMap (e' : M₃ →L[R₁] M₄)

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
{M₄ : Type u_8}
[TopologicalSpace M₄]
[AddCommMonoid M₄]
[Module R₁ M₁]
[Module R₁ M₂]
[Module R₁ M₃]
[Module R₁ M₄]
(e : M₁ ≃L[R₁] M₂)
(e' : M₃ ≃L[R₁] M₄)


@[to_additive (attr := elab_as_elim, induction_eliminator, cases_eliminator)]
theorem ind {p : Localization S → Prop} (H : ∀ y : M × S, p (mk y.1 y.2)) (x) : p x

(H : ∀ (y : M × ↥S), p (Localization.mk y.1 y.2))


theorem isRelPrime_of_no_nonunits_factors [MonoidWithZero α] {x y : α} (nonzero : ¬(x = 0 ∧ y = 0))
    (H : ∀ z, ¬ IsUnit z → z ≠ 0 → z ∣ x → ¬z ∣ y) : IsRelPrime x y

(H : ∀ (z : α), ¬IsUnit z → z ≠ 0 → z ∣ x → ¬z ∣ y)


@[simp]
theorem nhdsWithin_Icc_eq_nhdsWithin_Ici (h : a < b) : 𝓝[Icc a b] a = 𝓝[≥] a

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
{a b : α}
(h : a < b)


theorem ae_le_essSup
    (hf : IsBoundedUnder (· ≤ ·) (ae μ) f := by isBoundedDefault) :
    ∀ᵐ y ∂μ, f y ≤ essSup f μ

(hf : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) (MeasureTheory.ae μ) f := by isBoundedDefault)


theorem ker_pi (f : (i : ι) → M₂ →ₗ[R] φ i) : ker (pi f) = ⨅ i : ι, ker (f i)

{R : Type u}
{M₂ : Type w}
{ι : Type x}
[Semiring R]
[AddCommMonoid M₂]
[Module R M₂]
{φ : ι → Type i}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(f : (i : ι) → M₂ →ₗ[R] φ i)

LinearMap.ker (LinearMap.pi f) = ⨅ i, LinearMap.ker (f i)


@[to_additive]
theorem sym_ne_one_iff [One α] (a : α) : sym a ≠ (1 : αˢʸᵐ) ↔ a ≠ (1 : α)


@[simp]
theorem Icc_union_Ioc_eq_Icc (h₁ : a ≤ b) (h₂ : b ≤ c) : Icc a b ∪ Ioc b c = Icc a c

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


@[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]
[AddGroup G]
[LieAddGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{n : ℕ∞}
{f : M → G}
{x₀ : M}
(hf : ContMDiffAt I' I n f x₀)


@[simp]
theorem mk_coeff (x : TruncatedWittVector p n R) : (mk p fun i => x.coeff i) = x

{p n : ℕ}
{R : Type u_1}
(x : TruncatedWittVector p n R)

(TruncatedWittVector.mk p fun i => TruncatedWittVector.coeff i x) = x


theorem rec_heq_iff_heq {C : α → Sort*} {x : C a} {y : β} {e : a = b} :
    HEq (e ▸ x) y ↔ HEq x y

{α : Sort u_2}
{a : α}
{β : Sort u_1}
{b : α}
{C : α → Sort u_1}
{x : C a}
{y : β}
{e : a = b}


/-- Global integral curves are unique.

If a continuously differentiable vector field `v` admits two global integral curves
`γ γ' : ℝ → M`, and `γ t₀ = γ' t₀` for some `t₀`, then `γ` and `γ'` are equal. -/
theorem isIntegralCurve_eq_of_contMDiff (hγt : ∀ t, I.IsInteriorPoint (γ t))
    (hv : ContMDiff I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)))
    (hγ : IsIntegralCurve γ v) (hγ' : IsIntegralCurve γ' v) (h : γ t₀ = γ' t₀) : γ = γ'

(hγt : ∀ (t : ℝ), I.IsInteriorPoint (γ t))

(hv : ContMDiff I I.tangent 1 fun x => { proj := x, snd := v x })


theorem _root_.Continuous.clm_comp_const {X} [TopologicalSpace X] {g : X → F →SL[σ₂₃] G}
    (hg : Continuous g) (f : E →SL[σ₁₂] F) :
    Continuous (fun x => (g x).comp f : X → E →SL[σ₁₃] G)

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


@[simp]
theorem symm_symm (e : α ≃o β) : e.symm.symm = e

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
(e : α ≃o β)


theorem Eventually.choice {r : α → β → Prop} {l : Filter α} [l.NeBot] (h : ∀ᶠ x in l, ∃ y, r x y) :
    ∃ f : α → β, ∀ᶠ x in l, r x (f x)

{α : Type u}
{β : Type v}
{r : α → β → Prop}
{l : Filter α}
[l.NeBot]
(h : ∀ᶠ (x : α) in l, ∃ y, r x y)


theorem prodPrimeFactors_add_of_squarefree [CommSemiring R] {f g : ArithmeticFunction R}
    (hf : IsMultiplicative f) (hg : IsMultiplicative g) {n : ℕ} (hn : Squarefree n) :
    ∏ᵖ p ∣ n, (f + g) p = (f * g) n

{R : Type u_1}
[CommSemiring R]
{f g : ArithmeticFunction R}
(hf : f.IsMultiplicative)
(hg : g.IsMultiplicative)
{n : ℕ}
(hn : Squarefree n)

(ArithmeticFunction.prodPrimeFactors fun p => (f + g) p) n = (f * g) n


/-- The natural isomorphism `single V c j ⋙ eval V c j ≅ 𝟭 V`. -/
@[simps!]
noncomputable def singleCompEvalIsoSelf (j : ι) : single V c j ⋙ eval V c j ≅ 𝟭 V

(HomologicalComplex.singleCompEvalIsoSelf V c j).inv.app X = (HomologicalComplex.singleObjXSelf c j X).inv


@[to_additive (attr := simp)]
theorem toMonoidHom_eq_coe (f : α →*o β) : f.toMonoidHom = f

{α : Type u_2}
{β : Type u_3}
{hα : OrderedAddCommMonoid α}
{hβ : OrderedAddCommMonoid β}
(f : α →+o β)


lemma triangle :
    (associator X₁ tensorUnit X₃).hom ≫ tensorHom (𝟙 X₁) (leftUnitor X₃).hom =
      tensorHom (rightUnitor X₁).hom (𝟙 X₃)

[(X₁ : C) →
    CategoryTheory.Limits.PreservesColimit (CategoryTheory.Functor.empty C)
      ((CategoryTheory.MonoidalCategory.curriedTensor C).obj X₁)]

[(X₂ : C) →
    CategoryTheory.Limits.PreservesColimit (CategoryTheory.Functor.empty C)
      ((CategoryTheory.MonoidalCategory.curriedTensor C).flip.obj X₂)]

(X₁ X₃ : CategoryTheory.GradedObject I C)

[(CategoryTheory.GradedObject.Monoidal.tensorObj X₁ CategoryTheory.GradedObject.Monoidal.tensorUnit).HasTensor X₃]

[X₁.HasTensor (CategoryTheory.GradedObject.Monoidal.tensorObj CategoryTheory.GradedObject.Monoidal.tensorUnit X₃)]

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.GradedObject.Monoidal.associator X₁ CategoryTheory.GradedObject.Monoidal.tensorUnit X₃).hom
    (CategoryTheory.GradedObject.Monoidal.tensorHom (CategoryTheory.CategoryStruct.id X₁)
      (CategoryTheory.GradedObject.Monoidal.leftUnitor X₃).hom) =
  CategoryTheory.GradedObject.Monoidal.tensorHom (CategoryTheory.GradedObject.Monoidal.rightUnitor X₁).hom
    (CategoryTheory.CategoryStruct.id X₃)


theorem Disjoint.dedup_add {s t : Multiset α} (h : Disjoint s t) :
    dedup (s + t) = dedup s + dedup t

{α : Type u_1}
[DecidableEq α]
{s t : Multiset α}
(h : s.Disjoint t)


lemma quasiIso_opMap_iff (φ : S₁ ⟶ S₂) :
    QuasiIso (opMap φ) ↔ QuasiIso φ

CategoryTheory.ShortComplex.QuasiIso (CategoryTheory.ShortComplex.opMap φ) ↔ CategoryTheory.ShortComplex.QuasiIso φ


theorem dvd_iff_mod_eq_zero (a b : Int) : a ∣ b ↔ mod b a = 0


theorem nodup_map_iff_inj_on {f : α → β} {s : Multiset α} (d : Nodup s) :
    Nodup (map f s) ↔ ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{s : Multiset α}
(d : s.Nodup)

(Multiset.map f s).Nodup ↔ ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y


theorem map_sub (x y : E) : e (x - y) = e x - e y

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(e : E ≃ₛₗᵢ[σ₁₂] E₂)
(x y : E)


/-- The angle at the apex of an isosceles triangle is `π` minus twice a base angle, oriented
angle-at-point form where the apex is given as the center of a circle. -/
theorem oangle_eq_pi_sub_two_zsmul_oangle_center_right {s : Sphere P} {p₁ p₂ : P} (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) (h : p₁ ≠ p₂) : ∡ p₁ s.center p₂ = π - (2 : ℤ) • ∡ p₂ p₁ s.center

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

∡ p₁ s.center p₂ = ↑π - 2 • ∡ p₂ p₁ s.center


theorem involutive_iff_iter_2_eq_id {α} {f : α → α} : Involutive f ↔ f^[2] = id


/-- The CDF of the exponential distribution equals ``1 - exp (-(r * x))``-/
lemma exponentialCDFReal_eq {r : ℝ} (hr : 0 < r) (x : ℝ) :
    exponentialCDFReal r x = if 0 ≤ x then 1 - exp (-(r * x)) else 0

↑(ProbabilityTheory.exponentialCDFReal r) x = if 0 ≤ x then 1 - rexp (-(r * x)) else 0


@[simp]
lemma map₂_comp {Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) :
    YonedaCollection.map₂ F (f ≫ g) = YonedaCollection.map₂ F f ∘ YonedaCollection.map₂ F g

{A : CategoryTheory.Functor Cᵒᵖ (Type v)}

{F : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v)}

CategoryTheory.OverPresheafAux.YonedaCollection.map₂ F (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.OverPresheafAux.YonedaCollection.map₂ F f ∘ CategoryTheory.OverPresheafAux.YonedaCollection.map₂ F g


theorem IsAddSubgroup.of_sub (s : Set A) (zero_mem : (0 : A) ∈ s)
    (sub_mem : ∀ {a b : A}, a ∈ s → b ∈ s → a - b ∈ s) : IsAddSubgroup s


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

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


theorem iSup₂_comm {ι₁ ι₂ : Sort*} {κ₁ : ι₁ → Sort*} {κ₂ : ι₂ → Sort*}
    (f : ∀ i₁, κ₁ i₁ → ∀ i₂, κ₂ i₂ → α) :
    ⨆ (i₁) (j₁) (i₂) (j₂), f i₁ j₁ i₂ j₂ = ⨆ (i₂) (j₂) (i₁) (j₁), f i₁ j₁ i₂ j₂

(f : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → α)

⨆ i₁, ⨆ j₁, ⨆ i₂, ⨆ j₂, f i₁ j₁ i₂ j₂ = ⨆ i₂, ⨆ j₂, ⨆ i₁, ⨆ j₁, f i₁ j₁ i₂ j₂


@[reassoc (attr := simp)]
theorem biproduct_ι_comp_rightDistributor_inv {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
    biproduct.ι _ j ≫ (rightDistributor f X).inv = biproduct.ι _ j ▷ X

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Limits.biproduct.ι (fun j => CategoryTheory.MonoidalCategory.tensorObj (f j) X) j)
    (CategoryTheory.rightDistributor f X).inv =
  CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.Limits.biproduct.ι f j) X


theorem tendsto_nat_ceil_mul_div_atTop {a : R} (ha : 0 ≤ a) :
    Tendsto (fun x ↦ (⌈a * x⌉₊ : R) / x) atTop (𝓝 a)

{R : Type u_4}
[TopologicalSpace R]
[LinearOrderedField R]
[OrderTopology R]
[FloorRing R]
{a : R}
(ha : 0 ≤ a)

Filter.Tendsto (fun x => ↑⌈a * x⌉₊ / x) Filter.atTop (𝓝 a)


@[to_additive (attr := simp)]
lemma mker_snd : mker (snd M N) = .prod ⊤ ⊥

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

MonoidHom.mker (MonoidHom.snd M N) = ⊤.prod ⊥


theorem mul_apply (e₁ e₂ : α ≃ᵢ α) (x : α) : (e₁ * e₂) x = e₁ (e₂ x)

{α : Type u}
[PseudoEMetricSpace α]
(e₁ e₂ : α ≃ᵢ α)
(x : α)


@[simp]
theorem sup_prod : (s₁ ⊔ s₂) ×ˢ t = s₁ ×ˢ t ⊔ s₂ ×ˢ t

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(s₁ s₂ : UpperSet α)
(t : UpperSet β)

(s₁ ⊔ s₂) ×ˢ t = s₁ ×ˢ t ⊔ s₂ ×ˢ t


/-- There is a homomorphism to a graph from a comapped graph.
When the function is injective, this is an embedding (see `SimpleGraph.Embedding.comap`). -/
@[simps]
protected def comap (f : V → W) (G : SimpleGraph W) : G.comap f →g G

{V : Type u_1}
{W : Type u_2}
(f : V → W)
(G : SimpleGraph W)

∀ (a : V), (SimpleGraph.Hom.comap f G) a = f a


/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps!]
def coneEquivFunctor :
    Limits.Cone ((diagram U).op ⋙ F) ⥤
      Limits.Cone (SheafConditionEqualizerProducts.diagram F U)

(c : CategoryTheory.Limits.Cone ((CategoryTheory.Pairwise.diagram U).op ⋙ F))

((TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivFunctor F U).obj c).π.app Z =
  CategoryTheory.Limits.WalkingParallelPair.rec
    (CategoryTheory.Limits.Pi.lift fun i => c.π.app (Opposite.op (CategoryTheory.Pairwise.single i)))
    (CategoryTheory.Limits.Pi.lift fun b => c.π.app (Opposite.op (CategoryTheory.Pairwise.pair b.1 b.2))) Z


theorem Preconnected.set_univ_walk_nonempty (hconn : G.Preconnected) (u v : V) :
    (Set.univ : Set (G.Walk u v)).Nonempty

{V : Type u}
{G : SimpleGraph V}
(hconn : G.Preconnected)
(u v : V)


protected theorem hasBasis_uniformity_of_basis_aux₂ (h : DirectedOn (· ⊆ ·) 𝔖) {p : ι → Prop}
    {s : ι → Set (β × β)} (hb : HasBasis (𝓤 β) p s) :
    DirectedOn
      ((fun s : Set α => (UniformFun.uniformSpace s β).comap (s.restrict : (α →ᵤ β) → s →ᵤ β)) ⁻¹'o
        GE.ge)
      𝔖

(h : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖)

DirectedOn ((fun s => UniformSpace.comap s.restrict (UniformFun.uniformSpace (↑s) β)) ⁻¹'o GE.ge) 𝔖


theorem Wbtw.trans_right_left {w x y z : P} (h₁ : Wbtw R w x z) (h₂ : Wbtw R x y z) :
    Wbtw R w x y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{w x y z : P}
(h₁ : Wbtw R w x z)
(h₂ : Wbtw R x y z)


@[simp]
theorem diagonalization_symm_apply (w : PiLp 2 fun μ : Eigenvalues T => eigenspace T μ) :
    hT.diagonalization.symm w = ∑ μ, w μ

(w : PiLp 2 fun μ => ↥(Module.End.eigenspace T (↑T μ)))

hT.diagonalization.symm w = ∑ μ : Module.End.Eigenvalues T, ↑(w μ)


/-- In an R₁ space, the bornologies `relativelyCompact` and `inCompact` are equal. -/
@[simp]
theorem Bornology.relativelyCompact_eq_inCompact :
    Bornology.relativelyCompact X = Bornology.inCompact X

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


theorem get_prodMap (f : α →. γ) (g : β →. δ) (x : α × β) (h) :
    (f.prodMap g x).get h = ((f x.1).get h.1, (g x.2).get h.2)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(f : α →. γ)
(g : β →. δ)
(x : α × β)
(h : (f.prodMap g x).Dom)

(f.prodMap g x).get h = ((f x.1).get ⋯, (g x.2).get ⋯)


/-- The composition of equivalences of first-order languages. -/
@[simps, trans]
protected def trans (e : L ≃ᴸ L') (e' : L' ≃ᴸ L'') : L ≃ᴸ L''

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
{L'' : FirstOrder.Language}
(e : L ≃ᴸ L')
(e' : L' ≃ᴸ L'')

(e.trans e').invLHom = e.invLHom.comp e'.invLHom


@[simp] protected theorem add_sub_cancel' {n m : Nat} (h : m ≤ n) : m + (n - m) = n


/-- Because this theorem takes `Fintype α` as a non-instance argument, it can be used in particular
when `Fintype.card` ends up with different instance than the one found by inference  -/
theorem _root_.Fintype.card_eq_nat_card {_ : Fintype α} : Fintype.card α = Nat.card α

∀ {x : Fintype α}, Fintype.card α = Nat.card α


theorem RegularSpace.t3Space_iff_t0Space [RegularSpace X] : T3Space X ↔ T0Space X

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


theorem IsLUB.ciSup_set_eq {s : Set β} {f : β → α} (H : IsLUB (f '' s) a) (Hne : s.Nonempty) :
    ⨆ i : s, f i = a

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
{a : α}
{s : Set β}
{f : β → α}
(H : IsLUB (f '' s) a)
(Hne : s.Nonempty)


protected theorem Antitone.monovary (hf : Antitone f) (hg : Antitone g) : Monovary f g

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}
[LinearOrder ι]
(hf : Antitone f)
(hg : Antitone g)


/-- The functor `Square C ⥤ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the left morphism of `sq`
to the right morphism of `sq`. -/
@[simps!]
def toArrowArrowFunctor : Square C ⥤ Arrow (Arrow C)

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

(CategoryTheory.Square.toArrowArrowFunctor.obj sq).right.left = sq.X₂


theorem ae_iff_measure_eq [IsFiniteMeasure μ] {p : α → Prop}
    (hp : NullMeasurableSet { a | p a } μ) : (∀ᵐ a ∂μ, p a) ↔ μ { a | p a } = μ univ

(hp : MeasureTheory.NullMeasurableSet {a | p a} μ)

(∀ᵐ (a : α) ∂μ, p a) ↔ μ {a | p a} = μ Set.univ


@[simp] lemma nnnorm_toAdd (x) : ‖(toAdd x : E)‖₊ = ‖x‖₊

{E : Type u_2}
[NNNorm E]
(x : Multiplicative E)


theorem all_rotateR {P l x r} : @All α P (rotateR l x r) ↔ All P l ∧ P x ∧ All P r

{α : Type u_1}
{P : α → Prop}
{l : Ordnode α}
{x : α}
{r : Ordnode α}

Ordnode.All P (l.rotateR x r) ↔ Ordnode.All P l ∧ P x ∧ Ordnode.All P r


@[to_additive (attr := simp)]
lemma insertNth_mul [∀ j, Mul (α j)] (i : Fin (n + 1)) (x y : α i) (p q : ∀ j, α (i.succAbove j)) :
    i.insertNth (x * y) (p * q) = i.insertNth x p * i.insertNth y q

{n : ℕ}
{α : Fin (n + 1) → Type u_1}
[(j : Fin (n + 1)) → Add (α j)]
(i : Fin (n + 1))
(x y : α i)
(p q : (j : Fin n) → α (i.succAbove j))

i.insertNth (x + y) (p + q) = i.insertNth x p + i.insertNth y q


theorem rpow_logb_eq_abs (hx : x ≠ 0) : b ^ logb b x = |x|

{b x : ℝ}
(b_pos : 0 < b)
(b_ne_one : b ≠ 1)
(hx : x ≠ 0)


@[simp] theorem Fin.univ_image_getElem' [DecidableEq β] (l : List α) (f : α → β) :
    Finset.univ.image (fun i : Fin l.length => f <| l[(i : Nat)]) = (l.map f).toFinset

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

Finset.image (fun i => f l[↑i]) Finset.univ = (List.map f l).toFinset


@[to_additive (attr := simp)]
theorem mulSingle_one (i : I) : mulSingle i (1 : f i) = 1

{I : Type u}
{f : I → Type v₁}
[DecidableEq I]
[(i : I) → One (f i)]
(i : I)


@[to_additive]
lemma isOfFinOrder_of_finite (x : G) : IsOfFinOrder x

{G : Type u_1}
[LeftCancelMonoid G]
[Finite G]
(x : G)


/-- The language map removing an empty constant set.  -/
@[simps]
def LEquiv.addEmptyConstants [ie : IsEmpty α] : L ≃ᴸ L[[α]]

(L : FirstOrder.Language)
(α : Type w')
[ie : IsEmpty α]

(FirstOrder.Language.LEquiv.addEmptyConstants L α).invLHom =
  (FirstOrder.Language.LHom.id L).sumElim (FirstOrder.Language.LHom.ofIsEmpty (FirstOrder.Language.constantsOn α) L)


/-- Restrict a partial homeomorphism to the subsets of the source and target
that consist of points `x ∈ f.source`, `y = f x ∈ f.target`
such that `f` is `C^n` at `x` and `f.symm` is `C^n` at `y`.

Note that `n` is a natural number, not `∞`,
because the set of points of `C^∞`-smoothness of `f` is not guaranteed to be open. -/
@[simps! apply symm_apply source target]
def restrContDiff (f : PartialHomeomorph E F) (n : ℕ) : PartialHomeomorph E F

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(f : PartialHomeomorph E F)
(n : ℕ)

(PartialHomeomorph.restrContDiff 𝕜 f n).source =
  f.source ∩ {x | ContDiffAt 𝕜 (↑n) (↑f) x ∧ ContDiffAt 𝕜 (↑n) (↑f.symm) (↑f x)}


@[measurability]
theorem measurable_arcsin : Measurable arcsin


@[simp]
theorem extension_comp_coe {X : UniformSpaceCat} {Y : CpltSepUniformSpace}
    (f : toUniformSpace (CpltSepUniformSpace.of (Completion X)) ⟶ toUniformSpace Y) :
    extensionHom (completionHom X ≫ f) = f

(f : (CpltSepUniformSpace.of (UniformSpace.Completion ↑X)).toUniformSpace ⟶ Y.toUniformSpace)

UniformSpaceCat.extensionHom (X.completionHom ≫ f) = f


theorem indep_bot_left (m' : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω}
    {κ : Kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] :
    Indep ⊥ m' κ μ

{α : Type u_1}
{Ω : Type u_2}
{_mα : MeasurableSpace α}
(m' : MeasurableSpace Ω)
{_mΩ : MeasurableSpace Ω}
{κ : ProbabilityTheory.Kernel α Ω}
{μ : MeasureTheory.Measure α}
[ProbabilityTheory.IsMarkovKernel κ]


@[to_additive]
theorem characteristic_iff_le_map : H.Characteristic ↔ ∀ ϕ : G ≃* G, H ≤ H.map ϕ.toMonoidHom

{G : Type u_1}
[Group G]
{H : Subgroup G}

H.Characteristic ↔ ∀ (ϕ : G ≃* G), H ≤ Subgroup.map ϕ.toMonoidHom H


@[to_additive (attr := simp)]
theorem coe_mulRight (g : G) : ⇑(mulRight g) = fun x => x * g

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd G]
(g : G)

⇑(MeasurableEquiv.addRight g) = fun x => x + g


protected theorem cof_eq (hf : IsFundamentalSequence a o f) : a.cof.ord = o

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


lemma isIntegralCurveOn_iff_isIntegralCurveAt (hs : IsOpen s) :
    IsIntegralCurveOn γ v s ↔ ∀ t ∈ s, IsIntegralCurveAt γ v t

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type u_2}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type u_3}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{γ : ℝ → M}
{v : (x : M) → TangentSpace I x}
{s : Set ℝ}
(hs : IsOpen s)


theorem xor_comm : ∀ (x y : Bool), xor x y = xor y x


theorem moveLeft_neg_symm' {x : PGame} (i) :
    x.moveLeft i = -(-x).moveRight (toRightMovesNeg i)

x.moveLeft i = -(-x).moveRight (SetTheory.PGame.toRightMovesNeg i)


theorem convexHull_neg (s : Set E) : convexHull 𝕜 (-s) = -convexHull 𝕜 s

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


theorem Icc_mem_nhdsWithin_Iic (H : b ∈ Ioc a c) : Icc a c ∈ 𝓝[≤] b

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIicTopology α]
{a b c : α}
(H : b ∈ Set.Ioc a c)


/-- The unit isomorphism for `functorProdFunctorEquiv` -/
@[simps!]
def functorProdFunctorEquivUnitIso :
    𝟭 _ ≅ prodFunctorToFunctorProd A B C ⋙ functorProdToProdFunctor A B C

(X : CategoryTheory.Functor A B × CategoryTheory.Functor A C)

(CategoryTheory.functorProdFunctorEquivUnitIso A B C).hom.app X =
  ((X.1.prod'CompFst X.2).inv, (X.1.prod'CompSnd X.2).inv)


lemma bit_lt_bit (a b) (h : m < n) : bit a m < bit b n


@[simp]
theorem liftAux_apply (I' : A) (hI') (z : ℂ) : liftAux I' hI' z = algebraMap ℝ A z.re + z.im • I'

{A : Type u_1}
[Ring A]
[Algebra ℝ A]
(I' : A)
(hI' : I' * I' = -1)
(z : ℂ)

(Complex.liftAux I' hI') z = (algebraMap ℝ A) z.re + z.im • I'


/-- See `lt_of_tsub_lt_tsub_right` for a stronger statement in a linear order. -/
theorem lt_of_tsub_lt_tsub_right_of_le (h : c ≤ b) (h2 : a - c < b - c) : a < b

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


lemma InjOn.image_diff_subset {f : α → β} {t : Set α} (h : InjOn f s) (hst : t ⊆ s) :
    f '' (s \ t) = f '' s \ f '' t

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
{t : Set α}
(h : Set.InjOn f s)
(hst : t ⊆ s)


@[simp] theorem ncard_singleton (a : α) : ({a} : Set α).ncard = 1


/-- An alternating map from `ι → M` to `N`, denoted `M [⋀^ι]→ₗ[R] N`,
is a multilinear map that vanishes when two of its arguments are equal. -/
structure AlternatingMap extends MultilinearMap R (fun _ : ι => M) N where
  /-- The map is alternating: if `v` has two equal coordinates, then `f v = 0`. -/
  map_eq_zero_of_eq' : ∀ (v : ι → M) (i j : ι), v i = v j → i ≠ j → toFun v = 0

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
(self : M [⋀^ι]→ₗ[R] N)
(v : ι → M)
(i j : ι)


theorem comap_supp {S : Type*} [CommRing S] (f : S →+* R) :
    supp (v.comap f) = Ideal.comap f v.supp

{R : Type u_3}
{Γ₀ : Type u_4}
[CommRing R]
[LinearOrderedCommMonoidWithZero Γ₀]
(v : Valuation R Γ₀)
{S : Type u_7}
[CommRing S]
(f : S →+* R)

(Valuation.comap f v).supp = Ideal.comap f v.supp


/-- The right fraction in the opposite category corresponding to a left fraction. -/
@[simps]
def LeftFraction.op {X Y : C} (φ : W.LeftFraction X Y) :
    W.op.RightFraction (Opposite.op Y) (Opposite.op X)

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(φ : W.LeftFraction X Y)


/-- If some predicate holds for all `x ∈ (s : Set A)` and this predicate is closed under the
`algebraMap`, addition, multiplication and star operations, then it holds for `a ∈ adjoin R s`. -/
@[elab_as_elim]
theorem adjoin_induction {s : Set A} {p : A → Prop} {a : A} (h : a ∈ adjoin R s)
    (mem : ∀ x ∈ s, p x) (add : ∀ x y, p x → p y → p (x + y)) (zero : p 0)
    (mul : ∀ x y, p x → p y → p (x * y)) (smul : ∀ (r : R) x, p x → p (r • x)) : p a

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

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

(smul : ∀ (r : R) (x : A), p x → p (r • x))


theorem lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors'
    {p : R[X]} {t : R} {n : ℕ} (h : p ≠ 0)
    (hroot : ∀ m ≤ n, (derivative^[m] p).IsRoot t)
    (hnzd : ∀ m ≤ n, m ≠ 0 → (m : R) ∈ nonZeroDivisors R) :
    n < p.rootMultiplicity t

(hroot : ∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t)

(hnzd : ∀ m ≤ n, m ≠ 0 → ↑m ∈ nonZeroDivisors R)


theorem stalkToFiber_germ (P : LocalPredicate T) (U : Opens X) (x : U) (f) :
    stalkToFiber P x ((subsheafToTypes P).presheaf.germ x f) = f.1 x

(f : (TopCat.subsheafToTypes P).presheaf.obj (Opposite.op U))

TopCat.stalkToFiber P (↑x) ((TopCat.subsheafToTypes P).presheaf.germ x f) = ↑f x


theorem image_maximals_univ :
    Subtype.val '' maximals (· ≤ ·) (univ : Set s) = maximals (· ≤ ·) s

Subtype.val '' maximals (fun x x_1 => x ≤ x_1) Set.univ = maximals (fun x x_1 => x ≤ x_1) s


theorem _root_.measurableEmbedding_mulLeft₀ {g : G₀} (hg : g ≠ 0) :
    MeasurableEmbedding (g * ·)

{G₀ : Type u_2}
[MeasurableSpace G₀]
[GroupWithZero G₀]
[MeasurableMul G₀]
{g : G₀}
(hg : g ≠ 0)


/-- The pointwise minimum of strictly concave functions is strictly concave. -/
theorem StrictConcaveOn.inf (hf : StrictConcaveOn 𝕜 s f) (hg : StrictConcaveOn 𝕜 s g) :
    StrictConcaveOn 𝕜 s (f ⊓ g)

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


/-- Construct a left extension of `g : a ⟶ c` from a left extension of `g ≫ 𝟙 c`. -/
@[simps!]
def ofCompId (t : LeftExtension f (g ≫ 𝟙 c)) : LeftExtension f g

(t :
  CategoryTheory.Bicategory.LeftExtension f (CategoryTheory.CategoryStruct.comp g (CategoryTheory.CategoryStruct.id c)))

t.ofCompId.hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.rightUnitor g).inv t.unit


/-- If `|discr K| ≤ N` then the degree of `K` is at most `rankOfDiscrBdd`. -/
theorem rank_le_rankOfDiscrBdd :
    finrank ℚ K ≤ rankOfDiscrBdd N

{K : Type u_1}
[Field K]
[NumberField K]
{N : ℕ}
(hK : |NumberField.discr K| ≤ ↑N)

FiniteDimensional.finrank ℚ K ≤ NumberField.hermiteTheorem.rankOfDiscrBdd N


theorem mk_intCast (m : ℤ) : (mk m 1 : Localization M) = m

{R : Type u_1}
[CommRing R]
{M : Submonoid R}
(m : ℤ)


theorem IsPullback.of_map_of_faithful [ReflectsLimit (cospan h i) F] [F.Faithful]
    (H : IsPullback (F.map f) (F.map g) (F.map h) (F.map i)) : IsPullback f g h i

[CategoryTheory.Limits.ReflectsLimit (CategoryTheory.Limits.cospan h i) F]

(H : CategoryTheory.IsPullback (F.map f) (F.map g) (F.map h) (F.map i))


/-- The isomorphism between `incl ⋙ lift F _ _` with `F`. -/
@[simps!]
def inclLift {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) : incl ⋙ lift F M hM ≅ F

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

(CategoryTheory.WithTerminal.inclLift F M hM).inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)


@[to_additive (attr := simp)]
theorem toOrderHom_eq_coe (f : α →*o β) : f.toOrderHom = f

{α : Type u_2}
{β : Type u_3}
{hα : OrderedCommMonoid α}
{hβ : OrderedCommMonoid β}
(f : α →*o β)


private theorem aux1 {a b c : A} :
    ⁅L a + L b + L c, L (a * a) + L (b * b) + L (c * c) +
    2 • L (a * b) + 2 • L (c * a) + 2 • L (b * c)⁆
    =
    ⁅L a, L (a * a)⁆ + ⁅L a, L (b * b)⁆ + ⁅L a, L (c * c)⁆ +
    ⁅L a, 2 • L (a * b)⁆ + ⁅L a, 2 • L (c * a)⁆ + ⁅L a, 2 • L (b * c)⁆ +
    (⁅L b, L (a * a)⁆ + ⁅L b, L (b * b)⁆ + ⁅L b, L (c * c)⁆ +
    ⁅L b, 2 • L (a * b)⁆ + ⁅L b, 2 • L (c * a)⁆ + ⁅L b, 2 • L (b * c)⁆) +
    (⁅L c, L (a * a)⁆ + ⁅L c, L (b * b)⁆ + ⁅L c, L (c * c)⁆ +
    ⁅L c, 2 • L (a * b)⁆ + ⁅L c, 2 • L (c * a)⁆ + ⁅L c, 2 • L (b * c)⁆)

{A : Type u_1}
[NonUnitalNonAssocCommRing A]
{a b c : A}


@[to_additive (attr := simp)]
theorem measurePreserving_smul : MeasurePreserving (c • ·) μ μ

[MeasureTheory.VAddInvariantMeasure M α μ]

MeasureTheory.MeasurePreserving (fun x => c +ᵥ x) μ μ


theorem ConvexOn.le_left_of_right_le (hf : ConvexOn 𝕜 s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s)
    (hz : z ∈ openSegment 𝕜 x y) (hyz : f y ≤ f z) : f z ≤ f x

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrderedCancelAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConvexOn 𝕜 s f)
{x y z : E}
(hx : x ∈ s)
(hy : y ∈ s)
(hz : z ∈ openSegment 𝕜 x y)
(hyz : f y ≤ f z)


/-- Continuity within a set at a point can be read under left composition with a local
homeomorphism if a neighborhood of the initial point is sent to the source of the local
homeomorphism-/
theorem continuousWithinAt_iff_continuousWithinAt_comp_left {f : Z → X} {s : Set Z} {x : Z}
    (hx : f x ∈ e.source) (h : f ⁻¹' e.source ∈ 𝓝[s] x) :
    ContinuousWithinAt f s x ↔ ContinuousWithinAt (e ∘ f) s x

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(e : PartialHomeomorph X Y)
{f : Z → X}
{s : Set Z}
{x : Z}
(hx : f x ∈ e.source)
(h : f ⁻¹' e.source ∈ 𝓝[s] x)

ContinuousWithinAt f s x ↔ ContinuousWithinAt (↑e ∘ f) s x


/-- If `n < 0` and `|w - c| = |R|`, then `(z - w) ^ n` is not circle integrable on the circle with
center `c` and radius `|R|`, so the integral `∮ z in C(c, R), (z - w) ^ n` is equal to zero. -/
theorem integral_sub_zpow_of_undef {n : ℤ} {c w : ℂ} {R : ℝ} (hn : n < 0)
    (hw : w ∈ sphere c |R|) : (∮ z in C(c, R), (z - w) ^ n) = 0

{n : ℤ}
{c w : ℂ}
{R : ℝ}
(hn : n < 0)
(hw : w ∈ Metric.sphere c |R|)


lemma epi_iff_surjective_on_stonean : Epi f ↔
    ∀ (S : Stonean), Function.Surjective (f.val.app (op S.compHaus))

[∀ (X : CompHausᵒᵖ), CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.StructuredArrow X Stonean.toCompHaus.op) A]

[CategoryTheory.HasSheafify (CategoryTheory.extensiveTopology Stonean) A]

[(CategoryTheory.extensiveTopology Stonean).HasSheafCompose (CategoryTheory.forget A)]

[CategoryTheory.Balanced (CategoryTheory.Sheaf (CategoryTheory.extensiveTopology Stonean) A)]

CategoryTheory.Epi f ↔ ∀ (S : Stonean), Function.Surjective ⇑(f.val.app (Opposite.op S.compHaus))


theorem tangentMap_comp (hg : MDifferentiable I' I'' g) (hf : MDifferentiable I I' f) :
    tangentMap I I'' (g ∘ f) = tangentMap I' I'' g ∘ tangentMap I I' f

[I''s : SmoothManifoldWithCorners I'' M'']


theorem Finite.diff {s : Set α} (hs : s.Finite) (t : Set α) : (s \ t).Finite

{α : Type u}
{s : Set α}
(hs : s.Finite)
(t : Set α)


/-- A homeomorphism induces a partial homeomorphism on the whole space -/
@[simps! (config := mfld_cfg)]
def _root_.Homeomorph.toPartialHomeomorph (e : X ≃ₜ Y) : PartialHomeomorph X Y

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : X ≃ₜ Y)


/-- A `NormedAddTorsor V P` is a torsor of an additive seminormed group
action by a `SeminormedAddCommGroup V` on points `P`. We bundle the pseudometric space
structure and require the distance to be the same as results from the
norm (which in fact implies the distance yields a pseudometric space, but
bundling just the distance and using an instance for the pseudometric space
results in type class problems). -/
class NormedAddTorsor (V : outParam Type*) (P : Type*) [SeminormedAddCommGroup V]
  [PseudoMetricSpace P] extends AddTorsor V P where
  dist_eq_norm' : ∀ x y : P, dist x y = ‖(x -ᵥ y : V)‖

{V : outParam (Type u_1)}
{P : Type u_2}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[self : NormedAddTorsor V P]
(x y : P)


theorem continuous_coordChange (e₁ e₂ : Trivialization F proj) {b : B} (h₁ : b ∈ e₁.baseSet)
    (h₂ : b ∈ e₂.baseSet) : Continuous (e₁.coordChange e₂ b)

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e₁ e₂ : Trivialization F proj)
{b : B}
(h₁ : b ∈ e₁.baseSet)
(h₂ : b ∈ e₂.baseSet)


theorem mem_support_ofFintype_iff (a : α) : a ∈ (ofFintype f h).support ↔ f a ≠ 0

{α : Type u_1}
[Fintype α]
{f : α → ENNReal}
(h : ∑ a : α, f a = 1)
(a : α)

a ∈ (PMF.ofFintype f h).support ↔ f a ≠ 0


@[simp]
theorem iterate_derivative_X {k} (h : 1 < k) : derivative^[k] (X : R[X]) = 0

{R : Type u}
[Semiring R]
{k : ℕ}
(h : 1 < k)

(⇑Polynomial.derivative)^[k] Polynomial.X = 0


/-- Expression for `hurwitzZetaEven a 1` as a limit. (Mathematically `hurwitzZetaEven a 1` is
undefined, but our construction assigns some value to it; this lemma is mostly of interest for
determining what that value is). -/
lemma tendsto_hurwitzZetaEven_sub_one_div_nhds_one (a : UnitAddCircle) :
    Tendsto (fun s ↦ hurwitzZetaEven a s - 1 / (s - 1) / Gammaℝ s) (𝓝 1)
    (𝓝 (hurwitzZetaEven a 1))

Filter.Tendsto (fun s => HurwitzZeta.hurwitzZetaEven a s - 1 / (s - 1) / s.Gammaℝ) (𝓝 1)
  (𝓝 (HurwitzZeta.hurwitzZetaEven a 1))


/-- There is no vector subspace between `p` and `(K ∙ x) ⊔ p`, `WCovBy` version. -/
theorem wcovBy_span_singleton_sup (x : V) (p : Submodule K V) : WCovBy p ((K ∙ x) ⊔ p)

{K : Type u_3}
{V : Type u_6}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(x : V)
(p : Submodule K V)


/-- Bifunctor. This typeclass asserts that a lawless bitraversable bifunctor is lawful. -/
class LawfulBitraversable (t : Type u → Type u → Type u) [Bitraversable t] extends
  LawfulBifunctor t : Prop where
  -- Porting note: need to specify `m := Id` because `id` no longer has a `Monad` instance
  id_bitraverse : ∀ {α β} (x : t α β), bitraverse (m := Id) pure pure x = pure x
  comp_bitraverse :
    ∀ {F G} [Applicative F] [Applicative G] [LawfulApplicative F] [LawfulApplicative G]
      {α α' β β' γ γ'} (f : β → F γ) (f' : β' → F γ') (g : α → G β) (g' : α' → G β') (x : t α α'),
      bitraverse (Comp.mk ∘ map f ∘ g) (Comp.mk ∘ map f' ∘ g') x =
        Comp.mk (bitraverse f f' <$> bitraverse g g' x)
  bitraverse_eq_bimap_id :
    ∀ {α α' β β'} (f : α → β) (f' : α' → β') (x : t α α'),
      bitraverse (m := Id) (pure ∘ f) (pure ∘ f') x = pure (bimap f f' x)
  binaturality :
    ∀ {F G} [Applicative F] [Applicative G] [LawfulApplicative F] [LawfulApplicative G]
      (η : ApplicativeTransformation F G) {α α' β β'} (f : α → F β) (f' : α' → F β') (x : t α α'),
      η (bitraverse f f' x) = bitraverse (@η _ ∘ f) (@η _ ∘ f') x

{t : Type u → Type u → Type u}
[Bitraversable t]
[self : LawfulBitraversable t]
{F G : Type u → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
(η : ApplicativeTransformation F G)
{α α' β β' : Type u}
(f : α → F β)
(f' : α' → F β')
(x : t α α')

(fun {α} => η.app α) (bitraverse f f' x) = bitraverse ((fun {α} => η.app α) ∘ f) ((fun {α} => η.app α) ∘ f') x


theorem epi_of_epi_of_epi_of_mono'
    (hR₁ : (mk₂ (R₁.map' 1 2) (R₁.map' 2 3)).Exact)
    (hR₂ : (mk₂ (R₂.map' 0 1) (R₂.map' 1 2)).Exact) (hR₂' : R₂.map' 1 3 = 0)
    (h₀ : Epi (app' φ 0)) (h₂ : Epi (app' φ 2)) (h₃ : Mono (app' φ 3)) :
    Epi (app' φ 1)

{R₁ R₂ : CategoryTheory.ComposableArrows C 3}

(hR₁ : (CategoryTheory.ComposableArrows.mk₂ (R₁.map' 1 2 ⋯ ⋯) (R₁.map' 2 3 ⋯ ⋯)).Exact)

(hR₂ : (CategoryTheory.ComposableArrows.mk₂ (R₂.map' 0 1 ⋯ ⋯) (R₂.map' 1 2 ⋯ ⋯)).Exact)

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

(h₂ : CategoryTheory.Epi (CategoryTheory.ComposableArrows.app' φ 2 ⋯))

(h₃ : CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 3 ⋯))

CategoryTheory.Epi (CategoryTheory.ComposableArrows.app' φ 1 ⋯)


@[simp]
theorem col_add [Add α] (v w : m → α) : col ι (v + w) = col ι v + col ι w

{m : Type u_2}
{α : Type v}
{ι : Type u_6}
[Add α]
(v w : m → α)

Matrix.col ι (v + w) = Matrix.col ι v + Matrix.col ι w


@[simp]
theorem coe_currySumEquiv : ⇑(currySumEquiv R ι M₂ M' ι') = currySum

{R : Type uR}
{ι : Type uι}
{M₂ : Type v₂}
{M' : Type v'}
[CommSemiring R]
[AddCommMonoid M']
[AddCommMonoid M₂]
[Module R M']
[Module R M₂]
{ι' : Type u_1}

⇑(MultilinearMap.currySumEquiv R ι M₂ M' ι') = MultilinearMap.currySum


theorem cycleFactorsFinset_pairwise_disjoint :
    (cycleFactorsFinset f : Set (Perm α)).Pairwise Disjoint

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


/-- The cardinality of the set of `k`-smooth numbers `≤ N` is bounded by `2^π(k-1) * √N`. -/
lemma smoothNumbersUpTo_card_le (N k : ℕ) :
    (smoothNumbersUpTo N k).card ≤ 2 ^ k.primesBelow.card * N.sqrt

(N.smoothNumbersUpTo k).card ≤ 2 ^ k.primesBelow.card * N.sqrt


theorem LeftInverse.iterate {g : α → α} (hg : LeftInverse g f) (n : ℕ) :
    LeftInverse g^[n] f^[n]

{α : Type u}
{f g : α → α}
(hg : Function.LeftInverse g f)
(n : ℕ)


@[to_additive]
theorem quasiMeasurePreserving_inv_of_right_invariant [IsMulRightInvariant μ] :
    QuasiMeasurePreserving (Inv.inv : G → G) μ μ

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
[MeasurableInv G]
[μ.IsMulRightInvariant]

MeasureTheory.Measure.QuasiMeasurePreserving Inv.inv μ μ


theorem count_coe_fill_self_of_not_mem [DecidableEq α] {a : α} {i : Fin (n + 1)} {s : Sym α (n - i)}
    (hx : a ∉ s) :
    count a (fill a i s : Multiset α) = i

{α : Type u_1}
{n : ℕ}
[DecidableEq α]
{a : α}
{i : Fin (n + 1)}
{s : Sym α (n - ↑i)}
(hx : a ∉ s)


@[to_additive (attr := simp)]
theorem biUnion_op_smul_finset (s t : Finset α) : (t.biUnion fun a => op a • s) = s * t

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

(t.biUnion fun a => MulOpposite.op a • s) = s * t


/-- **Phragmen-Lindelöf principle** in the third quadrant. Let `f : ℂ → E` be a function such that

* `f` is differentiable in the open third quadrant and is continuous on its closure;
* `‖f z‖` is bounded from above by `A * exp (B * (abs z) ^ c)` on the open third quadrant
  for some `c < 2`;
* `‖f z‖` is bounded from above by a constant `C` on the boundary of the third quadrant.

Then `‖f z‖` is bounded from above by the same constant on the closed third quadrant. -/
theorem quadrant_III (hd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0))
    (hB : ∃ c < (2 : ℝ), ∃ B,
      f =O[cobounded ℂ ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * abs z ^ c))
    (hre : ∀ x : ℝ, x ≤ 0 → ‖f x‖ ≤ C) (him : ∀ x : ℝ, x ≤ 0 → ‖f (x * I)‖ ≤ C) (hz_re : z.re ≤ 0)
    (hz_im : z.im ≤ 0) : ‖f z‖ ≤ C

(hd : DiffContOnCl ℂ f (Set.Iio 0 ×ℂ Set.Iio 0))

(hB : ∃ c < 2, ∃ B, f =O[Bornology.cobounded ℂ ⊓ 𝓟 (Set.Iio 0 ×ℂ Set.Iio 0)] fun z => expR (B * Complex.abs z ^ c))

(him : ∀ x ≤ 0, ‖f (↑x * Complex.I)‖ ≤ C)


@[simp]
theorem symm_image_image (h : M ≃ₘ^n⟮I, J⟯ N) (s : Set M) : h.symm '' (h '' s) = s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{G : Type u_7}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_11}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
(h : M ≃ₘ^n⟮I, J⟯ N)
(s : Set M)


/-- If a functor `F : C ⥤ D` is equipped with "commutation isomorphisms" with the
shifts by `a` and `b`, then there is a commutation isomorphism with the shift by `c` when
`a + b = c`. -/
@[simps!]
noncomputable def isoAdd' {a b c : A} (h : a + b = c)
    (e₁ : shiftFunctor C a ⋙ F ≅ F ⋙ shiftFunctor D a)
    (e₂ : shiftFunctor C b ⋙ F ≅ F ⋙ shiftFunctor D b) :
    shiftFunctor C c ⋙ F ≅ F ⋙ shiftFunctor D c

(e₁ : (CategoryTheory.shiftFunctor C a).comp F ≅ F.comp (CategoryTheory.shiftFunctor D a))

(e₂ : (CategoryTheory.shiftFunctor C b).comp F ≅ F.comp (CategoryTheory.shiftFunctor D b))

(CategoryTheory.Functor.CommShift.isoAdd' h e₁ e₂).inv.app X =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorAdd' D a b c h).hom.app (F.obj X))
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctor D b).map (e₁.inv.app X))
      (CategoryTheory.CategoryStruct.comp (e₂.inv.app ((CategoryTheory.shiftFunctor C a).obj X))
        (F.map ((CategoryTheory.shiftFunctorAdd' C a b c h).inv.app X))))


@[to_additive]
theorem mulRight_bijective (a : Mˣ) : Function.Bijective ((· * a) : M → M)


/-- If a subset of a real vector space contains an open segment, then the direction of this
segment belongs to the tangent cone at its endpoints. -/
theorem mem_tangentCone_of_openSegment_subset {s : Set G} {x y : G} (h : openSegment ℝ x y ⊆ s) :
    y - x ∈ tangentConeAt ℝ s x

{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{s : Set G}
{x y : G}
(h : openSegment ℝ x y ⊆ s)


@[to_additive]
theorem tprod_finset_bUnion_disjoint {ι} {s : Finset ι} {t : ι → Set β}
    (hd : (s : Set ι).Pairwise (Disjoint on t)) (hf : ∀ i ∈ s, Multipliable (f ∘ (↑) : t i → α)) :
    ∏' x : ⋃ i ∈ s, t i, f x = ∏ i ∈ s, ∏' x : t i, f x

(hf : ∀ i ∈ s, Multipliable (f ∘ Subtype.val))

∏' (x : ↑(⋃ i ∈ s, t i)), f ↑x = ∏ i ∈ s, ∏' (x : ↑(t i)), f ↑x


@[simp]
theorem image_intrinsicInterior (φ : P →ᵃⁱ[𝕜] Q) (s : Set P) :
    intrinsicInterior 𝕜 (φ '' s) = φ '' intrinsicInterior 𝕜 s

{𝕜 : Type u_1}
{V : Type u_2}
{W : Type u_3}
{Q : Type u_4}
{P : Type u_5}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[SeminormedAddCommGroup W]
[NormedSpace 𝕜 V]
[NormedSpace 𝕜 W]
[MetricSpace P]
[PseudoMetricSpace Q]
[NormedAddTorsor V P]
[NormedAddTorsor W Q]
(φ : P →ᵃⁱ[𝕜] Q)
(s : Set P)

intrinsicInterior 𝕜 (⇑φ '' s) = ⇑φ '' intrinsicInterior 𝕜 s


@[simp, norm_cast]
theorem intCast_re (z : ℤ) : (z : ℍ[R,c₁,c₂]).re = z

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(z : ℤ)


@[simp]
theorem equivFunOnFintype_symm_single [Fintype ι] (i : ι) (m : β i) :
    (@DFinsupp.equivFunOnFintype ι β _ _).symm (Pi.single i m) = DFinsupp.single i m

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
[Fintype ι]
(i : ι)
(m : β i)

DFinsupp.equivFunOnFintype.symm (Pi.single i m) = DFinsupp.single i m


theorem iterate_succ_apply' (n : ℕ) (x : α) : f^[n.succ] x = f (f^[n] x)

{α : Type u}
(f : α → α)
(n : ℕ)
(x : α)


@[simp, norm_cast]
lemma coe_finsetOrderIsoSet : ⇑finsetOrderIsoSet = ((↑) : Finset α → Set α)


/-- A hamiltonian cycle visits every vertex. -/
lemma IsHamiltonianCycle.mem_support (hp : p.IsHamiltonianCycle) (b : α) :
    b ∈ p.support

{α : Type u_1}
[DecidableEq α]
{G : SimpleGraph α}
{a : α}
{p : G.Walk a a}
(hp : p.IsHamiltonianCycle)
(b : α)


@[simp]
theorem isUnit_left {a : α} (b : α) (ha : IsUnit a) : multiplicity a b = ⊤

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a : α}
(b : α)
(ha : IsUnit a)


/-- `G` is cover-preserving wrt the induced topology. -/
theorem inducedTopology_coverPreserving : CoverPreserving (G.inducedTopology K) K G

(K : CategoryTheory.GrothendieckTopology D)

CategoryTheory.CoverPreserving (G.inducedTopology K) K G


@[reassoc]
theorem coprod.map_comp_inl_inr_codiag [HasColimitsOfShape (Discrete WalkingPair) C] {X X' Y Y' : C}
    (g : X ⟶ Y) (g' : X' ⟶ Y') :
    coprod.map (g ≫ coprod.inl) (g' ≫ coprod.inr) ≫ codiag (Y ⨿ Y') = coprod.map g g'

[CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) C]

CategoryTheory.Limits.coprod.map (g ≫ CategoryTheory.Limits.coprod.inl) (g' ≫ CategoryTheory.Limits.coprod.inr) ≫
    CategoryTheory.Limits.codiag (Y ⨿ Y') =
  CategoryTheory.Limits.coprod.map g g'


theorem balance_eq_balance' {l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l)
    (sr : Sized r) : @balance α l x r = balance' l x r

{α : Type u_1}
{l : Ordnode α}
{x : α}
{r : Ordnode α}
(hl : l.Balanced)
(hr : r.Balanced)
(sl : l.Sized)
(sr : r.Sized)


theorem norm_zsmul [NormedSpace 𝕜 E] (n : ℤ) (x : E) : ‖n • x‖ = ‖(n : 𝕜)‖ * ‖x‖

(𝕜 : Type u_1)
{E : Type u_3}
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
(n : ℤ)
(x : E)

‖n • x‖ = ‖↑n‖ * ‖x‖


@[to_additive]
theorem tendsto_one_iff_norm_tendsto_zero {f : α → E} {a : Filter α} :
    Tendsto f a (𝓝 1) ↔ Tendsto (‖f ·‖) a (𝓝 0)

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
{f : α → E}
{a : Filter α}

Filter.Tendsto f a (𝓝 0) ↔ Filter.Tendsto (fun x => ‖f x‖) a (𝓝 0)


theorem HasFTaylorSeriesUpToOn.mono (h : HasFTaylorSeriesUpToOn n f p s) {t : Set E} (hst : t ⊆ s) :
    HasFTaylorSeriesUpToOn n f p t

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{n : ℕ∞}
{p : E → FormalMultilinearSeries 𝕜 E F}
(h : HasFTaylorSeriesUpToOn n f p s)
{t : Set E}
(hst : t ⊆ s)


theorem countable_iff_nonempty_embedding : Countable α ↔ Nonempty (α ↪ ℕ)


theorem inducedOuterMeasure_eq {s : Set α} (hs : MeasurableSet s) :
    inducedOuterMeasure m MeasurableSet.empty m0 s = m s hs

{m : (s : Set α) → MeasurableSet s → ℝ≥0∞}

(mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), MeasurableSet (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) ⋯ = ∑' (i : ℕ), m (f i) ⋯)

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


@[simp]
lemma leftHomologyMap'_nullHomotopic
    (H₁ : S₁.LeftHomologyData) (H₂ : S₂.LeftHomologyData)
    (h₀ : S₁.X₁ ⟶ S₂.X₁) (h₀_f : h₀ ≫ S₂.f = 0)
    (h₁ : S₁.X₂ ⟶ S₂.X₁) (h₂ : S₁.X₃ ⟶ S₂.X₂) (h₃ : S₁.X₃ ⟶ S₂.X₃) (g_h₃ : S₁.g ≫ h₃ = 0) :
    leftHomologyMap' (nullHomotopic _ _ h₀ h₀_f h₁ h₂ h₃ g_h₃) H₁ H₂ = 0

(h₀_f : CategoryTheory.CategoryStruct.comp h₀ S₂.f = 0)

(g_h₃ : CategoryTheory.CategoryStruct.comp S₁.g h₃ = 0)

CategoryTheory.ShortComplex.leftHomologyMap' (S₁.nullHomotopic S₂ h₀ h₀_f h₁ h₂ h₃ g_h₃) H₁ H₂ = 0


/-- The image of a right invariant measure under a left action is right invariant, assuming that
the action preserves multiplication. -/
@[to_additive "The image of a right invariant measure under a left additive action is right
 invariant, assuming that the action preserves addition."]
theorem isMulRightInvariant_map_smul
    {α} [SMul α G] [SMulCommClass α Gᵐᵒᵖ G] [MeasurableSpace α] [MeasurableSMul α G]
    [IsMulRightInvariant μ] (a : α) :
    IsMulRightInvariant (map (a • · : G → G) μ)

{G : Type u_2}
[MeasurableSpace G]
[AddSemigroup G]
[MeasurableAdd G]
{μ : MeasureTheory.Measure G}
{α : Type u_4}
[VAdd α G]
[VAddCommClass α Gᵃᵒᵖ G]
[MeasurableSpace α]
[MeasurableVAdd α G]
[μ.IsAddRightInvariant]
(a : α)

(MeasureTheory.Measure.map (fun x => a +ᵥ x) μ).IsAddRightInvariant


/-- Reindexing a family of vectors does not change their parallelepiped. -/
@[simp]
theorem parallelepiped_comp_equiv (v : ι → E) (e : ι' ≃ ι) :
    parallelepiped (v ∘ e) = parallelepiped v

{ι : Type u_1}
{ι' : Type u_2}
{E : Type u_3}
[Fintype ι]
[Fintype ι']
[AddCommGroup E]
[Module ℝ E]
(v : ι → E)
(e : ι' ≃ ι)

parallelepiped (v ∘ ⇑e) = parallelepiped v


/-- An object is not initial if and only if its fiber is nonempty. -/
lemma not_initial_iff_fiber_nonempty (X : C) : (IsInitial X → False) ↔ Nonempty (F.obj X)

(F : CategoryTheory.Functor C FintypeCat)

CategoryTheory.Limits.IsInitial X → False ↔ Nonempty ↑(F.obj X)


/-- A sequence `φ` of subsets of `α` is a `MeasureTheory.AECover` w.r.t. a measure `μ` and a filter
    `l` if almost every point (w.r.t. `μ`) of `α` eventually belongs to `φ n` (w.r.t. `l`), and if
    each `φ n` is measurable.  This definition is a technical way to avoid duplicating a lot of
    proofs.  It should be thought of as a sufficient condition for being able to interpret
    `∫ x, f x ∂μ` (if it exists) as the limit of `∫ x in φ n, f x ∂μ` as `n` tends to `l`.

    See for example `MeasureTheory.AECover.lintegral_tendsto_of_countably_generated`,
    `MeasureTheory.AECover.integrable_of_integral_norm_tendsto` and
    `MeasureTheory.AECover.integral_tendsto_of_countably_generated`. -/
structure AECover (φ : ι → Set α) : Prop where
  ae_eventually_mem : ∀ᵐ x ∂μ, ∀ᶠ i in l, x ∈ φ i
  protected measurableSet : ∀ i, MeasurableSet <| φ i

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
{φ : ι → Set α}
(self : MeasureTheory.AECover μ l φ)


@[to_additive]
theorem eq_of_one_div_eq_one_div (h : 1 / a = 1 / b) : a = b

{α : Type u_1}
[DivisionMonoid α]
{a b : α}
(h : 1 / a = 1 / b)


lemma compProd_add_left (μ ν : Measure α) [SFinite μ] [SFinite ν] (κ : Kernel α β)
    [IsSFiniteKernel κ] :
    (μ + ν) ⊗ₘ κ = μ ⊗ₘ κ + ν ⊗ₘ κ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(μ ν : MeasureTheory.Measure α)
[MeasureTheory.SFinite μ]
[MeasureTheory.SFinite ν]
(κ : ProbabilityTheory.Kernel α β)
[ProbabilityTheory.IsSFiniteKernel κ]

(μ + ν) ⊗ₘ κ = μ ⊗ₘ κ + ν ⊗ₘ κ


theorem mk_bounded_set_le (α : Type u) (c : Cardinal) :
    #{ t : Set α // #t ≤ c } ≤ max #α ℵ₀ ^ c


/-- A congruence lemma for `mfderiv`, (ab)using the fact that `TangentSpace I' (f x)` is
definitionally equal to `E'`. -/
theorem mfderiv_congr {f' : M → M'} (h : f = f') :
    @Eq (E →L[𝕜] E') (mfderiv I I' f x) (mfderiv I I' f' x)

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


/-- Copy a unit, adjusting definition equalities. -/
@[to_additive (attr := simps) "Copy an `AddUnit`, adjusting definitional equalities."]
def copy (u : αˣ) (val : α) (hv : val = u) (inv : α) (hi : inv = ↑u⁻¹) : αˣ

{α : Type u}
[Monoid α]
(u : αˣ)
(val : α)
(hv : val = ↑u)
(inv : α)
(hi : inv = ↑u⁻¹)


theorem pi_lineMap_apply (f g : ∀ i, P i) (c : k) (i : ι) :
    lineMap f g c i = lineMap (f i) (g i) c

{k : Type u_1}
[Ring k]
{ι : Type u_10}
{V : ι → Type u_11}
{P : ι → Type u_12}
[(i : ι) → AddCommGroup (V i)]
[(i : ι) → Module k (V i)]
[(i : ι) → AffineSpace (V i) (P i)]
(f g : (i : ι) → P i)
(c : k)
(i : ι)

(AffineMap.lineMap f g) c i = (AffineMap.lineMap (f i) (g i)) c


/-- If `A` is a column strictly dominant diagonal matrix, then it's determinant is nonzero. -/
theorem det_ne_zero_of_sum_col_lt_diag (h : ∀ k, ∑ i ∈ Finset.univ.erase k, ‖A i k‖ < ‖A k k‖) :
    A.det ≠ 0

(h : ∀ (k : n), ∑ i ∈ Finset.univ.erase k, ‖A i k‖ < ‖A k k‖)


@[to_additive]
theorem Multipliable.mul (hf : Multipliable f) (hg : Multipliable g) :
    Multipliable fun b ↦ f b * g b

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f g : β → α}
[ContinuousAdd α]
(hf : Summable f)
(hg : Summable g)


theorem zneg_pred (n : ZNum) : -n.pred = (-n).succ


/-- A graded version of `Algebra`. An instance of `DirectSum.GAlgebra R A` endows `(⨁ i, A i)`
with an `R`-algebra structure. -/
class GAlgebra where
  toFun : R →+ A 0
  map_one : toFun 1 = GradedMonoid.GOne.one
  map_mul :
    ∀ r s, GradedMonoid.mk _ (toFun (r * s)) = .mk _ (GradedMonoid.GMul.mul (toFun r) (toFun s))
  commutes : ∀ (r) (x : GradedMonoid A), .mk _ (toFun r) * x = x * .mk _ (toFun r)
  smul_def : ∀ (r) (x : GradedMonoid A), r • x = .mk _ (toFun r) * x

{ι : Type uι}
{R : Type uR}
{A : ι → Type uA}
[DecidableEq ι]
[CommSemiring R]
[(i : ι) → AddCommMonoid (A i)]
[(i : ι) → Module R (A i)]
[AddMonoid ι]
[DirectSum.GSemiring A]
[self : DirectSum.GAlgebra R A]
(r s : R)

GradedMonoid.mk 0 (DirectSum.GAlgebra.toFun (r * s)) =
  GradedMonoid.mk (0 + 0) (GradedMonoid.GMul.mul (DirectSum.GAlgebra.toFun r) (DirectSum.GAlgebra.toFun s))


/-- The functor `Square C ⥤ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the left morphism of `sq`
to the right morphism of `sq`. -/
@[simps!]
def toArrowArrowFunctor : Square C ⥤ Arrow (Arrow C)

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

(CategoryTheory.Square.toArrowArrowFunctor.obj sq).right.hom = sq.f₂₄


theorem fold_singleton (b a : α) : ({a} : Multiset α).fold op b = a * b

{α : Type u_1}
(op : α → α → α)
[hc : Std.Commutative op]
[ha : Std.Associative op]
(b a : α)


theorem bit1_of_bit1 (n : PosNum) : (n + n) + 1 = bit1 n


@[to_additive (attr := elab_as_elim)]
theorem closure_induction_right {s : Set M} {p : (m : M) → m ∈ closure s → Prop}
    (one : p 1 (one_mem _))
    (mul_right : ∀ x hx, ∀ (y) (hy : y ∈ s), p x hx → p (x * y) (mul_mem hx (subset_closure hy)))
    {x : M} (h : x ∈ closure s) : p x h

{p : (m : M) → m ∈ AddSubmonoid.closure s → Prop}

(mul_right : ∀ (x : M) (hx : x ∈ AddSubmonoid.closure s) (y : M) (hy : y ∈ s), p x hx → p (x + y) ⋯)


theorem house_mul_le (α β : K) : house (α * β) ≤ house α * house β

{K : Type u_1}
[Field K]
[NumberField K]
(α β : K)

NumberField.house (α * β) ≤ NumberField.house α * NumberField.house β


protected theorem Directed.disjoint_iSup_right (h : Directed (· ≤ ·) f) :
    Disjoint a (⨆ i, f i) ↔ ∀ i, Disjoint a (f i)

{ι : Sort u_1}
{α : Type u_2}
{f : ι → α}
[CompleteLattice α]
[IsCompactlyGenerated α]
{a : α}
(h : Directed (fun x x_1 => x ≤ x_1) f)

Disjoint a (⨆ i, f i) ↔ ∀ (i : ι), Disjoint a (f i)


theorem list_reverse (n) : (list n).reverse = (list n).map rev

(Fin.list n).reverse = List.map Fin.rev (Fin.list n)


theorem splitMax_eq :
    ∀ (s l) (x : α) (r), splitMax' l x r = (eraseMax (node s l x r), findMax' x r)

{α : Type u_1}
(s : ℕ)
(l : Ordnode α)
(x : α)
(r : Ordnode α)

l.splitMax' x r = ((Ordnode.node s l x r).eraseMax, Ordnode.findMax' x r)


/-- The first coefficient of a composition of formal multilinear series is the composition of the
first coefficients seen as continuous linear maps. -/
theorem comp_coeff_one (q : FormalMultilinearSeries 𝕜 F G) (p : FormalMultilinearSeries 𝕜 E F)
    (v : Fin 1 → E) : (q.comp p) 1 v = q 1 fun _i => p 1 v

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[CommRing 𝕜]
[AddCommGroup E]
[AddCommGroup F]
[AddCommGroup G]
[Module 𝕜 E]
[Module 𝕜 F]
[Module 𝕜 G]
[TopologicalSpace E]
[TopologicalSpace F]
[TopologicalSpace G]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]
[TopologicalAddGroup G]
[ContinuousConstSMul 𝕜 G]
(q : FormalMultilinearSeries 𝕜 F G)
(p : FormalMultilinearSeries 𝕜 E F)
(v : Fin 1 → E)

(q.comp p 1) v = (q 1) fun _i => (p 1) v


theorem mk_compl_eq_mk_compl_infinite {α : Type*} [Infinite α] {s t : Set α} (hs : #s < #α)
    (ht : #t < #α) : #(sᶜ : Set α) = #(tᶜ : Set α)

{α : Type u_1}
[Infinite α]
{s t : Set α}
(hs : #↑s < #α)
(ht : #↑t < #α)


theorem ModularCyclotomicCharacter_aux_spec (g : L ≃+* L) (n : ℕ+) :
    ∀ t : rootsOfUnity n L, g (t : Lˣ) = (t ^ (ModularCyclotomicCharacter_aux g n) : Lˣ)

{L : Type u}
[CommRing L]
[IsDomain L]
(g : L ≃+* L)
(n : ℕ+)
(t : ↥(rootsOfUnity n L))

g ↑↑t = ↑(↑t ^ ModularCyclotomicCharacter_aux g n)


/-- The presheaf of `J`-closed sieves is a `J`-sheaf.
The proof of this is adapted from [MM92], Chapter III, Section 7, Lemma 1.
-/
theorem classifier_isSheaf : Presieve.IsSheaf J₁ (Functor.closedSieves J₁)

(J₁ : CategoryTheory.GrothendieckTopology C)

CategoryTheory.Presieve.IsSheaf J₁ (CategoryTheory.Functor.closedSieves J₁)


/-- A morphism of Eilenberg–Moore algebras for the monad `T`. -/
@[ext]
structure Hom (A B : Algebra T) where
  /-- The underlying morphism associated to a morphism of algebras. -/
  f : A.A ⟶ B.A
  /-- Compatibility with the structure morphism, for a morphism of algebras. -/
  h : (T : C ⥤ C).map f ≫ B.a = A.a ≫ f := by aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T : CategoryTheory.Monad C}
{A B : T.Algebra}
(self : A.Hom B)

CategoryTheory.CategoryStruct.comp (T.map self.f) B.a = CategoryTheory.CategoryStruct.comp A.a self.f


@[continuity]
theorem Continuous.matrix_blockDiagonal' [Zero R] [DecidableEq l]
    {A : X → ∀ i, Matrix (m' i) (n' i) R} (hA : Continuous A) :
    Continuous fun x => blockDiagonal' (A x)

{A : X → (i : l) → Matrix (m' i) (n' i) R}

Continuous fun x => Matrix.blockDiagonal' (A x)


/-- `AddGroupSeminormClass F α` states that `F` is a type of `β`-valued seminorms on the additive
group `α`.

You should extend this class when you extend `AddGroupSeminorm`. -/
class AddGroupSeminormClass (F α β : Type*) [AddGroup α] [OrderedAddCommMonoid β] [FunLike F α β]
  extends SubadditiveHomClass F α β : Prop where
  /-- The image of zero is zero. -/
  map_zero (f : F) : f 0 = 0
  /-- The map is invariant under negation of its argument. -/
  map_neg_eq_map (f : F) (a : α) : f (-a) = f a

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[AddGroup α]
[OrderedAddCommMonoid β]
[FunLike F α β]
[self : AddGroupSeminormClass F α β]
(f : F)


/-- The obvious fully faithful functor `toKaroubi` sends an object `X : C` to the obvious
formal direct factor of `X` given by `𝟙 X`. -/
@[simps]
def toKaroubi : C ⥤ Karoubi C

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

∀ {X Y : C} (f : X ⟶ Y), ((CategoryTheory.Idempotents.toKaroubi C).map f).f = f


lemma CharOne.subsingleton [CharP R 1] : Subsingleton R

{R : Type u_1}
[NonAssocSemiring R]
[CharP R 1]


theorem inter_right_idem (s t : Finset α) : s ∩ t ∩ t = s ∩ t

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


theorem basis_iff_mem_maximals (hX : X ⊆ M.E := by aesop_mat) :
    M.Basis I X ↔ I ∈ maximals (· ⊆ ·) {I | M.Indep I ∧ I ⊆ X}

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
(hX : X ⊆ M.E := by aesop_mat)

M.Basis I X ↔ I ∈ maximals (fun x x_1 => x ⊆ x_1) {I | M.Indep I ∧ I ⊆ X}


theorem forall_image2_iff {p : γ → Prop} :
    (∀ z ∈ image2 f s t, p z) ↔ ∀ x ∈ s, ∀ y ∈ t, p (f x y)

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

(∀ z ∈ Set.image2 f s t, p z) ↔ ∀ x ∈ s, ∀ y ∈ t, p (f x y)


theorem transpose_mul_self_isDiag_iff_hasOrthogonalCols [Fintype m] [Mul α] [AddCommMonoid α]
    {A : Matrix m n α} : (Aᵀ * A).IsDiag ↔ A.HasOrthogonalCols

{α : Type u_1}
{n : Type u_4}
{m : Type u_5}
[Fintype m]
[Mul α]
[AddCommMonoid α]
{A : Matrix m n α}

(A.transpose * A).IsDiag ↔ A.HasOrthogonalCols


@[to_additive (attr := simp)]
theorem map.id' (x : FreeGroup α) : map (fun z => z) x = x


/-- Composing on the left by a uniformly continuous function preserves
  uniform convergence on a filter -/
theorem UniformContinuous.comp_tendstoUniformlyOnFilter [UniformSpace γ] {g : β → γ}
    (hg : UniformContinuous g) (h : TendstoUniformlyOnFilter F f p p') :
    TendstoUniformlyOnFilter (fun i => g ∘ F i) (g ∘ f) p p'

{α : Type u}
{β : Type v}
{γ : Type w}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{p : Filter ι}
{p' : Filter α}
[UniformSpace γ]
{g : β → γ}
(hg : UniformContinuous g)
(h : TendstoUniformlyOnFilter F f p p')


theorem if_congr {α : Sort u} {b c : Prop} [Decidable b] [Decidable c]
    {x y u v : α} (h_c : b ↔ c) (h_t : x = u) (h_e : y = v) : ite b x y = ite c u v

(if b then x else y) = if c then u else v


theorem const_iff_true {α : TypeVec n} {i x p} : ofRepeat (TypeVec.const p α i x) ↔ p

{n : ℕ}
{α : TypeVec.{u_1} n}
{i : Fin2 n}
{x : α i}
{p : Prop}

TypeVec.ofRepeat (TypeVec.const p α i x) ↔ p


theorem nonempty_frontier_iff [PreconnectedSpace α] {s : Set α} :
    (frontier s).Nonempty ↔ s.Nonempty ∧ s ≠ univ

{α : Type u}
[TopologicalSpace α]
[PreconnectedSpace α]
{s : Set α}

(frontier s).Nonempty ↔ s.Nonempty ∧ s ≠ Set.univ


theorem kronecker_smul [Monoid R] [Monoid α] [MulAction R α] [SMulCommClass R α α] (r : R)
    (A : Matrix l m α) (B : Matrix n p α) : A ⊗ₖ (r • B) = r • A ⊗ₖ B

{R : Type u_1}
{α : Type u_2}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{p : Type u_11}
[Monoid R]
[Monoid α]
[MulAction R α]
[SMulCommClass R α α]
(r : R)
(A : Matrix l m α)
(B : Matrix n p α)

Matrix.kroneckerMap (fun x x_1 => x * x_1) A (r • B) = r • Matrix.kroneckerMap (fun x x_1 => x * x_1) A B


theorem exists_subset_or_subset_of_two_mul_lt_card [DecidableEq α] {X Y : Finset α} {n : ℕ}
    (hXY : 2 * n < (X ∪ Y).card) : ∃ C : Finset α, n < C.card ∧ (C ⊆ X ∨ C ⊆ Y)

{α : Type u_1}
[DecidableEq α]
{X Y : Finset α}
{n : ℕ}
(hXY : 2 * n < (X ∪ Y).card)


/-- If a linear map `f : M₁ → M₂` respects direct sum decompositions of `M₁` and `M₂`, then it has a
block diagonal matrix with respect to bases compatible with the direct sum decompositions. -/
lemma toMatrix_directSum_collectedBasis_eq_blockDiagonal' {R M₁ M₂ : Type*} [CommSemiring R]
    [AddCommMonoid M₁] [Module R M₁] {N₁ : ι → Submodule R M₁} (h₁ : IsInternal N₁)
    [AddCommMonoid M₂] [Module R M₂] {N₂ : ι → Submodule R M₂} (h₂ : IsInternal N₂)
    {κ₁ κ₂ : ι → Type*} [∀ i, Fintype (κ₁ i)] [∀ i, Finite (κ₂ i)] [∀ i, DecidableEq (κ₁ i)]
    [Fintype ι] (b₁ : (i : ι) → Basis (κ₁ i) R (N₁ i)) (b₂ : (i : ι) → Basis (κ₂ i) R (N₂ i))
    {f : M₁ →ₗ[R] M₂} (hf : ∀ i, MapsTo f (N₁ i) (N₂ i)) :
    toMatrix (h₁.collectedBasis b₁) (h₂.collectedBasis b₂) f =
    Matrix.blockDiagonal' fun i ↦ toMatrix (b₁ i) (b₂ i) (f.restrict (hf i))

(hf : ∀ (i : ι), Set.MapsTo ⇑f ↑(N₁ i) ↑(N₂ i))

(LinearMap.toMatrix (h₁.collectedBasis b₁) (h₂.collectedBasis b₂)) f =
  Matrix.blockDiagonal' fun i => (LinearMap.toMatrix (b₁ i) (b₂ i)) (f.restrict ⋯)


@[fun_prop]
theorem DifferentiableWithinAt.const_smul (h : DifferentiableWithinAt 𝕜 f s x) (c : R) :
    DifferentiableWithinAt 𝕜 (fun y => c • f y) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{s : Set E}
{R : Type u_6}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
(h : DifferentiableWithinAt 𝕜 f s x)
(c : R)


theorem Lp.norm_constL_le (𝕜 : Type*) [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E]
    [Fact (1 ≤ p)] :
    ‖(Lp.constL p μ 𝕜 : E →L[𝕜] Lp E p μ)‖ ≤ (μ Set.univ).toReal ^ (1 / p.toReal)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
(p : ℝ≥0∞)
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[MeasureTheory.IsFiniteMeasure μ]
(𝕜 : Type u_5)
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[Fact (1 ≤ p)]

‖MeasureTheory.Lp.constL p μ 𝕜‖ ≤ (μ Set.univ).toReal ^ (1 / p.toReal)


/-- The left whiskering of an isomorphism is an isomorphism. -/
@[simps]
def whiskerLeftIso (X : C) {Y Z : C} (f : Y ≅ Z) : X ⊗ Y ≅ X ⊗ Z

{C : Type u}
[𝒞 : CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
(X : C)
{Y Z : C}
(f : Y ≅ Z)

(CategoryTheory.MonoidalCategory.whiskerLeftIso X f).hom = CategoryTheory.MonoidalCategory.whiskerLeft X f.hom


@[to_additive (attr := simp)]
theorem mk_of_inr (x : N) : (mk (of (.inr x)) : M ∗ N) = inr x

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(x : N)

Monoid.Coprod.mk (FreeMonoid.of (Sum.inr x)) = Monoid.Coprod.inr x


@[simp] lemma finsetEquivSet_symm_apply (s : Set α) [Fintype s] :
    finsetEquivSet.symm s = s.toFinset

{α : Type u_1}
[Fintype α]
(s : Set α)
[Fintype ↑s]

Fintype.finsetEquivSet.symm s = s.toFinset


@[to_additive]
theorem inv_eq_iff_mul_eq_one : a⁻¹ = b ↔ a * b = 1


lemma analyticAt_inv_one_sub (𝕝 : Type*) [NontriviallyNormedField 𝕝] [NormedAlgebra 𝕜 𝕝] :
    AnalyticAt 𝕜 (fun x : 𝕝 ↦ (1 - x)⁻¹) 0

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
(𝕝 : Type u_9)
[NontriviallyNormedField 𝕝]
[NormedAlgebra 𝕜 𝕝]


theorem pairwise_join {L : List (List α)} :
    Pairwise R (join L) ↔
      (∀ l ∈ L, Pairwise R l) ∧ Pairwise (fun l₁ l₂ => ∀ x ∈ l₁, ∀ y ∈ l₂, R x y) L

{α : Type u_1}
{R : α → α → Prop}
{L : List (List α)}

List.Pairwise R L.join ↔
  (∀ (l : List α), l ∈ L → List.Pairwise R l) ∧
    List.Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) L


theorem Disjoint.le_symmDiff_sup_symmDiff_right (h : Disjoint b c) : a ≤ a ∆ b ⊔ a ∆ c

{α : Type u_2}
[BooleanAlgebra α]
{a b c : α}
(h : Disjoint b c)


theorem mul {x y : R} (hx : IsSelfAdjoint x) (hy : IsSelfAdjoint y) : IsSelfAdjoint (x * y)

{R : Type u_1}
[CommSemigroup R]
[StarMul R]
{x y : R}
(hx : IsSelfAdjoint x)
(hy : IsSelfAdjoint y)


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

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


/-- A functor `F : J ⥤ Grp.{u}` has a limit iff `(F ⋙ forget Grp).sections` is
`u`-small.  -/
@[to_additive "A functor `F : J ⥤ AddGrp.{u}` has a limit iff
`(F ⋙ forget AddGrp).sections` is `u`-small."]
lemma hasLimit_iff_small_sections :
    HasLimit F ↔ Small.{u} (F ⋙ forget Grp).sections

{J : Type v}
[CategoryTheory.Category.{w, v} J]
(F : J ⥤ AddGrp)

CategoryTheory.Limits.HasLimit F ↔ Small.{u, max u v} ↑(F ⋙ CategoryTheory.forget AddGrp).sections


@[simp]
theorem mk_π_app_right {W : C} (fst : W ⟶ X) (snd : W ⟶ Y) (eq : fst ≫ f = snd ≫ g) :
    (mk fst snd eq).π.app WalkingCospan.right = snd

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

(CategoryTheory.Limits.PullbackCone.mk fst snd eq).π.app CategoryTheory.Limits.WalkingCospan.right = snd


@[simp] lemma unmop_hom_rightUnitor (X : Cᴹᵒᵖ) : (ρ_ X).hom.unmop = (λ_ (unmop X)).hom

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

(CategoryTheory.MonoidalCategory.rightUnitor X).hom.unmop = (CategoryTheory.MonoidalCategory.leftUnitor X.unmop).hom


@[simp]
theorem BinaryCofan.ι_app_left {X Y : C} (s : BinaryCofan X Y) :
    s.ι.app ⟨WalkingPair.left⟩ = s.inl

(s : CategoryTheory.Limits.BinaryCofan X Y)

s.ι.app { as := CategoryTheory.Limits.WalkingPair.left } = s.inl


/-- Two points are cospherical. -/
theorem cospherical_pair (p₁ p₂ : P) : Cospherical ({p₁, p₂} : Set P)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(p₁ p₂ : P)


/-- Change a `Cocone F` into a `Cone F.op`. -/
@[simps]
def Cocone.op (c : Cocone F) : Cone F.op

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(c : CategoryTheory.Limits.Cocone F)


@[simp]
theorem finite_toSet (s : Multiset α) : { x | x ∈ s }.Finite


@[simp]
theorem card_neighborSet_eq_degree : Fintype.card (G.neighborSet v) = G.degree v

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

Fintype.card ↑(G.neighborSet v) = G.degree v


/-- A `MulEquiv` version of `Coprod.swap`. -/
@[to_additive (attr := simps! (config := .asFn))
  "An `AddEquiv` version of `AddMonoid.Coprod.swap`."]
def coprodComm : M ∗ N ≃* N ∗ M

(M : Type u_1)
(N : Type u_2)
[MulOneClass M]
[MulOneClass N]

⇑(Monoid.MulEquiv.coprodComm M N) = ⇑(Monoid.Coprod.swap M N)


theorem lintegral_const_lt_top [IsFiniteMeasure μ] {c : ℝ≥0∞} (hc : c ≠ ∞) : ∫⁻ _, c ∂μ < ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure μ]
{c : ℝ≥0∞}
(hc : c ≠ ⊤)