/-- A ring is a simple module over itself iff it is a division ring. -/
theorem isSimpleModule_self_iff_isUnit :
    IsSimpleModule R R ↔ Nontrivial R ∧ ∀ x : R, x ≠ 0 → IsUnit x

IsSimpleModule R R ↔ Nontrivial R ∧ ∀ (x : R), x ≠ 0 → IsUnit x


theorem tendsto_order_unbounded [OrderTopology α] {f : β → α} {a : α} {x : Filter β}
    (hu : ∃ u, a < u) (hl : ∃ l, l < a) (h : ∀ l u, l < a → a < u → ∀ᶠ b in x, l < f b ∧ f b < u) :
    Tendsto f x (𝓝 a)

(h : ∀ (l u : α), l < a → a < u → ∀ᶠ (b : β) in x, l < f b ∧ f b < u)


theorem pi_eq_zero : pi fv = 0 ↔ ∀ i, fv i = 0

{k : Type u_2}
{V1 : Type u_3}
{P1 : Type u_4}
[Ring k]
[AddCommGroup V1]
[AffineSpace V1 P1]
[Module k V1]
{ι : Type u_9}
{φv : ι → Type u_10}
[(i : ι) → AddCommGroup (φv i)]
[(i : ι) → Module k (φv i)]
(fv : (i : ι) → P1 →ᵃ[k] φv i)

AffineMap.pi fv = 0 ↔ ∀ (i : ι), fv i = 0


theorem Chain.count_not :
    ∀ {b : Bool} {l : List Bool}, Chain (· ≠ ·) b l → count (!b) l = count b l + length l % 2

List.Chain (fun x x_1 => x ≠ x_1) b l → List.count (!b) l = List.count b l + l.length % 2


@[to_additive prod_eq_bot_iff]
theorem prod_eq_bot_iff {s : Submonoid M} {t : Submonoid N} : s.prod t = ⊥ ↔ s = ⊥ ∧ t = ⊥

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{s : Submonoid M}
{t : Submonoid N}


theorem partiallyWellOrderedOn_iff_finite_antichains [IsSymm α r] :
    s.PartiallyWellOrderedOn r ↔ ∀ t, t ⊆ s → IsAntichain r t → t.Finite

{α : Type u_2}
{r : α → α → Prop}
{s : Set α}
[IsRefl α r]
[IsSymm α r]

s.PartiallyWellOrderedOn r ↔ ∀ t ⊆ s, IsAntichain r t → t.Finite


lemma cfc_id' : cfc (fun x : R ↦ x) a = a

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


nonrec lemma StrongConcaveOn.mono (hmn : m ≤ n) (hf : StrongConcaveOn s n f) :
    StrongConcaveOn s m f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{s : Set E}
{f : E → ℝ}
{m n : ℝ}
(hmn : m ≤ n)
(hf : StrongConcaveOn s n f)


theorem coe_sup_eq : ↑(I ⊔ J) = { x | ∃ i ∈ I, ∃ j ∈ J, x = i ⊔ j }

{P : Type u_1}
[DistribLattice P]
{I J : Order.Ideal P}

↑(I ⊔ J) = {x | ∃ i ∈ I, ∃ j ∈ J, x = i ⊔ j}


@[simp]
theorem ofTypeFunctor_map {α β} (f : α → β) :
    (ofTypeFunctor m).map f = (Functor.map f : m α → m β)

(m : Type u → Type v)
[Functor m]
[LawfulFunctor m]
{α β : Type u}
(f : α → β)

(CategoryTheory.ofTypeFunctor m).map f = Functor.map f


lemma isoClosure_le_iff (P Q : MorphismProperty C) [Q.RespectsIso] :
    P.isoClosure ≤ Q ↔ P ≤ Q

(P Q : CategoryTheory.MorphismProperty C)


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

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

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


theorem bihimp_assoc : a ⇔ b ⇔ c = a ⇔ (b ⇔ c)

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


theorem degree_divByMonic_lt (p : R[X]) {q : R[X]} (hq : Monic q) (hp0 : p ≠ 0)
    (h0q : 0 < degree q) : degree (p /ₘ q) < degree p

{R : Type u}
[Ring R]
(p : R[X])
{q : R[X]}
(hq : q.Monic)
(hp0 : p ≠ 0)
(h0q : 0 < q.degree)


/-- This structure contains the data of a family of objects `X i` which cover
the terminal object, and of a presentation of `M.over (X i)` for all `i`. -/
structure QuasicoherentData where
  /-- the index type of the covering -/
  I : Type u'
  /-- a family of objects which cover the terminal object -/
  X : I → C
  coversTop : J.CoversTop X
  /-- a presentation of the sheaf of modules `M.over (X i)` for any `i : I` -/
  presentation (i : I) : (M.over (X i)).Presentation

{J : CategoryTheory.GrothendieckTopology C}

[∀ (X : C), (J.over X).HasSheafCompose (CategoryTheory.forget₂ RingCat AddCommGrp)]

[∀ (X : C), CategoryTheory.HasWeakSheafify (J.over X) AddCommGrp]

[∀ (X : C), (J.over X).WEqualsLocallyBijective AddCommGrp]


theorem HereditarilyLindelof_LindelofSets [HereditarilyLindelofSpace X] (s : Set X) :
    IsLindelof s

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


protected theorem encode : Primrec (@encode α _)


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


/-- If a nonempty ball in a proper space includes a closed set `s`, then there exists a nonempty
ball with the same center and a strictly smaller radius that includes `s`. -/
theorem exists_pos_lt_subset_ball (hr : 0 < r) (hs : IsClosed s) (h : s ⊆ ball x r) :
    ∃ r' ∈ Ioo 0 r, s ⊆ ball x r'

{α : Type u_1}
[PseudoMetricSpace α]
[ProperSpace α]
{x : α}
{r : ℝ}
{s : Set α}
(hr : 0 < r)
(hs : IsClosed s)
(h : s ⊆ Metric.ball x r)

∃ r' ∈ Set.Ioo 0 r, s ⊆ Metric.ball x r'


@[simp]
theorem coe_copy (f : C_c(α, β)) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
(f : α →C_c β)
(f' : α → β)
(h : f' = ⇑f)


/-- If an element `x` is a root of a nonzero polynomial `p`, then the degree of `p` is at least the
degree of the minimal polynomial of `x`. See also `minpoly.degree_le_of_ne_zero` which relaxes the
assumptions on `S` in exchange for stronger assumptions on `R`. -/
theorem IsIntegrallyClosed.degree_le_of_ne_zero {s : S} (hs : IsIntegral R s) {p : R[X]}
    (hp0 : p ≠ 0) (hp : Polynomial.aeval s p = 0) : degree (minpoly R s) ≤ degree p

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[IsDomain R]
[Algebra R S]
[IsDomain S]
[NoZeroSMulDivisors R S]
[IsIntegrallyClosed R]
{s : S}
(hs : IsIntegral R s)
{p : R[X]}
(hp0 : p ≠ 0)
(hp : (Polynomial.aeval s) p = 0)


/-- An auxiliary definition to be used in the proof of the fact that
`J.diagramFunctor D X` preserves limits. -/
@[simps]
def coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation {X : C} {K : Type max v u}
    [SmallCategory K] {F : K ⥤ Cᵒᵖ ⥤ D} {W : J.Cover X} (i : W.Arrow)
    (E : Cone (F ⋙ J.diagramFunctor D X ⋙ (evaluation (J.Cover X)ᵒᵖ D).obj (op W))) :
    Cone (F ⋙ (evaluation _ _).obj (op i.Y))

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

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

(E :
  CategoryTheory.Limits.Cone
    (F ⋙ J.diagramFunctor D X ⋙ (CategoryTheory.evaluation (J.Cover X)ᵒᵖ D).obj (Opposite.op W)))

(CategoryTheory.GrothendieckTopology.coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation i E).π.app k =
  E.π.app k ≫ CategoryTheory.Limits.Multiequalizer.ι (W.index (F.obj k)) i


lemma smul_lt_smul_of_neg_left (hb : b₁ < b₂) (ha : a < 0) : a • b₂ < a • b₁

{α : Type u_1}
{β : Type u_2}
{a : α}
{b₁ b₂ : β}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulStrictMono α β]
(hb : b₁ < b₂)
(ha : a < 0)


/-- This technique to witness `HasSeparatingCover` in regular Lindelöf topological spaces
will be used to prove regular Lindelöf spaces are normal. -/
lemma IsClosed.HasSeparatingCover {s t : Set X} [r : RegularSpace X] [LindelofSpace X]
    (s_cl : IsClosed s) (t_cl : IsClosed t) (st_dis : Disjoint s t) : HasSeparatingCover s t

{X : Type u_1}
[TopologicalSpace X]
{s t : Set X}
[r : RegularSpace X]
[LindelofSpace X]
(s_cl : IsClosed s)
(t_cl : IsClosed t)
(st_dis : Disjoint s t)


theorem betaIntegral_symm (u v : ℂ) : betaIntegral v u = betaIntegral u v


/-- The angle between the zero vector and a vector. -/
@[simp]
theorem angle_zero_left (x : V) : angle 0 x = π / 2

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
(x : V)


@[simp]
theorem eval_append_singleton (x : List α) (a : α) : M.eval (x ++ [a]) = M.step (M.eval x) a

{α : Type u}
{σ : Type v}
(M : DFA α σ)
(x : List α)
(a : α)


@[simp] theorem getElem?_set_eq {l : List α} {i : Nat} {a : α} (h : i < (l.set i a).length) :
    (l.set i a)[i]? = some a

{α : Type u_1}
{l : List α}
{i : Nat}
{a : α}
(h : i < (l.set i a).length)


theorem absorbs_iff_eventually_nhds_zero (h₀ : 0 ∈ s) :
    Absorbs 𝕜 s t ↔ ∀ᶠ c : 𝕜 in 𝓝 0, MapsTo (c • ·) t s

{𝕜 : Type u_1}
{E : Type u_3}
[NormedDivisionRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s t : Set E}
(h₀ : 0 ∈ s)

Absorbs 𝕜 s t ↔ ∀ᶠ (c : 𝕜) in 𝓝 0, Set.MapsTo (fun x => c • x) t s


/-- The functor `ShortComplex C ⥤ ShortComplex D` induced by a functor `C ⥤ D` which
preserves zero morphisms. -/
@[simps]
def _root_.CategoryTheory.Functor.mapShortComplex (F : C ⥤ D) [F.PreservesZeroMorphisms] :
    ShortComplex C ⥤ ShortComplex D

∀ {X Y : CategoryTheory.ShortComplex C} (φ : X ⟶ Y), (F.mapShortComplex.map φ).τ₃ = F.map φ.τ₃


theorem closure_sUnion (s : Set (Set K)) : closure (⋃₀ s) = ⨆ t ∈ s, closure t

{K : Type u}
[DivisionRing K]
(s : Set (Set K))

Subfield.closure (⋃₀ s) = ⨆ t ∈ s, Subfield.closure t


@[simp, norm_cast squash]
theorem cast_negSucc (n : ℕ) : (-[n+1] : R) = -(n + 1 : ℕ)

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


@[simp]
theorem toReal_neg : ∀ {a : EReal}, toReal (-a) = -toReal a


/-- If `f₀, f₁, f₂, ...` and `g₀, g₁, g₂, ...` are both multipliable then so is the
`ℤ`-indexed sequence: `..., g₂, g₁, g₀, f₀, f₁, f₂, ...` (with `f₀` at the `0`-th position). -/
@[to_additive "If `f₀, f₁, f₂, ...` and `g₀, g₁, g₂, ...` are both summable then so is the
`ℤ`-indexed sequence: `..., g₂, g₁, g₀, f₀, f₁, f₂, ...` (with `f₀` at the `0`-th position)."]
lemma Multipliable.int_rec {f g : ℕ → M} (hf : Multipliable f) (hg : Multipliable g) :
    Multipliable (Int.rec f g)

{M : Type u_1}
[CommMonoid M]
[TopologicalSpace M]
[ContinuousMul M]
{f g : ℕ → M}
(hf : Multipliable f)
(hg : Multipliable g)


@[simp] theorem ugetElem_eq_getElem (a : Array α) {i : USize} (h : i.toNat < a.size) :
  a[i] = a[i.toNat]

{α : Type u_1}
(a : Array α)
{i : USize}
(h : i.toNat < a.size)


theorem splitCenterBox_le (I : Box ι) (s : Set ι) : I.splitCenterBox s ≤ I

{ι : Type u_1}
(I : BoxIntegral.Box ι)
(s : Set ι)


theorem orthogonalProjection_orthogonal (u : E) :
    orthogonalProjection Kᗮ u =
      ⟨u - orthogonalProjection K u, sub_orthogonalProjection_mem_orthogonal _⟩

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

(orthogonalProjection Kᗮ) u = ⟨u - ↑((orthogonalProjection K) u), ⋯⟩


theorem measurable_iff_le_map {m₁ : MeasurableSpace α} {m₂ : MeasurableSpace β} {f : α → β} :
    Measurable f ↔ m₂ ≤ m₁.map f

{α : Type u_1}
{β : Type u_2}
{m₁ : MeasurableSpace α}
{m₂ : MeasurableSpace β}
{f : α → β}

Measurable f ↔ m₂ ≤ MeasurableSpace.map f m₁


@[to_additive (attr := simp)]
theorem ofList_append (xs ys : List α) : ofList (xs ++ ys) = ofList xs * ofList ys

FreeAddMonoid.ofList (xs ++ ys) = FreeAddMonoid.ofList xs + FreeAddMonoid.ofList ys


/-- `(x, y) ↦ x ^ y` is strictly differentiable at `p : ℝ × ℝ` such that `0 < p.fst`. -/
theorem hasStrictFDerivAt_rpow_of_pos (p : ℝ × ℝ) (hp : 0 < p.1) :
    HasStrictFDerivAt (fun x : ℝ × ℝ => x.1 ^ x.2)
      ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
        (p.1 ^ p.2 * log p.1) • ContinuousLinearMap.snd ℝ ℝ ℝ) p

HasStrictFDerivAt (fun x => x.1 ^ x.2)
  ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ + (p.1 ^ p.2 * Real.log p.1) • ContinuousLinearMap.snd ℝ ℝ ℝ)
  p


@[simp]
lemma rightUnshift_rightShift (a n' : ℤ) (hn' : n' + a = n) :
    (γ.rightShift a n' hn').rightUnshift n hn' = γ

(γ : CochainComplex.HomComplex.Cochain K L n)


/-- If `f : ℕ → M` has product `m`, then the partial products `∏ i ∈ range n, f i` converge
to `m`. -/
@[to_additive "If `f : ℕ → M` has sum `m`, then the partial sums `∑ i ∈ range n, f i` converge
to `m`."]
theorem tendsto_prod_nat {f : ℕ → M} (h : HasProd f m) :
    Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 m)

{M : Type u_1}
[AddCommMonoid M]
[TopologicalSpace M]
{m : M}
{f : ℕ → M}
(h : HasSum f m)

Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, f i) Filter.atTop (𝓝 m)


@[simp]
theorem empty_relation_apply (a b : α) : EmptyRelation a b ↔ False


theorem UniformCauchySeqOn.prod_map {ι' α' β' : Type*} [UniformSpace β'] {F' : ι' → α' → β'}
    {p' : Filter ι'} {s' : Set α'} (h : UniformCauchySeqOn F p s)
    (h' : UniformCauchySeqOn F' p' s') :
    UniformCauchySeqOn (fun i : ι × ι' => Prod.map (F i.1) (F' i.2)) (p ×ˢ p') (s ×ˢ s')

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{s : Set α}
{p : Filter ι}
{ι' : Type u_1}
{α' : Type u_2}
{β' : Type u_3}
[UniformSpace β']
{F' : ι' → α' → β'}
{p' : Filter ι'}
{s' : Set α'}
(h : UniformCauchySeqOn F p s)
(h' : UniformCauchySeqOn F' p' s')

UniformCauchySeqOn (fun i => Prod.map (F i.1) (F' i.2)) (p ×ˢ p') (s ×ˢ s')


/-- A continuous partition of unity on a set `s : Set X` is a collection of continuous functions
`f i` such that

* the supports of `f i` form a locally finite family of sets, i.e., for every point `x : X` there
  exists a neighborhood `U ∋ x` such that all but finitely many functions `f i` are zero on `U`;
* the functions `f i` are nonnegative;
* the sum `∑ᶠ i, f i x` is equal to one for every `x ∈ s` and is less than or equal to one
  otherwise.

If `X` is a normal paracompact space, then `PartitionOfUnity.exists_isSubordinate` guarantees
that for every open covering `U : Set (Set X)` of `s` there exists a partition of unity that is
subordinate to `U`.
-/
structure PartitionOfUnity (ι X : Type*) [TopologicalSpace X] (s : Set X := univ) where
  /-- The collection of continuous functions underlying this partition of unity -/
  toFun : ι → C(X, ℝ)
  /-- the supports of the underlying functions are a locally finite family of sets -/
  locallyFinite' : LocallyFinite fun i => support (toFun i)
  /-- the functions are non-negative -/
  nonneg' : 0 ≤ toFun
  /-- the functions sum up to one on `s` -/
  sum_eq_one' : ∀ x ∈ s, ∑ᶠ i, toFun i x = 1
  /-- the functions sum up to at most one, globally -/
  sum_le_one' : ∀ x, ∑ᶠ i, toFun i x ≤ 1

{ι : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{s : optParam (Set X) Set.univ}
(self : PartitionOfUnity ι X s)
(x : X)


/-- Auxiliary definition for `mapBifunctorShift₁Iso`. -/
@[simps! hom_f_f inv_f_f]
def mapBifunctorHomologicalComplexShift₁Iso :
    ((F.mapBifunctorHomologicalComplex _ _).obj (K₁⟦x⟧)).obj K₂ ≅
    (HomologicalComplex₂.shiftFunctor₁ D x).obj
      (((F.mapBifunctorHomologicalComplex _ _).obj K₁).obj K₂)

[∀ (X₁ : C₁), (F.obj X₁).PreservesZeroMorphisms]

∀ (x_1 : ℤ),
  ((K₁.mapBifunctorHomologicalComplexShift₁Iso K₂ F x).hom.f i).f x_1 = 𝟙 ((F.obj (K₁.X (i + x))).obj (K₂.X x_1))


lemma not_uncountable_iff : ¬Uncountable α ↔ Countable α


lemma extensiveTopology.presheafIsLocallySurjective_iff [FinitaryPreExtensive C] {F G : Cᵒᵖ ⥤ D}
    (f : F ⟶ G) [PreservesFiniteProducts F] [PreservesFiniteProducts G]
      [PreservesFiniteProducts (forget D)] : Presheaf.IsLocallySurjective (extensiveTopology C) f ↔
        ∀ (X : C), Function.Surjective (f.app (op X))

CategoryTheory.Presheaf.IsLocallySurjective (CategoryTheory.extensiveTopology C) f ↔
  ∀ (X : C), Function.Surjective ⇑(f.app (Opposite.op X))


theorem div_ne_zero_iff : a / b ≠ 0 ↔ a ≠ 0 ∧ b ≠ 0

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b : G₀}


@[simp]
theorem comp_right_id (r : Rel α β) : r • @Eq β = r

{α : Type u_1}
{β : Type u_2}
(r : Rel α β)


@[simp]
theorem finsuppLequivDFinsupp_symm_apply [DecidableEq ι] [Semiring R] [AddCommMonoid M]
    [∀ m : M, Decidable (m ≠ 0)] [Module R M] :
    ↑(LinearEquiv.symm (finsuppLequivDFinsupp (ι := ι) (M := M) R)) = DFinsupp.toFinsupp

{ι : Type u_1}
(R : Type u_2)
{M : Type u_3}
[DecidableEq ι]
[Semiring R]
[AddCommMonoid M]
[(m : M) → Decidable (m ≠ 0)]
[Module R M]

⇑(finsuppLequivDFinsupp R).symm = DFinsupp.toFinsupp


@[simp]
lemma cocardinal_inf_principal_neBot_iff {s : Set α} :
    (cocardinal α hreg ⊓ 𝓟 s).NeBot ↔ c ≤ #s

{α : Type u}
{c : Cardinal.{u}}
{hreg : c.IsRegular}
{s : Set α}

(Filter.cocardinal α hreg ⊓ 𝓟 s).NeBot ↔ c ≤ #↑s


protected lemma bijective (f : S →+* Q) (hf : f.comp (algebraMap R S) = algebraMap R Q) :
    Function.Bijective f


/-- If a point in an R₁ space has a compact neighborhood,
then it has a basis of compact closed neighborhoods. -/
theorem IsCompact.isCompact_isClosed_basis_nhds {x : X} {L : Set X} (hLc : IsCompact L)
    (hxL : L ∈ 𝓝 x) : (𝓝 x).HasBasis (fun K ↦ K ∈ 𝓝 x ∧ IsCompact K ∧ IsClosed K) (·)

{X : Type u_1}
[TopologicalSpace X]
[R1Space X]
{x : X}
{L : Set X}
(hLc : IsCompact L)
(hxL : L ∈ 𝓝 x)

(𝓝 x).HasBasis (fun K => K ∈ 𝓝 x ∧ IsCompact K ∧ IsClosed K) fun x => x


theorem totalSpaceMk_inducing : Inducing (@TotalSpace.mk B F E b)

[TopologicalSpace (Bundle.TotalSpace F E)]


/-- Cyclic permutations preserve the triple product. See also `triple_product_eq_det`. -/
theorem triple_product_permutation (u v w : Fin 3 → R) : u ⬝ᵥ v ×₃ w = v ⬝ᵥ w ×₃ u

{R : Type u_1}
[CommRing R]
(u v w : Fin 3 → R)

u ⬝ᵥ (crossProduct v) w = v ⬝ᵥ (crossProduct w) u


theorem fg_iff_exists_fin_generating_family {N : Submodule R M} :
    N.FG ↔ ∃ (n : ℕ) (s : Fin n → M), span R (range s) = N

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{N : Submodule R M}

N.FG ↔ ∃ n s, Submodule.span R (Set.range s) = N


theorem supIndep_product_iff {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α} :
    (s.product t).SupIndep f ↔ (s.SupIndep fun i => t.sup fun i' => f (i, i'))
      ∧ t.SupIndep fun i' => s.sup fun i => f (i, i')

{α : Type u_1}
{ι : Type u_3}
{ι' : Type u_4}
[DistribLattice α]
[OrderBot α]
{s : Finset ι}
{t : Finset ι'}
{f : ι × ι' → α}


theorem le_birthday : ∀ x : PGame, x ≤ x.birthday.toPGame


/-- An induction principle for span membership. If `p` holds for all elements of `s` and is
preserved under certain affine combinations, then `p` holds for all elements of the span of `s`. -/
theorem affineSpan_induction {x : P} {s : Set P} {p : P → Prop} (h : x ∈ affineSpan k s)
    (mem : ∀ x : P, x ∈ s → p x)
    (smul_vsub_vadd : ∀ (c : k) (u v w : P), p u → p v → p w → p (c • (u -ᵥ v) +ᵥ w)) : p x


theorem exists_blsub_cof (o : Ordinal) :
    ∃ f : ∀ a < (cof o).ord, Ordinal, blsub.{u, u} _ f = o


theorem sum_comp_inr {P Q R : D} (f : (inr P : C ⊕ D) ⟶ inr Q) (g : (inr Q : C ⊕ D) ⟶ inr R) :
    @CategoryStruct.comp _ _ P Q R (f : P ⟶ Q) (g : Q ⟶ R) =
      @CategoryStruct.comp _ _ (inr P) (inr Q) (inr R) (f : P ⟶ Q) (g : Q ⟶ R)

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
(D : Type u₁)
[CategoryTheory.Category.{v₁, u₁} D]
{P Q R : D}
(f : Sum.inr P ⟶ Sum.inr Q)
(g : Sum.inr Q ⟶ Sum.inr R)

CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f g


@[simp]
theorem cliqueFinset_map (f : α ↪ β) (hn : n ≠ 1) :
    (G.map f).cliqueFinset n = (G.cliqueFinset n).map ⟨map f, Finset.map_injective _⟩

{α : Type u_1}
{β : Type u_2}
(G : SimpleGraph α)
[Fintype α]
[DecidableEq α]
[DecidableRel G.Adj]
{n : ℕ}
[Fintype β]
[DecidableEq β]
(f : α ↪ β)
(hn : n ≠ 1)

(SimpleGraph.map f G).cliqueFinset n = Finset.map { toFun := Finset.map f, inj' := ⋯ } (G.cliqueFinset n)


theorem Subtype.nontrivial_iff_exists_ne (p : α → Prop) (x : Subtype p) :
    Nontrivial (Subtype p) ↔ ∃ (y : α) (_ : p y), y ≠ x

{α : Type u_1}
(p : α → Prop)
(x : Subtype p)

Nontrivial (Subtype p) ↔ ∃ y x_1, y ≠ ↑x


theorem coe_tsum_of_nonneg {f : α → ℝ} (hf₁ : ∀ n, 0 ≤ f n) :
    (⟨∑' n, f n, tsum_nonneg hf₁⟩ : ℝ≥0) = (∑' n, ⟨f n, hf₁ n⟩ : ℝ≥0)

{α : Type u_1}
{f : α → ℝ}
(hf₁ : ∀ (n : α), 0 ≤ f n)

⟨∑' (n : α), f n, ⋯⟩ = ∑' (n : α), ⟨f n, ⋯⟩


/-- Combine a collection of bundled continuous maps `C(X i, Y i)` into a bundled continuous map
`C(∀ i, X i, ∀ i, Y i)`. -/
@[simps!]
def piMap (f : ∀ i, C(X i, Y i)) : C((i : I) → X i, (i : I) → Y i)

{I : Type u_5}
{X : I → Type u_7}
{Y : I → Type u_8}
[(i : I) → TopologicalSpace (X i)]
[(i : I) → TopologicalSpace (Y i)]
(f : (i : I) → C(X i, Y i))
(a : (i : I) → X i)
(i : I)

(ContinuousMap.piMap f) a i = (f i) (a i)


theorem add_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ)
    (hg : Martingale g ℱ μ) : Submartingale (f + g) ℱ μ

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

(hf : MeasureTheory.Submartingale f ℱ μ)


theorem Nondegenerate.toMatrix' {B : BilinForm R₃ (ι → R₃)} (h : B.Nondegenerate) :
    B.toMatrix'.Nondegenerate

{R₃ : Type u_7}
[CommRing R₃]
{ι : Type u_12}
[DecidableEq ι]
[Fintype ι]
{B : LinearMap.BilinForm R₃ (ι → R₃)}
(h : B.Nondegenerate)


lemma natDegree_eraseLead (h : f.nextCoeff ≠ 0) : f.eraseLead.natDegree = f.natDegree - 1

{R : Type u_1}
[Semiring R]
{f : R[X]}
(h : f.nextCoeff ≠ 0)


theorem preimage_metric_closedBall {r : ℝ} : p ⁻¹' Metric.closedBall 0 r = { x | p x ≤ r }

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

⇑p ⁻¹' Metric.closedBall 0 r = {x | p x ≤ r}


theorem FiberBundle.writtenInExtChartAt_trivializationAt {x : TotalSpace F E} {y}
    (hy : y ∈ (extChartAt (IB.prod 𝓘(𝕜, F)) x).target) :
    writtenInExtChartAt (IB.prod 𝓘(𝕜, F)) (IB.prod 𝓘(𝕜, F)) x
      (trivializationAt F E x.proj) y = y

writtenInExtChartAt (IB.prod 𝓘(𝕜, F)) (IB.prod 𝓘(𝕜, F)) x (↑(trivializationAt F E x.proj)) y = y


@[simp]
theorem ofBoolAlg_sdiff (a b : AsBoolAlg α) : ofBoolAlg (a \ b) = ofBoolAlg a * (1 + ofBoolAlg b)

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


theorem eq_of_mem_slice (h₁ : A ∈ 𝒜 # r₁) (h₂ : A ∈ 𝒜 # r₂) : r₁ = r₂

{α : Type u_1}
{𝒜 : Finset (Finset α)}
{A : Finset α}
{r₁ r₂ : ℕ}
(h₁ : A ∈ 𝒜 # r₁)
(h₂ : A ∈ 𝒜 # r₂)


theorem toList_inj {s₁ s₂ : String} : s₁.toList = s₂.toList ↔ s₁ = s₂


theorem EventuallyEq.eventuallyConst_iff {g : α → β} (h : f =ᶠ[l] g) :
    EventuallyConst f l ↔ EventuallyConst g l

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{f g : α → β}
(h : f =ᶠ[l] g)

Filter.EventuallyConst f l ↔ Filter.EventuallyConst g l


@[to_additive]
theorem mem_smul_finset {x : β} : x ∈ a • s ↔ ∃ y, y ∈ s ∧ a • y = x

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{s : Finset β}
{a : α}
{x : β}


theorem mem_lowerBounds_image_self (Hf : AntitoneOn f t) :
    a ∈ upperBounds t → a ∈ t → f a ∈ lowerBounds (f '' t)

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


theorem coe_coe (P : Polynomial F) : ((P : PowerSeries F) : LaurentSeries F) = (P : RatFunc F)


@[simp, norm_cast]
theorem coe_one : ((1 : R[X]) : PowerSeries R) = 1


theorem inv_lt_inv {x y : ℝ≥0} (hx : x ≠ 0) (h : x < y) : y⁻¹ < x⁻¹


@[simp]
theorem restrict_piecewise_compl (f g : α → β) (s : Set α) [∀ x, Decidable (x ∈ s)] :
    sᶜ.restrict (piecewise s f g) = sᶜ.restrict g

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

sᶜ.restrict (s.piecewise f g) = sᶜ.restrict g


@[to_additive tendsto_norm_cocompact_atTop]
lemma tendsto_norm_cocompact_atTop' [ProperSpace E] : Tendsto norm (cocompact E) atTop

{E : Type u_3}
[SeminormedGroup E]
[ProperSpace E]

Filter.Tendsto norm (Filter.cocompact E) Filter.atTop


@[to_additive (attr := simp, norm_cast)]
theorem coe_ofClosureMEqTopRight (f : M → N) (hs : closure s = ⊤) (h1 hmul) :
    ⇑(ofClosureMEqTopRight f hs h1 hmul) = f

(hmul : ∀ (x y : M), y ∈ s → f (x * y) = f x * f y)

⇑(MonoidHom.ofClosureMEqTopRight f hs h1 hmul) = f


theorem mul_right_cancel_iff_of_pos [MulPosReflectLE α] (b0 : 0 < b) : a * b = c * b ↔ a = c

{α : Type u_1}
{a b c : α}
[MulZeroClass α]
[PartialOrder α]
[MulPosReflectLE α]
(b0 : 0 < b)


@[simp]
theorem coe_copy (f : M₁ →SL[σ₁₂] M₂) (f' : M₁ → M₂) (h : f' = ⇑f) : ⇑(f.copy f' h) = f'

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(f : M₁ →SL[σ₁₂] M₂)
(f' : M₁ → M₂)
(h : f' = ⇑f)


@[simp] theorem forM_cons' [Monad m] :
    (a::as).forM f = (f a >>= fun _ => as.forM f : m PUnit)

∀ {α : Type u_3} {a : α} {as : List α} {f : α → m PUnit} [inst : Monad m],
  (a :: as).forM f = do
    f a
    as.forM f


@[simp] theorem bind_singleton' (l : List α) : (l.bind fun x => [x]) = l


@[simp]
theorem measurableEquivRealProd_symm_apply (p : ℝ × ℝ) :
    measurableEquivRealProd.symm p = {re := p.1, im := p.2}

Complex.measurableEquivRealProd.symm p = { re := p.1, im := p.2 }


lemma image_subset_diffs_left : b ∈ t → s.image (· \ b) ⊆ s \\ t

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

b ∈ t → Finset.image (fun x => x \ b) s ⊆ s.diffs t


theorem mul {a b c k : ℤ} (hk0 : k ≠ 0) :
    Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c)


theorem heq_of_cast_eq : ∀ (e : α = β) (_ : cast e a = a'), HEq a a'


/-- If a function `f : 𝕜 → E` has power series representation `p` on a ball of some radius and for
each positive radius it has some power series representation, then `p` converges to `f` on the whole
`𝕜`. -/
theorem HasFPowerSeriesOnBall.r_eq_top_of_exists {f : 𝕜 → E} {r : ℝ≥0∞} {x : 𝕜}
    {p : FormalMultilinearSeries 𝕜 𝕜 E} (h : HasFPowerSeriesOnBall f p x r)
    (h' : ∀ (r' : ℝ≥0) (_ : 0 < r'), ∃ p' : FormalMultilinearSeries 𝕜 𝕜 E,
      HasFPowerSeriesOnBall f p' x r') :
    HasFPowerSeriesOnBall f p x ∞

(h' : ∀ (r' : ℝ≥0), 0 < r' → ∃ p', HasFPowerSeriesOnBall f p' x ↑r')


theorem Heap.WF.of_le (hle : n ≤ n') (h : Heap.WF le n' s) : s.WF le n

∀ {α : Type u_1} {le : α → α → Bool} {s : Batteries.BinomialHeap.Imp.Heap α},
  n ≤ n' → Batteries.BinomialHeap.Imp.Heap.WF le n' s → Batteries.BinomialHeap.Imp.Heap.WF le n s


theorem tsum_add_one_eq_top {f : ℕ → ℝ≥0∞} (hf : ∑' n, f n = ∞) (hf0 : f 0 ≠ ∞) :
    ∑' n, f (n + 1) = ∞

{f : ℕ → ℝ≥0∞}
(hf : ∑' (n : ℕ), f n = ⊤)
(hf0 : f 0 ≠ ⊤)


@[simp]
theorem inf_set_eq_iInter (s : Finset α) (f : α → Set β) : s.inf f = ⋂ x ∈ s, f x

{α : Type u_2}
{β : Type u_3}
(s : Finset α)
(f : α → Set β)


@[continuity]
theorem continuous_exp : Continuous exp


/-- If `f` maps `s` bijectively to `t`, and `t'` is a superset of `t` contained in the range of `f`,
then `f` maps some superset of `s` bijectively to `t'`. -/
theorem BijOn.exists_extend {t' : Set β} (h : BijOn f s t) (htt' : t ⊆ t') (ht' : t' ⊆ range f) :
    ∃ s', s ⊆ s' ∧ BijOn f s' t'

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
{t' : Set β}
(h : Set.BijOn f s t)
(htt' : t ⊆ t')
(ht' : t' ⊆ Set.range f)


theorem posOfAux_eq (s c) : posOfAux s c = findAux s (· == c)

s.posOfAux c = s.findAux fun x => x == c


theorem lintegral_nnnorm_neg {f : α → β} : (∫⁻ a, ‖(-f) a‖₊ ∂μ) = ∫⁻ a, ‖f a‖₊ ∂μ

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

∫⁻ (a : α), ↑‖(-f) a‖₊ ∂μ = ∫⁻ (a : α), ↑‖f a‖₊ ∂μ


@[simp]
theorem relabel_id_eq_id : (Term.relabel id : L.Term α → L.Term α) = id

FirstOrder.Language.Term.relabel id = id


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

{M : Type u_2}
{α : Type u_3}
[AddMonoid M]
[MeasurableSpace M]
[MeasurableAdd₂ M]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(l : List (α → M))
(hl : ∀ f ∈ l, AEMeasurable f μ)


@[simp]
theorem cancel_iso_inv_left {X Y Z : C} (f : Y ≅ X) (g g' : Y ⟶ Z) :
    f.inv ≫ g = f.inv ≫ g' ↔ g = g'

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

CategoryTheory.CategoryStruct.comp f.inv g = CategoryTheory.CategoryStruct.comp f.inv g' ↔ g = g'


@[simp]
theorem isClopen_discrete [DiscreteTopology X] (s : Set X) : IsClopen s

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


lemma W_of_preservesSheafification
    {P₁ P₂ : Cᵒᵖ ⥤ A} (f : P₁ ⟶ P₂) (hf : J.W f) :
    J.W (whiskerRight f F)

(J : CategoryTheory.GrothendieckTopology C)


@[simp]
theorem smeval_one : (1 : R[X]).smeval x = 1 • x ^ 0

(R : Type u_1)
[Semiring R]
{S : Type u_2}
[AddCommMonoid S]
[Pow S ℕ]
[MulActionWithZero R S]
(x : S)


theorem measurableSet_B {K : Set F} {r s ε : ℝ} : MeasurableSet (B f K r s ε)

{F : Type u_1}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f : ℝ → F}
{K : Set F}
{r s ε : ℝ}

MeasurableSet (RightDerivMeasurableAux.B f K r s ε)


@[to_additive]
theorem OneHom.cancel_right [One M] [One N] [One P] {g₁ g₂ : OneHom N P} {f : OneHom M N}
    (hf : Function.Surjective f) : g₁.comp f = g₂.comp f ↔ g₁ = g₂

{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[Zero M]
[Zero N]
[Zero P]
{g₁ g₂ : ZeroHom N P}
{f : ZeroHom M N}
(hf : Function.Surjective ⇑f)


theorem getElem_mem : ∀ (l : List α) n (h : n < l.length), l[n]'h ∈ l

{α : Type u_1}
(l : List α)
(n : Nat)
(h : n < l.length)


/-- Uses `left` co(ntra)variant. -/
@[to_additive (attr := simp) "Uses `left` co(ntra)variant."]
theorem Left.inv_le_one_iff : a⁻¹ ≤ 1 ↔ 1 ≤ a

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

a⁻¹ ≤ 1 ↔ 1 ≤ a


/-- A function `f` goes to `-∞` independent of an order-preserving embedding `e`. -/
theorem tendsto_atBot_embedding [Preorder β] [Preorder γ] {f : α → β} {e : β → γ} {l : Filter α}
    (hm : ∀ b₁ b₂, e b₁ ≤ e b₂ ↔ b₁ ≤ b₂) (hu : ∀ c, ∃ b, e b ≤ c) :
    Tendsto (e ∘ f) l atBot ↔ Tendsto f l atBot

(hm : ∀ (b₁ b₂ : β), e b₁ ≤ e b₂ ↔ b₁ ≤ b₂)

Filter.Tendsto (e ∘ f) l Filter.atBot ↔ Filter.Tendsto f l Filter.atBot


theorem exists_separable_of_irreducible {f : F[X]} (hf : Irreducible f) (hp : p ≠ 0) :
    ∃ (n : ℕ) (g : F[X]), g.Separable ∧ expand F (p ^ n) g = f

{F : Type u}
[Field F]
(p : ℕ)
[HF : CharP F p]
{f : F[X]}
(hf : Irreducible f)
(hp : p ≠ 0)

∃ n g, g.Separable ∧ (Polynomial.expand F (p ^ n)) g = f


/--
Given a `HomotopyRel f₀ f₁ S`, we can define a `HomotopyRel f₁ f₀ S` by reversing the homotopy.
-/
@[simps!]
def symm (F : HomotopyRel f₀ f₁ S) : HomotopyRel f₁ f₀ S

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
{S : Set X}
(F : f₀.HomotopyRel f₁ S)
(x : ↑I × X)


theorem trans_symm_eq_symm_trans_symm : (e.trans e').symm = e'.symm.trans e.symm

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


@[simp]
theorem piIsoPi_hom_π (J : Type u) (f : J → Grpd.{u, u}) (j : J) :
    (piIsoPi J f).hom ≫ Limits.Pi.π f j = CategoryTheory.Pi.eval _ j

(J : Type u)
(f : J → CategoryTheory.Grpd)
(j : J)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Grpd.piIsoPi J f).hom (CategoryTheory.Limits.Pi.π f j) =
  CategoryTheory.Pi.eval (fun i => ↑(f i)) j


/-- `Prod.map` of two `OrderHom`s as an `OrderHom`. -/
@[simps]
def prodMap (f : α →o β) (g : γ →o δ) : α × γ →o β × δ

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
{δ : Type u_5}
[Preorder α]
[Preorder β]
[Preorder γ]
[Preorder δ]
(f : α →o β)
(g : γ →o δ)

∀ (a : α × γ), (f.prodMap g) a = Prod.map (⇑f) (⇑g) a


theorem support_pow_coprime {σ : Perm α} {n : ℕ} (h : Nat.Coprime n (orderOf σ)) :
    (σ ^ n).support = σ.support

{α : Type u}
[DecidableEq α]
[Fintype α]
{σ : Equiv.Perm α}
{n : ℕ}
(h : n.Coprime (orderOf σ))


theorem sum_comap_seq (κ : Kernel α β) [IsSFiniteKernel κ] (hg : Measurable g) :
    (Kernel.sum fun n => comap (seq κ n) g hg) = comap κ g hg

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

(ProbabilityTheory.Kernel.sum fun n => (κ.seq n).comap g hg) = κ.comap g hg


/-- The category of algebras over an additive monad on a preadditive category is preadditive. -/
@[simps]
instance Monad.algebraPreadditive : Preadditive (Monad.Algebra T)

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
(T : CategoryTheory.Monad C)
[T.Additive]
(F G : T.Algebra)
(α β : F ⟶ G)


/-- A fact that is eventually true about all pairs `l ×ˢ l` is eventually true about
all diagonal pairs `(i, i)` -/
theorem Eventually.diag_of_prod {p : α × α → Prop} (h : ∀ᶠ i in f ×ˢ f, p i) :
    ∀ᶠ i in f, p (i, i)

{α : Type u_1}
{f : Filter α}
{p : α × α → Prop}
(h : ∀ᶠ (i : α × α) in f ×ˢ f, p i)


/-- This technical lemma tell us that if `C` is the conductor of `R<x>` and `I` is an ideal of `R`
  then `p * (I * S) ⊆ I * R<x>` for any `p` in `C ∩ R` -/
theorem prod_mem_ideal_map_of_mem_conductor {p : R} {z : S}
    (hp : p ∈ Ideal.comap (algebraMap R S) (conductor R x)) (hz' : z ∈ I.map (algebraMap R S)) :
    algebraMap R S p * z ∈ algebraMap R<x> S '' ↑(I.map (algebraMap R R<x>))

(hz' : z ∈ Ideal.map (algebraMap R S) I)

(algebraMap R S) p * z ∈
  ⇑(algebraMap (↥(Algebra.adjoin R {x})) S) '' ↑(Ideal.map (algebraMap R ↥(Algebra.adjoin R {x})) I)


theorem Filter.Eventually.prod_inl_nhds {p : X → Prop} {x : X} (h : ∀ᶠ x in 𝓝 x, p x) (y : Y) :
    ∀ᶠ x in 𝓝 (x, y), p (x : X × Y).1

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{p : X → Prop}
{x : X}
(h : ∀ᶠ (x : X) in 𝓝 x, p x)
(y : Y)


@[simp]
theorem ofRealCLM_coe : (ofRealCLM : ℝ →ₗ[ℝ] ℂ) = ofRealAm.toLinearMap


/-- The bijection `normalizedFactorsEquivSpanNormalizedFactors` between the set of prime
    factors of `r` and the set of prime factors of the ideal `⟨r⟩` preserves multiplicities. See
    `count_normalizedFactorsSpan_eq_count` for the version stated in terms of multisets `count`.-/
theorem multiplicity_normalizedFactorsEquivSpanNormalizedFactors_eq_multiplicity {r d : R}
    (hr : r ≠ 0) (hd : d ∈ normalizedFactors r) :
    multiplicity d r =
      multiplicity (normalizedFactorsEquivSpanNormalizedFactors hr ⟨d, hd⟩ : Ideal R)
        (Ideal.span {r})

(hd : d ∈ UniqueFactorizationMonoid.normalizedFactors r)

multiplicity d r = multiplicity (↑((normalizedFactorsEquivSpanNormalizedFactors hr) ⟨d, hd⟩)) (Ideal.span {r})


@[simp]
theorem sup_sdiff_symmDiff : (a ⊔ b) \ a ∆ b = a ⊓ b

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


@[norm_cast]
theorem coe_add : ∀ {x y : ℚ}, (↑(x + y) : ℚ_[p]) = ↑x + ↑y


theorem continuousWithinAt_inter {f : α → β} {s t : Set α} {x : α} (h : t ∈ 𝓝 x) :
    ContinuousWithinAt f (s ∩ t) x ↔ ContinuousWithinAt f s x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s t : Set α}
{x : α}
(h : t ∈ 𝓝 x)


theorem or_comm : ∀ (x y : Bool), (x || y) = (y || x)


/-- Homomorphisms on the quotient of a monoid by a congruence relation are equal if they
    are equal on elements that are coercions from the monoid. -/
@[to_additive "Homomorphisms on the quotient of an `AddMonoid` by an additive congruence relation
are equal if they are equal on elements that are coercions from the `AddMonoid`."]
theorem lift_funext (f g : c.Quotient →* P) (h : ∀ a : M, f a = g a) : f = g

{M : Type u_1}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass P]
{c : AddCon M}
(f g : c.Quotient →+ P)
(h : ∀ (a : M), f ↑a = g ↑a)


@[simp]
theorem ascPochhammer_zero : ascPochhammer S 0 = 1


@[simp]
theorem ConcreteCategory.hasCoeToFun_Type {X Y : Type u} (f : X ⟶ Y) : CoeFun.coe f = f


@[simp]
theorem ofFinsupp_add {a b} : (⟨a + b⟩ : R[X]) = ⟨a⟩ + ⟨b⟩

{ toFinsupp := a + b } = { toFinsupp := a } + { toFinsupp := b }


@[simp]
theorem mem_submoduleImage {M' : Type*} [AddCommMonoid M'] [Module R M'] {O : Submodule R M}
    {ϕ : O →ₗ[R] M'} {N : Submodule R M} {x : M'} :
    x ∈ ϕ.submoduleImage N ↔ ∃ (y : _) (yO : y ∈ O), y ∈ N ∧ ϕ ⟨y, yO⟩ = x

{R : Type u_1}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{M' : Type u_11}
[AddCommMonoid M']
[Module R M']
{O : Submodule R M}
{ϕ : ↥O →ₗ[R] M'}
{N : Submodule R M}
{x : M'}

x ∈ ϕ.submoduleImage N ↔ ∃ y, ∃ (yO : y ∈ O), y ∈ N ∧ ϕ ⟨y, yO⟩ = x


theorem nadd_lt_nadd_of_le_of_lt : ∀ {a b c d}, a ≤ b → c < d → a ♯ c < b ♯ d


@[to_additive]
theorem le_of_mul_le_right : a * b ≤ c → b ≤ c

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
{a b c : α}


theorem natAbs_sub_le (a b : Int) : natAbs (a - b) ≤ natAbs a + natAbs b


theorem bind_some_eq_map (f : α → β) (x : Part α) : x.bind (some ∘ f) = map f x

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(x : Part α)


@[simp]
theorem eqOn_range {ι : Sort*} {f : ι → α} {g₁ g₂ : α → β} :
    EqOn g₁ g₂ (range f) ↔ g₁ ∘ f = g₂ ∘ f

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_6}
{f : ι → α}
{g₁ g₂ : α → β}

Set.EqOn g₁ g₂ (Set.range f) ↔ g₁ ∘ f = g₂ ∘ f


theorem map_prod_of_prime [CommSemiring R] {f : ArithmeticFunction R}
    (h_mult : ArithmeticFunction.IsMultiplicative f)
    (t : Finset ℕ) (ht : ∀ p ∈ t, p.Prime) :
    f (∏ a ∈ t, a) = ∏ a ∈ t, f a

{R : Type u_1}
[CommSemiring R]
{f : ArithmeticFunction R}
(h_mult : f.IsMultiplicative)
(t : Finset ℕ)
(ht : ∀ p ∈ t, Nat.Prime p)


theorem congr_left (h : ∀ i, f i =ᵐ[μ] f' i) (h_tendsto : TendstoInMeasure μ f l g) :
    TendstoInMeasure μ f' l g

(h_tendsto : MeasureTheory.TendstoInMeasure μ f l g)


protected theorem aeStronglyMeasurable {f : ι → α → β} {p : ℝ≥0∞} (hf : UniformIntegrable f p μ)
    (i : ι) : AEStronglyMeasurable (f i) μ

{f : ι → α → β}

(hf : MeasureTheory.UniformIntegrable f p μ)

MeasureTheory.AEStronglyMeasurable (f i) μ


theorem liftR_iff {α : TypeVec n} (r : ∀ ⦃i⦄, α i → α i → Prop) (x y : P α) :
    LiftR @r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ i j, r (f₀ i j) (f₁ i j)

{n : ℕ}
{P : MvPFunctor.{u} n}
{α : TypeVec.{u} n}
(r : ⦃i : Fin2 n⦄ → α i → α i → Prop)
(x y : ↑P α)

MvFunctor.LiftR r x y ↔ ∃ a f₀ f₁, x = ⟨a, f₀⟩ ∧ y = ⟨a, f₁⟩ ∧ ∀ (i : Fin2 n) (j : P.B a i), r (f₀ i j) (f₁ i j)


/-- Nilpotency respects isomorphisms -/
theorem nilpotent_of_mulEquiv {G' : Type*} [Group G'] [_h : IsNilpotent G] (f : G ≃* G') :
    IsNilpotent G'

{G : Type u_1}
[Group G]
{G' : Type u_2}
[Group G']
[_h : Group.IsNilpotent G]
(f : G ≃* G')


theorem logb_prod {α : Type*} (s : Finset α) (f : α → ℝ) (hf : ∀ x ∈ s, f x ≠ 0) :
    logb b (∏ i ∈ s, f i) = ∑ i ∈ s, logb b (f i)

{b : ℝ}
{α : Type u_1}
(s : Finset α)
(f : α → ℝ)
(hf : ∀ x ∈ s, f x ≠ 0)

Real.logb b (∏ i ∈ s, f i) = ∑ i ∈ s, Real.logb b (f i)


@[simp]
lemma image_subtype_val_Ici_Iic {a : α} (b : Ici a) : Subtype.val '' Iic b = Icc a b

{α : Type u_1}
[Preorder α]
{a : α}
(b : ↑(Set.Ici a))


/-- A T₃.₅ space is a completely regular space that is also T1. -/
@[mk_iff]
class T35Space (X : Type u) [TopologicalSpace X] extends T1Space X, CompletelyRegularSpace X : Prop

T35Space X ↔ T1Space X ∧ CompletelyRegularSpace X


/-- The supremum of congruence relations `c, d` equals the smallest congruence relation containing
    the binary relation '`x` is related to `y` by `c` or `d`'. -/
theorem sup_eq_ringConGen (c d : RingCon R) : c ⊔ d = ringConGen fun x y => c x y ∨ d x y

{R : Type u_2}
[Add R]
[Mul R]
(c d : RingCon R)


theorem sup_mul : (I ⊔ J) * K = I * K ⊔ J * K

{R : Type u}
[CommSemiring R]
(I J K : Ideal R)


@[simp] theorem comp_id (f : G →+c[a, b] H) : f.comp .id = f

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


@[simp]
theorem iterate_id (a : α) : iterate id a = const a


@[simp]
theorem isRotated_singleton_iff {x : α} : l ~r [x] ↔ l = [x]


/-- Variant of `homMk'` where both objects are applications of `mk`. -/
@[simps]
def mkPostcomp (f : S ⟶ T.obj Y) (g : Y ⟶ Y') : mk f ⟶ mk (f ≫ T.map g)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{S : D}
{Y Y' : C}
{T : CategoryTheory.Functor C D}
(f : S ⟶ T.obj Y)
(g : Y ⟶ Y')

(CategoryTheory.StructuredArrow.mkPostcomp f g).right = g


theorem subset_le_of_restrict_le_restrict {i : Set α} (hi : MeasurableSet i) (hi₂ : v ≤[i] w)
    {j : Set α} (hj : j ⊆ i) : v j ≤ w j

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[TopologicalSpace M]
[AddCommMonoid M]
[PartialOrder M]
(v w : MeasureTheory.VectorMeasure α M)
{i : Set α}
(hi : MeasurableSet i)
(hi₂ : v.restrict i ≤ w.restrict i)
{j : Set α}
(hj : j ⊆ i)


theorem hasDerivAt_neg' : HasDerivAt (fun x => -x) (-1) x

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


theorem preserves_map' {α β} (x : α → β) : @η _ ∘ Functor.map x = Functor.map x ∘ @η _

{F : Type u → Type v}
[Applicative F]
[LawfulApplicative F]
{G : Type u → Type w}
[Applicative G]
[LawfulApplicative G]
(η : ApplicativeTransformation F G)
{α β : Type u}
(x : α → β)

(fun {α} => η.app α) ∘ Functor.map x = Functor.map x ∘ fun {α} => η.app α


@[simps]
instance hasForgetToHeytAlg : HasForget₂ BoolAlg HeytAlg

↑(CategoryTheory.HasForget₂.forget₂.obj X) = ↑X


theorem Memℒp.eLpNorm_ne_top {f : α → E} (hfp : Memℒp f p μ) : eLpNorm f p μ ≠ ∞

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


@[continuity]
protected theorem continuous (h : α ≃ᵤ β) : Continuous h

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(h : α ≃ᵤ β)


theorem ne_neg_self_iff {θ : Angle} : θ ≠ -θ ↔ θ ≠ 0 ∧ θ ≠ π

θ ≠ -θ ↔ θ ≠ 0 ∧ θ ≠ ↑π


theorem equivalence : Equivalence fun f g : C(X, Y) => HomotopicRel f g S

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{S : Set X}

Equivalence fun f g => f.HomotopicRel g S


/-- The **chain rule for manifolds**. -/
theorem HasMFDerivAt.comp (hg : HasMFDerivAt I' I'' g (f x) g') (hf : HasMFDerivAt I I' f x f') :
    HasMFDerivAt I I'' (g ∘ f) x (g'.comp f')

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

{f' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)}

{g' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))}


theorem biproduct.mapBiproduct_inv_map_desc (g : ∀ j, f j ⟶ W) :
    -- Porting note: twice we need haveI to tell Lean about hasBiproduct_of_preserves F f
    haveI : HasBiproduct fun j => F.obj (f j) := hasBiproduct_of_preserves F f
    (F.mapBiproduct f).inv ≫ F.map (biproduct.desc g) = biproduct.desc fun j => F.map (g j)

(F.mapBiproduct f).inv ≫ F.map (CategoryTheory.Limits.biproduct.desc g) =
  CategoryTheory.Limits.biproduct.desc fun j => F.map (g j)


/-- A natural transformation is an epimorphism if each component is. -/
theorem epi_of_epi_app (α : F ⟶ G) [∀ X : C, Epi (α.app X)] : Epi α

[∀ (X : C), CategoryTheory.Epi (α.app X)]


lemma exists_nat_gt (x : α) : ∃ n : ℕ, x < n

{α : Type u_1}
[StrictOrderedSemiring α]
[Archimedean α]
(x : α)


@[simp]
theorem nsmul_apply (r : ℕ) (f : α →ᵇ β) (v : α) : (r • f) v = r • f v

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
[AddMonoid β]
[BoundedAdd β]
[ContinuousAdd β]
(r : ℕ)
(f : BoundedContinuousFunction α β)
(v : α)


theorem reduceOption_append (l l' : List (Option α)) :
    (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption


@[simp]
theorem reverseRecOn_nil {motive : List α → Sort*} (nil : motive [])
    (append_singleton : ∀ (l : List α) (a : α), motive l → motive (l ++ [a])) :
    reverseRecOn [] nil append_singleton = nil

(append_singleton : (l : List α) → (a : α) → motive l → motive (l ++ [a]))

List.reverseRecOn [] nil append_singleton = nil


theorem subtypeDomain_sum [∀ i, AddCommMonoid (β i)] {s : Finset γ} {h : γ → Π₀ i, β i}
    {p : ι → Prop} [DecidablePred p] :
    (∑ c ∈ s, h c).subtypeDomain p = ∑ c ∈ s, (h c).subtypeDomain p

{ι : Type u}
{γ : Type w}
{β : ι → Type v}
[(i : ι) → AddCommMonoid (β i)]
{s : Finset γ}
{h : γ → Π₀ (i : ι), β i}
{p : ι → Prop}
[DecidablePred p]

DFinsupp.subtypeDomain p (∑ c ∈ s, h c) = ∑ c ∈ s, DFinsupp.subtypeDomain p (h c)


@[simp]
theorem comap_id (s : AffineSubspace k P₁) : s.comap (AffineMap.id k P₁) = s

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

AffineSubspace.comap (AffineMap.id k P₁) s = s


lemma two_le_natDegree_of_nextCoeff_eraseLead (hlead : f.eraseLead ≠ 0) (hnext : f.nextCoeff = 0) :
    2 ≤ f.natDegree

{R : Type u_1}
[Semiring R]
{f : R[X]}
(hlead : f.eraseLead ≠ 0)
(hnext : f.nextCoeff = 0)


theorem symmDiff_subset_union : s ∆ t ⊆ s ∪ t


theorem degreeOf_eq_sup (n : σ) (f : MvPolynomial σ R) :
    degreeOf n f = f.support.sup fun m => m n

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(n : σ)
(f : MvPolynomial σ R)

MvPolynomial.degreeOf n f = f.support.sup fun m => m n


theorem ContinuousLinearMap.reApplyInnerSelf_smul (T : E →L[𝕜] E) (x : E) {c : 𝕜} :
    T.reApplyInnerSelf (c • x) = ‖c‖ ^ 2 * T.reApplyInnerSelf x

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(T : E →L[𝕜] E)
(x : E)
{c : 𝕜}


theorem lie_mem_lie {x : L} {m : M} (hx : x ∈ I) (hm : m ∈ N) : ⁅x, m⁆ ∈ ⁅I, N⁆

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{N : LieSubmodule R L M}
{I : LieIdeal R L}
{x : L}
{m : M}
(hx : x ∈ I)
(hm : m ∈ N)


@[ext]
theorem ComponentCompl.supp_injective :
    Function.Injective (ComponentCompl.supp : G.ComponentCompl K → Set V)

{V : Type u}
{G : SimpleGraph V}
{K : Set V}


@[to_additive (attr := simp)]
theorem snd_div [Div G] [Div H] (a b : G × H) : (a / b).2 = a.2 / b.2

{G : Type u_3}
{H : Type u_4}
[Sub G]
[Sub H]
(a b : G × H)


theorem splitOnP.go_ne_nil (xs acc : List α) : splitOnP.go p xs acc ≠ []

{α : Type u}
(p : α → Bool)
(xs acc : List α)


@[to_additive]
theorem IsOrderedSMul.smul_le_smul [Preorder G] [Preorder P] [SMul G P] [IsOrderedSMul G P]
    {a b : G} {c d : P} (hab : a ≤ b) (hcd : c ≤ d) : a • c ≤ b • d

{G : Type u_1}
{P : Type u_2}
[Preorder G]
[Preorder P]
[VAdd G P]
[IsOrderedVAdd G P]
{a b : G}
{c d : P}
(hab : a ≤ b)
(hcd : c ≤ d)


/-- `TStructure C` is the type of t-structures on the (pre)triangulated category `C`. -/
structure TStructure where
  /-- the predicate of objects that are `≤ n` for `n : ℤ`. -/
  LE (n : ℤ) : C → Prop
  /-- the predicate of objects that are `≥ n` for `n : ℤ`. -/
  GE (n : ℤ) : C → Prop
  LE_closedUnderIsomorphisms (n : ℤ) : ClosedUnderIsomorphisms (LE n) := by infer_instance
  GE_closedUnderIsomorphisms (n : ℤ) : ClosedUnderIsomorphisms (GE n) := by infer_instance
  LE_shift (n a n' : ℤ) (h : a + n' = n) (X : C) (hX : LE n X) : LE n' (X⟦a⟧)
  GE_shift (n a n' : ℤ) (h : a + n' = n) (X : C) (hX : GE n X) : GE n' (X⟦a⟧)
  zero' ⦃X Y : C⦄ (f : X ⟶ Y) (hX : LE 0 X) (hY : GE 1 Y) : f = 0
  LE_zero_le : LE 0 ≤ LE 1
  GE_one_le : GE 1 ≤ GE 0
  exists_triangle_zero_one (A : C) : ∃ (X Y : C) (_ : LE 0 X) (_ : GE 1 Y)
    (f : X ⟶ A) (g : A ⟶ Y) (h : Y ⟶ X⟦(1 : ℤ)⟧), Triangle.mk f g h ∈ distTriang C

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

(self : CategoryTheory.Triangulated.TStructure C)

∃ X Y,
  ∃ (_ : self.LE 0 X) (_ : self.GE 1 Y),
    ∃ f g h, CategoryTheory.Pretriangulated.Triangle.mk f g h ∈ CategoryTheory.Pretriangulated.distinguishedTriangles


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

{m : α → β → γ}

(h_antidistrib : ∀ (a : α) (b : β), n (m a b) = m' (n₁ b) (n₂ a))

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


theorem iSup_div {ι : Sort*} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} : iSup f / a = ⨆ i, f i / a

{ι : Sort u_4}
{f : ι → ℝ≥0∞}
{a : ℝ≥0∞}


theorem mem_lowerBounds_image2_of_mem_upperBounds (ha : a ∈ upperBounds s)
    (hb : b ∈ upperBounds t) : f a b ∈ lowerBounds (image2 f s t)

{f : α → β → γ}

(h₀ : ∀ (b : β), Antitone (Function.swap f b))


theorem restr_eq_of_source_subset {e : PartialEquiv α β} {s : Set α} (h : e.source ⊆ s) :
    e.restr s = e

{α : Type u_1}
{β : Type u_2}
{e : PartialEquiv α β}
{s : Set α}
(h : e.source ⊆ s)


/-- More general going-up theorem than `exists_ideal_over_prime_of_isIntegral_of_isDomain`.
TODO: Version of going-up theorem with arbitrary length chains (by induction on this)?
  Not sure how best to write an ascending chain in Lean -/
theorem exists_ideal_over_prime_of_isIntegral_of_isPrime
    [Algebra.IsIntegral R S] (P : Ideal R) [IsPrime P]
    (I : Ideal S) [IsPrime I] (hIP : I.comap (algebraMap R S) ≤ P) :
    ∃ Q ≥ I, IsPrime Q ∧ Q.comap (algebraMap R S) = P

(hIP : Ideal.comap (algebraMap R S) I ≤ P)

∃ Q ≥ I, Q.IsPrime ∧ Ideal.comap (algebraMap R S) Q = P


theorem Valid'.glue {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂) :
    BalancedSz (size l) (size r) →
      Valid' o₁ (@glue α l r) o₂ ∧ size (@glue α l r) = size l + size r

{α : Type u_1}
[Preorder α]
{l : Ordnode α}
{x : α}
{r : Ordnode α}
{o₁ : WithBot α}
{o₂ : WithTop α}
(hl : Ordnode.Valid' o₁ l ↑x)
(hr : Ordnode.Valid' (↑x) r o₂)

Ordnode.BalancedSz l.size r.size → Ordnode.Valid' o₁ (l.glue r) o₂ ∧ (l.glue r).size = l.size + r.size


/-- **Vitali-Carathéodory Theorem**: given an integrable real function `f`, there exists an
integrable function `g < f` which is upper semicontinuous, with integral arbitrarily close to that
of `f`. This function has to be `EReal`-valued in general. -/
theorem exists_upperSemicontinuous_lt_integral_gt [SigmaFinite μ] (f : α → ℝ) (hf : Integrable f μ)
    {ε : ℝ} (εpos : 0 < ε) :
    ∃ g : α → EReal,
      (∀ x, (g x : EReal) < f x) ∧
      UpperSemicontinuous g ∧
      Integrable (fun x => EReal.toReal (g x)) μ ∧
      (∀ᵐ x ∂μ, ⊥ < g x) ∧ (∫ x, f x ∂μ) < (∫ x, EReal.toReal (g x) ∂μ) + ε

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
{μ : MeasureTheory.Measure α}
[μ.WeaklyRegular]
[MeasureTheory.SigmaFinite μ]
(f : α → ℝ)
(hf : MeasureTheory.Integrable f μ)
{ε : ℝ}
(εpos : 0 < ε)

∃ g,
  (∀ (x : α), g x < ↑(f x)) ∧
    UpperSemicontinuous g ∧
      MeasureTheory.Integrable (fun x => (g x).toReal) μ ∧
        (∀ᵐ (x : α) ∂μ, ⊥ < g x) ∧ ∫ (x : α), f x ∂μ < ∫ (x : α), (g x).toReal ∂μ + ε


/-- A helper lemma used to prove that the (scalar or usual) product of a function that tends to one
and a bounded function tends to one. This lemma is formulated for any binary operation
`op : E → F → G` with an estimate `‖op x y‖ ≤ A * ‖x‖ * ‖y‖` for some constant A instead of
multiplication so that it can be applied to `(*)`, `flip (*)`, `(•)`, and `flip (•)`. -/
@[to_additive "A helper lemma used to prove that the (scalar or usual) product of a function that
tends to zero and a bounded function tends to zero. This lemma is formulated for any binary
operation `op : E → F → G` with an estimate `‖op x y‖ ≤ A * ‖x‖ * ‖y‖` for some constant A instead
of multiplication so that it can be applied to `(*)`, `flip (*)`, `(•)`, and `flip (•)`."]
lemma Filter.Tendsto.op_one_isBoundedUnder_le' {f : α → E} {g : α → F} {l : Filter α}
    (hf : Tendsto f l (𝓝 1)) (hg : IsBoundedUnder (· ≤ ·) l (Norm.norm ∘ g)) (op : E → F → G)
    (h_op : ∃ A, ∀ x y, ‖op x y‖ ≤ A * ‖x‖ * ‖y‖) : Tendsto (fun x => op (f x) (g x)) l (𝓝 1)

(hg : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ g))

(h_op : ∃ A, ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖)

Filter.Tendsto (fun x => op (f x) (g x)) l (𝓝 1)


theorem sequentialFunctor_initial_aux (j : J) : ∃ (n : ℕ), sequentialFunctor_obj J n ≤ j

(J : Type u_2)
[Countable J]
[Preorder J]
[CategoryTheory.IsCofiltered J]
(j : J)

∃ n, CategoryTheory.Limits.sequentialFunctor_obj J n ≤ j


/-- Given a diagram of `StructuredArrow X F`s, we may obtain a cone with cone point `X`. -/
@[simps!]
def Cone.fromStructuredArrow (F : C ⥤ D) {X : D} (G : J ⥤ StructuredArrow X F) :
    Cone (G ⋙ StructuredArrow.proj X F ⋙ F)

(G : CategoryTheory.Functor J (CategoryTheory.StructuredArrow X F))

(CategoryTheory.Limits.Cone.fromStructuredArrow F G).pt = X


theorem DifferentiableAt.derivWithin (h : DifferentiableAt 𝕜 f x) (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin f s x = deriv f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s : Set 𝕜}
(h : DifferentiableAt 𝕜 f x)
(hxs : UniqueDiffWithinAt 𝕜 s x)


/-- The natural cocone over the forgetful functor `Over X ⥤ T` with cocone point `X`. -/
@[simps]
def forgetCocone (X : T) : Limits.Cocone (forget X)

(self : CategoryTheory.Comma (CategoryTheory.Functor.id T) (CategoryTheory.Functor.fromPUnit X))

(CategoryTheory.Over.forgetCocone X).ι.app self = self.hom


theorem image₂_inter_subset_right [DecidableEq β] :
    image₂ f s (t ∩ t') ⊆ image₂ f s t ∩ image₂ f s t'

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t t' : Finset β}
[DecidableEq β]

Finset.image₂ f s (t ∩ t') ⊆ Finset.image₂ f s t ∩ Finset.image₂ f s t'


@[simp, norm_cast]
theorem coe_ennreal_one : ((1 : ℝ≥0∞) : EReal) = 1


theorem smul_eq_diagonal_mul [Fintype m] [DecidableEq m] (M : Matrix m n α) (a : α) :
    a • M = (diagonal fun _ => a) * M

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[NonUnitalNonAssocSemiring α]
[Fintype m]
[DecidableEq m]
(M : Matrix m n α)
(a : α)

a • M = (Matrix.diagonal fun x => a) * M


theorem aestronglyMeasurable'_integral_condDistrib (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
    (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
    AEStronglyMeasurable' (mβ.comap X) (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ

(hf : MeasureTheory.AEStronglyMeasurable f (MeasureTheory.Measure.map (fun a => (X a, Y a)) μ))

MeasureTheory.AEStronglyMeasurable' (MeasurableSpace.comap X mβ)
  (fun a => ∫ (y : Ω), f (X a, y) ∂(ProbabilityTheory.condDistrib Y X μ) (X a)) μ


@[simp]
theorem ι_f_succ (n : ℕ) : I.ι.f (n + 1) = 0

(I : CategoryTheory.InjectiveResolution Z)


theorem isIso_iff_mk_eq_top {X Y : C} (f : X ⟶ Y) [Mono f] : IsIso f ↔ mk f = ⊤

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

CategoryTheory.IsIso f ↔ CategoryTheory.Subobject.mk f = ⊤


theorem isPartition_single (h : x ∈ Box.Icc I) : (single I I le_rfl x h).IsPartition

{ι : Type u_1}
{I : BoxIntegral.Box ι}
{x : ι → ℝ}
(h : x ∈ BoxIntegral.Box.Icc I)

(BoxIntegral.TaggedPrepartition.single I I ⋯ x h).IsPartition


@[to_additive (attr := simp)]
theorem coe_map (f : M →* N) (x : Mˣ) : ↑(map f x) = f x

{M : Type u}
{N : Type v}
[Monoid M]
[Monoid N]
(f : M →* N)
(x : Mˣ)


theorem perm_of_prod_eq_prod :
    ∀ {l₁ l₂ : List M}, l₁.prod = l₂.prod → (∀ p ∈ l₁, Prime p) → (∀ p ∈ l₂, Prime p) → Perm l₁ l₂

{M : Type u_1}
[CancelCommMonoidWithZero M]
[Unique Mˣ]
{l₁ l₂ : List M}

l₁.prod = l₂.prod → (∀ p ∈ l₁, Prime p) → (∀ p ∈ l₂, Prime p) → l₁ ~ l₂


theorem archimedean_iff_nat_lt : Archimedean α ↔ ∀ x : α, ∃ n : ℕ, x < n


@[simp, norm_cast]
theorem const_top [Top β] : (↑(⊤ : β) : Germ l β) = ⊤

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
[Top β]


theorem toComplex_def₂ (x : ℤ[i]) : (x : ℂ) = ⟨x.re, x.im⟩

GaussianInt.toComplex x = { re := ↑x.re, im := ↑x.im }


/-- The standard triangle `K ⟶ L ⟶ mappingCone φ ⟶ K⟦(1 : ℤ)⟧` in `CochainComplex C ℤ`
attached to a morphism `φ : K ⟶ L`. It involves `φ`, `inr φ : L ⟶ mappingCone φ` and
the morphism induced by the `1`-cocycle `-mappingCone.fst φ`. -/
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂]
noncomputable def triangle : Triangle (CochainComplex C ℤ)

(CochainComplex.mappingCone.triangle φ).obj₃ = CochainComplex.mappingCone φ


lemma IsCondKernelCDF.toKernel_Iic {hf : IsCondKernelCDF f κ ν} (p : α × β) (x : ℝ) :
    hf.toKernel f p (Iic x) = ENNReal.ofReal (f p x)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}

∀ {x : MeasurableSpace β} {f : α × β → StieltjesFunction} {κ : ProbabilityTheory.Kernel α (β × ℝ)}
  {ν : ProbabilityTheory.Kernel α β} {hf : ProbabilityTheory.IsCondKernelCDF f κ ν} (p : α × β) (x_1 : ℝ),
  ((ProbabilityTheory.IsCondKernelCDF.toKernel f hf) p) (Set.Iic x_1) = ENNReal.ofReal (↑(f p) x_1)


@[simp]
theorem not_isEmpty_iff : ¬IsEmpty α ↔ Nonempty α


@[simp]
theorem toNNReal_coe_nat (n : ℕ) : Real.toNNReal n = n


theorem IsSquare.not_irreducible (ha : IsSquare a) : ¬Irreducible a

{α : Type u_1}
[CommMonoid α]
{a : α}
(ha : IsSquare a)


@[simp]
theorem equivOfRoot_aeval (pb : PowerBasis A S) (pb' : PowerBasis A S')
    (h₁ : aeval pb.gen (minpoly A pb'.gen) = 0) (h₂ : aeval pb'.gen (minpoly A pb.gen) = 0)
    (f : A[X]) : pb.equivOfRoot pb' h₁ h₂ (aeval pb.gen f) = aeval pb'.gen f

(h₁ : (Polynomial.aeval pb.gen) (minpoly A pb'.gen) = 0)

(h₂ : (Polynomial.aeval pb'.gen) (minpoly A pb.gen) = 0)

(pb.equivOfRoot pb' h₁ h₂) ((Polynomial.aeval pb.gen) f) = (Polynomial.aeval pb'.gen) f


theorem of_neg (h : Irrational (-x)) : Irrational x


@[to_additive]
theorem prod_finset_sum_index {γ : Type w} {α : Type x} [∀ i, AddCommMonoid (β i)]
    [∀ (i) (x : β i), Decidable (x ≠ 0)] [CommMonoid γ] {s : Finset α} {g : α → Π₀ i, β i}
    {h : ∀ i, β i → γ} (h_zero : ∀ i, h i 0 = 1)
    (h_add : ∀ i b₁ b₂, h i (b₁ + b₂) = h i b₁ * h i b₂) :
    (∏ i ∈ s, (g i).prod h) = (∑ i ∈ s, g i).prod h

[(i : ι) → (x : β i) → Decidable (x ≠ 0)]

(h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂)

∏ i ∈ s, (g i).prod h = (∑ i ∈ s, g i).prod h


/-- The exponents that appear in the unique decomposition of a unit as the product of
a root of unity and powers of the units of the fundamental system `fundSystem` (see
`exist_unique_eq_mul_prod`) are given by the representation of the unit on `basisModTorsion`. -/
theorem fun_eq_repr {x ζ : (𝓞 K)ˣ} {f : Fin (rank K) → ℤ} (hζ : ζ ∈ torsion K)
    (h : x = ζ * ∏ i, (fundSystem K i) ^ (f i)) :
    f = (basisModTorsion K).repr (Additive.ofMul ↑x)

{f : Fin (NumberField.Units.rank K) → ℤ}

(h : x = ζ * ∏ i : Fin (NumberField.Units.rank K), NumberField.Units.fundSystem K i ^ f i)

f = ⇑((NumberField.Units.basisModTorsion K).repr (Additive.ofMul ↑x))


theorem SBtw.sbtw.trans_left {a b c d : α} (h : sbtw a b c) : sbtw b d c → sbtw a d c

{α : Type u_1}
[CircularPreorder α]
{a b c d : α}
(h : sbtw a b c)


@[reassoc (attr := simp)]
theorem imageSubobjectMap_arrow {W X Y Z : C} {f : W ⟶ X} [HasImage f] {g : Y ⟶ Z} [HasImage g]
    (sq : Arrow.mk f ⟶ Arrow.mk g) [HasImageMap sq] :
    imageSubobjectMap sq ≫ (imageSubobject g).arrow = (imageSubobject f).arrow ≫ sq.right

(sq : CategoryTheory.Arrow.mk f ⟶ CategoryTheory.Arrow.mk g)

CategoryTheory.Limits.imageSubobjectMap sq ≫ (CategoryTheory.Limits.imageSubobject g).arrow =
  (CategoryTheory.Limits.imageSubobject f).arrow ≫ sq.right


/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains. -/
@[simps]
def prodEquiv : (A →ₐ[R] B) × (A →ₐ[R] C) ≃ (A →ₐ[R] B × C)

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


@[simp]
theorem colimit_cocone_comp_aux (s : Cocone (F ⋙ G)) (j : C) :
    G.map (homToLift F (F.obj j)) ≫ s.ι.app (lift F (F.obj j)) = s.ι.app j

(s : CategoryTheory.Limits.Cocone (F.comp G))

CategoryTheory.CategoryStruct.comp (G.map (CategoryTheory.Functor.Final.homToLift F (F.obj j)))
    (s.ι.app (CategoryTheory.Functor.Final.lift F (F.obj j))) =
  s.ι.app j


@[simp]
theorem finset_sum_coeff {ι : Type*} (s : Finset ι) (f : ι → R[X]) (n : ℕ) :
    coeff (∑ b ∈ s, f b) n = ∑ b ∈ s, coeff (f b) n

{R : Type u}
[Semiring R]
{ι : Type u_1}
(s : Finset ι)
(f : ι → R[X])
(n : ℕ)

(∑ b ∈ s, f b).coeff n = ∑ b ∈ s, (f b).coeff n


theorem mem_keys {a} {l : List (Sigma β)} : a ∈ l.keys ↔ ∃ b : β a, Sigma.mk a b ∈ l

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


theorem part_surjOn : Set.SurjOn P.part s P.parts

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


theorem not_subsingleton (α) [Nontrivial α] : ¬Subsingleton α


@[to_additive (attr := simp)]
theorem mul_lt_mul_iff_left [CovariantClass α α (· * ·) (· < ·)]
    [ContravariantClass α α (· * ·) (· < ·)] (a : α) {b c : α} :
    a * b < a * c ↔ b < c

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

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


theorem isWF_iff_no_descending_seq :
    IsWF s ↔ ∀ f : ℕ → α, StrictAnti f → ¬∀ n, f (OrderDual.toDual n) ∈ s

s.IsWF ↔ ∀ (f : ℕ → α), StrictAnti f → ¬∀ (n : ℕ), f (OrderDual.toDual n) ∈ s


theorem extend_iUnion_nat {f : ℕ → Set α} (hm : ∀ i, P (f i))
    (mU : m (⋃ i, f i) (PU hm) = ∑' i, m (f i) (hm i)) :
    extend m (⋃ i, f i) = ∑' i, extend m (f i)

(PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i))

(mU : m (⋃ i, f i) ⋯ = ∑' (i : ℕ), m (f i) ⋯)

MeasureTheory.extend m (⋃ i, f i) = ∑' (i : ℕ), MeasureTheory.extend m (f i)


theorem re_sq_le_normSq (z : K) : re z * re z ≤ normSq z

RCLike.re z * RCLike.re z ≤ RCLike.normSq z


nonrec theorem continuous_const_smul_iff (hc : IsUnit c) :
    (Continuous fun x => c • f x) ↔ Continuous f

{M : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Monoid M]
[TopologicalSpace α]
[MulAction M α]
[ContinuousConstSMul M α]
[TopologicalSpace β]
{f : β → α}
{c : M}
(hc : IsUnit c)


/-- The inner product between a `π / 2` rotation of a vector and a multiple of that vector is
zero. -/
@[simp]
theorem inner_rotation_pi_div_two_left_smul (x : V) (r : ℝ) :
    ⟪o.rotation (π / 2 : ℝ) x, r • x⟫ = 0

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


theorem ι_isoSheafedSpace_inv (i : D.J) :
    D.toSheafedSpaceGlueData.toGlueData.ι i ≫ D.isoSheafedSpace.inv = (𝖣.ι i).1

D.toSheafedSpaceGlueData.ι i ≫ D.isoSheafedSpace.inv = (D.ι i).val


theorem nonMemberSubfamily_inter (a : α) (𝒜 ℬ : Finset (Finset α)) :
    (𝒜 ∩ ℬ).nonMemberSubfamily a = 𝒜.nonMemberSubfamily a ∩ ℬ.nonMemberSubfamily a

{α : Type u_1}
[DecidableEq α]
(a : α)
(𝒜 ℬ : Finset (Finset α))

Finset.nonMemberSubfamily a (𝒜 ∩ ℬ) = Finset.nonMemberSubfamily a 𝒜 ∩ Finset.nonMemberSubfamily a ℬ


theorem mem_pi (x : ι → α) : x ∈ I.pi ι ↔ ∀ i, x i ∈ I

{α : Type u}
[Semiring α]
(I : Ideal α)
(ι : Type v)
(x : ι → α)


/-- Constructor for objects of the category `Functor.RightExtension L F`. -/
@[simps!]
def RightExtension.mk (F' : D ⥤ H) {L : C ⥤ D} {F : C ⥤ H} (α : L ⋙ F' ⟶ F) :
    RightExtension L F

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_7, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_9, u_5} D]
(F' : CategoryTheory.Functor D H)
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
(α : L.comp F' ⟶ F)

(CategoryTheory.Functor.RightExtension.mk F' α).right.as = PUnit.unit


@[to_additive]
theorem map_subtype_le {H : Subgroup G} (K : Subgroup H) : K.map H.subtype ≤ H

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


theorem _root_.Dense.isSeparable_iff (hs : Dense s) :
    IsSeparable s ↔ SeparableSpace α

{α : Type u}
[t : TopologicalSpace α]
{s : Set α}
(hs : Dense s)

TopologicalSpace.IsSeparable s ↔ TopologicalSpace.SeparableSpace α


theorem bind_congr {f g : α → Multiset β} {m : Multiset α} :
    (∀ a ∈ m, f a = g a) → bind m f = bind m g

{α : Type u_1}
{β : Type v}
{f g : α → Multiset β}
{m : Multiset α}

(∀ a ∈ m, f a = g a) → m.bind f = m.bind g


@[simp]
theorem image₂_right [DecidableEq β] (h : s.Nonempty) : image₂ (fun _ y => y) s t = t

{α : Type u_1}
{β : Type u_3}
{s : Finset α}
{t : Finset β}
[DecidableEq β]
(h : s.Nonempty)


@[simp]
theorem singleton_op (x : α) : ({x} : Set α).op = {op x}


/-- Let `μ` be a σ-finite left invariant measure on `E`. Then `μ` is equal to the Haar measure
defined by `b` iff the parallelepiped defined by `b` has measure `1` for `μ`. -/
theorem Basis.addHaar_eq_iff [SecondCountableTopology E] (b : Basis ι ℝ E) (μ : Measure E)
    [SigmaFinite μ] [IsAddLeftInvariant μ] :
    b.addHaar = μ ↔ μ b.parallelepiped = 1

{ι : Type u_1}
{E : Type u_3}
[Fintype ι]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[SecondCountableTopology E]
(b : Basis ι ℝ E)
(μ : MeasureTheory.Measure E)
[MeasureTheory.SigmaFinite μ]
[μ.IsAddLeftInvariant]


@[to_additive]
protected theorem mul [Mul β] [ContinuousMul β] (hu : Adapted f u) (hv : Adapted f v) :
    Adapted f (u * v)

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[TopologicalSpace β]
[Preorder ι]
{u v : ι → Ω → β}
{f : MeasureTheory.Filtration ι m}
[Mul β]
[ContinuousMul β]
(hu : MeasureTheory.Adapted f u)
(hv : MeasureTheory.Adapted f v)


theorem one_left (b : α) : multiplicity 1 b = ⊤

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


/-- For a function taking values in a second countable space, the set of points `x` for
which the image under `f` of `(x, ∞)` is separated below from `f x` is countable. -/
theorem countable_image_gt_image_Ioi [OrderTopology α] [LinearOrder β] (f : β → α)
    [SecondCountableTopology α] : Set.Countable {x | ∃ z, z < f x ∧ ∀ y, x < y → f y ≤ z}

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[LinearOrder β]
(f : β → α)
[SecondCountableTopology α]

{x | ∃ z < f x, ∀ (y : β), x < y → f y ≤ z}.Countable


@[aesop safe apply (rule_sets := [SetLike])]
lemma ratCast_mem (s : S) (q : ℚ) : (q : K) ∈ s

{K : Type u}
[DivisionRing K]
{S : Type u_1}
[SetLike S K]
[h : SubfieldClass S K]
(s : S)
(q : ℚ)


/-- The *identity principle* for analytic functions: If an analytic function vanishes in a whole
neighborhood of a point `z₀`, then it is uniformly zero along a connected set. For a one-dimensional
version assuming only that the function vanishes at some points arbitrarily close to `z₀`, see
`eqOn_zero_of_preconnected_of_frequently_eq_zero`. -/
theorem eqOn_zero_of_preconnected_of_eventuallyEq_zero {f : E → F} {U : Set E}
    (hf : AnalyticOn 𝕜 f U) (hU : IsPreconnected U) {z₀ : E} (h₀ : z₀ ∈ U) (hfz₀ : f =ᶠ[𝓝 z₀] 0) :
    EqOn f 0 U

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{U : Set E}
(hf : AnalyticOn 𝕜 f U)
(hU : IsPreconnected U)
{z₀ : E}
(h₀ : z₀ ∈ U)
(hfz₀ : f =ᶠ[𝓝 z₀] 0)


theorem sum_add_tsum_nat_add {f : ℕ → ℝ≥0} (k : ℕ) (hf : Summable f) :
    ∑' i, f i = (∑ i ∈ range k, f i) + ∑' i, f (i + k)

{f : ℕ → NNReal}
(k : ℕ)
(hf : Summable f)

∑' (i : ℕ), f i = ∑ i ∈ Finset.range k, f i + ∑' (i : ℕ), f (i + k)


/-- Any `CommMagma G` that satisfies `IsLeftCancelMul G` also satisfies `IsCancelMul G`. -/
@[to_additive AddCommMagma.IsLeftCancelAdd.toIsCancelAdd "Any `AddCommMagma G` that satisfies
`IsLeftCancelAdd G` also satisfies `IsCancelAdd G`."]
lemma CommMagma.IsLeftCancelMul.toIsCancelMul (G : Type u) [CommMagma G] [IsLeftCancelMul G] :
    IsCancelMul G

(G : Type u)
[AddCommMagma G]
[IsLeftCancelAdd G]


/-- Given a presieve on `X`, and a sieve on each domain of an arrow in the presieve, we can bind to
produce a sieve on `X`.
-/
@[simps]
def bind (S : Presieve X) (R : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, S f → Sieve Y) : Sieve X

(R : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → CategoryTheory.Sieve Y)

(CategoryTheory.Sieve.bind S R).arrows = S.bind fun Y f h => (R h).arrows


/-- See `SimpleGraph.cliqueFree_of_chromaticNumber_lt` for a tighter bound. -/
theorem cliqueFree_of_card_lt [Fintype α] (hc : card α < n) : G.CliqueFree n

{α : Type u_1}
{G : SimpleGraph α}
{n : ℕ}
[Fintype α]
(hc : Fintype.card α < n)


/-- If `p` is prime, then `J(a | p)` is `-1` iff `a` is not a square modulo `p`. -/
theorem nonsquare_iff_jacobiSym_eq_neg_one {a : ℤ} {p : ℕ} [Fact p.Prime] :
    J(a | p) = -1 ↔ ¬IsSquare (a : ZMod p)


/-- The cardinality of the fiber of a not-initial object is non-zero. -/
lemma non_zero_card_fiber_of_not_initial (X : C) (h : IsInitial X → False) :
    Nat.card (F.obj X) ≠ 0

(F : CategoryTheory.Functor C FintypeCat)

(h : CategoryTheory.Limits.IsInitial X → False)


/-- If two nonzero squares are negatives of each other in `ZMod p`, then `p % 4 ≠ 3`. -/
theorem mod_four_ne_three_of_sq_eq_neg_sq' {x y : ZMod p} (hy : y ≠ 0) (hxy : x ^ 2 = -y ^ 2) :
    p % 4 ≠ 3

{p : ℕ}
[Fact (Nat.Prime p)]
{x y : ZMod p}
(hy : y ≠ 0)
(hxy : x ^ 2 = -y ^ 2)


@[simp]
theorem single_apply (a : α) (b : β) : single a b a = some b

{α : Type u}
{β : Type v}
[DecidableEq α]
[DecidableEq β]
(a : α)
(b : β)


@[simp]
theorem mem_iInf {ι} {x : α} {s : ι → Closeds α} : x ∈ iInf s ↔ ∀ i, x ∈ s i

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


theorem map_sum_lt {ι : Type*} {s : Finset ι} {f : ι → R} {g : Γ₀} (hg : g ≠ 0)
    (hf : ∀ i ∈ s, v (f i) < g) : v (∑ i ∈ s, f i) < g

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedCommMonoidWithZero Γ₀]
(v : Valuation R Γ₀)
{ι : Type u_7}
{s : Finset ι}
{f : ι → R}
{g : Γ₀}
(hg : g ≠ 0)
(hf : ∀ i ∈ s, v (f i) < g)


@[simp, reassoc]
theorem colimitFlipCompColimIsoColimitCompColim_ι_ι_inv (k) (j) :
    colimit.ι (F.obj j) k ≫ colimit.ι (F ⋙ colim) j ≫
      (colimitFlipCompColimIsoColimitCompColim F).inv =
        (colimit.ι _ j ≫ colimit.ι (F.flip ⋙ colim) k : _ ⟶ colimit (F.flip ⋙ colim))

[CategoryTheory.Limits.HasColimitsOfShape (J × K) C]

[CategoryTheory.Limits.HasColimitsOfShape (K × J) C]

CategoryTheory.Limits.colimit.ι (F.obj j) k ≫
    CategoryTheory.Limits.colimit.ι (F ⋙ CategoryTheory.Limits.colim) j ≫
      (CategoryTheory.Limits.colimitFlipCompColimIsoColimitCompColim F).inv =
  CategoryTheory.Limits.colimit.ι (F.flip.obj k) j ≫
    CategoryTheory.Limits.colimit.ι (F.flip ⋙ CategoryTheory.Limits.colim) k


/-- The integral of the conditional expectation `condexpL1CLM` over an `m`-measurable set is equal
to the integral of `f` on that set. See also `setIntegral_condexp`, the similar statement for
`condexp`. -/
theorem setIntegral_condexpL1CLM (f : α →₁[μ] F') (hs : MeasurableSet[m] s) :
    ∫ x in s, condexpL1CLM F' hm μ f x ∂μ = ∫ x in s, f x ∂μ

{α : Type u_1}
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
{s : Set α}
(f : ↥(MeasureTheory.Lp F' 1 μ))
(hs : MeasurableSet s)

∫ (x : α) in s, ↑↑((MeasureTheory.condexpL1CLM F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ


@[simp, norm_cast] lemma coe_qsmul (s : S) (q : ℚ) (x : s) : ↑(q • x) = q • (x : K)

{K : Type u}
[DivisionRing K]
{S : Type u_1}
[SetLike S K]
[h : SubfieldClass S K]
(s : S)
(q : ℚ)
(x : ↥s)


@[reassoc (attr := simp)]
lemma homology_π_ι :
    K.homologyπ i ≫ K.homologyι i = K.iCycles i ≫ K.pOpcycles i


@[simp]
theorem orderIsoPUnitSumLex_symm_inl (x : PUnit) :
    (@orderIsoPUnitSumLex α _).symm (toLex <| inl x) = ⊥

WithBot.orderIsoPUnitSumLex.symm (toLex (Sum.inl x)) = ⊥


/-- Extending a cocone by a composition is the same as extending the cone twice. -/
@[simps!]
def extendComp (s : Cocone F) {X Y : C} (f : s.pt ⟶ X) (g : X ⟶ Y) :
    s.extend (f ≫ g) ≅ (s.extend f).extend g

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(s : CategoryTheory.Limits.Cocone F)
{X Y : C}
(f : s.pt ⟶ X)
(g : X ⟶ Y)

(CategoryTheory.Limits.Cocones.extendComp s f g).inv.hom = 𝟙 Y


theorem IsPrime.pow_mem_iff_mem {I : Ideal α} (hI : I.IsPrime) {r : α} (n : ℕ) (hn : 0 < n) :
    r ^ n ∈ I ↔ r ∈ I

{α : Type u}
[CommSemiring α]
{I : Ideal α}
(hI : I.IsPrime)
{r : α}
(n : ℕ)
(hn : 0 < n)


@[to_additive]
theorem support_smulAntidiagonal_subset_smul {hs : s.IsPWO} {ht : t.IsPWO} :
    { a | (SMulAntidiagonal hs ht a).Nonempty } ⊆ (s • t)

{G : Type u_1}
{P : Type u_2}
[PartialOrder G]
[PartialOrder P]
[VAdd G P]
[IsOrderedCancelVAdd G P]
{s : Set G}
{t : Set P}
{hs : s.IsPWO}
{ht : t.IsPWO}

{a | (Finset.VAddAntidiagonal hs ht a).Nonempty} ⊆ s +ᵥ t


@[simp]
theorem Biprod.inl_ofComponents :
    biprod.inl ≫ Biprod.ofComponents f₁₁ f₁₂ f₂₁ f₂₂ = f₁₁ ≫ biprod.inl + f₁₂ ≫ biprod.inr

CategoryTheory.Limits.biprod.inl ≫ CategoryTheory.Biprod.ofComponents f₁₁ f₁₂ f₂₁ f₂₂ =
  f₁₁ ≫ CategoryTheory.Limits.biprod.inl + f₁₂ ≫ CategoryTheory.Limits.biprod.inr


@[simp]
theorem lift_comp_reindex_symm (e : ι ≃ ι₂) (φ : MultilinearMap R s E) :
    lift φ ∘ₗ (reindex R s e).symm = lift (domDomCongrLinearEquiv' R R s _ e φ)

{ι : Type u_1}
{ι₂ : Type u_2}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]
{E : Type u_9}
[AddCommMonoid E]
[Module R E]
(e : ι ≃ ι₂)
(φ : MultilinearMap R s E)

PiTensorProduct.lift φ ∘ₗ ↑(PiTensorProduct.reindex R s e).symm =
  PiTensorProduct.lift ((MultilinearMap.domDomCongrLinearEquiv' R R s E e) φ)


/-- A fork on `f g : X ⟶ Y` is determined by the morphism `ι : P ⟶ X` satisfying `ι ≫ f = ι ≫ g`.
-/
@[simps]
def Fork.ofι {P : C} (ι : P ⟶ X) (w : ι ≫ f = ι ≫ g) : Fork f g

(w : CategoryTheory.CategoryStruct.comp ι f = CategoryTheory.CategoryStruct.comp ι g)

(CategoryTheory.Limits.Fork.ofι ι w).pt = P


theorem filter_eq_iff : f = g ↔ f.sets = g.sets


@[rclike_simps] -- porting note (#10618): was `simp`
theorem normSq_eq_zero {z : K} : normSq z = 0 ↔ z = 0


@[to_additive]
theorem extend_div [Div γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ) :
    Function.extend f (g₁ / g₂) (e₁ / e₂) = Function.extend f g₁ e₁ / Function.extend f g₂ e₂

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Sub γ]
(f : α → β)
(g₁ g₂ : α → γ)
(e₁ e₂ : β → γ)

Function.extend f (g₁ - g₂) (e₁ - e₂) = Function.extend f g₁ e₁ - Function.extend f g₂ e₂


protected theorem FastSubsingleton.elim {α : Sort u} [h : FastSubsingleton α] : (a b : α) → a = b

{α : Sort u}
[h : Lean.Meta.FastSubsingleton α]
(a b : α)


theorem formPerm_append_pair : ∀ (l : List α) (a b : α),
    formPerm (l ++ [a, b]) = formPerm (l ++ [a]) * swap a b

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

(l ++ [a, b]).formPerm = (l ++ [a]).formPerm * Equiv.swap a b


theorem finite_iUnion_right_iff {ι : Type*} {I : Set ι} (hI : I.Finite) {s : Set X}
    {t : ι → Set X} : IsMetricSeparated s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, IsMetricSeparated s (t i)

{X : Type u_1}
[EMetricSpace X]
{ι : Type u_2}
{I : Set ι}
(hI : I.Finite)
{s : Set X}
{t : ι → Set X}


theorem option_casesOn {o : α → Option β} {f : α → σ} {g : α → β → σ} (ho : Primrec o)
    (hf : Primrec f) (hg : Primrec₂ g) :
    @Primrec _ σ _ _ fun a => Option.casesOn (o a) (f a) (g a)

{α : Type u_1}
{β : Type u_2}
{σ : Type u_5}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{o : α → Option β}
{f : α → σ}
{g : α → β → σ}
(ho : Primrec o)
(hf : Primrec f)
(hg : Primrec₂ g)

Primrec fun a => Option.casesOn (o a) (f a) (g a)


@[simp]
theorem absNorm_span_insert (r : S) (s : Set S) :
    absNorm (span (insert r s)) ∣ gcd (absNorm (span s)) (Algebra.norm ℤ r).natAbs

{S : Type u_1}
[CommRing S]
[IsDomain S]
[Nontrivial S]
[IsDedekindDomain S]
[Module.Free ℤ S]
[Module.Finite ℤ S]
(r : S)
(s : Set S)

Ideal.absNorm (Ideal.span (insert r s)) ∣ gcd (Ideal.absNorm (Ideal.span s)) ((Algebra.norm ℤ) r).natAbs


lemma _root_.MeasureTheory.AEStronglyMeasurable.fourierPowSMulRight
    (hf : AEStronglyMeasurable f μ) (n : ℕ) :
    AEStronglyMeasurable (fun v ↦ fourierPowSMulRight L f v n) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun v => VectorFourier.fourierPowSMulRight L f v n) μ


theorem le_sup_of_le {b : β} (hb : b ∈ s) (h : a ≤ f b) : a ≤ s.sup f

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[OrderBot α]
{s : Finset β}
{f : β → α}
{a : α}
{b : β}
(hb : b ∈ s)
(h : a ≤ f b)


theorem ContinuousWithinAt.image_closure {f : α → β} {s : Set α}
    (hf : ∀ x ∈ closure s, ContinuousWithinAt f s x) : f '' closure s ⊆ closure (f '' s)


lemma nilRank_le_finrank : nilRank φ ≤ finrank R M

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[AddCommGroup L]
[Module R L]
[AddCommGroup M]
[Module R M]
(φ : L →ₗ[R] Module.End R M)
[Module.Free R M]
[Module.Finite R M]
[Module.Finite R L]
[Module.Free R L]
[Nontrivial R]

φ.nilRank ≤ FiniteDimensional.finrank R M


@[symm]
theorem IsConj.symm {a b : α} : IsConj a b → IsConj b a


/-- The partial images of a binary function `f` whose partial evaluations are injective are pairwise
disjoint iff `f` is injective . -/
theorem pairwiseDisjoint_image_right_iff {f : α → β → γ} {s : Set α} {t : Set β}
    (hf : ∀ a ∈ s, Injective (f a)) :
    (s.PairwiseDisjoint fun a => f a '' t) ↔ (s ×ˢ t).InjOn fun p => f p.1 p.2

{f : α → β → γ}

(hf : ∀ a ∈ s, Function.Injective (f a))

(s.PairwiseDisjoint fun a => f a '' t) ↔ Set.InjOn (fun p => f p.1 p.2) (s ×ˢ t)


theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
    (K⁻¹ : ℝ≥0∞) * edist (f x) (f y) ≤ edist x y

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(h : LipschitzWith K f)
(x y : α)


@[simp]
theorem functorCategoryMonoidalEquivalence.functor_map {A B : Action V G} (f : A ⟶ B) :
    (functorCategoryMonoidalEquivalence _ _).map f = FunctorCategoryEquivalence.functor.map f

(V : Type (u + 1))
[CategoryTheory.LargeCategory V]
(G : MonCat)
[CategoryTheory.MonoidalCategory V]
{A B : Action V G}
(f : A ⟶ B)

(Action.functorCategoryMonoidalEquivalence V G).map f = Action.FunctorCategoryEquivalence.functor.map f


@[to_additive]
theorem le_map_div_mul_map_div [Group α] [CommSemigroup β] [LE β] [SubmultiplicativeHomClass F α β]
    (f : F) (a b c : α) : f (a / c) ≤ f (a / b) * f (b / c)

{F : Type u_2}
{α : Type u_3}
{β : Type u_4}
[FunLike F α β]
[Group α]
[CommSemigroup β]
[LE β]
[SubmultiplicativeHomClass F α β]
(f : F)
(a b c : α)


@[simp, norm_cast]
theorem coe_sum {ι : Type*} [Fintype ι] (f : ι → S) : (↑(∑ i, f i) : L) = ∑ i, (f i : L)

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)
{ι : Type u_4}
[Fintype ι]
(f : ι → ↥S)


/-- In the characteristic zero case, the weights in the centroid sum
to 1 if the set is nonempty. -/
theorem sum_centroidWeights_eq_one_of_nonempty [CharZero k] (h : s.Nonempty) :
    ∑ i ∈ s, s.centroidWeights k i = 1

(k : Type u_1)
[DivisionRing k]
{ι : Type u_4}
(s : Finset ι)
[CharZero k]
(h : s.Nonempty)

∑ i ∈ s, Finset.centroidWeights k s i = 1


/-- Range of `Basis.flag` as a `Flag`. -/
@[simps!]
def toFlag (b : Basis (Fin n) K V) : Flag (Submodule K V)

{K : Type u_1}
{V : Type u_2}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{n : ℕ}
(b : Basis (Fin n) K V)


theorem or_right_comm : (a ∨ b) ∨ c ↔ (a ∨ c) ∨ b


theorem mono (f : α → E) {s t : Set α} (hst : t ⊆ s) : eVariationOn f t ≤ eVariationOn f s

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
(f : α → E)
{s t : Set α}
(hst : t ⊆ s)


theorem ofMulAction_self_smul_eq_mul (x : MonoidAlgebra k G) (y : (ofMulAction k G G).asModule) :
    x • y = (x * y : MonoidAlgebra k G)

(y : (Representation.ofMulAction k G G).asModule)


@[simp]
theorem tan_arctan (x : ℝ) : tan (arctan x) = x


/-- A Lipschitz function is continuous. -/
protected theorem continuous (hf : LipschitzWith K f) : Continuous f

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(hf : LipschitzWith K f)


@[simp]
theorem comp_f {X Y Z : DifferentialObject S C} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).f = f.f ≫ g.f

{X Y Z : CategoryTheory.DifferentialObject S C}

(CategoryTheory.CategoryStruct.comp f g).f = CategoryTheory.CategoryStruct.comp f.f g.f


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

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

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


theorem elim_preimage_pi [DecidableEq ι] {l : List ι} (hnd : l.Nodup) (h : ∀ i, i ∈ l)
    (t : ∀ i, Set (α i)) : TProd.elim' h ⁻¹' pi univ t = Set.tprod l t

{ι : Type u}
{α : ι → Type v}
[DecidableEq ι]
{l : List ι}
(hnd : l.Nodup)
(h : ∀ (i : ι), i ∈ l)
(t : (i : ι) → Set (α i))

List.TProd.elim' h ⁻¹' Set.univ.pi t = Set.tprod l t


theorem withTopEquiv_lt {x y : PartENat} : withTopEquiv x < withTopEquiv y ↔ x < y

PartENat.withTopEquiv x < PartENat.withTopEquiv y ↔ x < y


@[simp] protected theorem mul_pos_iff_of_pos_left {a b : Nat} (h : 0 < a) :
    0 < a * b ↔ 0 < b


@[simp]
theorem nonZeroDivisors.coe_ne_zero [Nontrivial M] (x : M⁰) : (x : M) ≠ 0

{M : Type u_2}
[MonoidWithZero M]
[Nontrivial M]
(x : ↥M⁰)


@[simp]
protected theorem deriv_aeval : deriv (fun x => aeval x q) x = aeval x (derivative q)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{R : Type u_1}
[CommSemiring R]
[Algebra R 𝕜]
(q : R[X])

deriv (fun x => (Polynomial.aeval x) q) x = (Polynomial.aeval x) (Polynomial.derivative q)


theorem abs_lt_one (z : 𝔻) : abs (z : ℂ) < 1


theorem card_le_of {α : Type u} {n : ℕ} (H : ∀ s : Finset α, s.card ≤ n) : #α ≤ n

{α : Type u}
{n : ℕ}
(H : ∀ (s : Finset α), s.card ≤ n)


@[simp]
theorem sum_lof (j : ι) (x : AdicCompletion I (M j)) :
    sum I M ((DirectSum.lof (AdicCompletion I R) ι (fun i ↦ AdicCompletion I (M i)) j) x) =
      map I (lof R ι M j) x

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{ι : Type u_6}
[DecidableEq ι]
(M : ι → Type u_7)
[(i : ι) → AddCommGroup (M i)]
[(i : ι) → Module R (M i)]
(j : ι)
(x : AdicCompletion I (M j))

(AdicCompletion.sum I M) ((DirectSum.lof (AdicCompletion I R) ι (fun i => AdicCompletion I (M i)) j) x) =
  (AdicCompletion.map I (DirectSum.lof R ι M j)) x


theorem comp_add (f g : M →ₛₗ[σ₁₂] M₂) (h : M₂ →ₛₗ[σ₂₃] M₃) :
    (h.comp (f + g) : M →ₛₗ[σ₁₃] M₃) = h.comp f + h.comp g

{R₁ : Type u_2}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M : Type u_9}
{M₂ : Type u_11}
{M₃ : Type u_12}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R₁ M]
[Module R₂ M₂]
[Module R₃ M₃]
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
(f g : M →ₛₗ[σ₁₂] M₂)
(h : M₂ →ₛₗ[σ₂₃] M₃)


theorem equivPair_smul_same {i} (m : M i) (w : Word M) :
    equivPair i (of m • w) = ⟨m * (equivPair i w).head, (equivPair i w).tail,
      (equivPair i w).fstIdx_ne⟩

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
[(i : ι) → DecidableEq (M i)]
[DecidableEq ι]
{i : ι}
(m : M i)
(w : Monoid.CoprodI.Word M)

(Monoid.CoprodI.Word.equivPair i) (Monoid.CoprodI.of m • w) =
  { head := m * ((Monoid.CoprodI.Word.equivPair i) w).head, tail := ((Monoid.CoprodI.Word.equivPair i) w).tail,
    fstIdx_ne := ⋯ }


theorem out_eq' (H K : Subgroup G) (q : Quotient ↑H ↑K) : mk H K q.out' = q

{G : Type u_1}
[Group G]
(H K : Subgroup G)
(q : Doset.Quotient ↑H ↑K)


@[simp] theorem getMsb_cast (h : w = v) (x : BitVec w) : (cast h x).getMsb i = x.getMsb i

{w v i : Nat}
(h : w = v)
(x : BitVec w)


theorem symm_apply_le (e : α ≃o β) {x : α} {y : β} : e.symm y ≤ x ↔ y ≤ e x

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


@[simp]
lemma basicOpen_pow {U : Opens X} (f : X.presheaf.obj (op U)) (n : ℕ) (h : 0 < n) :
    X.basicOpen (f ^ n) = X.basicOpen f

{U : TopologicalSpace.Opens ↑↑X.toPresheafedSpace}


theorem vsub_iInter_subset (s : Set β) (t : ι → Set β) : (s -ᵥ ⋂ i, t i) ⊆ ⋂ i, s -ᵥ t i

{α : Type u_2}
{β : Type u_3}
{ι : Sort u_5}
[VSub α β]
(s : Set β)
(t : ι → Set β)


@[reassoc (attr := simp)]
theorem toSheafify_sheafifyLift {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (hQ : Presheaf.IsSheaf J Q) :
    toSheafify J P ≫ sheafifyLift J η hQ = η

(J : CategoryTheory.GrothendieckTopology C)

(hQ : CategoryTheory.Presheaf.IsSheaf J Q)

CategoryTheory.CategoryStruct.comp (CategoryTheory.toSheafify J P) (CategoryTheory.sheafifyLift J η hQ) = η


@[simp 1100]
theorem singleton_op_unop (x : α) : ({op x} : Set αᵒᵖ).unop = {x}


@[simp]
lemma IsInvertedBy.iff_comp {C₁ C₂ C₃ : Type*} [Category C₁] [Category C₂] [Category C₃]
    (W : MorphismProperty C₁) (F : C₁ ⥤ C₂) (G : C₂ ⥤ C₃) [G.ReflectsIsomorphisms] :
    W.IsInvertedBy (F ⋙ G) ↔ W.IsInvertedBy F

(W : CategoryTheory.MorphismProperty C₁)

W.IsInvertedBy (F.comp G) ↔ W.IsInvertedBy F


@[simp]
theorem zero_testAgainstNN_apply (f : Ω →ᵇ ℝ≥0) : (0 : FiniteMeasure Ω).testAgainstNN f = 0

{Ω : Type u_1}
[MeasurableSpace Ω]
[TopologicalSpace Ω]
(f : Ω →ᵇ ℝ≥0)

MeasureTheory.FiniteMeasure.testAgainstNN 0 f = 0


theorem minpoly_eq_minpoly : minpoly G F x = _root_.minpoly (FixedPoints.subfield G F) x

(G : Type u)
[Group G]
(F : Type v)
[Field F]
[MulSemiringAction G F]
[Fintype G]
(x : F)

FixedPoints.minpoly G F x = minpoly (↥(FixedPoints.subfield G F)) x


/-- Contravariantly associated to each functor `J ⥤ C`, we have the `C`-copresheaf consisting of
cocones with a given cocone point.
-/
@[simps!]
def cocones : (J ⥤ C)ᵒᵖ ⥤ C ⥤ Type max u₁ v₃

(J : Type u₁)
[CategoryTheory.Category.{v₁, u₁} J]
(C : Type u₃)
[CategoryTheory.Category.{v₃, u₃} C]
(F : (J ⥤ C)ᵒᵖ)
(X : C)

((CategoryTheory.cocones J C).obj F).obj X = (Opposite.unop F ⟶ (CategoryTheory.Functor.const J).obj X)


theorem ClosedComplemented.of_isCompl_isClosed (h : IsCompl p q) (hp : IsClosed (p : Set E))
    (hq : IsClosed (q : Set E)) : p.ClosedComplemented

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


@[simp]
theorem toDual_le_toDual_iff {a b : WithTop α} : WithTop.toDual a ≤ WithTop.toDual b ↔ b ≤ a


nonrec theorem MellinConvergent.div_const {f : ℝ → ℂ} {s : ℂ} (hf : MellinConvergent f s) (a : ℂ) :
    MellinConvergent (fun t => f t / a) s


theorem Differentiable.rpow (hf : Differentiable ℝ f) (hg : Differentiable ℝ g) (h : ∀ x, f x ≠ 0) :
    Differentiable ℝ fun x => f x ^ g x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f g : E → ℝ}
(hf : Differentiable ℝ f)
(hg : Differentiable ℝ g)
(h : ∀ (x : E), f x ≠ 0)


lemma ScottContinuous.continuous' {f : α → β} (hf : ScottContinuous f) : Continuous' f

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
{f : α → β}
(hf : ScottContinuous f)


@[simp]
theorem mem_dual {S : PointedCone ℝ E} {y : E} : y ∈ dual S ↔ ∀ ⦃x⦄, x ∈ S → 0 ≤ ⟪x, y⟫_ℝ

{E : Type u_5}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{S : PointedCone ℝ E}
{y : E}

y ∈ S.dual ↔ ∀ ⦃x : E⦄, x ∈ S → 0 ≤ ⟪x, y⟫_ℝ


theorem isLittleO_iff_tendsto {f g : α → 𝕜} (hgf : ∀ x, g x = 0 → f x = 0) :
    f =o[l] g ↔ Tendsto (fun x => f x / g x) l (𝓝 0)

{α : Type u_1}
{𝕜 : Type u_15}
[NormedDivisionRing 𝕜]
{l : Filter α}
{f g : α → 𝕜}
(hgf : ∀ (x : α), g x = 0 → f x = 0)

f =o[l] g ↔ Filter.Tendsto (fun x => f x / g x) l (𝓝 0)


@[simp]
theorem mem_nhds_toTopsp (F : Ctop α σ) {s : Set α} {a : α} :
    s ∈ @nhds _ F.toTopsp a ↔ ∃ b, a ∈ F b ∧ F b ⊆ s

{α : Type u_1}
{σ : Type u_3}
(F : Ctop α σ)
{s : Set α}
{a : α}


/-- `zeroLocus` and `vanishingIdeal` form a galois connection. -/
theorem gc :
    @GaloisConnection (Ideal R) (Set (PrimeSpectrum R))ᵒᵈ _ _ (fun I => zeroLocus I) fun t =>
      vanishingIdeal t

GaloisConnection (fun I => PrimeSpectrum.zeroLocus ↑I) fun t => PrimeSpectrum.vanishingIdeal t


@[mono, gcongr]
theorem mul_lt_mul (ac : a < c) (bd : b < d) : a * b < c * d

{a b c d : ℝ≥0∞}
(ac : a < c)
(bd : b < d)


lemma one_le_div_iff (hb : 0 < b) : 1 ≤ a / b ↔ b ≤ a


@[simp] lemma coe_smul {M : Type*} [Zero R] [SMulZeroClass M R] [ContinuousConstSMul M R]
    (m : M) (f : C(X, R)₀) : ⇑(m • f) = m • f

{X : Type u_1}
{R : Type u_2}
[Zero X]
[TopologicalSpace X]
[TopologicalSpace R]
{M : Type u_3}
[Zero R]
[SMulZeroClass M R]
[ContinuousConstSMul M R]
(m : M)
(f : ContinuousMapZero X R)


/-- Precomposing `f` with `Prod.fst` is `C^n` at `x : E × F` -/
theorem ContDiffAt.fst'' {f : E → G} {x : E × F} (hf : ContDiffAt 𝕜 n f x.1) :
    ContDiffAt 𝕜 n (fun x : E × F => f x.1) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{n : ℕ∞}
{f : E → G}
{x : E × F}
(hf : ContDiffAt 𝕜 n f x.1)


/-- If two affine subspaces have a point in common, the direction of their inf equals the inf of
their directions. -/
theorem direction_inf_of_mem {s₁ s₂ : AffineSubspace k P} {p : P} (h₁ : p ∈ s₁) (h₂ : p ∈ s₂) :
    (s₁ ⊓ s₂).direction = s₁.direction ⊓ s₂.direction

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{s₁ s₂ : AffineSubspace k P}
{p : P}
(h₁ : p ∈ s₁)
(h₂ : p ∈ s₂)


@[trans]
theorem ModEq.trans : a ≡ b [PMOD p] → b ≡ c [PMOD p] → a ≡ c [PMOD p]

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


@[simp] theorem runK_modify (f : σ → σ) (s : σ) (k : PUnit → σ → m β) : (modify f : StateCpsT σ m PUnit).runK s k = k ⟨⟩ (f s)

{σ : Type u}
{m : Type u → Type v}
{β : Type u}
(f : σ → σ)
(s : σ)
(k : PUnit → σ → m β)

(modify f).runK s k = k PUnit.unit (f s)


@[to_additive]
theorem smoothAt_finset_prod' (h : ∀ i ∈ t, SmoothAt I' I (f i) x) :
    SmoothAt I' I (∏ i ∈ t, f i) x

{ι : Type u_1}
{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{H : Type u_3}
[TopologicalSpace H]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[AddCommMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothAdd I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{x : M}
{t : Finset ι}
{f : ι → M → G}
(h : ∀ i ∈ t, SmoothAt I' I (f i) x)


@[to_additive (attr := simp)]
theorem mul_inv_cancel_right (a : α) (b : αˣ) : a * b * ↑b⁻¹ = a

{α : Type u}
[Monoid α]
(a : α)
(b : αˣ)


theorem disjoint_nhdsSet_nhdsSet [NormalSpace X] {s t : Set X} (hs : IsClosed s) (ht : IsClosed t)
    (hd : Disjoint s t) : Disjoint (𝓝ˢ s) (𝓝ˢ t)

{X : Type u_1}
[TopologicalSpace X]
[NormalSpace X]
{s t : Set X}
(hs : IsClosed s)
(ht : IsClosed t)
(hd : Disjoint s t)


@[to_additive]
theorem prod_dite {s : Finset α} {p : α → Prop} {hp : DecidablePred p} (f : ∀ x : α, p x → β)
    (g : ∀ x : α, ¬p x → β) :
    ∏ x ∈ s, (if hx : p x then f x hx else g x hx) =
      (∏ x ∈ (s.filter p).attach, f x.1 (by simpa using (mem_filter.mp x.2).2)) *
        ∏ x ∈ (s.filter fun x => ¬p x).attach, g x.1 (by simpa using (mem_filter.mp x.2).2)

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
{s : Finset α}
{p : α → Prop}
{hp : DecidablePred p}
(f : (x : α) → p x → β)
(g : (x : α) → ¬p x → β)

(∏ x ∈ s, if hx : p x then f x hx else g x hx) =
  (∏ x ∈ (Finset.filter p s).attach, f ↑x ⋯) * ∏ x ∈ (Finset.filter (fun x => ¬p x) s).attach, g ↑x ⋯


theorem fast_fib_aux_bit_tt (n : ℕ) :
    fastFibAux (bit true n) =
      let p := fastFibAux n
      (p.2 ^ 2 + p.1 ^ 2, p.2 * (2 * p.1 + p.2))

(Nat.bit true n).fastFibAux =
  let p := n.fastFibAux;
  (p.2 ^ 2 + p.1 ^ 2, p.2 * (2 * p.1 + p.2))


theorem DifferentiableWithinAt.mono (h : DifferentiableWithinAt 𝕜 f t x) (st : s ⊆ t) :
    DifferentiableWithinAt 𝕜 f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{s t : Set E}
(h : DifferentiableWithinAt 𝕜 f t x)
(st : s ⊆ t)


theorem FGModuleCatCoevaluation_apply_one :
    FGModuleCatCoevaluation K V (1 : K) =
      ∑ i : Basis.ofVectorSpaceIndex K V,
        (Basis.ofVectorSpace K V) i ⊗ₜ[K] (Basis.ofVectorSpace K V).coord i

(K : Type u)
[Field K]
(V : FGModuleCat K)

(FGModuleCat.FGModuleCatCoevaluation K V) 1 =
  ∑ i : ↑(Basis.ofVectorSpaceIndex K ↑V), (Basis.ofVectorSpace K ↑V) i ⊗ₜ[K] (Basis.ofVectorSpace K ↑V).coord i


theorem ediam_image_le_of_subset_of_le (hf : HolderOnWith C r f s) (ht : t ⊆ s) {d : ℝ≥0∞}
    (hd : EMetric.diam t ≤ d) : EMetric.diam (f '' t) ≤ (C : ℝ≥0∞) * d ^ (r : ℝ)

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
{C r : ℝ≥0}
{f : X → Y}
{s t : Set X}
(hf : HolderOnWith C r f s)
(ht : t ⊆ s)
{d : ℝ≥0∞}
(hd : EMetric.diam t ≤ d)


theorem of_comp_finite {f : A →+* B} {g : B →+* C} (h : (g.comp f).Finite) : g.Finite

{A : Type u_1}
{B : Type u_2}
{C : Type u_3}
[CommRing A]
[CommRing B]
[CommRing C]
{f : A →+* B}
{g : B →+* C}
(h : (g.comp f).Finite)


@[simp]
theorem basisSpanSingleton_apply (b : Basis ι R S) {x : S} (hx : x ≠ 0) (i : ι) :
    (basisSpanSingleton b hx i : S) = x * b i

{ι : Type u_1}
{R : Type u_2}
{S : Type u_3}
[CommSemiring R]
[CommRing S]
[IsDomain S]
[Algebra R S]
(b : Basis ι R S)
{x : S}
(hx : x ≠ 0)
(i : ι)

↑((Ideal.basisSpanSingleton b hx) i) = x * b i


theorem iUnion_subset (h : π.IsPartition) (π₁ : Prepartition I) : π₁.iUnion ⊆ π.iUnion

{ι : Type u_1}
{I : BoxIntegral.Box ι}
{π : BoxIntegral.Prepartition I}
(h : π.IsPartition)
(π₁ : BoxIntegral.Prepartition I)


/-- For any candidate `f`, `HD(f)` is larger than or equal to the Hausdorff distance in the
optimal coupling. This follows from the fact that `HD` of the optimal candidate is exactly
the Hausdorff distance in the optimal coupling, although we only prove here the inequality
we need. -/
theorem hausdorffDist_optimal_le_HD {f} (h : f ∈ candidatesB X Y) :
    hausdorffDist (range (optimalGHInjl X Y)) (range (optimalGHInjr X Y)) ≤ HD f

(h : f ∈ GromovHausdorff.candidatesB X Y)

Metric.hausdorffDist (Set.range (GromovHausdorff.optimalGHInjl X Y)) (Set.range (GromovHausdorff.optimalGHInjr X Y)) ≤
  GromovHausdorff.HD f


/-- The inner product between a `π / 2` rotation of a vector and that vector is zero. -/
@[simp]
theorem inner_rotation_pi_div_two_left (x : V) : ⟪o.rotation (π / 2 : ℝ) x, x⟫ = 0

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


@[simp]
theorem dist_homothety_self (p₁ p₂ : P) (c : 𝕜) :
    dist (homothety p₁ c p₂) p₂ = ‖1 - c‖ * dist p₁ p₂

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 V]
(p₁ p₂ : P)
(c : 𝕜)

dist ((AffineMap.homothety p₁ c) p₂) p₂ = ‖1 - c‖ * dist p₁ p₂


@[to_additive (attr := simp)]
theorem comap_top (f : F) : (⊤ : Submonoid N).comap f = ⊤

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
(f : F)


@[to_additive]
theorem inseparable_one_iff_norm {a : E} : Inseparable a 1 ↔ ‖a‖ = 0

{E : Type u_6}
[SeminormedGroup E]
{a : E}


/-- If two continuous linear maps are equal on a set `s`, then they are equal on the closure
of the `Submodule.span` of this set. -/
theorem eqOn_closure_span [T2Space M₂] {s : Set M₁} {f g : M₁ →SL[σ₁₂] M₂} (h : Set.EqOn f g s) :
    Set.EqOn f g (closure (Submodule.span R₁ s : Set M₁))

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
[T2Space M₂]
{s : Set M₁}
{f g : M₁ →SL[σ₁₂] M₂}
(h : Set.EqOn (⇑f) (⇑g) s)

Set.EqOn (⇑f) (⇑g) (closure ↑(Submodule.span R₁ s))


private theorem house_le_bound : ∀ l, house (ξ K x l).1 ≤ (c₁ K) *
    ((c₁ K * q * A)^((p : ℝ) / (q - p)))

(a : Matrix α β (NumberField.RingOfIntegers K))

(hxbound : ‖x‖ ≤ (↑q * ↑(FiniteDimensional.finrank ℚ K) * ‖NumberField.house.asiegel K a‖) ^ (↑p / (↑q - ↑p)))

(habs : ∀ (k : α) (l : β), NumberField.house ((algebraMap (NumberField.RingOfIntegers K) K) (a k l)) ≤ A)

NumberField.house ↑(NumberField.house.ξ K x l) ≤
  NumberField.house.c₁ K * (NumberField.house.c₁ K * ↑q * A) ^ (↑p / (↑q - ↑p))


/-- The iterated differential within a set `s` at a point `x` is not modified if one intersects
`s` with a neighborhood of `x` within `s`. -/
theorem iteratedFDerivWithin_inter' {n : ℕ} (hu : u ∈ 𝓝[s] x) :
    iteratedFDerivWithin 𝕜 n f (s ∩ u) x = iteratedFDerivWithin 𝕜 n f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s u : Set E}
{f : E → F}
{x : E}
{n : ℕ}
(hu : u ∈ 𝓝[s] x)


theorem dist_eq_sum {p : ℝ≥0∞} (hp : 0 < p.toReal) (f g : PiLp p α) :
    dist f g = (∑ i, dist (f i) (g i) ^ p.toReal) ^ (1 / p.toReal)

{ι : Type u_2}
{α : ι → Type u_3}
[Fintype ι]
[(i : ι) → Dist (α i)]
{p : ℝ≥0∞}
(hp : 0 < p.toReal)
(f g : PiLp p α)

dist f g = (∑ i : ι, dist (f i) (g i) ^ p.toReal) ^ (1 / p.toReal)


theorem lt_of_add_one_le {a b : Int} (H : a + 1 ≤ b) : a < b


theorem add_comm_le {x y : PGame} : x + y ≤ y + x


protected theorem nonempty (s : NonemptyCompacts α) : (s : Set α).Nonempty

(s : TopologicalSpace.NonemptyCompacts α)


theorem Ideal.IsHomogeneous.toIdeal_homogeneousCore_eq_self (h : I.IsHomogeneous 𝒜) :
    (I.homogeneousCore 𝒜).toIdeal = I

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[DecidableEq ι]
[AddMonoid ι]
[GradedRing 𝒜]
{I : Ideal A}
(h : Ideal.IsHomogeneous 𝒜 I)


theorem exists_aeval_eq_zero_of_injective {R : Type*} [CommRing R] [IsAlgClosed k] [Algebra R k]
    (hinj : Function.Injective (algebraMap R k)) (p : R[X]) (hp : p.degree ≠ 0) :
    ∃ x : k, aeval x p = 0

(hinj : Function.Injective ⇑(algebraMap R k))


theorem copy_eq (S : LieSubmodule R L M) (s : Set M) (hs : s = ↑S) : S.copy s hs = S

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(S : LieSubmodule R L M)
(s : Set M)
(hs : s = ↑S)


theorem stronglyMeasurable_uncurry_of_continuous_of_stronglyMeasurable {α β ι : Type*}
    [TopologicalSpace ι] [MetrizableSpace ι] [MeasurableSpace ι] [SecondCountableTopology ι]
    [OpensMeasurableSpace ι] [TopologicalSpace β] [PseudoMetrizableSpace β] [MeasurableSpace α]
    {u : ι → α → β} (hu_cont : ∀ x, Continuous fun i => u i x) (h : ∀ i, StronglyMeasurable (u i)) :
    StronglyMeasurable (Function.uncurry u)

{u : ι → α → β}

(hu_cont : ∀ (x : α), Continuous fun i => u i x)

(h : ∀ (i : ι), MeasureTheory.StronglyMeasurable (u i))


@[to_additive (attr := simp)]
theorem zpow_iterate (n : ℤ) (j : ℕ) : (fun x : G => x ^ n)^[j] = fun x => x ^ n ^ j

{G : Type u_3}
[Group G]
(n : ℤ)
(j : ℕ)

(fun x => x ^ n)^[j] = fun x => x ^ n ^ j


@[to_additive (attr := simp)]
theorem mem_map {f : G →* N} {K : Subgroup G} {y : N} : y ∈ K.map f ↔ ∃ x ∈ K, f x = y

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{f : G →* N}
{K : Subgroup G}
{y : N}


@[simp]
theorem coe_addMonoidHom_trans [NonAssocSemiring S'] (e₁ : R ≃+* S) (e₂ : S ≃+* S') :
    (e₁.trans e₂ : R →+ S') = (e₂ : S →+ S').comp ↑e₁

{R : Type u_4}
{S : Type u_5}
{S' : Type u_6}
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring S']
(e₁ : R ≃+* S)
(e₂ : S ≃+* S')


theorem posDef_of_nonneg {Q : QuadraticMap R₂ M N} (h : ∀ x, 0 ≤ Q x) (h0 : Q.Anisotropic) :
    PosDef Q

{M : Type u_4}
{N : Type u_5}
{R₂ : Type u}
[CommSemiring R₂]
[AddCommMonoid M]
[Module R₂ M]
[PartialOrder N]
[AddCommMonoid N]
[Module R₂ N]
{Q : QuadraticMap R₂ M N}
(h : ∀ (x : M), 0 ≤ Q x)
(h0 : Q.Anisotropic)


theorem quotient_prod_linearEquiv (p : Submodule K V) : Nonempty (((V ⧸ p) × p) ≃ₗ[K] V)

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


/-- A version of `Equiv.arrowCongr` in `Type`, rather than `Sort`.

The `equiv_rw` tactic is not able to use the default `Sort` level `Equiv.arrowCongr`,
because Lean's universe rules will not unify `?l_1` with `imax (1 ?m_1)`.
-/
-- Porting note: removing `congr` attribute
@[simps! apply]
def arrowCongr' {α₁ β₁ α₂ β₂ : Type*} (hα : α₁ ≃ α₂) (hβ : β₁ ≃ β₂) : (α₁ → β₁) ≃ (α₂ → β₂)

{α₁ : Type u_1}
{β₁ : Type u_2}
{α₂ : Type u_3}
{β₂ : Type u_4}
(hα : α₁ ≃ α₂)
(hβ : β₁ ≃ β₂)
(f : α₁ → β₁)

∀ (a : α₂), (hα.arrowCongr' hβ) f a = hβ (f (hα.symm a))


@[simp]
theorem filter_le (s : Multiset α) : filter p s ≤ s

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


@[to_additive]
theorem tendsto_mul {a b : M} : Tendsto (fun p : M × M => p.fst * p.snd) (𝓝 (a, b)) (𝓝 (a * b))

{M : Type u_3}
[TopologicalSpace M]
[Add M]
[ContinuousAdd M]
{a b : M}

Filter.Tendsto (fun p => p.1 + p.2) (𝓝 (a, b)) (𝓝 (a + b))


protected lemma IsConjExponent.conjExponent (h : 1 < p) : p.IsConjExponent (conjExponent p)


@[simp]
theorem abs_im_lt_abs {z : ℂ} : |z.im| < Complex.abs z ↔ z.re ≠ 0


/-- When `f : ℂ → E` is differentiable, the `cauchyPowerSeries f z R` represents `f` as a power
series centered at `z` in the entirety of `ℂ`, regardless of `R : ℝ≥0`, with `0 < R`. -/
protected theorem _root_.Differentiable.hasFPowerSeriesOnBall {f : ℂ → E} (h : Differentiable ℂ f)
    (z : ℂ) {R : ℝ≥0} (hR : 0 < R) : HasFPowerSeriesOnBall f (cauchyPowerSeries f z R) z ∞

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
[CompleteSpace E]
{f : ℂ → E}
(h : Differentiable ℂ f)
(z : ℂ)
{R : ℝ≥0}
(hR : 0 < R)

HasFPowerSeriesOnBall f (cauchyPowerSeries f z ↑R) z ⊤