/-- Implementation of `Mon_.equivLaxMonoidalFunctorPUnit`. -/
@[simps]
def monToLaxMonoidal : Mon_ C ⥤ LaxMonoidalFunctor (Discrete PUnit.{u + 1}) C

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

∀ (x x_1 : CategoryTheory.Discrete PUnit.{u + 1}),
  ((Mon_.EquivLaxMonoidalFunctorPUnit.monToLaxMonoidal C).obj A).μ x x_1 = A.mul


theorem count_roots_le_one {p : R[X]} (hsep : Separable p) (x : R) : p.roots.count x ≤ 1

{R : Type u}
[CommRing R]
[IsDomain R]
{p : R[X]}
(hsep : p.Separable)
(x : R)


theorem cof_lsub_le {ι} (f : ι → Ordinal) : cof (lsub.{u, u} f) ≤ #ι


@[simp]
theorem hyperoperation_zero (m : ℕ) : hyperoperation 0 m = Nat.succ


theorem contMDiffWithinAt_id : ContMDiffWithinAt I I n (id : M → M) s 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]
{s : Set M}
{x : M}
{n : ℕ∞}


/-- Analogue of `HasFPowerSeriesOnBall` where convergence is required only on a set `s`. -/
structure HasFPowerSeriesWithinOnBall (f : E → F) (p : FormalMultilinearSeries 𝕜 E F) (s : Set E)
    (x : E) (r : ℝ≥0∞) : Prop where
  /-- `p` converges on `ball 0 r` -/
  r_le : r ≤ p.radius
  /-- The radius of convergence is positive -/
  r_pos : 0 < r
  /-- `p converges to f` within `s` -/
  hasSum : ∀ {y}, x + y ∈ s → y ∈ EMetric.ball (0 : E) r →
    HasSum (fun n : ℕ => p n fun _ : Fin n => y) (f (x + y))
  /-- We require `ContinuousWithinAt f s x` to ensure `f x` is nice -/
  continuousWithinAt : ContinuousWithinAt f s x

(self : HasFPowerSeriesWithinOnBall f p s x r)


/-- The dimension of a finite dimensional space is preserved under linear equivalence. -/
theorem finrank_eq (f : M ≃ₗ[R] M₂) : finrank R M = finrank R M₂

{R : Type u_1}
{M : Type u_2}
{M₂ : Type u_3}
[Ring R]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R M₂]
(f : M ≃ₗ[R] M₂)

FiniteDimensional.finrank R M = FiniteDimensional.finrank R M₂


theorem natAbs_inj_of_nonneg_of_nonpos {a b : ℤ} (ha : 0 ≤ a) (hb : b ≤ 0) :
    natAbs a = natAbs b ↔ a = -b


theorem cardinalInterFilter_aleph_one_iff :
    CardinalInterFilter l (aleph 1) ↔ CountableInterFilter l

CardinalInterFilter l (Cardinal.aleph 1) ↔ CountableInterFilter l


@[simp]
lemma map_π : (c.map G).π = G.map c.π

(c : CategoryTheory.Limits.CokernelCofork f)

CategoryTheory.Limits.Cofork.π (c.map G) = G.map (CategoryTheory.Limits.Cofork.π c)


theorem IsSheafFor.isAmalgamation (t : IsSheafFor P R) {x : FamilyOfElements P R}
    (hx : x.Compatible) : x.IsAmalgamation (t.amalgamate x hx)

{P : CategoryTheory.Functor Cᵒᵖ (Type w)}

(t : CategoryTheory.Presieve.IsSheafFor P R)

{x : CategoryTheory.Presieve.FamilyOfElements P R}


theorem condexpIndL1Fin_smul (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : ℝ) (x : G) :
    condexpIndL1Fin hm hs hμs (c • x) = c • condexpIndL1Fin hm hs hμs x

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[NormedSpace ℝ G]
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
(c : ℝ)
(x : G)

MeasureTheory.condexpIndL1Fin hm hs hμs (c • x) = c • MeasureTheory.condexpIndL1Fin hm hs hμs x


theorem abs_det_adjustToOrientation (v : ι → E) :
    |(e.adjustToOrientation x).toBasis.det v| = |e.toBasis.det v|

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{ι : Type u_2}
[Fintype ι]
[DecidableEq ι]
[ne : Nonempty ι]
(e : OrthonormalBasis ι ℝ E)
(x : Orientation ℝ E ι)
(v : ι → E)


@[to_additive eq_zero_of_add_nonneg_right]
theorem eq_one_of_one_le_mul_right (ha : a ≤ 1) (hb : b ≤ 1) (hab : 1 ≤ a * b) : b = 1

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


theorem sym2_image [DecidableEq β] (f : α → β) (s : Finset α) :
    (s.image f).sym2 = s.sym2.image (Sym2.map f)

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

(Finset.image f s).sym2 = Finset.image (Sym2.map f) s.sym2


@[simp]
theorem Ico_filter_le (a b c : α) : ((Ico a b).filter fun x => c ≤ x) = Ico (max a c) b

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

Multiset.filter (fun x => c ≤ x) (Multiset.Ico a b) = Multiset.Ico (max a c) b


/-- If `f : ℝⁿ → E` is continuous on a rectangular box `I`, then it is Box integrable on `I`
w.r.t. a locally finite measure `μ` with the same integral. -/
theorem ContinuousOn.hasBoxIntegral [CompleteSpace E] {f : (ι → ℝ) → E} (μ : Measure (ι → ℝ))
    [IsLocallyFiniteMeasure μ] {I : Box ι} (hc : ContinuousOn f (Box.Icc I))
    (l : IntegrationParams) :
    HasIntegral.{u, v, v} I l f μ.toBoxAdditive.toSMul (∫ x in I, f x ∂μ)

(hc : ContinuousOn f (BoxIntegral.Box.Icc I))

BoxIntegral.HasIntegral I l f μ.toBoxAdditive.toSMul (∫ (x : ι → ℝ) in ↑I, f x ∂μ)


theorem subNatNat_elim (m n : Nat) (motive : Nat → Nat → Int → Prop)
    (hp : ∀ i n, motive (n + i) n i)
    (hn : ∀ i m, motive m (m + i + 1) -[i+1]) :
    motive m n (subNatNat m n)

(hp : ∀ (i n : Nat), motive (n + i) n ↑i)

(hn : ∀ (i m : Nat), motive m (m + i + 1) (Int.negSucc i))


@[simp] lemma eq_ratCast [DivisionRing α] [FunLike F ℚ α] [RingHomClass F ℚ α] (f : F) (q : ℚ) :
    f q = q

{F : Type u_1}
{α : Type u_3}
[DivisionRing α]
[FunLike F ℚ α]
[RingHomClass F ℚ α]
(f : F)
(q : ℚ)


@[to_additive]
theorem relindex_comap (f : G' →* G) (K : Subgroup G') :
    relindex (comap f H) K = relindex H (map f K)

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

(AddSubgroup.comap f H).relindex K = H.relindex (AddSubgroup.map f K)


theorem Ioi_subset_Ioo_union_Ici : Ioi a ⊆ Ioo a b ∪ Ici b

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


@[norm_cast]
theorem coe_iInf₂ [@DecidableRel α (· ≤ ·)] (f : ∀ i, κ i → Interval α) :
    ↑(⨅ (i) (j), f i j) = ⋂ (i) (j), (f i j : Set α)

{α : Type u_1}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[CompleteLattice α]
[DecidableRel fun x x_1 => x ≤ x_1]
(f : (i : ι) → κ i → Interval α)


lemma W_eq_W_range_sheafToPresheaf_obj :
    J.W = LeftBousfield.W (· ∈ Set.range (sheafToPresheaf J A).obj)

(J : CategoryTheory.GrothendieckTopology C)

J.W = CategoryTheory.Localization.LeftBousfield.W fun x => x ∈ Set.range (CategoryTheory.sheafToPresheaf J A).obj


@[to_additive (attr := simp)]
theorem OneHom.coe_coe [OneHomClass F M N] (f : F) :
    ((f : OneHom M N) : M → N) = f

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


@[simps]
instance whiskerLeft (X Y Z : C) [MonoidalCoherence Y Z] :
    MonoidalCoherence (X ⊗ Y) (X ⊗ Z)

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


theorem Equivalence.isIdempotentComplete {D : Type*} [Category D] (ε : C ≌ D)
    (h : IsIdempotentComplete C) : IsIdempotentComplete D

(h : CategoryTheory.IsIdempotentComplete C)


@[simp]
theorem differentiableAt_pi : DifferentiableAt 𝕜 Φ x ↔ ∀ i, DifferentiableAt 𝕜 (fun x => Φ x i) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{ι : Type u_6}
[Fintype ι]
{F' : ι → Type u_7}
[(i : ι) → NormedAddCommGroup (F' i)]
[(i : ι) → NormedSpace 𝕜 (F' i)]
{Φ : E → (i : ι) → F' i}

DifferentiableAt 𝕜 Φ x ↔ ∀ (i : ι), DifferentiableAt 𝕜 (fun x => Φ x i) x


lemma ConvexOn.smul' (hf : ConvexOn 𝕜 s f) (hg : ConvexOn 𝕜 s g) (hf₀ : ∀ ⦃x⦄, x ∈ s → 0 ≤ f x)
    (hg₀ : ∀ ⦃x⦄, x ∈ s → 0 ≤ g x) (hfg : MonovaryOn f g s) : ConvexOn 𝕜 s (f • g)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[LinearOrderedCommRing 𝕜]
[LinearOrderedCommRing E]
[LinearOrderedAddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
[Module E F]
[IsScalarTower 𝕜 E F]
[SMulCommClass 𝕜 E F]
[OrderedSMul 𝕜 F]
[OrderedSMul E F]
{s : Set 𝕜}
{f : 𝕜 → E}
{g : 𝕜 → F}
(hf : ConvexOn 𝕜 s f)
(hg : ConvexOn 𝕜 s g)
(hf₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → 0 ≤ f x)
(hg₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → 0 ≤ g x)
(hfg : MonovaryOn f g s)


@[simp]
theorem toList_zero : (Multiset.toList 0 : List α) = []


theorem xInTermsOfW_eq [Invertible (p : R)] {n : ℕ} : xInTermsOfW p R n =
    (X n - ∑ i ∈ range n, C ((p : R) ^ i) *
      xInTermsOfW p R i ^ p ^ (n - i)) * C ((⅟p : R) ^ n)

(p : ℕ)
(R : Type u_1)
[CommRing R]
[Invertible ↑p]
{n : ℕ}

xInTermsOfW p R n =
  (MvPolynomial.X n - ∑ i ∈ Finset.range n, MvPolynomial.C (↑p ^ i) * xInTermsOfW p R i ^ p ^ (n - i)) *
    MvPolynomial.C (⅟↑p ^ n)


@[simp] theorem ofNat_succ (n) : ofNat (Nat.succ n) = oadd 0 n.succPNat 0


/-- Given a property of germs of functions and sets in the model space, then one defines
a corresponding property in a charted space, by requiring that it holds at the preferred chart at
this point. (When the property is local and invariant, it will in fact hold using any chart, see
`liftPropWithinAt_indep_chart`). We require continuity in the lifted property, as otherwise one
single chart might fail to capture the behavior of the function.
-/
@[mk_iff liftPropWithinAt_iff']
structure LiftPropWithinAt (P : (H → H') → Set H → H → Prop) (f : M → M') (s : Set M) (x : M) :
    Prop where
  continuousWithinAt : ContinuousWithinAt f s x
  prop : P (chartAt H' (f x) ∘ f ∘ (chartAt H x).symm) ((chartAt H x).symm ⁻¹' s) (chartAt H x x)

{H : Type u_1}
{M : Type u_2}
{H' : Type u_3}
{M' : Type u_4}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
[TopologicalSpace H']
[TopologicalSpace M']
[ChartedSpace H' M']
(P : (H → H') → Set H → H → Prop)
(f : M → M')
(s : Set M)
(x : M)

ChartedSpace.LiftPropWithinAt P f s x ↔
  ContinuousWithinAt f s x ∧
    P (↑(chartAt H' (f x)) ∘ f ∘ ↑(chartAt H x).symm) (↑(chartAt H x).symm ⁻¹' s) (↑(chartAt H x) x)


theorem ContDiffOn.csinh {n} (hf : ContDiffOn ℂ n f s) :
    ContDiffOn ℂ n (fun x => Complex.sinh (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{s : Set E}
{n : ℕ∞}
(hf : ContDiffOn ℂ n f s)


theorem cmp_ne_gt [OrientedCmp cmp] : cmp x y ≠ .gt ↔ cmp y x ≠ .lt

∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y : α} [inst : Batteries.OrientedCmp cmp],
  cmp x y ≠ Ordering.gt ↔ cmp y x ≠ Ordering.lt


lemma coe_sSup : BddAbove s → ↑(sSup s) = ⨆ a ∈ s, (a : ℕ∞)


/-- The term of `TopologicalSpace.IrreducibleCloseds α` corresponding to a singleton. -/
@[simps]
def singleton [T1Space α] (x : α) : IrreducibleCloseds α

{α : Type u_2}
[TopologicalSpace α]
[T1Space α]
(x : α)

↑(TopologicalSpace.IrreducibleCloseds.singleton x) = {x}


theorem Integrable.integral_norm_prod_left ⦃f : α × β → E⦄ (hf : Integrable f (μ.prod ν)) :
    Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ

⦃f : α × β → E⦄

(hf : MeasureTheory.Integrable f (μ.prod ν))

MeasureTheory.Integrable (fun x => ∫ (y : β), ‖f (x, y)‖ ∂ν) μ


private theorem he'' (he : ∀ X' X Y f g, e X' Y (F.map f ≫ g) = f ≫ e X Y g)
    {X' X Y} (f g) : F.map f ≫ (e X Y).symm g = (e X' Y).symm (f ≫ g)

(e : (X : C) → (Y : D) → (F.obj X ⟶ Y) ≃ (X ⟶ G_obj Y))

(he :
  ∀ (X' X : C) (Y : D) (f : X' ⟶ X) (g : F.obj X ⟶ Y),
    (e X' Y) (CategoryTheory.CategoryStruct.comp (F.map f) g) = CategoryTheory.CategoryStruct.comp f ((e X Y) g))

CategoryTheory.CategoryStruct.comp (F.map f) ((e X Y).symm g) = (e X' Y).symm (CategoryTheory.CategoryStruct.comp f g)


@[simp]
theorem sSup_fst (S : Set (Concept α β r)) :
    (sSup S).fst = extentClosure r (⋂ c ∈ S, (c : Concept _ _ _).snd)

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}
(S : Set (Concept α β r))

(sSup S).toProd.1 = extentClosure r (⋂ c ∈ S, c.toProd.2)


theorem principalUnitGroup_le_principalUnitGroup {A B : ValuationSubring K} :
    B.principalUnitGroup ≤ A.principalUnitGroup ↔ A ≤ B

{K : Type u}
[Field K]
{A B : ValuationSubring K}


theorem Algebra.traceForm_toMatrix_powerBasis (h : PowerBasis R S) :
    BilinForm.toMatrix h.basis (traceForm R S) = of fun i j => trace R S (h.gen ^ (i.1 + j.1))

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]
(h : PowerBasis R S)

(BilinForm.toMatrix h.basis) (Algebra.traceForm R S) = Matrix.of fun i j => (Algebra.trace R S) (h.gen ^ (↑i + ↑j))


@[simp]
theorem Periodic.lift_coe [AddGroup α] (h : Periodic f c) (a : α) :
    h.lift (a : α ⧸ AddSubgroup.zmultiples c) = f a

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddGroup α]
(h : Function.Periodic f c)
(a : α)


@[simp]
theorem mkHom_f_1 : (mkHom P Q zero one one_zero_comm succ).f 1 = one

(one_zero_comm : zero ≫ Q.d 0 1 = P.d 0 1 ≫ one)

(P.mkHom Q zero one one_zero_comm succ).f 1 = one


theorem degrees_sub [DecidableEq σ] (p q : MvPolynomial σ R) :
    (p - q).degrees ≤ p.degrees ⊔ q.degrees

{R : Type u}
{σ : Type u_1}
[CommRing R]
[DecidableEq σ]
(p q : MvPolynomial σ R)


theorem _root_.MeasurableEmbedding.integrableOn_iff_comap [MeasurableSpace β] {e : α → β}
    (he : MeasurableEmbedding e) {f : β → E} {μ : Measure β} {s : Set β} (hs : s ⊆ range e) :
    IntegrableOn f s μ ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) (μ.comap e)

{α : Type u_1}
{β : Type u_2}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[MeasurableSpace β]
{e : α → β}
(he : MeasurableEmbedding e)
{f : β → E}
{μ : MeasureTheory.Measure β}
{s : Set β}
(hs : s ⊆ Set.range e)

MeasureTheory.IntegrableOn f s μ ↔ MeasureTheory.IntegrableOn (f ∘ e) (e ⁻¹' s) (MeasureTheory.Measure.comap e μ)


theorem normNoninc_explicitCokernelπ {X Y : SemiNormedGrp.{u}} (f : X ⟶ Y) :
    (explicitCokernelπ f).NormNoninc


/-- The composition `l ∘ f` where `l : F → E` and `f : 𝕜 → F`, has a derivative equal to the
Fréchet derivative of `l` applied to the derivative of `f`. -/
theorem HasFDerivAt.comp_hasDerivAt_of_eq
    (hl : HasFDerivAt l l' y) (hf : HasDerivAt f f' x) (hy : y = f x) :
    HasDerivAt (l ∘ f) (l' f') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → F}
{f' : F}
(x : 𝕜)
{l : F → E}
{l' : F →L[𝕜] E}
{y : F}
(hl : HasFDerivAt l l' y)
(hf : HasDerivAt f f' x)
(hy : y = f x)


protected theorem equiv_symm (h : IsFixedPt e x) : IsFixedPt e.symm x

{α : Type u}
{x : α}
{e : Equiv.Perm α}
(h : Function.IsFixedPt (⇑e) x)


theorem isCompl_sup_left_of_isCompl_sup_right [Lattice α] [BoundedOrder α] [IsModularLattice α]
    (h : Disjoint b c) (hcomp : IsCompl a (b ⊔ c)) :
    IsCompl (a ⊔ b) c

{α : Type u_1}
{a b c : α}
[Lattice α]
[BoundedOrder α]
[IsModularLattice α]
(h : Disjoint b c)
(hcomp : IsCompl a (b ⊔ c))


theorem cauchySeq_const [SemilatticeSup β] [Nonempty β] (x : α) : CauchySeq fun _ : β => x

{α : Type u}
{β : Type v}
[uniformSpace : UniformSpace α]
[SemilatticeSup β]
[Nonempty β]
(x : α)


theorem exact_iff_of_forks {cg : KernelFork S.g} (hg : IsLimit cg) {cf : CokernelCofork S.f}
    (hf : IsColimit cf) : S.Exact ↔ cg.ι ≫ cf.π = 0

{cg : CategoryTheory.Limits.KernelFork S.g}

{cf : CategoryTheory.Limits.CokernelCofork S.f}

(hf : CategoryTheory.Limits.IsColimit cf)

S.Exact ↔ CategoryTheory.Limits.Fork.ι cg ≫ CategoryTheory.Limits.Cofork.π cf = 0


@[simp]
theorem ofLinearEquiv_toLinearEquiv (map_mul) (map_one) :
    ofLinearEquiv e.toLinearEquiv map_mul map_one = e

(map_one : ∀ (x y : A₁), e.toLinearEquiv (x * y) = e.toLinearEquiv x * e.toLinearEquiv y)

AlgEquiv.ofLinearEquiv e.toLinearEquiv map_mul map_one = e


@[simp]
theorem EuclideanSpace.single_apply (i : ι) (a : 𝕜) (j : ι) :
    (EuclideanSpace.single i a) j = ite (j = i) a 0

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
[DecidableEq ι]
(i : ι)
(a : 𝕜)
(j : ι)

EuclideanSpace.single i a j = if j = i then a else 0


theorem clog_of_right_le_zero (b : ℕ) {r : R} (hr : r ≤ 0) : clog b r = 0

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
(b : ℕ)
{r : R}
(hr : r ≤ 0)


/-- The associated bilinear form of an anisotropic quadratic form is nondegenerate. -/
theorem separatingLeft_of_anisotropic [Invertible (2 : R)] (Q : QuadraticMap R M R)
    (hB : Q.Anisotropic) :
    -- Porting note: added implicit argument
    (QuadraticMap.associated' (R := R) Q).SeparatingLeft

{R : Type u_3}
{M : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[Invertible 2]
(Q : QuadraticMap R M R)
(hB : Q.Anisotropic)


@[to_additive]
theorem monotone_map {f : M →ₙ* N} : Monotone (map f)

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{f : AddHom M N}


@[simp]
theorem Perm.extendDomain_refl : Perm.extendDomain (Equiv.refl _) f = Equiv.refl _

{α' : Type u_1}
{β' : Type u_2}
{p : β' → Prop}
[DecidablePred p]
(f : α' ≃ Subtype p)

Equiv.Perm.extendDomain (Equiv.refl α') f = Equiv.refl β'


/-- If `f : X → Y` is continuous and `Y` is equipped with the Borel sigma algebra, then
the push-forward of finite measures `f* : FiniteMeasure X → FiniteMeasure Y` is continuous
(in the topologies of weak convergence of measures). -/
lemma continuous_map {f : Ω → Ω'} (f_cont : Continuous f) :
    Continuous (fun ν ↦ FiniteMeasure.map ν f)

{Ω : Type u_1}
{Ω' : Type u_2}
[MeasurableSpace Ω]
[MeasurableSpace Ω']
[TopologicalSpace Ω]
[OpensMeasurableSpace Ω]
[TopologicalSpace Ω']
[BorelSpace Ω']
{f : Ω → Ω'}
(f_cont : Continuous f)


theorem add_lt_of_lt {a b c : Cardinal} (hc : ℵ₀ ≤ c) (h1 : a < c) (h2 : b < c) : a + b < c

{a b c : Cardinal.{u_1}}
(hc : ℵ₀ ≤ c)
(h1 : a < c)
(h2 : b < c)


theorem quasiSeparated_eq_diagonal_is_quasiCompact :
    @QuasiSeparated = MorphismProperty.diagonal @QuasiCompact

@AlgebraicGeometry.QuasiSeparated = CategoryTheory.MorphismProperty.diagonal @AlgebraicGeometry.QuasiCompact


@[simp, norm_cast]
theorem cast_prod (s : Finset ι) (f : ι → ℚ) : ∏ i ∈ s, f i = ∏ i ∈ s, (f i : α)

{ι : Type u_1}
{α : Type u_2}
[Field α]
[CharZero α]
(s : Finset ι)
(f : ι → ℚ)


@[simp]
theorem cast_toZNum [Zero α] [One α] [Add α] [Neg α] : ∀ n : Num, (n.toZNum : α) = n

{α : Type u_1}
[Zero α]
[One α]
[Add α]
[Neg α]
(n : Num)


theorem Nat.measurable_floor : Measurable (Nat.floor : R → ℕ)

{R : Type u_2}
[LinearOrderedSemiring R]
[FloorSemiring R]
[TopologicalSpace R]
[OrderTopology R]
[MeasurableSpace R]
[OpensMeasurableSpace R]


theorem quot_neg_mul_neg (x y : PGame) : ⟦-x * -y⟧ = (⟦x * y⟧ : Game)


/-- Flipping a square by switching the top-right and the bottom-left objects. -/
@[simps]
def flip (sq : Square C) : Square C

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


@[simp]
lemma StarMemClass.star_coe_eq {S α : Type*} [InvolutiveStar α] [SetLike S α]
    [StarMemClass S α] (s : S) : star (s : Set α) = s

{S : Type u_1}
{α : Type u_2}
[InvolutiveStar α]
[SetLike S α]
[StarMemClass S α]
(s : S)


@[simp]
theorem mem_tail_support_append_iff {t u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
    t ∈ (p.append p').support.tail ↔ t ∈ p.support.tail ∨ t ∈ p'.support.tail

{V : Type u}
{G : SimpleGraph V}
{t u v w : V}
(p : G.Walk u v)
(p' : G.Walk v w)


/-- The `v`-adic valuation on `K` extends the `v`-adic valuation on `R`. -/
theorem valuation_of_algebraMap (r : R) : v.valuation (algebraMap R K r) = v.intValuation r

(v : IsDedekindDomain.HeightOneSpectrum R)

v.valuation ((algebraMap R K) r) = v.intValuation r


theorem rfindOpt_spec {α} {f : ℕ → Option α} {a} (h : a ∈ rfindOpt f) : ∃ n, a ∈ f n

{α : Type u_1}
{f : ℕ → Option α}
{a : α}
(h : a ∈ Nat.rfindOpt f)


@[simp]
lemma weightSpace_zero_normalizer_eq_self :
    (weightSpace M (0 : L → R)).normalizer = weightSpace M 0

(R : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]

(LieModule.weightSpace M 0).normalizer = LieModule.weightSpace M 0


lemma IsMeasurableRatCDF.stieltjesFunction_nonneg (a : α) (r : ℝ) : 0 ≤ hf.stieltjesFunction a r

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)


@[simp]
theorem aleph0_mul_continuum : ℵ₀ * 𝔠 = 𝔠

Cardinal.aleph0 * Cardinal.continuum = Cardinal.continuum


@[to_additive]
theorem contMDiffWithinAt_finprod (lf : LocallyFinite fun i ↦ mulSupport <| f i) {x₀ : M}
    (h : ∀ i, ContMDiffWithinAt I' I n (f i) s x₀) :
    ContMDiffWithinAt I' I n (fun x ↦ ∏ᶠ i, f i x) s x₀

(lf : LocallyFinite fun i => Function.mulSupport (f i))

(h : ∀ (i : ι), ContMDiffWithinAt I' I n (f i) s x₀)

ContMDiffWithinAt I' I n (fun x => ∏ᶠ (i : ι), f i x) s x₀


@[ext]
theorem ext {f g : TopHom α β} (h : ∀ a, f a = g a) : f = g

{α : Type u_2}
{β : Type u_3}
[Top α]
[Top β]
{f g : TopHom α β}
(h : ∀ (a : α), f a = g a)


{R : Type u_1}
[Ring R]
{Γ₀ : Type u_2}
[LinearOrderedCommGroupWithZero Γ₀]
(v : Valuation R Γ₀)
[v.RankOne]


@[simp]
lemma slope_of_Y_eq {x₁ x₂ y₁ y₂ : F} (hx : x₁ = x₂) (hy : y₁ = W.negY x₂ y₂) :
    W.slope x₁ x₂ y₁ y₂ = 0

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x₁ x₂ y₁ y₂ : F}
(hx : x₁ = x₂)
(hy : y₁ = W.negY x₂ y₂)


@[simp]
theorem coe_one : ⇑(1 : E ≃ₗᵢ[R] E) = id

{R : Type u_1}
{E : Type u_5}
[Semiring R]
[SeminormedAddCommGroup E]
[Module R E]


@[simp]
theorem subtypeEquivCodomain_symm_apply (f : { x' // x' ≠ x } → Y) (y : Y) (x' : X) :
    ((subtypeEquivCodomain f).symm y : X → Y) x' = if h : x' ≠ x then f ⟨x', h⟩ else y

{X : Sort u_2}
[DecidableEq X]
{x : X}
{Y : Sort u_1}
(f : { x' // x' ≠ x } → Y)
(y : Y)
(x' : X)

↑((Equiv.subtypeEquivCodomain f).symm y) x' = if h : x' ≠ x then f ⟨x', h⟩ else y


theorem coe_map_of_surjective (h : Function.Surjective f) :
    LieSubmodule.toSubmodule (I.map f) = (LieSubmodule.toSubmodule I).map (f : L →ₗ[R] L')

{R : Type u}
{L : Type v}
{L' : Type w₂}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
{f : L →ₗ⁅R⁆ L'}
{I : LieIdeal R L}
(h : Function.Surjective ⇑f)

↑(LieIdeal.map f I) = Submodule.map ↑f ↑I


theorem hasBasis_nhdsSet (s : Set X) : (𝓝ˢ s).HasBasis (fun U => IsOpen U ∧ s ⊆ U) fun U => U

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


/-- A family of ring homomorphisms `f a : γ →+* β a` defines a ring homomorphism
`Pi.ringHom f : γ →+* Π a, β a` given by `Pi.ringHom f x b = f b x`. -/
@[simps]
protected def ringHom {γ : Type w} [∀ i, NonAssocSemiring (f i)] [NonAssocSemiring γ]
    (g : ∀ i, γ →+* f i) : γ →+* ∀ i, f i

{I : Type u}
{f : I → Type v}
{γ : Type w}
[(i : I) → NonAssocSemiring (f i)]
[NonAssocSemiring γ]
(g : (i : I) → γ →+* f i)
(x : γ)
(b : I)


theorem add_lt_top {x y : EReal} (hx : x ≠ ⊤) (hy : y ≠ ⊤) : x + y < ⊤


lemma IsEquipartition.sum_nonUniforms_lt' (hA : A.Nonempty) (hε : 0 < ε) (hP : P.IsEquipartition)
    (hG : P.IsUniform G ε) :
    ∑ i ∈ P.nonUniforms G ε, (i.1.card * i.2.card : 𝕜) < ε * (A.card + P.parts.card) ^ 2

{α : Type u_1}
{𝕜 : Type u_2}
[LinearOrderedField 𝕜]
[DecidableEq α]
{A : Finset α}
{P : Finpartition A}
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε : 𝕜}
(hA : A.Nonempty)
(hε : 0 < ε)
(hP : P.IsEquipartition)
(hG : P.IsUniform G ε)

∑ i ∈ P.nonUniforms G ε, ↑i.1.card * ↑i.2.card < ε * (↑A.card + ↑P.parts.card) ^ 2


@[simp]
theorem not_mem_bot {x : α → M} : ¬x ∈ (⊥ : L.DefinableSet A α)

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


lemma angle_exp_one (x : ℝ) : angle (exp (x * I)) 1 = |toIocMod Real.two_pi_pos (-π) x|

InnerProductGeometry.angle (Complex.exp (↑x * Complex.I)) 1 = |toIocMod Real.two_pi_pos (-π) x|


/-- Equivalences of `LiftStruct` for a square and the corresponding square
in the opposite category. -/
@[simps]
def opEquiv (sq : CommSq f i p g) : LiftStruct sq ≃ LiftStruct sq.op

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{A B X Y : C}
{f : A ⟶ X}
{i : A ⟶ B}
{p : X ⟶ Y}
{g : B ⟶ Y}
(sq : CategoryTheory.CommSq f i p g)
(l : sq.LiftStruct)

(CategoryTheory.CommSq.LiftStruct.opEquiv sq) l = l.op


/-- The functor part of the equivalence `LightProfinite ≌ LightDiagram` -/
@[simps]
noncomputable def lightProfiniteToLightDiagram : LightProfinite.{u} ⥤ LightDiagram.{u}

lightProfiniteToLightDiagram.obj X = X.toLightDiagram


/--
Given a functor `F : C ⥤ D`, we have an (essentially surjective) functor from `C` to the essential
image of `F`.
-/
@[simps!]
def toEssImage (F : C ⥤ D) : C ⥤ F.EssImageSubcategory

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

∀ {X Y : C} (f : X ⟶ Y), F.toEssImage.map f = F.map f


/-- The identity morphism of a snake input. -/
@[simps]
def id : Hom S S

(S : CategoryTheory.ShortComplex.SnakeInput C)

(CategoryTheory.ShortComplex.SnakeInput.Hom.id S).f₀ = CategoryTheory.CategoryStruct.id S.L₀


@[norm_cast]
protected lemma natCast_sub {n m : ℕ} : n ≤ m → (↑(m - n) : ℤ) = ↑m - ↑n


/-- Composition of partial homeomorphisms respects equivalence. -/
theorem EqOnSource.trans' {e e' : PartialHomeomorph X Y} {f f' : PartialHomeomorph Y Z}
    (he : e ≈ e') (hf : f ≈ f') : e.trans f ≈ e'.trans f'

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{e e' : PartialHomeomorph X Y}
{f f' : PartialHomeomorph Y Z}
(he : e ≈ e')
(hf : f ≈ f')


theorem Adapted.isStoppingTime_leastGE (r : ℝ) (n : ℕ) (hf : Adapted ℱ f) :
    IsStoppingTime ℱ (leastGE f r n)

{Ω : Type u_1}
{m0 : MeasurableSpace Ω}
{ℱ : MeasureTheory.Filtration ℕ m0}
{f : ℕ → Ω → ℝ}
(r : ℝ)
(n : ℕ)
(hf : MeasureTheory.Adapted ℱ f)

MeasureTheory.IsStoppingTime ℱ (MeasureTheory.leastGE f r n)


theorem dist_lt_add_of_nonempty_ball_inter_ball (h : (ball x ε₁ ∩ ball y ε₂).Nonempty) :
    dist x y < ε₁ + ε₂

(h : (Metric.ball x ε₁ ∩ Metric.ball y ε₂).Nonempty)


lemma measure_symmDiff_eq (hs : MeasurableSet s) (ht : MeasurableSet t) :
    μ (s ∆ t) = μ (s \ t) + μ (t \ s)

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(hs : MeasurableSet s)
(ht : MeasurableSet t)

μ (symmDiff s t) = μ (s \ t) + μ (t \ s)


/-- The diagram described by the universal property for quotients of monoids, when the congruence
    relation is the kernel of the homomorphism, commutes. -/
@[to_additive (attr := simp) "The diagram described by the universal property for quotients
of `AddMonoid`s, when the additive congruence relation is the kernel of the homomorphism,
commutes."]
theorem kerLift_mk (x : M) : kerLift f x = f x

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
{f : M →* P}
(x : M)


/-- (Implementation). An auxiliary cocone which is useful in order to construct colimits
in the comma category. -/
@[simps!]
def colimitAuxiliaryCocone (c₂ : Cocone (F ⋙ snd L R)) : Cocone ((F ⋙ fst L R) ⋙ L)

(F : CategoryTheory.Functor J (CategoryTheory.Comma L R))

(c₂ : CategoryTheory.Limits.Cocone (F.comp (CategoryTheory.Comma.snd L R)))

(CategoryTheory.Comma.colimitAuxiliaryCocone F c₂).ι.app X =
  CategoryTheory.CategoryStruct.comp (F.obj X).hom (R.map (c₂.ι.app X))


@[simp] theorem SatisfiesM_Id_eq : SatisfiesM (m := Id) p x ↔ p x

∀ {type : Type u_1} {p : type → Prop} {x : Id type}, SatisfiesM p x ↔ p x


/-- This left homology map data expresses compatibilities of the left homology data
constructed by `LeftHomologyData.ofEpiOfIsIsoOfMono` -/
@[simps]
def ofEpiOfIsIsoOfMono (φ : S₁ ⟶ S₂) (h : LeftHomologyData S₁)
    [Epi φ.τ₁] [IsIso φ.τ₂] [Mono φ.τ₃] :
    LeftHomologyMapData φ h (LeftHomologyData.ofEpiOfIsIsoOfMono φ h)

(CategoryTheory.ShortComplex.LeftHomologyMapData.ofEpiOfIsIsoOfMono φ h).φH = CategoryTheory.CategoryStruct.id h.H


theorem map_comp (f : β → γ) (g : α → β) (hf : Continuous f) (hg : Continuous g) (K : Compacts α) :
    K.map (f ∘ g) (hf.comp hg) = (K.map g hg).map f hf

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
(f : β → γ)
(g : α → β)
(hf : Continuous f)
(hg : Continuous g)
(K : TopologicalSpace.Compacts α)

TopologicalSpace.Compacts.map (f ∘ g) ⋯ K = TopologicalSpace.Compacts.map f hf (TopologicalSpace.Compacts.map g hg K)


/-- Supremum of `s i`, `i : ι`, is equal to the supremum over `t : Finset ι` of suprema
`⨆ i ∈ t, s i`. This version works for `ι : Sort*`. See `iSup_eq_iSup_finset` for a version
that assumes `ι : Type*` but has no `PLift`s. -/
theorem iSup_eq_iSup_finset' (s : ι' → α) :
    ⨆ i, s i = ⨆ t : Finset (PLift ι'), ⨆ i ∈ t, s (PLift.down i)

{α : Type u_2}
{ι' : Sort u_7}
[CompleteLattice α]
(s : ι' → α)


/-- A *trail* is a walk with no repeating edges. -/
@[mk_iff isTrail_def]
structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
  edges_nodup : p.edges.Nodup

{V : Type u}
{G : SimpleGraph V}
{u v : V}
{p : G.Walk u v}
(self : p.IsTrail)


@[to_additive]
protected theorem inv_le_inv (hf : f ≤ g) : f⁻¹ ≤ g⁻¹

{α : Type u_2}
[Neg α]
{f g : Filter α}
(hf : f ≤ g)


/-- Suppose we are given `∑ i, lᵢ * sᵢ = 1` ∈ `S`, and `S'` a subalgebra of `S` that contains
`lᵢ` and `sᵢ`. To check that an `x : S` falls in `S'`, we only need to show that
`sᵢ ^ n • x ∈ S'` for some `n` for each `sᵢ`. -/
theorem mem_of_finset_sum_eq_one_of_pow_smul_mem
    {ι : Type*} (ι' : Finset ι) (s : ι → S) (l : ι → S)
    (e : ∑ i ∈ ι', l i * s i = 1) (hs : ∀ i, s i ∈ S') (hl : ∀ i, l i ∈ S') (x : S)
    (H : ∀ i, ∃ n : ℕ, (s i ^ n : S) • x ∈ S') : x ∈ S'

{R : Type u_1}
{S : Type u_2}
[CommSemiring R]
[CommRing S]
[Algebra R S]
(S' : Subalgebra R S)
{ι : Type u_3}
(ι' : Finset ι)
(s l : ι → S)
(e : ∑ i ∈ ι', l i * s i = 1)
(hs : ∀ (i : ι), s i ∈ S')
(hl : ∀ (i : ι), l i ∈ S')
(x : S)
(H : ∀ (i : ι), ∃ n, s i ^ n • x ∈ S')


theorem functor_comp_id {F} [AF : Functor F] [LawfulFunctor F] :
    @Comp.functor F Id _ _ = AF

{F : Type u_1 → Type u_2}
[AF : Functor F]
[LawfulFunctor F]


@[simp] theorem lex_inr_inr : Lex r s (inr b₁) (inr b₂) ↔ s b₁ b₂

∀ {α : Type u_1} {r : α → α → Prop} {β : Type u_2} {s : β → β → Prop} {b₁ b₂ : β},
  Sum.Lex r s (Sum.inr b₁) (Sum.inr b₂) ↔ s b₁ b₂


lemma comp_id (C : VariableChange R) : comp C id = C

{R : Type u}
[CommRing R]
(C : WeierstrassCurve.VariableChange R)

C.comp WeierstrassCurve.VariableChange.id = C


theorem dvd_of_mod_eq_zero {a b : Int} (H : mod b a = 0) : a ∣ b


theorem monovary_self (f : ι → α) : Monovary f f

{ι : Type u_1}
{α : Type u_3}
[Preorder α]
(f : ι → α)


/-- Subsemiring closure of a set is monotone in its argument: if `s ⊆ t`,
then `closure s ≤ closure t`. -/
theorem closure_mono ⦃s t : Set R⦄ (h : s ⊆ t) : closure s ≤ closure t

{R : Type u}
[NonAssocSemiring R]
⦃s t : Set R⦄
(h : s ⊆ t)

Subsemiring.closure s ≤ Subsemiring.closure t


/-- An action is pretransitive if and only if the quotient by `MulAction.orbitRel` is a
subsingleton. -/
@[to_additive "An additive action is pretransitive if and only if the quotient by
`AddAction.orbitRel` is a subsingleton."]
theorem pretransitive_iff_subsingleton_quotient :
    IsPretransitive G α ↔ Subsingleton (orbitRel.Quotient G α)

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

MulAction.IsPretransitive G α ↔ Subsingleton (MulAction.orbitRel.Quotient G α)


@[to_additive]
theorem inv_mul_le_one_iff : a⁻¹ * b ≤ 1 ↔ b ≤ a

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


theorem codisjoint_right_comm : Codisjoint (a ⊔ b) c ↔ Codisjoint (a ⊔ c) b

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
{a b c : α}


/-- The clifford algebras over `CliffordAlgebraComplex.Q` is isomorphic as an `ℝ`-algebra to `ℂ`. -/
@[simps!]
protected def equiv : CliffordAlgebra Q ≃ₐ[ℝ] ℂ

(a : CliffordAlgebra CliffordAlgebraComplex.Q)

CliffordAlgebraComplex.equiv a = CliffordAlgebraComplex.toComplex a


/-- The canonical isomorphism `(F.postcomp G).postcomp G' ≅ F.postcomp (G ⋙ G')`. -/
@[simps!]
def postcompPostcompIso (G : D ⥤ E) (G' : E ⥤ E') [G.CommShift A] [G'.CommShift A] :
    (F.postcomp G).postcomp G' ≅ F.postcomp (G ⋙ G')

(F : CategoryTheory.SingleFunctors C D A)

∀ (x : C), ((F.postcompPostcompIso G G').hom.hom a).app x = 𝟙 (G'.obj (G.obj ((F.functor a).obj x)))


/-- In this situation, `F` is also initial, see
    `Functor.initial_of_exists_of_isCofiltered_of_fullyFaithful`. -/
theorem IsCofiltered.of_exists_of_isCofiltered_of_fullyFaithful [IsCofiltered D] [F.Full]
    [F.Faithful] (h : ∀ d, ∃ c, Nonempty (F.obj c ⟶ d)) : IsCofiltered C

(h : ∀ (d : D), ∃ c, Nonempty (F.obj c ⟶ d))


theorem natDegree_smul_le (a : R) (p : R[X]) : natDegree (a • p) ≤ natDegree p

{R : Type u}
[Semiring R]
(a : R)
(p : R[X])


theorem diophPFun_comp1 {S : Set (Option α → ℕ)} (d : Dioph S) {f} (df : DiophPFun f) :
    Dioph {v : α → ℕ | ∃ h : f.Dom v, f.fn v h ::ₒ v ∈ S}

{α : Type u}
{S : Set (Option α → ℕ)}
(d : Dioph S)
{f : (α → ℕ) →. ℕ}
(df : Dioph.DiophPFun f)

Dioph {v | ∃ (h : f.Dom v), f.fn v h ::ₒ v ∈ S}


lemma cons_add_cons (x : α) (v : Fin n → α) (y : α) (w : Fin n → α) :
    vecCons x v + vecCons y w = vecCons (x + y) (v + w)

{α : Type u_1}
{n : ℕ}
[Add α]
(x : α)
(v : Fin n → α)
(y : α)
(w : Fin n → α)

Matrix.vecCons x v + Matrix.vecCons y w = Matrix.vecCons (x + y) (v + w)


@[to_additive (attr := simp)]
theorem quotientSubgroupOfEmbeddingOfLE_apply_mk (H : Subgroup α) (h : s ≤ t) (g : s) :
    quotientSubgroupOfEmbeddingOfLE H h (QuotientGroup.mk g) =
      (QuotientGroup.mk (inclusion h g) : (fun _ => { x // x ∈ t } ⧸ subgroupOf H t) ↑g)

{α : Type u_1}
[AddGroup α]
{s t : AddSubgroup α}
(H : AddSubgroup α)
(h : s ≤ t)
(g : ↥s)

(AddSubgroup.quotientAddSubgroupOfEmbeddingOfLE H h) ↑g = ↑((AddSubgroup.inclusion h) g)


@[simp]
protected theorem coe_coe {F : Type*} [FunLike F A B] [NonUnitalAlgHomClass F R A B]
    [NonUnitalStarAlgHomClass F R A B] (f : F) :
    ⇑(f : A →⋆ₙₐ[R] B) = f

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
[Star B]
{F : Type u_6}
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(f : F)


@[simp]
theorem neg_apply : (-x) i = -x i

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


@[simp]
theorem coe_addHom_mk {σ : R →+* S} (f : AddHom M M₃) (h) :
    ((LinearMap.mk f h : M →ₛₗ[σ] M₃) : AddHom M M₃) = f

(h : ∀ (m : R) (x : M), f.toFun (m • x) = σ m • f.toFun x)


@[to_additive pi_nnnorm_const_le]
lemma pi_nnnorm_const_le' (a : E) : ‖fun _ : ι => a‖₊ ≤ ‖a‖₊

{ι : Type u_1}
{E : Type u_2}
[Fintype ι]
[SeminormedAddGroup E]
(a : E)


theorem disjoint_compl_right_iff_subset : Disjoint s tᶜ ↔ s ⊆ t


lemma X_eq_iff {P Q : Fin 3 → F} (hPz : P z ≠ 0) (hQz : Q z ≠ 0) :
    P x * Q z ^ 2 = Q x * P z ^ 2 ↔ P x / P z ^ 2 = Q x / Q z ^ 2

{F : Type v}
[Field F]
{P Q : Fin 3 → F}
(hPz : P z ≠ 0)
(hQz : Q z ≠ 0)


theorem typein_le_typein' (o : Ordinal) {x x' : o.out.α} :
    @typein _ (· < ·) (isWellOrder_out_lt _) x ≤ @typein _ (· < ·) (isWellOrder_out_lt _) x'
      ↔ x ≤ x'

(o : Ordinal.{u_3})
{x x' : (Quotient.out o).α}

Ordinal.typein (fun x x_1 => x < x_1) x ≤ Ordinal.typein (fun x x_1 => x < x_1) x' ↔ x ≤ x'


theorem WCovBy.covBy_of_ne (h : a ⩿ b) (h2 : a ≠ b) : a ⋖ b

{α : Type u_1}
[PartialOrder α]
{a b : α}
(h : a ⩿ b)
(h2 : a ≠ b)


theorem le_of_count_ne_zero {m p : Associates α} (h0 : m ≠ 0) (hp : Irreducible p) :
    count p m.factors ≠ 0 → p ≤ m

[(p : Associates α) → Decidable (Irreducible p)]


lemma algebraMap_def (e : α ≃ β) [Semiring β] [Algebra R β] (r : R) :
    let semiring := Equiv.semiring e
    let algebra := Equiv.algebra R e
    (algebraMap R α) r = e.symm ((algebraMap R β) r)

{α : Type u}
{β : Type v}
(R : Type u_1)
[CommSemiring R]
(e : α ≃ β)
[Semiring β]
[Algebra R β]
(r : R)

let semiring := e.semiring;
let algebra := Equiv.algebra R e;
(algebraMap R α) r = e.symm ((algebraMap R β) r)


@[simp]
theorem monotoneOn_singleton : MonotoneOn f {a}

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


@[to_additive]
theorem mulEquivOfLocalizations_left_inv_apply {k : N ≃* P} (x) :
    f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k) x = k x

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{k : N ≃+ P}
(x : N)

(f.addEquivOfLocalizations (f.ofAddEquivOfLocalizations k)) x = k x


theorem natDegree_monomial_le (a : R) {m : ℕ} : (monomial m a).natDegree ≤ m

{R : Type u}
[Semiring R]
(a : R)
{m : ℕ}

((Polynomial.monomial m) a).natDegree ≤ m


/-- A finite dimensional module has dimension at most 1 iff
there is some `v : V` so every vector is a multiple of `v`.
-/
theorem finrank_le_one_iff [Module.Free K V] [Module.Finite K V] :
    finrank K V ≤ 1 ↔ ∃ v : V, ∀ w : V, ∃ c : K, c • v = w

{K : Type u}
{V : Type v}
[Ring K]
[StrongRankCondition K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]
[Module.Finite K V]

FiniteDimensional.finrank K V ≤ 1 ↔ ∃ v, ∀ (w : V), ∃ c, c • v = w


theorem foldrM_eq_foldr (f : α → β → m β) (b l) :
    foldrM f b l = foldr (fun a mb => mb >>= f a) (pure b) l

{α : Type u}
{β : Type v}
{m : Type v → Type w}
[Monad m]
[LawfulMonad m]
(f : α → β → m β)
(b : β)
(l : List α)

List.foldrM f b l = List.foldr (fun a mb => mb >>= f a) (pure b) l


@[simp, norm_cast]
lemma cast_sum [AddCommGroupWithOne β] (s : Finset α) (f : α → ℤ) :
    ↑(∑ x ∈ s, f x : ℤ) = ∑ x ∈ s, (f x : β)

{α : Type u_2}
{β : Type u_3}
[AddCommGroupWithOne β]
(s : Finset α)
(f : α → ℤ)


theorem recDiagAux_succ_succ {motive : Nat → Nat → Sort _}
    (zero_left : ∀ n, motive 0 n) (zero_right : ∀ m, motive m 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (m n) :
    Nat.recDiagAux zero_left zero_right succ_succ (m+1) (n+1)
      = succ_succ m n (Nat.recDiagAux zero_left zero_right succ_succ m n)

(succ_succ : (m n : Nat) → motive m n → motive (m + 1) (n + 1))

Nat.recDiagAux zero_left zero_right succ_succ (m + 1) (n + 1) =
  succ_succ m n (Nat.recDiagAux zero_left zero_right succ_succ m n)


theorem one_lt_card_iff_nontrivial : 1 < s.card ↔ s.Nontrivial


theorem Indep.indepSets {s1 s2 : Set (Set Ω)}
    (h_indep : Indep (generateFrom s1) (generateFrom s2) μ) :
    IndepSets s1 s2 μ

(h_indep : ProbabilityTheory.Indep (MeasurableSpace.generateFrom s1) (MeasurableSpace.generateFrom s2) μ)


theorem ext_iff {P Q : Sylow p G} : P = Q ↔ (P : Subgroup G) = Q

{p : ℕ}
{G : Type u_1}
[Group G]
{P Q : Sylow p G}


lemma neg_def (P : W.Point) : P.neg = -P

{R : Type u}
[CommRing R]
{W : WeierstrassCurve.Affine R}
(P : W.Point)


theorem strictMono_cast : StrictMono (Nat.cast : ℕ → α)

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


lemma image_basicOpen_eq_basicOpen (a : A) (i : ℕ) :
    toSpec 𝒜 f '' (Subtype.val ⁻¹' (pbo (decompose 𝒜 a i) : Set (ProjectiveSpectrum 𝒜))) =
    (PrimeSpectrum.basicOpen (R := A⁰_ f) <|
      HomogeneousLocalization.mk
        ⟨m * i, ⟨decompose 𝒜 a i ^ m, SetLike.pow_mem_graded _ (Submodule.coe_mem _)⟩,
          ⟨f^i, by rw [mul_comm]; exact SetLike.pow_mem_graded _ f_deg⟩, ⟨i, rfl⟩⟩).1

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

⇑(AlgebraicGeometry.ProjIsoSpecTopComponent.toSpec 𝒜 f) ''
    (Subtype.val ⁻¹' ↑(ProjectiveSpectrum.basicOpen 𝒜 ↑(((DirectSum.decompose 𝒜) a) i))) =
  (PrimeSpectrum.basicOpen
      (HomogeneousLocalization.mk
        { deg := m * i, num := ⟨↑(((DirectSum.decompose 𝒜) a) i) ^ m, ⋯⟩, den := ⟨f ^ i, ⋯⟩, den_mem := ⋯ })).carrier


/-- Construct a homeomorphism from an isomorphism. -/
@[simps]
def homeoOfIso {X Y : Sequential.{u}} (f : X ≅ Y) : X ≃ₜ Y

(a : (CategoryTheory.forget Sequential).obj Y)

(Sequential.homeoOfIso f).symm a = f.inv a


theorem max_div_div_right_of_nonpos (hc : c ≤ 0) (a b : α) : max (a / c) (b / c) = min a b / c

{α : Type u_2}
[LinearOrderedField α]
{c : α}
(hc : c ≤ 0)
(a b : α)


@[simp]
theorem mem_closedBall : y ∈ closedBall p x r ↔ p (y - x) ≤ r

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


theorem IsChain.mono : s ⊆ t → IsChain r t → IsChain r s

{α : Type u_1}
{r : α → α → Prop}
{s t : Set α}


@[to_additive]
theorem index_dvd_card : H.index ∣ Nat.card G

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


protected theorem mem_nhds_iff {l : Filter α} {S : Set (Filter α)} :
    S ∈ 𝓝 l ↔ ∃ t ∈ l, Iic (𝓟 t) ⊆ S

{α : Type u_2}
{l : Filter α}
{S : Set (Filter α)}


@[local simp] theorem ofNat_mul_negSucc' (m n : Nat) : ↑m * -[n+1] = negOfNat (m * succ n)

↑m * Int.negSucc n = Int.negOfNat (m * n.succ)


@[deprecated getElem_reverse (since := "2024-06-12")]
theorem get_reverse (l : List α) (i : Nat) (h1 h2) :
    get (reverse l) ⟨length l - 1 - i, h1⟩ = get l ⟨i, h2⟩

(h1 : l.length - 1 - i < l.reverse.length)

l.reverse.get ⟨l.length - 1 - i, h1⟩ = l.get ⟨i, h2⟩


lemma isSheaf_coherent (P : Cᵒᵖ ⥤ Type w) :
    Presieve.IsSheaf (coherentTopology C) P ↔
    (∀ (B : C) (α : Type) [Finite α] (X : α → C) (π : (a : α) → (X a ⟶ B)),
      EffectiveEpiFamily X π → (Presieve.ofArrows X π).IsSheafFor P)

(P : CategoryTheory.Functor Cᵒᵖ (Type w))

CategoryTheory.Presieve.IsSheaf (CategoryTheory.coherentTopology C) P ↔
  ∀ (B : C) (α : Type) [inst : Finite α] (X : α → C) (π : (a : α) → X a ⟶ B),
    CategoryTheory.EffectiveEpiFamily X π → CategoryTheory.Presieve.IsSheafFor P (CategoryTheory.Presieve.ofArrows X π)


theorem pairwise_univ : (univ : Set α).Pairwise r ↔ Pairwise r


lemma lift_desc_f {K L : CochainComplex C ℤ} (α : Cocycle K F 1) (β : Cochain K G 0)
    (eq : δ 0 1 β + α.1.comp (Cochain.ofHom φ) (add_zero 1) = 0)
    (α' : Cochain F L (-1)) (β' : G ⟶ L)
    (eq' : δ (-1) 0 α' = Cochain.ofHom (φ ≫ β')) (n n' : ℤ) (hnn' : n + 1 = n') :
    (lift φ α β eq).f n ≫ (desc φ α' β' eq').f n =
    α.1.v n n' hnn' ≫ α'.v n' n (by omega) + β.v n n (add_zero n) ≫ β'.f n

(α : CochainComplex.HomComplex.Cocycle K F 1)

(β : CochainComplex.HomComplex.Cochain K G 0)

(eq : CochainComplex.HomComplex.δ 0 1 β + (↑α).comp (CochainComplex.HomComplex.Cochain.ofHom φ) ⋯ = 0)

(α' : CochainComplex.HomComplex.Cochain F L (-1))

(eq' : CochainComplex.HomComplex.δ (-1) 0 α' = CochainComplex.HomComplex.Cochain.ofHom (φ ≫ β'))

(CochainComplex.mappingCone.lift φ α β eq).f n ≫ (CochainComplex.mappingCone.desc φ α' β' eq').f n =
  (↑α).v n n' hnn' ≫ α'.v n' n ⋯ + β.v n n ⋯ ≫ β'.f n


theorem gauge_eq_one_iff_mem_frontier (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) :
    gauge s x = 1 ↔ x ∈ frontier s

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
{x : E}
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul ℝ E]
(hc : Convex ℝ s)
(hs₀ : s ∈ 𝓝 0)


/-- The obvious equivalence of categories `(ShortComplex C)ᵒᵖ ≌ ShortComplex Cᵒᵖ`. -/
@[simps]
def opEquiv : (ShortComplex C)ᵒᵖ ≌ ShortComplex Cᵒᵖ

(CategoryTheory.ShortComplex.opEquiv C).unitIso =
  CategoryTheory.Iso.refl (CategoryTheory.Functor.id (CategoryTheory.ShortComplex C)ᵒᵖ)


theorem linearIndependent_empty_type [IsEmpty ι] : LinearIndependent R v

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


/-- If `M ≤ N` are submonoids of `R` such that `∀ x : N, ∃ m : R, m * x ∈ M`, then the
localization at `N` is equal to the localizaton of `M`. -/
theorem isLocalization_of_is_exists_mul_mem (M N : Submonoid R) [IsLocalization M S] (h : M ≤ N)
    (h' : ∀ x : N, ∃ m : R, m * x ∈ M) : IsLocalization N S

{R : Type u_1}
[CommSemiring R]
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
(M N : Submonoid R)
[IsLocalization M S]
(h : M ≤ N)
(h' : ∀ (x : ↥N), ∃ m, m * ↑x ∈ M)


theorem comp_bfamilyOfFamily {ι : Type u} (f : ι → α) (g : α → β) :
    (fun i hi => g (bfamilyOfFamily f i hi)) = bfamilyOfFamily (g ∘ f)

{α : Type u_1}
{β : Type u_2}
{ι : Type u}
(f : ι → α)
(g : α → β)

(fun i hi => g (Ordinal.bfamilyOfFamily f i hi)) = Ordinal.bfamilyOfFamily (g ∘ f)


@[simp] theorem length_cons : length (cons a b t) = length t + 1

∀ {α : Type u_1} {a : α} {β : Type u_2} {b : β} {t : Batteries.AssocList α β},
  (Batteries.AssocList.cons a b t).length = t.length + 1


@[to_additive]
theorem tprod_sigma' {γ : β → Type*} {f : (Σb : β, γ b) → α}
    (h₁ : ∀ b, Multipliable fun c ↦ f ⟨b, c⟩) (h₂ : Multipliable f) :
    ∏' p, f p = ∏' (b) (c), f ⟨b, c⟩

(h₁ : ∀ (b : β), Summable fun c => f ⟨b, c⟩)

∑' (p : (b : β) × γ b), f p = ∑' (b : β) (c : γ b), f ⟨b, c⟩


@[ext]
theorem rightDistributor_ext_left {J : Type} [Fintype J]
    {f : J → C} {X Y : C} {g h : (⨁ f) ⊗ X ⟶ Y}
    (w : ∀ j, (biproduct.ι f j ▷ X) ≫ g = (biproduct.ι f j ▷ X) ≫ h) : g = h

{g h : CategoryTheory.MonoidalCategory.tensorObj (⨁ f) X ⟶ Y}

(w :
  ∀ (j : J),
    CategoryTheory.CategoryStruct.comp
        (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.Limits.biproduct.ι f j) X) g =
      CategoryTheory.CategoryStruct.comp
        (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.Limits.biproduct.ι f j) X) h)


theorem iIndepSets.iIndepSet_of_mem {_mΩ : MeasurableSpace Ω} {κ : Kernel α Ω}
    [IsMarkovKernel κ] {μ : Measure α} {π : ι → Set (Set Ω)} {f : ι → Set Ω}
    (hfπ : ∀ i, f i ∈ π i) (hf : ∀ i, MeasurableSet (f i))
    (hπ : iIndepSets π κ μ) :
    iIndepSet f κ μ

(hπ : ProbabilityTheory.Kernel.iIndepSets π κ μ)

ProbabilityTheory.Kernel.iIndepSet f κ μ


theorem isMinOn_const {b : β} : IsMinOn (fun _ => b) s a

{α : Type u}
{β : Type v}
[Preorder β]
{s : Set α}
{a : α}
{b : β}


protected theorem nhdsWithin_iUnion (hf : LocallyFinite f) (a : X) :
    𝓝[⋃ i, f i] a = ⨆ i, 𝓝[f i] a

{ι : Type u_1}
{X : Type u_4}
[TopologicalSpace X]
{f : ι → Set X}
(hf : LocallyFinite f)
(a : X)


@[simp]
lemma rightHomologyMap_add :
    rightHomologyMap (φ + φ') = rightHomologyMap φ + rightHomologyMap φ'

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(φ φ' : S₁ ⟶ S₂)
[S₁.HasRightHomology]
[S₂.HasRightHomology]

CategoryTheory.ShortComplex.rightHomologyMap (φ + φ') =
  CategoryTheory.ShortComplex.rightHomologyMap φ + CategoryTheory.ShortComplex.rightHomologyMap φ'


@[reassoc (attr := simp)]
lemma homologyπ_naturality :
    K.homologyπ i ≫ homologyMap φ i = cyclesMap φ i ≫ L.homologyπ i

K.homologyπ i ≫ HomologicalComplex.homologyMap φ i = HomologicalComplex.cyclesMap φ i ≫ L.homologyπ i


/-- Functor composition induces a functor on truncated simplicial objects. -/
@[simps!]
def whiskering {n} (D : Type*) [Category D] : (C ⥤ D) ⥤ Truncated C n ⥤ Truncated D n

(F : (SimplexCategory.Truncated n)ᵒᵖ ⥤ C)

∀ {X Y : (SimplexCategory.Truncated n)ᵒᵖ} (f : X ⟶ Y),
  (((CategoryTheory.SimplicialObject.Truncated.whiskering C D).obj H).obj F).map f = H.map (F.map f)


@[to_additive (attr := simp, norm_cast)]
lemma unop_nnratCast [NNRatCast α] (q : ℚ≥0) : unop (q : αᵐᵒᵖ) = q


theorem disjoint_nhds_nhds_iff_not_specializes : Disjoint (𝓝 x) (𝓝 y) ↔ ¬x ⤳ y

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


@[simp]
lemma presheafHom_map_app_op_mk_id {X Y : C} (g : Y ⟶ X)
    (α : (presheafHom F G).obj (op X)) :
    ((presheafHom F G).map g.op α).app (op (Over.mk (𝟙 Y))) =
      α.app (op (Over.mk g))

(α : (CategoryTheory.presheafHom F G).obj (Opposite.op X))

((CategoryTheory.presheafHom F G).map g.op α).app
    (Opposite.op (CategoryTheory.Over.mk (CategoryTheory.CategoryStruct.id Y))) =
  α.app (Opposite.op (CategoryTheory.Over.mk g))


lemma antitone_rpow_of_base_le_one {b : ℝ} (hb₀ : 0 < b) (hb₁ : b ≤ 1) :
    Antitone (b ^ · : ℝ → ℝ)


/-- Any two modules that are subsingletons are isomorphic. -/
@[simps]
def ofSubsingleton : M ≃ₗ[R] M₂

{R : Type u_1}
(M : Type u_8)
(M₂ : Type u_10)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
[Subsingleton M]
[Subsingleton M₂]

∀ (x : M₂), (LinearEquiv.ofSubsingleton M M₂).symm x = 0


theorem computable_of_manyOneReducible {p : α → Prop} {q : β → Prop} (h₁ : p ≤₀ q)
    (h₂ : ComputablePred q) : ComputablePred p

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{p : α → Prop}
{q : β → Prop}
(h₁ : p ≤₀ q)
(h₂ : ComputablePred q)


theorem Additive.isAddHom [Mul α] [Mul β] {f : α → β} (hf : IsMulHom f) :
    @IsAddHom (Additive α) (Additive β) _ _ f

{α : Type u}
{β : Type v}
[Mul α]
[Mul β]
{f : α → β}
(hf : IsMulHom f)


theorem le_sub_of_le_upcrossingsBefore (hN : 0 < N) (hab : a < b)
    (hn : n < upcrossingsBefore a b f N ω) :
    b - a ≤ stoppedValue f (upperCrossingTime a b f N (n + 1)) ω -
      stoppedValue f (lowerCrossingTime a b f N n) ω

{f : ℕ → Ω → ℝ}

(hn : n < MeasureTheory.upcrossingsBefore a b f N ω)

b - a ≤
  MeasureTheory.stoppedValue f (MeasureTheory.upperCrossingTime a b f N (n + 1)) ω -
    MeasureTheory.stoppedValue f (MeasureTheory.lowerCrossingTime a b f N n) ω


@[reassoc (attr := simp)]
lemma ι_mapBifunctorAssociator_inv (i₁ : I₁) (i₂ : I₂) (i₃ : I₃) (j : J) (h : r (i₁, i₂, i₃) = j) :
    ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h ≫
      (mapBifunctorAssociator associator ρ₁₂ ρ₂₃ X₁ X₂ X₃).inv j =
    ((associator.inv.app (X₁ i₁)).app (X₂ i₂)).app (X₃ i₃) ≫
      ιMapBifunctor₁₂BifunctorMapObj F₁₂ G ρ₁₂ X₁ X₂ X₃ i₁ i₂ i₃ j h

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

{G : CategoryTheory.Functor C₁₂ (CategoryTheory.Functor C₃ C₄)}

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

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

(associator : CategoryTheory.bifunctorComp₁₂ F₁₂ G ≅ CategoryTheory.bifunctorComp₂₃ F G₂₃)

(ρ₁₂ : CategoryTheory.GradedObject.BifunctorComp₁₂IndexData r)

(ρ₂₃ : CategoryTheory.GradedObject.BifunctorComp₂₃IndexData r)

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

(X₂ : CategoryTheory.GradedObject I₂ C₂)

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

[(((CategoryTheory.GradedObject.mapBifunctor F₁₂ I₁ I₂).obj X₁).obj X₂).HasMap ρ₁₂.p]

[(((CategoryTheory.GradedObject.mapBifunctor G ρ₁₂.I₁₂ I₃).obj
            (CategoryTheory.GradedObject.mapBifunctorMapObj F₁₂ ρ₁₂.p X₁ X₂)).obj
        X₃).HasMap
    ρ₁₂.q]

[(((CategoryTheory.GradedObject.mapBifunctor G₂₃ I₂ I₃).obj X₂).obj X₃).HasMap ρ₂₃.p]

[(((CategoryTheory.GradedObject.mapBifunctor F I₁ ρ₂₃.I₂₃).obj X₁).obj
        (CategoryTheory.GradedObject.mapBifunctorMapObj G₂₃ ρ₂₃.p X₂ X₃)).HasMap
    ρ₂₃.q]

[H₁₂ : CategoryTheory.GradedObject.HasGoodTrifunctor₁₂Obj F₁₂ G ρ₁₂ X₁ X₂ X₃]

[H₂₃ : CategoryTheory.GradedObject.HasGoodTrifunctor₂₃Obj F G₂₃ ρ₂₃ X₁ X₂ X₃]

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.GradedObject.ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h)
    ((CategoryTheory.GradedObject.mapBifunctorAssociator associator ρ₁₂ ρ₂₃ X₁ X₂ X₃).inv j) =
  CategoryTheory.CategoryStruct.comp (((associator.inv.app (X₁ i₁)).app (X₂ i₂)).app (X₃ i₃))
    (CategoryTheory.GradedObject.ιMapBifunctor₁₂BifunctorMapObj F₁₂ G ρ₁₂ X₁ X₂ X₃ i₁ i₂ i₃ j h)


theorem pi_Ioo_mem_nhds (ha : ∀ i, a i < x i) (hb : ∀ i, x i < b i) : Ioo a b ∈ 𝓝 x

{ι : Type u_1}
{π : ι → Type u_2}
[Finite ι]
[(i : ι) → LinearOrder (π i)]
[(i : ι) → TopologicalSpace (π i)]
[∀ (i : ι), OrderTopology (π i)]
{a b x : (i : ι) → π i}
[Nonempty ι]
(ha : ∀ (i : ι), a i < x i)
(hb : ∀ (i : ι), x i < b i)


@[simp, norm_cast]
theorem op_coe (S : Subsemiring R) : S.op = MulOpposite.unop ⁻¹' (S : Set R)

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


theorem convex_Icc (r s : β) : Convex 𝕜 (Icc r s)

{𝕜 : Type u_1}
{β : Type u_4}
[OrderedSemiring 𝕜]
[OrderedAddCommMonoid β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
(r s : β)


theorem map_mono {f : F} {p p' : Submodule R M} : p ≤ p' → map f p ≤ map f p'

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[RingHomSurjective σ₁₂]
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
{f : F}
{p p' : Submodule R M}

p ≤ p' → Submodule.map f p ≤ Submodule.map f p'


theorem addChar_eq (p : Pos) (c : Char) : p + c = ⟨p.byteIdx + c.utf8Size⟩

p + c = { byteIdx := p.byteIdx + c.utf8Size }


theorem isNat_lucasLehmerTest : {p np : ℕ} →
    IsNat p np → LucasLehmerTest np → LucasLehmerTest p

Mathlib.Meta.NormNum.IsNat p np → LucasLehmerTest np → LucasLehmerTest p


@[to_additive (attr := simp)]
lemma ker_snd : ker (snd G G') = .prod ⊤ ⊥

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']


@[simp] theorem add_mod_mod (m n k : Nat) : (m + n % k) % k = (m + n) % k


theorem IsLUB.mem_closure {a : α} {s : Set α} (ha : IsLUB s a) (hs : s.Nonempty) : a ∈ closure s

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{a : α}
{s : Set α}
(ha : IsLUB s a)
(hs : s.Nonempty)


/-- A cardinal lifted to a lower or equal universe equals itself. -/
@[simp, nolint simpNF]
theorem lift_id' (a : Cardinal.{max u v}) : lift.{u} a = a


lemma hom_heq_of_cons_eq_cons {p : Path a b} {p' : Path a c}
    {e : b ⟶ d} {e' : c ⟶ d} (h : p.cons e = p'.cons e') : HEq e e'

{V : Type u}
[Quiver V]
{a b c d : V}
{p : Quiver.Path a b}
{p' : Quiver.Path a c}
{e : b ⟶ d}
{e' : c ⟶ d}
(h : p.cons e = p'.cons e')


@[simp] lemma isCobounded_preimage_toDual {s : Set αᵒᵈ} :
    IsCobounded (toDual ⁻¹' s) ↔ IsCobounded s

{α : Type u_2}
[Bornology α]
{s : Set αᵒᵈ}

Bornology.IsCobounded (⇑OrderDual.toDual ⁻¹' s) ↔ Bornology.IsCobounded s


/-- Express `edist` in terms of `nndist`-/
theorem edist_nndist (x y : α) : edist x y = nndist x y

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


@[simp]
theorem bind_zero_left (f : α → Measure β) : bind 0 f = 0

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


theorem hasDerivAtFilter_neg : HasDerivAtFilter Neg.neg (-1) x L

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(x : 𝕜)
(L : Filter 𝕜)


lemma disjoint_sdiff_right : Disjoint s (t \ s)


theorem Nonempty.of_infs_left : (s ⊼ t).Nonempty → s.Nonempty

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


theorem le.intro {a b : Int} (n : Nat) (h : a + n = b) : a ≤ b


@[to_additive]
theorem prod_flip {n : ℕ} (f : ℕ → β) :
    (∏ r ∈ range (n + 1), f (n - r)) = ∏ k ∈ range (n + 1), f k

{β : Type u_4}
[CommMonoid β]
{n : ℕ}
(f : ℕ → β)

∏ r ∈ Finset.range (n + 1), f (n - r) = ∏ k ∈ Finset.range (n + 1), f k


theorem map_symm_eq_iff (e : M ≃ₛₗ[τ₁₂] M₂) {K : Submodule R₂ M₂} :
    K.map e.symm = p ↔ p.map e = K

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{τ₂₁ : R₂ →+* R}
[RingHomInvPair τ₁₂ τ₂₁]
[RingHomInvPair τ₂₁ τ₁₂]
{p : Submodule R M}
(e : M ≃ₛₗ[τ₁₂] M₂)
{K : Submodule R₂ M₂}

Submodule.map e.symm K = p ↔ Submodule.map e p = K


lemma finite_countablePartition (α : Type*) [MeasurableSpace α] [CountablyGenerated α] (n : ℕ) :
    Set.Finite (countablePartition α n)

(α : Type u_3)
[MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]
(n : ℕ)


theorem Finite.einfsep_pos (hs : s.Finite) : 0 < s.einfsep

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


/-- A version of `Submodule.span_eq` for subobjects closed under addition and scalar multiplication
and containing zero. In general, this should not be used directly, but can be used to quickly
generate proofs for specific types of subobjects. -/
lemma coe_span_eq_self [SetLike S M] [AddSubmonoidClass S M] [SMulMemClass S R M] (s : S) :
    (span R (s : Set M) : Set M) = s

{R : Type u_1}
{M : Type u_4}
{S : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[SetLike S M]
[AddSubmonoidClass S M]
[SMulMemClass S R M]
(s : S)


@[to_additive]
theorem ContMDiff.mul (hf : ContMDiff I' I n f) (hg : ContMDiff I' I n g) :
    ContMDiff I' I n (f * g)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[Mul G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_7}
[TopologicalSpace M]
[ChartedSpace H' M]
{f g : M → G}
{n : ℕ∞}
(hf : ContMDiff I' I n f)
(hg : ContMDiff I' I n g)


@[simp]
theorem compl_eq_univ_iff (s : Finset α) : sᶜ = univ ↔ s = ∅

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


@[simp]
theorem lsum_apply (S) [AddCommMonoid M] [Module R M] [Fintype ι] [DecidableEq ι] [Semiring S]
    [Module S M] [SMulCommClass R S M] (f : (i : ι) → φ i →ₗ[R] M) :
    lsum R φ S f = ∑ i : ι, (f i).comp (proj i)

(R : Type u)
{M : Type v}
{ι : Type x}
[Semiring R]
(φ : ι → Type i)
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(S : Type u_1)
[AddCommMonoid M]
[Module R M]
[Fintype ι]
[DecidableEq ι]
[Semiring S]
[Module S M]
[SMulCommClass R S M]
(f : (i : ι) → φ i →ₗ[R] M)

(LinearMap.lsum R φ S) f = ∑ i : ι, f i ∘ₗ LinearMap.proj i


theorem const_of_comp [PreconnectedSpace A] (cont : Continuous g)
    (he : ∀ a a', p (g a) = p (g a')) (a a') : g a = g a'

{X : Type u_3}
{E : Type u_1}
{A : Type u_2}
[TopologicalSpace E]
[TopologicalSpace A]
{p : E → X}
(sep : IsSeparatedMap p)
(inj : IsLocallyInjective p)
{g : A → E}
[PreconnectedSpace A]
(cont : Continuous g)
(he : ∀ (a a' : A), p (g a) = p (g a'))
(a a' : A)


theorem prod_generateFrom_generateFrom_eq {X Y : Type*} {s : Set (Set X)} {t : Set (Set Y)}
    (hs : ⋃₀ s = univ) (ht : ⋃₀ t = univ) :
    @instTopologicalSpaceProd X Y (generateFrom s) (generateFrom t) =
      generateFrom (image2 (·  ×ˢ ·) s t)

{X : Type u_5}
{Y : Type u_6}
{s : Set (Set X)}
{t : Set (Set Y)}
(hs : ⋃₀ s = Set.univ)
(ht : ⋃₀ t = Set.univ)

instTopologicalSpaceProd = TopologicalSpace.generateFrom (Set.image2 (fun x x_1 => x ×ˢ x_1) s t)


theorem separable_iff_squarefree {g : K[X]} : g.Separable ↔ Squarefree g

{K : Type u_1}
[Field K]
[PerfectField K]
{g : K[X]}


/-- A map `f : α → α` is said to be pre-ergodic with respect to a measure `μ` if any measurable
strictly invariant set is either almost empty or full. -/
structure PreErgodic (μ : Measure α := by volume_tac) : Prop where
  ae_empty_or_univ : ∀ ⦃s⦄, MeasurableSet s → f ⁻¹' s = s → s =ᵐ[μ] (∅ : Set α) ∨ s =ᵐ[μ] univ

{μ : autoParam (MeasureTheory.Measure α) _auto✝}

MeasurableSet s → f ⁻¹' s = s → s =ᵐ[μ] ∅ ∨ s =ᵐ[μ] Set.univ


/-- A right adjoint functor `R : D ⥤ C` is *monadic* if the comparison functor `Monad.comparison R`
from `D` to the category of Eilenberg-Moore algebras for the adjunction is an equivalence.
-/
class MonadicRightAdjoint (R : D ⥤ C) where
  /-- a choice of left adjoint for `R` -/
  L : C ⥤ D
  /-- `R` is a right adjoint -/
  adj : L ⊣ R
  eqv : (Monad.comparison adj).IsEquivalence

[self : CategoryTheory.MonadicRightAdjoint R]


@[simp, norm_cast]
theorem coe_iSup {ι : Sort*} [CompleteLattice β] (f : ι → α →o β) :
    ((⨆ i, f i : α →o β) : α → β) = ⨆ i, (f i : α → β)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
{ι : Sort u_3}
[CompleteLattice β]
(f : ι → α →o β)


theorem fromBlocks_toBlocks (M : Matrix (n ⊕ o) (l ⊕ m) α) :
    fromBlocks M.toBlocks₁₁ M.toBlocks₁₂ M.toBlocks₂₁ M.toBlocks₂₂ = M

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
(M : Matrix (n ⊕ o) (l ⊕ m) α)

Matrix.fromBlocks M.toBlocks₁₁ M.toBlocks₁₂ M.toBlocks₂₁ M.toBlocks₂₂ = M


/-- Any element commutes with itself. -/
@[to_additive (attr := refl, simp) "Any element commutes with itself."]
protected theorem refl (a : S) : Commute a a


@[to_additive (attr := simp)]
theorem length_mul (x y : FreeSemigroup α) : (x * y).length = x.length + y.length


@[simp] lemma toMeasure_map (ν : FiniteMeasure Ω) (f : Ω → Ω') :
    (ν.map f).toMeasure = ν.toMeasure.map f

{Ω : Type u_1}
{Ω' : Type u_2}
[MeasurableSpace Ω]
[MeasurableSpace Ω']
(ν : MeasureTheory.FiniteMeasure Ω)
(f : Ω → Ω')

↑(ν.map f) = MeasureTheory.Measure.map f ↑ν


/-- The strong pigeonhole principle for finitely many pigeons and pigeonholes.
There is a pigeonhole with at least as many pigeons as
the ceiling of the average number of pigeons across all pigeonholes.
("The maximum is at least the mean" specialized to integers.)

More formally, given a function `f` between finite types `α` and `β` and a number `n` such that
`card β * n < card α`, there exists an element `y : β` such that its preimage has more than `n`
elements. -/
theorem exists_lt_card_fiber_of_mul_lt_card (hn : card β * n < card α) :
    ∃ y : β, n < (univ.filter fun x => f x = y).card

(hn : Fintype.card β * n < Fintype.card α)

∃ y, n < (Finset.filter (fun x => f x = y) Finset.univ).card


theorem hasPushout_assoc_symm [HasPushout g₁ (g₂ ≫ f₃)] : HasPushout (g₃ ≫ f₂) g₄

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

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


lemma lanAdjunction_counit_app (G : D ⥤ H) :
    (L.lanAdjunction H).counit.app G =
      descOfIsLeftKanExtension (L.lan.obj (L ⋙ G)) (L.lanUnit.app (L ⋙ G)) G (𝟙 (L ⋙ G))

[∀ (F : CategoryTheory.Functor C H), L.HasLeftKanExtension F]

(L.lanAdjunction H).counit.app G =
  (L.lan.obj (L.comp G)).descOfIsLeftKanExtension (L.lanUnit.app (L.comp G)) G
    (CategoryTheory.CategoryStruct.id (L.comp G))


@[simp]
theorem mk_right_unitor_hom : Quot.mk _ (Hom₂.right_unitor f) = (ρ_ f).hom

{B : Type u}
[Quiver B]
{a b : CategoryTheory.FreeBicategory B}
(f : a ⟶ b)

Quot.mk CategoryTheory.FreeBicategory.Rel (CategoryTheory.FreeBicategory.Hom₂.right_unitor f) =
  (CategoryTheory.Bicategory.rightUnitor f).hom


/-- Subgroups of torsion-free groups are torsion-free. -/
@[to_additive "Subgroups of additive torsion-free groups are additively torsion-free."]
theorem IsTorsionFree.subgroup (tG : IsTorsionFree G) (H : Subgroup G) : IsTorsionFree H

{G : Type u_1}
[AddGroup G]
(tG : AddMonoid.IsTorsionFree G)
(H : AddSubgroup G)


theorem PGame.lf_iff_game_lf {x y : PGame} : PGame.LF x y ↔ ⟦x⟧ ⧏ ⟦y⟧


theorem LinearMap.rTensor_range :
    range (rTensor Q g) =
      range (rTensor Q (Submodule.subtype (range g)))

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

LinearMap.range (LinearMap.rTensor Q g) = LinearMap.range (LinearMap.rTensor Q (LinearMap.range g).subtype)


theorem tail_drop (l : List α) (n : Nat) : (l.drop n).tail = l.drop (n + 1)

(List.drop n l).tail = List.drop (n + 1) l


lemma StarModule.smul_lt_smul_of_pos {a b : A} {c : R} (hab : a < b) (hc : 0 < c) :
    c • a < c • b

{R : Type u}
{A : Type u_1}
[Semiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
[NonUnitalRing A]
[StarRing A]
[PartialOrder A]
[StarOrderedRing A]
[Module R A]
[StarModule R A]
[NoZeroSMulDivisors R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
{a b : A}
{c : R}
(hab : a < b)
(hc : 0 < c)


lemma smul_nonneg [PosSMulMono α β] (ha : 0 ≤ a) (hb : 0 ≤ b₁) : 0 ≤ a • b₁

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


theorem drop_set_of_lt (a : α) {n m : Nat} (l : List α) (h : n < m) :
    (l.set n a).drop m = l.drop m

{α : Type u_1}
(a : α)
{n m : Nat}
(l : List α)
(h : n < m)


/-- A telescoping sum along `{0, ..., n-1}` of an `ℕ`-valued function
reduces to the difference of the last and first terms
when the function we are summing is monotone.
-/
theorem sum_range_tsub [CanonicallyOrderedAddCommMonoid α] [Sub α] [OrderedSub α]
    [ContravariantClass α α (· + ·) (· ≤ ·)] {f : ℕ → α} (h : Monotone f) (n : ℕ) :
    ∑ i ∈ range n, (f (i + 1) - f i) = f n - f 0

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

∑ i ∈ Finset.range n, (f (i + 1) - f i) = f n - f 0


/-- Lemma used to destruct perms element by element. -/
theorem perm_inv_core {a : α} {l₁ l₂ r₁ r₂ : List α} :
    l₁ ++ a :: r₁ ~ l₂ ++ a :: r₂ → l₁ ++ r₁ ~ l₂ ++ r₂

{α : Type u_1}
{a : α}
{l₁ l₂ r₁ r₂ : List α}


@[to_additive (attr := elab_as_elim)]
theorem induction_on {C : M ∗ N → Prop} (m : M ∗ N)
    (inl : ∀ m, C (inl m)) (inr : ∀ n, C (inr n)) (mul : ∀ x y, C x → C y → C (x * y)) : C m

(inl : ∀ (m : M), C (AddMonoid.Coprod.inl m))

(inr : ∀ (n : N), C (AddMonoid.Coprod.inr n))

(mul : ∀ (x y : AddMonoid.Coprod M N), C x → C y → C (x + y))


protected theorem id_traverse {σ α} (x : σ ⊕ α) :
    Sum.traverse (pure : α → Id α) x = x


/-- The `affineSpan` of a finite affinely independent family is `⊤` iff the
family's cardinality is one more than that of the finite-dimensional space. -/
theorem AffineIndependent.affineSpan_eq_top_iff_card_eq_finrank_add_one [FiniteDimensional k V]
    [Fintype ι] {p : ι → P} (hi : AffineIndependent k p) :
    affineSpan k (Set.range p) = ⊤ ↔ Fintype.card ι = finrank k V + 1

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
{ι : Type u_4}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
[FiniteDimensional k V]
[Fintype ι]
{p : ι → P}
(hi : AffineIndependent k p)

affineSpan k (Set.range p) = ⊤ ↔ Fintype.card ι = FiniteDimensional.finrank k V + 1


/-- A predicate `C → Prop` on the objects of a category is closed under isomorphisms
if whenever `P X`, then all the objects `Y` that are isomorphic to `X` also satisfy `P Y`. -/
class ClosedUnderIsomorphisms : Prop where
  of_iso {X Y : C} (_ : X ≅ Y) (_ : P X) : P Y

[self : CategoryTheory.ClosedUnderIsomorphisms P]


theorem measurable_comp_iff (hg : MeasurableEmbedding g) : Measurable (g ∘ f) ↔ Measurable f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{mα : MeasurableSpace α}
[MeasurableSpace β]
[MeasurableSpace γ]
{f : α → β}
{g : β → γ}
(hg : MeasurableEmbedding g)


@[to_additive]
theorem mul_upperClosure : s * upperClosure t = upperClosure (s * t)

{α : Type u_1}
[OrderedAddCommGroup α]
(s t : Set α)

s + ↑(upperClosure t) = ↑(upperClosure (s + t))


/-- The coercion from a closed subset is proper. -/
lemma isProperMap_subtype_val_of_closed {U : Set X} (hU : IsClosed U) : IsProperMap ((↑) : U → X)

{X : Type u_1}
[TopologicalSpace X]
{U : Set X}
(hU : IsClosed U)


protected theorem Nodup.cons (ha : a ∉ l) (hl : Nodup l) : Nodup (a :: l)

{α : Type u}
{l : List α}
{a : α}
(ha : a ∉ l)
(hl : l.Nodup)


theorem IsGreatest.nonempty (h : IsGreatest s a) : s.Nonempty

{α : Type u}
[Preorder α]
{s : Set α}
{a : α}
(h : IsGreatest s a)


theorem sub_mem_Ico_iff_right : a - b ∈ Set.Ico c d ↔ b ∈ Set.Ioc (a - d) (a - c)

{α : Type u_1}
[OrderedAddCommGroup α]
{a b c d : α}


theorem floor_lt_ceil_of_lt_of_pos {a b : α} (h : a < b) (h' : 0 < b) : ⌊a⌋₊ < ⌈b⌉₊

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a b : α}
(h : a < b)
(h' : 0 < b)


@[nontriviality]
theorem Finite.of_subsingleton [Subsingleton α] (s : Set α) : s.Finite

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


/-- A composition of `n` is a list of positive integers summing to `n`. -/
@[ext]
structure Composition (n : ℕ) where
  /-- List of positive integers summing to `n`-/
  blocks : List ℕ
  /-- Proof of positivity for `blocks`-/
  blocks_pos : ∀ {i}, i ∈ blocks → 0 < i
  /-- Proof that `blocks` sums to `n`-/
  blocks_sum : blocks.sum = n


/-- If a function `f` is continuously polynomial on a set `s` and `g` is a continuous linear map,
then `g ∘ f` is continuously polynomial on `s`. -/
theorem ContinuousLinearMap.comp_cPolynomialOn {s : Set E} (g : F →L[𝕜] G)
    (h : CPolynomialOn 𝕜 f s) : CPolynomialOn 𝕜 (g ∘ f) s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
{s : Set E}
(g : F →L[𝕜] G)
(h : CPolynomialOn 𝕜 f s)


protected theorem fderivWithin (hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 iso s x = iso

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{s : Set E}
(iso : E ≃L[𝕜] F)
(hxs : UniqueDiffWithinAt 𝕜 s x)


theorem not_mem_adicCompletionIntegers {x : v.adicCompletion K} :
    x ∉ v.adicCompletionIntegers K ↔ 1 < (Valued.v x : ℤₘ₀)

(v : IsDedekindDomain.HeightOneSpectrum R)

{x : IsDedekindDomain.HeightOneSpectrum.adicCompletion K v}

x ∉ IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers K v ↔ 1 < Valued.v x


lemma mapToEqualizer_eq_comp (P : Cᵒᵖ ⥤ Type*) {X B : C} (π : X ⟶ B) [HasPullback π π] :
    MapToEqualizer P π (pullback.fst π π) (pullback.snd π π) pullback.condition =
    equalizer.lift (P.map π.op) (equalizerCondition_w' P π) ≫
    (Types.equalizerIso _ _).hom

(P : CategoryTheory.Functor Cᵒᵖ (Type u_4))

CategoryTheory.regularTopology.MapToEqualizer P π (CategoryTheory.Limits.pullback.fst π π)
    (CategoryTheory.Limits.pullback.snd π π) ⋯ =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.equalizer.lift (P.map π.op) ⋯)
    (CategoryTheory.Limits.Types.equalizerIso (P.map (CategoryTheory.Limits.pullback.fst π π).op)
        (P.map (CategoryTheory.Limits.pullback.snd π π).op)).hom


@[gcongr]
protected theorem Sublist.drop : ∀ {l₁ l₂ : List α}, l₁ <+ l₂ → ∀ n, l₁.drop n <+ l₂.drop n

l₁.Sublist l₂ → ∀ (n : ℕ), (List.drop n l₁).Sublist (List.drop n l₂)


theorem map_closure (f : M →[L] N) (s : Set M) : (closure L s).map f = closure L (f '' s)

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(f : L.Hom M N)
(s : Set M)

FirstOrder.Language.Substructure.map f ((FirstOrder.Language.Substructure.closure L).toFun s) =
  (FirstOrder.Language.Substructure.closure L).toFun (⇑f '' s)


/-- A homomorphism of `Action V G`s is a morphism between the underlying objects,
commuting with the action of `G`.
-/
@[ext]
structure Hom (M N : Action V G) where
  hom : M.V ⟶ N.V
  comm : ∀ g : G, M.ρ g ≫ hom = hom ≫ N.ρ g := by aesop_cat

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
{M N : Action V G}
(self : M.Hom N)
(g : ↑G)


theorem arccos_le_pi (x : ℝ) : arccos x ≤ π


/-- A lax monoidal functor takes monoid objects to monoid objects.

That is, a lax monoidal functor `F : C ⥤ D` induces a functor `Mon_ C ⥤ Mon_ D`.
-/
@[simps]
def mapMon (F : LaxMonoidalFunctor C D) : Mon_ C ⥤ Mon_ D

(F : CategoryTheory.LaxMonoidalFunctor C D)

(F.mapMon.obj A).mul = F.μ A.X A.X ≫ F.map A.mul


@[to_additive (attr := simp)]
theorem divRight_symm [IsometricSMul Gᵐᵒᵖ G] (c : G) : (divRight c).symm = mulRight c

{G : Type v}
[AddGroup G]
[PseudoEMetricSpace G]
[IsometricVAdd Gᵃᵒᵖ G]
(c : G)

(IsometryEquiv.subRight c).symm = IsometryEquiv.addRight c


theorem HomogeneousIdeal.toIdeal_injective :
    Function.Injective (HomogeneousIdeal.toIdeal : HomogeneousIdeal 𝒜 → Ideal A)

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[DecidableEq ι]
[AddMonoid ι]
[GradedRing 𝒜]


@[reassoc]
lemma mapBifunctorLeftUnitor_inv_naturality :
    φ ≫ (mapBifunctorLeftUnitor F X e p hp Y').inv =
      (mapBifunctorLeftUnitor F X e p hp Y).inv ≫ mapBifunctorMapMap F p (𝟙 _) φ

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

(e : F.obj X ≅ CategoryTheory.Functor.id D)

[(Y : D) → CategoryTheory.Limits.PreservesColimit (CategoryTheory.Functor.empty C) (F.flip.obj Y)]

{Y Y' : CategoryTheory.GradedObject J D}

[(((CategoryTheory.GradedObject.mapBifunctor F I J).obj ((CategoryTheory.GradedObject.single₀ I).obj X)).obj Y).HasMap
    p]

[(((CategoryTheory.GradedObject.mapBifunctor F I J).obj ((CategoryTheory.GradedObject.single₀ I).obj X)).obj Y').HasMap
    p]

CategoryTheory.CategoryStruct.comp φ (CategoryTheory.GradedObject.mapBifunctorLeftUnitor F X e p hp Y').inv =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.GradedObject.mapBifunctorLeftUnitor F X e p hp Y).inv
    (CategoryTheory.GradedObject.mapBifunctorMapMap F p
      (CategoryTheory.CategoryStruct.id ((CategoryTheory.GradedObject.single₀ I).obj X)) φ)


theorem mulMap_comm_of_commute (hc : ∀ (m : M) (n : N), Commute m.1 n.1) :
    mulMap N M = mulMap M N ∘ₗ TensorProduct.comm R N M

(hc : ∀ (m : ↥M) (n : ↥N), Commute ↑m ↑n)

N.mulMap M = M.mulMap N ∘ₗ ↑(TensorProduct.comm R ↥N ↥M)


@[simp]
theorem edgeFinset_top [DecidableEq V] :
    (⊤ : SimpleGraph V).edgeFinset = univ.filter fun e => ¬e.IsDiag

{V : Type u_1}
[Fintype V]
[DecidableEq V]

⊤.edgeFinset = Finset.filter (fun e => ¬e.IsDiag) Finset.univ


@[simp]
theorem wbtw_const_vsub_iff {x y z : P} (p : P) :
    Wbtw R (p -ᵥ x) (p -ᵥ y) (p -ᵥ z) ↔ Wbtw R x y z

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x y z : P}
(p : P)


@[to_additive]
theorem NormedCommGroup.tendsto_nhds_nhds {f : E → F} {x : E} {y : F} :
    Tendsto f (𝓝 x) (𝓝 y) ↔ ∀ ε > 0, ∃ δ > 0, ∀ x', ‖x' / x‖ < δ → ‖f x' / y‖ < ε

{E : Type u_6}
{F : Type u_7}
[SeminormedAddGroup E]
[SeminormedAddGroup F]
{f : E → F}
{x : E}
{y : F}

Filter.Tendsto f (𝓝 x) (𝓝 y) ↔ ∀ ε > 0, ∃ δ > 0, ∀ (x' : E), ‖x' - x‖ < δ → ‖f x' - y‖ < ε


@[higher_order fst_comp_snd]
theorem fst_snd {α₀ α₁ β₀ β₁} (f : α₀ → α₁) (f' : β₀ → β₁) (x : F α₀ β₀) :
    fst f (snd f' x) = bimap f f' x

{F : Type u₀ → Type u₁ → Type u₂}
[Bifunctor F]
[LawfulBifunctor F]
{α₀ α₁ : Type u₀}
{β₀ β₁ : Type u₁}
(f : α₀ → α₁)
(f' : β₀ → β₁)
(x : F α₀ β₀)

Bifunctor.fst f (Bifunctor.snd f' x) = bimap f f' x


lemma not_isEquipartition :
    ¬P.IsEquipartition ↔ ∃ a ∈ P.parts, ∃ b ∈ P.parts, b.card + 1 < a.card

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{P : Finpartition s}


lemma shiftIso_zero (a : M) :
    F.shiftIso 0 a a (zero_add a) =
      isoWhiskerRight (shiftFunctorZero C M) _ ≪≫ leftUnitor _

{C : Type u_1}
{A : Type u_2}
[CategoryTheory.Category.{u_6, u_1} C]
[CategoryTheory.Category.{u_5, u_2} A]
(F : C ⥤ A)
{M : Type u_3}
[AddMonoid M]
[CategoryTheory.HasShift C M]
[F.ShiftSequence M]
(a : M)

F.shiftIso 0 a a ⋯ =
  CategoryTheory.isoWhiskerRight (CategoryTheory.shiftFunctorZero C M) (F.shift a) ≪≫ (F.shift a).leftUnitor


theorem by_contradiction {p : Prop} : (¬p → False) → p


@[simp]
theorem associatesNonZeroDivisorsEquivIsPrincipal_map_one :
    (associatesNonZeroDivisorsEquivIsPrincipal R 1 : Ideal R) = 1

{R : Type u_1}
[CommRing R]
[IsDomain R]

↑↑((Ideal.associatesNonZeroDivisorsEquivIsPrincipal R) 1) = 1


/-- Each element of the monoid defines an additive monoid homomorphism. -/
@[simps]
def DistribMulAction.toAddMonoidEnd :
    M →* AddMonoid.End A

(M : Type u_1)
(A : Type u_4)
[Monoid M]
[AddMonoid A]
[DistribMulAction M A]
(x : M)

(DistribMulAction.toAddMonoidEnd M A) x = DistribMulAction.toAddMonoidHom A x


@[simp]
theorem min_eq_add : (min : Tropical R → Tropical R → Tropical R) = (· + ·)


lemma singularPart_eq_zero_iff_apply_eq_zero (κ η : Kernel α γ) [IsFiniteKernel κ]
    [IsFiniteKernel η] (a : α) :
    singularPart κ η a = 0 ↔ singularPart κ η a (mutuallySingularSetSlice κ η a) = 0

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

(κ.singularPart η) a = 0 ↔ ((κ.singularPart η) a) (κ.mutuallySingularSetSlice η a) = 0


theorem map_lift'_eq2 {g : Set β → Set γ} {m : α → β} (hg : Monotone g) :
    (map m f).lift' g = f.lift' (g ∘ image m)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : Filter α}
{g : Set β → Set γ}
{m : α → β}
(hg : Monotone g)

(Filter.map m f).lift' g = f.lift' (g ∘ Set.image m)


/-- `K` and `Kᗮ` have trivial intersection. -/
theorem orthogonal_disjoint : Disjoint K Kᗮ

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


@[simp]
theorem mem_positive {x : E} : x ∈ positive 𝕜 E ↔ 0 ≤ x

(𝕜 : Type u_2)
(E : Type u_1)
[OrderedSemiring 𝕜]
[OrderedAddCommGroup E]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
[TopologicalSpace E]
[OrderClosedTopology E]
{x : E}


theorem mem_kstar : x ∈ l∗ ↔ ∃ L : List (List α), x = L.join ∧ ∀ y ∈ L, y ∈ l

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

x ∈ l∗ ↔ ∃ L, x = L.join ∧ ∀ y ∈ L, y ∈ l


theorem toIocMod_zero_sub_comm (a b : α) : toIocMod hp 0 (a - b) = p - toIcoMod hp 0 (b - a)

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a b : α)


theorem insert_injOn (s : Set α) : sᶜ.InjOn fun a => insert a s


theorem sum_to_range :
    Set.range (sum_to C ho) = GoodProducts (π C (ord I · < o)) ∪ MaxProducts C ho

(ho : o < Ordinal.type fun x x_1 => x < x_1)

Set.range (Profinite.NobelingProof.GoodProducts.sum_to C ho) =
  Profinite.NobelingProof.GoodProducts (Profinite.NobelingProof.π C fun x => Profinite.NobelingProof.ord I x < o) ∪
    Profinite.NobelingProof.GoodProducts.MaxProducts C ho


theorem lt_of_le_sub_one (h : 0 < m) : n ≤ m - 1 → n < m


theorem length_pos_of_mem {a : α} : ∀ {l : List α}, a ∈ l → 0 < length l


theorem arrow_mk_iso_iff
    (P : AffineTargetMorphismProperty) [P.toProperty.RespectsIso]
    {X Y X' Y' : Scheme} {f : X ⟶ Y} {f' : X' ⟶ Y'}
    (e : Arrow.mk f ≅ Arrow.mk f') {h : IsAffine Y} :
    letI : IsAffine Y' := isAffine_of_isIso (Y := Y) e.inv.right
    P f ↔ P f'

(e : CategoryTheory.Arrow.mk f ≅ CategoryTheory.Arrow.mk f')


/-- All n-simplices among cospherical points in n-space have the same
circumsphere. -/
theorem exists_circumsphere_eq_of_cospherical {ps : Set P} {n : ℕ} [FiniteDimensional ℝ V]
    (hd : finrank ℝ V = n) (hc : Cospherical ps) :
    ∃ c : Sphere P, ∀ sx : Simplex ℝ P n, Set.range sx.points ⊆ ps → sx.circumsphere = c

(hd : FiniteDimensional.finrank ℝ V = n)

∃ c, ∀ (sx : Affine.Simplex ℝ P n), Set.range sx.points ⊆ ps → sx.circumsphere = c


theorem degreeOf_lt_iff {n : σ} {f : MvPolynomial σ R} {d : ℕ} (h : 0 < d) :
    degreeOf n f < d ↔ ∀ m : σ →₀ ℕ, m ∈ f.support → m n < d

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{n : σ}
{f : MvPolynomial σ R}
{d : ℕ}
(h : 0 < d)

MvPolynomial.degreeOf n f < d ↔ ∀ m ∈ f.support, m n < d


@[to_additive (attr := simp)]
protected theorem smul_cancel' {r₁ : R} {r₂ : X} {s t : S} :
    ((r₁ * s) /ₒ t) • (r₂ /ₒ s) = (r₁ • r₂) /ₒ t

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[MulAction R X]
{r₁ : R}
{r₂ : X}
{s t : ↥S}

(r₁ * ↑s /ₒ t) • (r₂ /ₒ s) = r₁ • r₂ /ₒ t


theorem Subsingleton.congr {s : Cycle α} (h : Subsingleton s) :
    ∀ ⦃x⦄ (_hx : x ∈ s) ⦃y⦄ (_hy : y ∈ s), x = y

{α : Type u_1}
{s : Cycle α}
(h : s.Subsingleton)
⦃x : α⦄
(_hx : x ∈ s)
⦃y : α⦄
(_hy : y ∈ s)


theorem normSq_apply (z : ℂ) : normSq z = z.re * z.re + z.im * z.im

Complex.normSq z = z.re * z.re + z.im * z.im


theorem tsub_add_eq_tsub_tsub_swap (a b c : α) : a - (b + c) = a - c - b

{α : Type u_1}
[PartialOrder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]
(a b c : α)


@[simp]
theorem support_eq_empty {p : MvPolynomial σ R} : p.support = ∅ ↔ p = 0

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


theorem add_descFactorial_eq_ascFactorial (n : ℕ) : ∀ k : ℕ,
    (n + k).descFactorial k = (n + 1).ascFactorial k


theorem basis_one (h : IsAdjoinRootMonic S f) (hdeg : 1 < natDegree f) :
    h.basis ⟨1, hdeg⟩ = h.root

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


@[mono]
theorem restrict_mono [Preorder β] (s : Set α) {f g : α →ₛ β} (H : f ≤ g) :
    f.restrict s ≤ g.restrict s

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Zero β]
[Preorder β]
(s : Set α)
{f g : MeasureTheory.SimpleFunc α β}
(H : f ≤ g)


private theorem T_pow' (n : ℕ) : T ^ 2 ^ n < 1

(hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2)


theorem map_comap {β} (f : α → β) (m : OuterMeasure β) : map f (comap f m) = restrict (range f) m

{α : Type u_1}
{β : Type u_3}
(f : α → β)
(m : MeasureTheory.OuterMeasure β)

(MeasureTheory.OuterMeasure.map f) ((MeasureTheory.OuterMeasure.comap f) m) =
  (MeasureTheory.OuterMeasure.restrict (Set.range f)) m


@[to_additive]
theorem dist_eq_norm_div (a b : E) : dist a b = ‖a / b‖

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


@[to_additive]
lemma orbitRel.quotient_eq_of_quotient_subgroup_eq' {H : Subgroup G} {a b : α}
    (h : (Quotient.mk'' a : orbitRel.Quotient H α) = Quotient.mk'' b) :
    (Quotient.mk'' a : orbitRel.Quotient G α) = Quotient.mk'' b

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]
{H : AddSubgroup G}
{a b : α}
(h : Quotient.mk'' a = Quotient.mk'' b)


/-- If there is a fundamental domain `s`, then `HasFundamentalDomain` holds. -/
@[to_additive]
lemma IsFundamentalDomain.hasFundamentalDomain (ν : Measure α) {s : Set α}
    (fund_dom_s : IsFundamentalDomain G s ν) :
    HasFundamentalDomain G α ν

(fund_dom_s : MeasureTheory.IsFundamentalDomain G s ν)

MeasureTheory.HasFundamentalDomain G α ν


theorem mem_primeFactorsList_mul {a b : ℕ} (ha : a ≠ 0) (hb : b ≠ 0) {p : ℕ} :
    p ∈ (a * b).primeFactorsList ↔ p ∈ a.primeFactorsList ∨ p ∈ b.primeFactorsList


@[simp]
theorem insertNth_succ_nil (n : ℕ) (a : α) : insertNth (n + 1) a [] = []


theorem mem_map' : t ∈ map m f ↔ { x | m x ∈ t } ∈ f

{α : Type u}
{β : Type v}
{f : Filter α}
{m : α → β}
{t : Set β}


theorem lintegral_abs_det_fderiv_le_addHaar_image (hs : MeasurableSet s)
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (hf : InjOn f s) :
    (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) ≤ μ (f '' s)

∫⁻ (x : E) in s, ENNReal.ofReal |(f' x).det| ∂μ ≤ μ (f '' s)


@[fun_prop]
protected theorem continuous (f : A →A[R] B) : Continuous f

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


lemma Algebra.adjoin_root_eq_top_of_isSplittingField :
    Algebra.adjoin K {α} = ⊤

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

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


theorem IsPrime.inf_le {I J P : Ideal R} (hp : IsPrime P) : I ⊓ J ≤ P ↔ I ≤ P ∨ J ≤ P

{R : Type u}
[CommSemiring R]
{I J P : Ideal R}
(hp : P.IsPrime)


@[to_additive]
theorem monotone_comap {f : M →ₙ* N} : Monotone (comap f)

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{f : AddHom M N}


@[simp]
theorem coforkOfCokernelCofork_π (c : CokernelCofork (f - g)) :
    (coforkOfCokernelCofork c).π = c.π

(c : CategoryTheory.Limits.CokernelCofork (f - g))

(CategoryTheory.Preadditive.coforkOfCokernelCofork c).π = CategoryTheory.Limits.Cofork.π c


/-- An uncurried version of `Finset.prod_product`. -/
@[to_additive "An uncurried version of `Finset.sum_product`"]
theorem prod_product' {s : Finset γ} {t : Finset α} {f : γ → α → β} :
    ∏ x ∈ s ×ˢ t, f x.1 x.2 = ∏ x ∈ s, ∏ y ∈ t, f x y

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[CommMonoid β]
{s : Finset γ}
{t : Finset α}
{f : γ → α → β}


theorem Fin.val_eq_of_eq {n} {i j : Fin n} (h : Eq i j) : Eq i.val j.val


theorem IsCycleOn.exists_pow_eq' (hs : s.Finite) (hf : f.IsCycleOn s) (ha : a ∈ s) (hb : b ∈ s) :
    ∃ n : ℕ, (f ^ n) a = b

{α : Type u_2}
{f : Equiv.Perm α}
{s : Set α}
{a b : α}
(hs : s.Finite)
(hf : f.IsCycleOn s)
(ha : a ∈ s)
(hb : b ∈ s)


@[simp, norm_cast] lemma val_nnratCast (q : ℚ≥0) : (q : selfAdjoint R) = (q : R)

{R : Type u_1}
[Field R]
[StarRing R]
(q : ℚ≥0)


theorem refl (f : C(X, Y)) (hf : P f) : HomotopicWith f f P

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{P : C(X, Y) → Prop}
(f : C(X, Y))
(hf : P f)


theorem Matrix.isAdjointPair_equiv' [DecidableEq n] (P : Matrix n n R₃) (h : IsUnit P) :
    (Pᵀ * J * P).IsAdjointPair (Pᵀ * J * P) A A' ↔
      J.IsAdjointPair J (P * A * P⁻¹) (P * A' * P⁻¹)

{R₃ : Type u_7}
[CommRing R₃]
{n : Type u_11}
[Fintype n]
(J A A' : Matrix n n R₃)
[DecidableEq n]
(P : Matrix n n R₃)
(h : IsUnit P)

(P.transpose * J * P).IsAdjointPair (P.transpose * J * P) A A' ↔ J.IsAdjointPair J (P * A * P⁻¹) (P * A' * P⁻¹)


/-- The type of bi-Heyting homomorphisms from `α` to `β`. Bounded lattice homomorphisms that
preserve Heyting implication and difference. -/
structure BiheytingHom (α β : Type*) [BiheytingAlgebra α] [BiheytingAlgebra β] extends
  LatticeHom α β where
  /-- The proposition that a bi-Heyting homomorphism preserves the Heyting implication. -/
  protected map_himp' : ∀ a b, toFun (a ⇨ b) = toFun a ⇨ toFun b
  /-- The proposition that a bi-Heyting homomorphism preserves the difference operation. -/
  protected map_sdiff' : ∀ a b, toFun (a \ b) = toFun a \ toFun b

{α : Type u_6}
{β : Type u_7}
[BiheytingAlgebra α]
[BiheytingAlgebra β]
(self : BiheytingHom α β)
(a b : α)

self.toFun (a \ b) = self.toFun a \ self.toFun b


theorem disjoint_iff_comap_eq_bot {p q : Submodule R M} : Disjoint p q ↔ comap p.subtype q = ⊥

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p q : Submodule R M}

Disjoint p q ↔ Submodule.comap p.subtype q = ⊥


@[simp] lemma SpecΓIdentity_app : SpecΓIdentity.app R = ΓSpecIso R

AlgebraicGeometry.Scheme.SpecΓIdentity.app R = AlgebraicGeometry.Scheme.ΓSpecIso R


@[to_additive (attr := simp)]
theorem union_inv : (s ∪ t)⁻¹ = s⁻¹ ∪ t⁻¹


theorem coe_linearMap_injective : Function.Injective ((↑) : (A →ₐc[R] B) → A →ₗ[R] B)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]


@[congr]
theorem iUnion_congr_Prop {p q : Prop} {f₁ : p → Set α} {f₂ : q → Set α} (pq : p ↔ q)
    (f : ∀ x, f₁ (pq.mpr x) = f₂ x) : iUnion f₁ = iUnion f₂

{α : Type u_1}
{p q : Prop}
{f₁ : p → Set α}
{f₂ : q → Set α}
(pq : p ↔ q)
(f : ∀ (x : q), f₁ ⋯ = f₂ x)


theorem mk_mem_periodicPts (hn : 0 < n) (hx : IsPeriodicPt f n x) : x ∈ periodicPts f

{α : Type u_1}
{f : α → α}
{x : α}
{n : ℕ}
(hn : 0 < n)
(hx : Function.IsPeriodicPt f n x)


@[simp]
theorem mk_type (α A) : «Type» ⟨α, A⟩ = α


theorem nhdsWithin_Iio_self_neBot' {b : α} (H : (Iio b).Nonempty) : NeBot (𝓝[<] b)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
{b : α}
(H : (Set.Iio b).Nonempty)


/-- The `i`-th element of a list coincides with the `i`-th element of any of its prefixes of
length `> i`. Version designed to rewrite from the small list to the big list. -/
theorem getElem_take' (L : List α) {j i : Nat} {h : i < (L.take j).length} :
    (L.take j)[i] =
    L[i]'(Nat.lt_of_lt_of_le h (length_take_le' _ _))

{α : Type u_1}
(L : List α)
{j i : Nat}
{h : i < (List.take j L).length}


/-- `LocallyConstant.congrLeft` as an `AlgEquiv`. -/
@[simps!]
def congrLeftₐ (R : Type*) [CommSemiring R] [Semiring Z] [Algebra R Z] (e : X ≃ₜ Y) :
    LocallyConstant X Z ≃ₐ[R] LocallyConstant Y Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{Z : Type u_6}
(R : Type u_7)
[CommSemiring R]
[Semiring Z]
[Algebra R Z]
(e : X ≃ₜ Y)
(g : LocallyConstant Y Z)

∀ (a : X), ((LocallyConstant.congrLeftₐ R e).symm g) a = g (e a)


theorem mem_inf {x} : x ∈ S ⊓ T ↔ x ∈ S ∧ x ∈ T

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
(S T : ConvexCone 𝕜 E)
{x : E}


@[simp]
theorem fst_map (f : M →ₗ[R'] N) (x : TrivSqZeroExt R' M) : fst (map f x) = fst x

{R' : Type u}
{M : Type v}
[CommSemiring R']
[AddCommMonoid M]
[Module R' M]
[Module R'ᵐᵒᵖ M]
[IsCentralScalar R' M]
{N : Type u_3}
[AddCommMonoid N]
[Module R' N]
[Module R'ᵐᵒᵖ N]
[IsCentralScalar R' N]
(f : M →ₗ[R'] N)
(x : tsze R' M)


lemma map_comap {f : α → β} (h_range : N.E ⊆ range f) (hf : InjOn f (f ⁻¹' N.E)) :
    (N.comap f).map f hf = N

{α : Type u_1}
{β : Type u_2}
{N : Matroid β}
{f : α → β}
(h_range : N.E ⊆ Set.range f)
(hf : Set.InjOn f (f ⁻¹' N.E))


@[simp]
theorem isBounded_iff_isVonNBounded {s : Set E} :
    @IsBounded _ (vonNBornology 𝕜 E) s ↔ IsVonNBounded 𝕜 s

(𝕜 : Type u_1)
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[ContinuousSMul 𝕜 E]
{s : Set E}

Bornology.IsBounded s ↔ Bornology.IsVonNBounded 𝕜 s


theorem range_smul (f : V →ₗ[K] V₂) (a : K) (h : a ≠ 0) : range (a • f) = range f

{K : Type u_4}
{V : Type u_9}
{V₂ : Type u_10}
[Semifield K]
[AddCommMonoid V]
[Module K V]
[AddCommMonoid V₂]
[Module K V₂]
(f : V →ₗ[K] V₂)
(a : K)
(h : a ≠ 0)

LinearMap.range (a • f) = LinearMap.range f


@[to_additive]
theorem image_inv : (s.image fun x => x⁻¹) = s⁻¹

{α : Type u_2}
[DecidableEq α]
[Neg α]
{s : Finset α}


lemma generateFrom_iUnion_countablePartition (α : Type*) [m : MeasurableSpace α]
    [CountablyGenerated α] :
    generateFrom (⋃ n, countablePartition α n) = m

(α : Type u_3)
[m : MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]

MeasurableSpace.generateFrom (⋃ n, MeasurableSpace.countablePartition α n) = m


theorem condexpL2_indicator_nonneg (hm : m ≤ m0) (hs : MeasurableSet s) (hμs : μ s ≠ ∞)
    [SigmaFinite (μ.trim hm)] : (0 : α → ℝ) ≤ᵐ[μ]
    condexpL2 ℝ ℝ hm (indicatorConstLp 2 hs hμs 1)

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hm : m ≤ m0)
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
[MeasureTheory.SigmaFinite (μ.trim hm)]

0 ≤ᵐ[μ] ↑↑↑((MeasureTheory.condexpL2 ℝ ℝ hm) (MeasureTheory.indicatorConstLp 2 hs hμs 1))


theorem aemeasurable_deriv [MeasurableSpace 𝕜] [OpensMeasurableSpace 𝕜] [MeasurableSpace F]
    [BorelSpace F] (f : 𝕜 → F) (μ : Measure 𝕜) : AEMeasurable (deriv f) μ

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
[MeasurableSpace 𝕜]
[OpensMeasurableSpace 𝕜]
[MeasurableSpace F]
[BorelSpace F]
(f : 𝕜 → F)
(μ : MeasureTheory.Measure 𝕜)


theorem Dart.symm_ne (d : G.Dart) : d.symm ≠ d

{V : Type u_1}
{G : SimpleGraph V}
(d : G.Dart)


lemma levyProkhorovEDist_le_max_measure_univ (μ ν : Measure Ω) :
    levyProkhorovEDist μ ν ≤ max (μ univ) (ν univ)

{Ω : Type u_2}
[MeasurableSpace Ω]
[PseudoEMetricSpace Ω]
(μ ν : MeasureTheory.Measure Ω)

MeasureTheory.levyProkhorovEDist μ ν ≤ max (μ Set.univ) (ν Set.univ)


protected theorem coe_inv (x : S) : (↑x⁻¹ : L) = (↑x)⁻¹

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

↑x⁻¹ = (↑x)⁻¹


@[to_additive]
theorem mul_mem_mul : a ∈ s → b ∈ t → a * b ∈ s * t

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


protected theorem sub_lt_sub_of_lt_of_le {a b c d : Int}
  (hab : a < b) (hcd : c ≤ d) : a - d < b - c


theorem hasDerivAt_sinh (x : ℝ) : HasDerivAt sinh (cosh x) x


theorem _root_.IsUnit.mem_unitary_of_mul_star_self {u : R} (hu : IsUnit u)
    (h_mul : u * star u = 1) : u ∈ unitary R

{R : Type u_1}
[Monoid R]
[StarMul R]
{u : R}
(hu : IsUnit u)
(h_mul : u * star u = 1)


theorem Disjoint.cycleOf_mul_distrib [DecidableRel (f * g).SameCycle]
    [DecidableRel (g * f).SameCycle]  (h : f.Disjoint g) (x : α) :
    (f * g).cycleOf x = f.cycleOf x * g.cycleOf x

{α : Type u_2}
{f g : Equiv.Perm α}
[DecidableRel f.SameCycle]
[DecidableRel g.SameCycle]
[DecidableRel (f * g).SameCycle]
[DecidableRel (g * f).SameCycle]
(h : f.Disjoint g)
(x : α)


@[simp]
theorem not_prime_one : ¬(1 : ℕ+).Prime


@[simp, mfld_simps]
theorem mem_localTrivAt_source (p : Z.TotalSpace) (b : B) :
    p ∈ (Z.localTrivAt b).source ↔ p.1 ∈ (Z.localTrivAt b).baseSet

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(p : Z.TotalSpace)
(b : B)

p ∈ (Z.localTrivAt b).source ↔ p.proj ∈ (Z.localTrivAt b).baseSet


/-- Two nonnegative real exponents `p, q` are conjugate if they are `> 1` and satisfy the equality
`1/p + 1/q = 1`. This condition shows up in many theorems in analysis, notably related to `L^p`
norms. -/
@[mk_iff]
structure IsConjExponent (p q : ℝ≥0) : Prop where
  one_lt : 1 < p
  inv_add_inv_conj : p⁻¹ + q⁻¹ = 1

p.IsConjExponent q ↔ 1 < p ∧ p⁻¹ + q⁻¹ = 1


@[reassoc]
lemma whiskerLeft_mapId_hom (f : a ⟶ b) : F.map f ◁ (F.mapId b).hom =
    (F.mapComp f (𝟙 b)).inv ≫ F.map₂ (ρ_ f).hom ≫ (ρ_ (F.map f)).inv

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.Pseudofunctor B C)
{a b : B}
(f : a ⟶ b)

CategoryTheory.Bicategory.whiskerLeft (F.map f) (F.mapId b).hom =
  CategoryTheory.CategoryStruct.comp (F.mapComp f (CategoryTheory.CategoryStruct.id b)).inv
    (CategoryTheory.CategoryStruct.comp (F.map₂ (CategoryTheory.Bicategory.rightUnitor f).hom)
      (CategoryTheory.Bicategory.rightUnitor (F.map f)).inv)


theorem gradedComm_algebraMap_tmul (r : R) (b : ⨁ i, ℬ i) :
    gradedComm R 𝒜 ℬ (algebraMap R _ r ⊗ₜ b) = b ⊗ₜ algebraMap R _ r

(R : Type u_1)
{ι : Type u_2}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
(𝒜 : ι → Type u_5)
(ℬ : ι → Type u_6)
[CommRing R]
[(i : ι) → AddCommGroup (𝒜 i)]
[(i : ι) → AddCommGroup (ℬ i)]
[(i : ι) → Module R (𝒜 i)]
[(i : ι) → Module R (ℬ i)]
[DirectSum.GRing 𝒜]
[DirectSum.GRing ℬ]
[DirectSum.GAlgebra R 𝒜]
[DirectSum.GAlgebra R ℬ]
(r : R)
(b : ⨁ (i : ι), ℬ i)

(TensorProduct.gradedComm R 𝒜 ℬ) ((algebraMap R (⨁ (i : ι), 𝒜 i)) r ⊗ₜ[R] b) = b ⊗ₜ[R] (algebraMap R (⨁ (i : ι), 𝒜 i)) r


@[simp] theorem bind_eq_bind : bind = @Option.bind α β


lemma kernImage_compl {s : Set α} : kernImage f (sᶜ) = (f '' s)ᶜ

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


@[simp]
theorem mem_piFinset {t : ∀ a, Finset (δ a)} {f : ∀ a, δ a} : f ∈ piFinset t ↔ ∀ a, f a ∈ t a

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{δ : α → Type u_3}
{t : (a : α) → Finset (δ a)}
{f : (a : α) → δ a}

f ∈ Fintype.piFinset t ↔ ∀ (a : α), f a ∈ t a


@[simp]
theorem coe_one : ⇑(1 : CircleDeg1Lift) = id


theorem exp_mul_I_antiperiodic : Function.Antiperiodic (fun x => exp (x * I)) π

Function.Antiperiodic (fun x => Complex.exp (x * Complex.I)) ↑Real.pi


theorem restrict_apply₀ (ht : NullMeasurableSet t (μ.restrict s)) : μ.restrict s t = μ (t ∩ s)

(ht : MeasureTheory.NullMeasurableSet t (μ.restrict s))


@[simp]
theorem sinh_pos_iff : 0 < sinh x ↔ 0 < x


theorem left_U_subset_right_C (c : CU P) : c.left.U ⊆ c.right.C

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
(c : Urysohns.CU P)


/-- Given a compact set `K` inside an open set `U`, there is an open neighborhood `V` of `1`
  such that `V * K ⊆ U`. -/
@[to_additive
  "Given a compact set `K` inside an open set `U`, there is an open neighborhood `V` of
  `0` such that `V + K ⊆ U`."]
theorem compact_open_separated_mul_left {K U : Set G} (hK : IsCompact K) (hU : IsOpen U)
    (hKU : K ⊆ U) : ∃ V ∈ 𝓝 (1 : G), V * K ⊆ U

{G : Type w}
[TopologicalSpace G]
[MulOneClass G]
[ContinuousMul G]
{K U : Set G}
(hK : IsCompact K)
(hU : IsOpen U)
(hKU : K ⊆ U)


theorem integerNormalization_spec (p : S[X]) :
    ∃ b : M, ∀ i, algebraMap R S ((integerNormalization M p).coeff i) = (b : R) • p.coeff i

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsLocalization M S]
(p : S[X])

∃ b, ∀ (i : ℕ), (algebraMap R S) ((IsLocalization.integerNormalization M p).coeff i) = ↑b • p.coeff i


/-- A more general version of `MonoidHom.map_finprod_mem` that requires `s ∩ mulSupport f` rather
than `s` to be finite. -/
@[to_additive
      "A more general version of `AddMonoidHom.map_finsum_mem` that requires
      `s ∩ support f` rather than `s` to be finite."]
theorem MonoidHom.map_finprod_mem' {f : α → M} (g : M →* N) (h₀ : (s ∩ mulSupport f).Finite) :
    g (∏ᶠ j ∈ s, f j) = ∏ᶠ i ∈ s, g (f i)

{α : Type u_1}
{M : Type u_5}
{N : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
{s : Set α}
{f : α → M}
(g : M →+ N)
(h₀ : (s ∩ Function.support f).Finite)


/-- The `tail` of a vector made up of one element is `nil`. -/
@[simp]
theorem singleton_tail : ∀ (v : Vector α 1), v.tail = Vector.nil


theorem isSt_st {x : ℝ*} (hx : st x ≠ 0) : IsSt x (st x)


theorem _root_.MeasureTheory.Memℒp.ofReal {f : α → ℝ} (hf : Memℒp f p μ) :
    Memℒp (fun x => (f x : K)) p μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
{K : Type u_6}
[RCLike K]
{f : α → ℝ}
(hf : MeasureTheory.Memℒp f p μ)

MeasureTheory.Memℒp (fun x => ↑(f x)) p μ


theorem mk_apply_of_mem {s : Finset ι} {f : ∀ i : (↑s : Set ι), β i.val} {n : ι} (hn : n ∈ s) :
    mk β s f n = f ⟨n, hn⟩

{ι : Type v}
{β : ι → Type w}
[(i : ι) → AddCommMonoid (β i)]
[DecidableEq ι]
{s : Finset ι}
{f : (i : ↑↑s) → β ↑i}
{n : ι}
(hn : n ∈ s)


@[simp]
theorem Iio_union_Ico_eq_Iio (h : a ≤ b) : Iio a ∪ Ico a b = Iio b

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


theorem toSubsemiring_inj {S U : StarSubsemiring R} : S.toSubsemiring = U.toSubsemiring ↔ S = U

{R : Type v}
[NonAssocSemiring R]
[StarRing R]
{S U : StarSubsemiring R}


@[simp]
theorem coe_fn_mk (f : α ≃ β) (o : ∀ ⦃a b⦄, s (f a) (f b) ↔ r a b) :
    (RelIso.mk f @o : α → β) = f

(o : ∀ ⦃a b : α⦄, s (f a) (f b) ↔ r a b)

⇑{ toEquiv := f, map_rel_iff' := o } = ⇑f


@[to_additive]
theorem smul_inter_ne_empty_iff' {s t : Set α} {x : α} :
    x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a / b = x

{α : Type u_2}
[AddGroup α]
{s t : Set α}
{x : α}

(x +ᵥ s) ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a - b = x


lemma refl (γ : OneCochain G U) : OneCohomologyRelation γ γ 1

(γ : CategoryTheory.PresheafOfGroups.OneCochain G U)

CategoryTheory.PresheafOfGroups.OneCohomologyRelation γ γ 1


@[simp]
theorem frobenius_nnnorm_conjTranspose [StarAddMonoid α] [NormedStarGroup α] (A : Matrix m n α) :
    ‖Aᴴ‖₊ = ‖A‖₊

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
[StarAddMonoid α]
[NormedStarGroup α]
(A : Matrix m n α)

‖Aᴴ‖₊ = ‖A‖₊


@[to_additive]
lemma _root_.Equiv.prod_comp (e : ι ≃ κ) (g : κ → α) : ∏ i, g (e i) = ∏ i, g i

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[Fintype ι]
[Fintype κ]
[CommMonoid α]
(e : ι ≃ κ)
(g : κ → α)


@[simp]
lemma zero_pow_eq_zero [Nontrivial M₀] : (0 : M₀) ^ n = 0 ↔ n ≠ 0

{M₀ : Type u_2}
[MonoidWithZero M₀]
{n : ℕ}
[Nontrivial M₀]


theorem measure_preimage {f : α → β} (hf : MeasurePreserving f μa μb) {s : Set β}
    (hs : NullMeasurableSet s μb) : μa (f ⁻¹' s) = μb s

(hf : MeasureTheory.MeasurePreserving f μa μb)

(hs : MeasureTheory.NullMeasurableSet s μb)


theorem eq_zero_of_abs_lt_dvd {m x : ℤ} (h1 : m ∣ x) (h2 : |x| < m) : x = 0


theorem map_iSup {ι : Sort*} (f : K →+* L) (s : ι → Subfield K) :
    (iSup s).map f = ⨆ i, (s i).map f

{K : Type u}
{L : Type v}
[DivisionRing K]
[DivisionRing L]
{ι : Sort u_1}
(f : K →+* L)
(s : ι → Subfield K)

Subfield.map f (iSup s) = ⨆ i, Subfield.map f (s i)


lemma cfcₙ_cases (P : A → Prop) (a : A) (f : R → R) (h₀ : P 0)
    (haf : ∀ (hf : ContinuousOn f (σₙ R a)) h0 ha, P (cfcₙHom ha ⟨⟨_, hf.restrict⟩, h0⟩)) :
    P (cfcₙ f a)

(haf :
  ∀ (hf : ContinuousOn f (σₙ R a)) (h0 : { toFun := (σₙ R a).restrict f, continuous_toFun := ⋯ } 0 = 0) (ha : p a),
    P ((cfcₙHom ha) { toFun := (σₙ R a).restrict f, continuous_toFun := ⋯, map_zero' := h0 }))


theorem gc_map_comap (f : R →+* S) : GaloisConnection (map f) (comap f)

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
(f : R →+* S)

GaloisConnection (Subring.map f) (Subring.comap f)


@[simp]
theorem toEuclideanLin_apply_piLp_equiv_symm (M : Matrix m n 𝕜) (v : n → 𝕜) :
    toEuclideanLin M ((WithLp.equiv 2 (n→ 𝕜)).symm v) = (WithLp.equiv 2 (m → 𝕜)).symm (M *ᵥ v)

{𝕜 : Type u_3}
[RCLike 𝕜]
{m : Type u_8}
{n : Type u_9}
[Fintype n]
[DecidableEq n]
(M : Matrix m n 𝕜)
(v : n → 𝕜)

(Matrix.toEuclideanLin M) ((WithLp.equiv 2 (n → 𝕜)).symm v) = (WithLp.equiv 2 (m → 𝕜)).symm (M.mulVec v)


theorem comp_eq_zero_iff : p.comp q = 0 ↔ p = 0 ∨ p.eval (q.coeff 0) = 0 ∧ q = C (q.coeff 0)

{R : Type u}
[CommRing R]
[IsDomain R]
{p q : R[X]}

p.comp q = 0 ↔ p = 0 ∨ Polynomial.eval (q.coeff 0) p = 0 ∧ q = Polynomial.C (q.coeff 0)


theorem Nonempty.of_image₂_right (h : (s.image₂ f t).Nonempty) : t.Nonempty

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t : Finset β}
(h : (Finset.image₂ f s t).Nonempty)


theorem LinearMap.toMatrixAlgEquiv'_mul (f g : (n → R) →ₗ[R] n → R) :
    LinearMap.toMatrixAlgEquiv' (f * g) =
      LinearMap.toMatrixAlgEquiv' f * LinearMap.toMatrixAlgEquiv' g

{R : Type u_1}
[CommSemiring R]
{n : Type u_5}
[DecidableEq n]
[Fintype n]
(f g : (n → R) →ₗ[R] n → R)


theorem mem_powers (n : M) : n ∈ powers n


theorem ContinuousMultilinearMap.uncurry0_norm (f : G[×0]→L[𝕜] G') : ‖f.uncurry0‖ = ‖f‖

(f : ContinuousMultilinearMap 𝕜 (fun i => G) G')


theorem IsPrimePow.two_le : ∀ {n : ℕ}, IsPrimePow n → 2 ≤ n


theorem identity (s : Stream' α) : pure id ⊛ s = s


protected theorem mul_comm : M * N = N * M

{R : Type u}
[CommSemiring R]
{A : Type v}
[CommSemiring A]
[Algebra R A]
(M N : Submodule R A)


@[simp]
theorem ofNat_apply (n : ℕ) [n.AtLeastTwo] (a : α) : (OfNat.ofNat n : ∀ a, π a) a = n

{α : Type u_1}
{π : α → Type u_3}
[(a : α) → NatCast (π a)]
(n : ℕ)
[n.AtLeastTwo]
(a : α)