/-- The `Aut F` action on the fiber of a Galois object is transitive. See
`pretransitive_of_isConnected` for the same result for connected objects. -/
theorem FiberFunctor.isPretransitive_of_isGalois (X : C) [IsGalois X] :
    MulAction.IsPretransitive (Aut F) (F.obj X)

(F : CategoryTheory.Functor C FintypeCat)

MulAction.IsPretransitive (CategoryTheory.Aut F) ↑(F.obj X)


theorem ofDigits_zmodeq' (b b' : ℤ) (k : ℕ) (h : b ≡ b' [ZMOD k]) (L : List ℕ) :
    ofDigits b L ≡ ofDigits b' L [ZMOD k]

(b b' : ℤ)
(k : ℕ)
(h : b ≡ b' [ZMOD ↑k])
(L : List ℕ)

Nat.ofDigits b L ≡ Nat.ofDigits b' L [ZMOD ↑k]


/-- An intermediate field of `E / F` is contained in the separable closure of `F` in `E`
if and only if it is separable over `F`. -/
theorem le_separableClosure_iff (L : IntermediateField F E) :
    L ≤ separableClosure F E ↔ Algebra.IsSeparable F L

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(L : IntermediateField F E)

L ≤ separableClosure F E ↔ Algebra.IsSeparable F ↥L


@[simp]
theorem self_sub_toIcoDiv_zsmul (a b : α) : b - toIcoDiv hp a b • p = toIcoMod hp a b

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


@[simp]
theorem Hom.cast_cast {u v u' v' u'' v'' : U} (e : u ⟶ v) (hu : u = u') (hv : v = v')
    (hu' : u' = u'') (hv' : v' = v'') :
    (e.cast hu hv).cast hu' hv' = e.cast (hu.trans hu') (hv.trans hv')

Quiver.Hom.cast hu' hv' (Quiver.Hom.cast hu hv e) = Quiver.Hom.cast ⋯ ⋯ e


@[simp] lemma toEquiv_symm : (@toEquiv α).symm = ofEquiv


lemma bijOn_id (s : Set α) : BijOn id s s


theorem disjoint_comm : Disjoint f g ↔ Disjoint g f


theorem const_pow (x : β) (n : ℕ) : const (x ^ n) = const x ^ n

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

CauSeq.const abv (x ^ n) = CauSeq.const abv x ^ n


theorem cons_fin_one (x : α) (u : Fin 0 → α) : vecCons x u = fun _ => x


/-- The isomorphism from the restriction to the top subspace.
-/
@[simps]
def restrictTopIso (X : PresheafedSpace C) : X.restrict (Opens.openEmbedding ⊤) ≅ X

(X : AlgebraicGeometry.PresheafedSpace C)


theorem strictMono_iff_injective : StrictMono f ↔ Injective f


@[to_additive (attr := simp, norm_cast)]
theorem coe_le_coe : (p : E → ℝ) ≤ q ↔ p ≤ q

{E : Type u_4}
[Group E]
{p q : GroupNorm E}

⇑p ≤ ⇑q ↔ p ≤ q


{α : Type u_1}
{β : Type u_2}
(e : α ≃ β)
{s : Set α}
{t : Set β}


theorem measurable_to_nat {f : α → ℕ} : (∀ y, MeasurableSet (f ⁻¹' {f y})) → Measurable f

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℕ}

(∀ (y : α), MeasurableSet (f ⁻¹' {f y})) → Measurable f


theorem traceMatrix_of_basis_mulVec (b : Basis ι A B) (z : B) :
    traceMatrix A b *ᵥ b.equivFun z = fun i => trace A B (z * b i)

{ι : Type w}
[Fintype ι]
{A : Type u}
{B : Type v}
[CommRing A]
[CommRing B]
[Algebra A B]
(b : Basis ι A B)
(z : B)

Algebra.traceMatrix A ⇑b *ᵥ b.equivFun z = fun i => (Algebra.trace A B) (z * b i)


/-- The optimal coupling constructed above realizes exactly the Gromov-Hausdorff distance,
essentially by design. -/
theorem hausdorffDist_optimal {X : Type u} [MetricSpace X] [CompactSpace X] [Nonempty X]
    {Y : Type v} [MetricSpace Y] [CompactSpace Y] [Nonempty Y] :
    hausdorffDist (range (optimalGHInjl X Y)) (range (optimalGHInjr X Y)) = ghDist X Y

Metric.hausdorffDist (Set.range (GromovHausdorff.optimalGHInjl X Y)) (Set.range (GromovHausdorff.optimalGHInjr X Y)) =
  GromovHausdorff.ghDist X Y


theorem compl_sInf' : (sInf s)ᶜ = sSup (HasCompl.compl '' s)

{α : Type u}
[CompleteBooleanAlgebra α]
{s : Set α}


theorem append_concat {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (h : G.Adj w x) :
    p.append (q.concat h) = (p.append q).concat h

{V : Type u}
{G : SimpleGraph V}
{u v w x : V}
(p : G.Walk u v)
(q : G.Walk v w)
(h : G.Adj w x)


/-- If `x` is an element of a subgroup `s` of a seminormed group `E`, its norm in `s` is equal to
its norm in `E`. -/
@[to_additive (attr := simp) "If `x` is an element of an additive subgroup `s` of a seminormed
additive group `E`, its norm in `s` is equal to its norm in `E`."]
theorem coe_norm (x : s) : ‖x‖ = ‖(x : E)‖

{E : Type u_6}
[SeminormedAddGroup E]
{S : Type u_9}
[SetLike S E]
[AddSubgroupClass S E]
(s : S)
(x : ↥s)


@[simp]
theorem homTensorHomEquiv_apply (x : (M →ₗ[R] P) ⊗[R] (N →ₗ[R] Q)) :
    homTensorHomEquiv R M N P Q x = homTensorHomMap R M N P Q x

(x : TensorProduct R (M →ₗ[R] P) (N →ₗ[R] Q))

(homTensorHomEquiv R M N P Q) x = (TensorProduct.homTensorHomMap R M N P Q) x


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

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


lemma IsMeasurableRatCDF.stieltjesFunctionAux_def' (f : α → ℚ → ℝ) (a : α) :
    IsMeasurableRatCDF.stieltjesFunctionAux f a
      = fun (t : ℝ) ↦ ⨅ r : { r' : ℚ // t < r' }, f a r

ProbabilityTheory.IsMeasurableRatCDF.stieltjesFunctionAux f a = fun t => ⨅ r, f a ↑r


@[simp] lemma insert_subset_insert_iff (ha : a ∉ s) : insert a s ⊆ insert a t ↔ s ⊆ t

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


theorem shiftRight_add {w : Nat} (x : BitVec w) (n m : Nat) :
    x >>> (n + m) = (x >>> n) >>> m


@[simp]
theorem eventually_iSup {p : α → Prop} {fs : ι → Filter α} :
    (∀ᶠ x in ⨆ b, fs b, p x) ↔ ∀ b, ∀ᶠ x in fs b, p x

{α : Type u}
{ι : Sort x}
{p : α → Prop}
{fs : ι → Filter α}

(∀ᶠ (x : α) in ⨆ b, fs b, p x) ↔ ∀ (b : ι), ∀ᶠ (x : α) in fs b, p x


/-- A measure is said to be `IsOpenPosMeasure` if it is positive on nonempty open sets. -/
class IsOpenPosMeasure : Prop where
  open_pos : ∀ U : Set X, IsOpen U → U.Nonempty → μ U ≠ 0

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


theorem min_dist_le_dist_pi (x y : ∀ i, F i) (i : ι) :
    min ((1 / 2) ^ encode i : ℝ) (dist (x i) (y i)) ≤ dist x y

{ι : Type u_2}
[Encodable ι]
{F : ι → Type u_3}
[(i : ι) → MetricSpace (F i)]
(x y : (i : ι) → F i)
(i : ι)

min ((1 / 2) ^ Encodable.encode i) (dist (x i) (y i)) ≤ dist x y


@[reassoc (attr := simp)]
theorem prodComparison_snd : prodComparison F A B ≫ prod.snd = F.map prod.snd

[CategoryTheory.Limits.HasBinaryProduct (F.obj A) (F.obj B)]

CategoryTheory.Limits.prodComparison F A B ≫ CategoryTheory.Limits.prod.snd = F.map CategoryTheory.Limits.prod.snd


theorem lift_mono (hf : f₁ ≤ f₂) (hg : g₁ ≤ g₂) : f₁.lift g₁ ≤ f₂.lift g₂

{α : Type u_1}
{β : Type u_2}
{f₁ f₂ : Filter α}
{g₁ g₂ : Set α → Filter β}
(hf : f₁ ≤ f₂)
(hg : g₁ ≤ g₂)


@[simp] lemma findGreatest_pos : 0 < Nat.findGreatest P k ↔ ∃ n, 0 < n ∧ n ≤ k ∧ P n

{k : ℕ}
{P : ℕ → Prop}
[DecidablePred P]


theorem two_le_iff : (2 : Cardinal) ≤ #α ↔ ∃ x y : α, x ≠ y


@[simp, norm_cast]
theorem coe_coe (s : NonemptyInterval α) : ((s : Interval α) : Set α) = s

{α : Type u_1}
[PartialOrder α]
(s : NonemptyInterval α)


@[simp, norm_cast] lemma coe_top [Top α] : ((⊤ : α) : WithBot α) = ⊤


/-- **Darboux's theorem**: the image of a convex set under `f'` is a convex set,
`deriv` version. -/
theorem Convex.image_deriv {s : Set ℝ} (hs : Convex ℝ s) (hf : ∀ x ∈ s, DifferentiableAt ℝ f x) :
    Convex ℝ (deriv f '' s)

{f : ℝ → ℝ}
{s : Set ℝ}
(hs : Convex ℝ s)
(hf : ∀ x ∈ s, DifferentiableAt ℝ f x)


@[simp]
theorem ediam_image (s : Set E) : EMetric.diam (e '' s) = EMetric.diam s

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


@[simp, nolint simpNF] -- Porting note (#10675): dsimp can not prove this
theorem mem_toAddSubgroup {s : Subring R} {x : R} : x ∈ s.toAddSubgroup ↔ x ∈ s

{R : Type u}
[Ring R]
{s : Subring R}
{x : R}


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

(t : CategoryTheory.Triangulated.TStructure C)


@[simp, norm_cast]
theorem coe_zero : ((0 : ℝ) : EReal) = 0


@[simp]
theorem obj_μ_zero_app (m₁ m₂ : M) (X : C) :
    (F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (𝟙_ M ⊗ m₂)).app X ≫
    (F.map (α_ m₁ (𝟙_ M) m₂).inv).app X ≫ (F.μIso (m₁ ⊗ 𝟙_ M) m₂).inv.app X =
    (F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X) ≫
    (F.map (λ_ m₂).hom).app ((F.obj m₁).obj X) ≫ (F.obj m₂).map ((F.map (ρ_ m₁).inv).app X)

(F : CategoryTheory.MonoidalFunctor M (CategoryTheory.Functor C C))

CategoryTheory.CategoryStruct.comp ((F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X))
    (CategoryTheory.CategoryStruct.comp ((F.μ m₁ (CategoryTheory.MonoidalCategory.tensorObj (𝟙_ M) m₂)).app X)
      (CategoryTheory.CategoryStruct.comp ((F.map (CategoryTheory.MonoidalCategory.associator m₁ (𝟙_ M) m₂).inv).app X)
        ((F.μIso (CategoryTheory.MonoidalCategory.tensorObj m₁ (𝟙_ M)) m₂).inv.app X))) =
  CategoryTheory.CategoryStruct.comp ((F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X))
    (CategoryTheory.CategoryStruct.comp
      ((F.map (CategoryTheory.MonoidalCategory.leftUnitor m₂).hom).app ((F.obj m₁).obj X))
      ((F.obj m₂).map ((F.map (CategoryTheory.MonoidalCategory.rightUnitor m₁).inv).app X)))


@[to_additive]
theorem edist_mulIndicator (s t : Set α) (f : α → E) (x : α) :
    edist (s.mulIndicator f x) (t.mulIndicator f x) = ‖(s ∆ t).mulIndicator f x‖₊

{α : Type u_3}
{E : Type u_6}
[SeminormedGroup E]
(s t : Set α)
(f : α → E)
(x : α)

edist (s.mulIndicator f x) (t.mulIndicator f x) = ↑‖(symmDiff s t).mulIndicator f x‖₊


theorem tr_eval (k) (L : List (Γ k)) {L₁ L₂} (H₁ : L₁ ∈ TM1.eval (tr M) (trInit k L))
    (H₂ : L₂ ∈ TM2.eval M k L) :
    ∃ (S : ∀ k, List (Γ k)) (L' : ListBlank (∀ k, Option (Γ k))),
      addBottom L' = L₁ ∧
        (∀ k, L'.map (proj k) = ListBlank.mk ((S k).map some).reverse) ∧ S k = L₂

{L₁ : Turing.ListBlank Turing.TM2to1.Γ'}

(H₁ : L₁ ∈ Turing.TM1.eval (Turing.TM2to1.tr M) (Turing.TM2to1.trInit k L))

∃ S L',
  Turing.TM2to1.addBottom L' = L₁ ∧
    (∀ (k : K), Turing.ListBlank.map (Turing.proj k) L' = Turing.ListBlank.mk (List.map some (S k)).reverse) ∧ S k = L₂


theorem ContinuousAt.comp_continuousWithinAt {g : β → γ} {f : α → β} {s : Set α} {x : α}
    (hg : ContinuousAt g (f x)) (hf : ContinuousWithinAt f s x) : ContinuousWithinAt (g ∘ f) s x

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{g : β → γ}
{f : α → β}
{s : Set α}
{x : α}
(hg : ContinuousAt g (f x))
(hf : ContinuousWithinAt f s x)


/-- The function `invInterpStrip` is `diffContOnCl`. -/
lemma diffContOnCl_invInterpStrip {ε : ℝ} (hε : ε > 0) :
    DiffContOnCl ℂ (fun z ↦ invInterpStrip f z ε) (verticalStrip 0 1)

{E : Type u_1}
[NormedAddCommGroup E]
(f : ℂ → E)
{ε : ℝ}
(hε : ε > 0)

DiffContOnCl ℂ (fun z => Complex.HadamardThreeLines.invInterpStrip f z ε) (Complex.HadamardThreeLines.verticalStrip 0 1)


@[simp]
theorem coe_comp {X Y Z : CompHausLike P} (f : X ⟶ Y) (g : Y ⟶ Z) :
    ((forget (CompHausLike P)).map f ≫ (forget (CompHausLike P)).map g) = g ∘ f

(P : TopCat → Prop)
{X Y Z : CompHausLike P}
(f : X ⟶ Y)
(g : Y ⟶ Z)

(CategoryTheory.forget (CompHausLike P)).map f ≫ (CategoryTheory.forget (CompHausLike P)).map g = ⇑g ∘ ⇑f


/-- If a function `f` is differentiable and `f'` is monotone on `ℝ` then `f` is convex. -/
theorem Monotone.convexOn_univ_of_deriv {f : ℝ → ℝ} (hf : Differentiable ℝ f)
    (hf'_mono : Monotone (deriv f)) : ConvexOn ℝ univ f


lemma ext₀ {F G : ComposableArrows C 0} (h : F.obj' 0 = G.obj 0) : F = G

{F G : CategoryTheory.ComposableArrows C 0}


theorem coe_eq_zero_of_pos_iff (hp : 0 < p) {x : 𝕜} (hx : 0 < x) :
    (x : AddCircle p) = 0 ↔ ∃ n : ℕ, n • p = x

{𝕜 : Type u_1}
[LinearOrderedAddCommGroup 𝕜]
(p : 𝕜)
(hp : 0 < p)
{x : 𝕜}
(hx : 0 < x)


/-- Auxiliary definition for `mapBifunctorHomologicalComplex`. -/
@[simps!]
def mapBifunctorHomologicalComplexObj (K₁ : HomologicalComplex C₁ c₁) :
    HomologicalComplex C₂ c₂ ⥤ HomologicalComplex₂ D c₁ c₂

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

(((F.mapBifunctorHomologicalComplexObj c₂ K₁).obj K₂).X i₁).X i₂ = (F.obj (K₁.X i₁)).obj (K₂.X i₂)


theorem finallySmall_of_final_of_finallySmall [FinallySmall.{w} K] : FinallySmall.{w} J

{J : Type u}
[CategoryTheory.Category.{v, u} J]
{K : Type u₁}
[CategoryTheory.Category.{v₁, u₁} K]
(F : K ⥤ J)
[F.Final]
[CategoryTheory.FinallySmall K]


/-- `iff` version of `DirectSum.isInternal_submodule_of_independent_of_iSup_eq_top`,
`DirectSum.IsInternal.submodule_independent`, and `DirectSum.IsInternal.submodule_iSup_eq_top`. -/
theorem isInternal_submodule_iff_independent_and_iSup_eq_top (A : ι → Submodule R M) :
    IsInternal A ↔ CompleteLattice.Independent A ∧ iSup A = ⊤

{R : Type u}
[Ring R]
{ι : Type v}
[dec_ι : DecidableEq ι]
{M : Type u_1}
[AddCommGroup M]
[Module R M]
(A : ι → Submodule R M)

DirectSum.IsInternal A ↔ CompleteLattice.Independent A ∧ iSup A = ⊤


theorem preimage_mem_comap (ht : t ∈ g) : m ⁻¹' t ∈ comap m g

{α : Type u}
{β : Type v}
{g : Filter β}
{m : α → β}
{t : Set β}
(ht : t ∈ g)


lemma exact_and_mono_f_iff_f_is_kernel [S.HasHomology] :
    S.Exact ∧ Mono S.f ↔ Nonempty (IsLimit (KernelFork.ofι S.f S.zero))

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
(S : CategoryTheory.ShortComplex C)
[CategoryTheory.Balanced C]
[S.HasHomology]

S.Exact ∧ CategoryTheory.Mono S.f ↔
  Nonempty (CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.KernelFork.ofι S.f ⋯))


theorem negSucc_mul_subNatNat (m n k : Nat) :
    -[m+1] * subNatNat n k = subNatNat (succ m * k) (succ m * n)

Int.negSucc m * Int.subNatNat n k = Int.subNatNat (m.succ * k) (m.succ * n)


theorem Context.evalList_insert
  (ctx : Context α)
  (h : Commutative ctx.op)
  (x : Nat)
  (xs : List Nat)
  : evalList α ctx (insert x xs) = evalList α ctx (x::xs)

{α : Sort u_1}
(ctx : Lean.Data.AC.Context α)
(h : Std.Commutative ctx.op)
(x : Nat)
(xs : List Nat)

Lean.Data.AC.evalList α ctx (Lean.Data.AC.insert x xs) = Lean.Data.AC.evalList α ctx (x :: xs)


private theorem mul_self_abs (z : ℂ) : ((abs z) * abs z) = normSq z

√(Complex.normSq z) * √(Complex.normSq z) = Complex.normSq z


@[simp]
theorem natTrailingDegree_natCast (n : ℕ) : natTrailingDegree (n : R[X]) = 0


theorem reduceOption_get?_iff {l : List (Option α)} {x : α} :
    (∃ i, l.get? i = some (some x)) ↔ ∃ i, l.reduceOption.get? i = some x

{α : Type u_1}
{l : List (Option α)}
{x : α}


lemma IsLocalization.ker_map (hT : Submonoid.map g M = T) :
    RingHom.ker (IsLocalization.map Q g (hT.symm ▸ M.le_comap_map) : S →+* Q) =
      (RingHom.ker g).map (algebraMap R S)

{R : Type u_1}
{S : Type u_2}
{P : Type u_3}
(Q : Type u_4)
[CommSemiring R]
[CommSemiring S]
[CommSemiring P]
[CommSemiring Q]
{M : Submonoid R}
{T : Submonoid P}
[Algebra R S]
[Algebra P Q]
[IsLocalization M S]
[IsLocalization T Q]
(g : R →+* P)
(hT : Submonoid.map g M = T)

RingHom.ker (IsLocalization.map Q g ⋯) = Ideal.map (algebraMap R S) (RingHom.ker g)


lemma isClopen_sInter (hS : ∀ s ∈ S, IsClopen s) : IsClopen (⋂₀ S)

{α : Type u_3}
[TopologicalSpace α]
[AlexandrovDiscrete α]
{S : Set (Set α)}
(hS : ∀ s ∈ S, IsClopen s)


theorem Icc_inter_Icc : Icc a₁ b₁ ∩ Icc a₂ b₂ = Icc (a₁ ⊔ a₂) (b₁ ⊓ b₂)

{α : Type u_1}
[Lattice α]
{a₁ a₂ b₁ b₂ : α}

Set.Icc a₁ b₁ ∩ Set.Icc a₂ b₂ = Set.Icc (a₁ ⊔ a₂) (b₁ ⊓ b₂)


@[simp]
theorem equivOfEq_trans (S T U : Subalgebra R A) (hST : S = T) (hTU : T = U) :
    (equivOfEq S T hST).trans (equivOfEq T U hTU) = equivOfEq S U (hST.trans hTU)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S T U : Subalgebra R A)
(hST : S = T)
(hTU : T = U)

(S.equivOfEq T hST).trans (T.equivOfEq U hTU) = S.equivOfEq U ⋯


theorem lcm_dvd_lcm_mul_right [GCDMonoid α] (m n k : α) : lcm m n ∣ lcm (m * k) n

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
(m n k : α)


theorem sSup {ℐ : Set (Ideal A)} (h : ∀ I ∈ ℐ, Ideal.IsHomogeneous 𝒜 I) :
    (sSup ℐ).IsHomogeneous 𝒜

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


theorem dropWhile (p : Char → Bool) : ∀ {s}, ValidFor l m r s →
    ValidFor (l ++ m.takeWhile p) (m.dropWhile p) r (s.dropWhile p)

{l m r : List Char}
(p : Char → Bool)
{s : Substring}

Substring.ValidFor l m r s → Substring.ValidFor (l ++ List.takeWhile p m) (List.dropWhile p m) r (s.dropWhile p)


lemma IsRightCancelMulZero.to_isLeftCancelMulZero [IsRightCancelMulZero M₀] :
    IsLeftCancelMulZero M₀

{M₀ : Type u_1}
[CommSemigroup M₀]
[Zero M₀]
[IsRightCancelMulZero M₀]


theorem iInf₂_le {f : ∀ i, κ i → α} (i : ι) (j : κ i) : ⨅ (i) (j), f i j ≤ f i j

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


theorem C_dvd_iff_dvd_coeff (r : R) (φ : MvPolynomial σ R) : C r ∣ φ ↔ ∀ i, r ∣ φ.coeff i

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(r : R)
(φ : MvPolynomial σ R)

MvPolynomial.C r ∣ φ ↔ ∀ (i : σ →₀ ℕ), r ∣ MvPolynomial.coeff i φ


theorem Pi.compl_def [∀ i, HasCompl (π i)] (x : ∀ i, π i) :
    xᶜ = fun i ↦ (x i)ᶜ

{ι : Type u_1}
{π : ι → Type u_4}
[(i : ι) → HasCompl (π i)]
(x : (i : ι) → π i)


theorem IsCompl.compl_eq_iff (h : IsCompl x y) : zᶜ = y ↔ z = x

{α : Type u}
{x y z : α}
[BooleanAlgebra α]
(h : IsCompl x y)


theorem AntitoneOn.sum_le_integral (hf : AntitoneOn f (Icc x₀ (x₀ + a))) :
    (∑ i ∈ Finset.range a, f (x₀ + (i + 1 : ℕ))) ≤ ∫ x in x₀..x₀ + a, f x

(hf : AntitoneOn f (Set.Icc x₀ (x₀ + ↑a)))

∑ i ∈ Finset.range a, f (x₀ + ↑(i + 1)) ≤ ∫ (x : ℝ) in x₀..x₀ + ↑a, f x


protected lemma lt_of_le_of_lt (h₁ : x.1 ≤ y.1) (h₂ : x.2 < y.2) : x < y

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
{x y : α × β}
(h₁ : x.1 ≤ y.1)
(h₂ : x.2 < y.2)


theorem term_atom_pfg {α} [AddCommGroup α] (x x' : α) (h : x = x') : x = termg 1 x' 0

{α : Type u_1}
[AddCommGroup α]
(x x' : α)
(h : x = x')


@[simp] theorem foldrIdx_cons :
    (x :: xs : List α).foldrIdx f i s = f s x (foldrIdx f i xs (s + 1))

∀ {α_1 : Sort u_2} {f : Nat → α → α_1 → α_1} {i : α_1} {s : Nat},
  List.foldrIdx f i (x :: xs) s = f s x (List.foldrIdx f i xs (s + 1))


protected theorem mdifferentiable (f : C^∞⟮I, M; I', M'⟯) : MDifferentiable I I' f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
(f : C^⊤⟮I, M; I', M'⟯)


@[to_additive (attr := simp)]
theorem cancel_left {g : β →*o γ} {f₁ f₂ : α →*o β} (hg : Function.Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
[AddZeroClass α]
[AddZeroClass β]
[AddZeroClass γ]
{g : β →+o γ}
{f₁ f₂ : α →+o β}
(hg : Function.Injective ⇑g)


theorem map_roots [IsDomain S] : (map φ P).roots = (Polynomial.map φ P.toPoly).roots

{R : Type u_1}
{S : Type u_2}
{P : Cubic R}
[CommRing R]
[CommRing S]
{φ : R →+* S}
[IsDomain S]

(Cubic.map φ P).roots = (Polynomial.map φ P.toPoly).roots


@[deprecated getElem_replicate (since := "2024-06-12")]
theorem get_replicate (a : α) {n : Nat} (m : Fin _) : (replicate n a).get m = a

{α : Type u_1}
(a : α)
{n : Nat}
(m : Fin (List.replicate n a).length)


/-- Projection from `G ≃+c[a, a] G` to `G →+c[a, a] G`, as a monoid homomorphism. -/
@[simps! apply]
def toAddConstMapHom : (G ≃+c[a, a] G) →* (G →+c[a, a] G)

{G : Type u_1}
[Add G]
{a : G}
(self : G ≃+c[a, a] G)

AddConstEquiv.toAddConstMapHom self = self.toAddConstMap


theorem blockDiagonal'_apply_ne (M : ∀ i, Matrix (m' i) (n' i) α) {k k'} (i j) (h : k ≠ k') :
    blockDiagonal' M ⟨k, i⟩ ⟨k', j⟩ = 0

{o : Type u_4}
{m' : o → Type u_7}
{n' : o → Type u_8}
{α : Type u_12}
[DecidableEq o]
[Zero α]
(M : (i : o) → Matrix (m' i) (n' i) α)
{k k' : o}
(i : m' k)
(j : n' k')
(h : k ≠ k')

Matrix.blockDiagonal' M ⟨k, i⟩ ⟨k', j⟩ = 0


@[simp]
theorem antitone_toDual_comp_iff : Antitone (toDual ∘ f : α → βᵒᵈ) ↔ Monotone f

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

Antitone (⇑OrderDual.toDual ∘ f) ↔ Monotone f


@[to_additive]
theorem prod_lt_one (h : ∀ i ∈ s, f i < 1) (hs : s.Nonempty) : ∏ i ∈ s, f i < 1

{ι : Type u_1}
{M : Type u_4}
[OrderedCancelAddCommMonoid M]
{f : ι → M}
{s : Finset ι}
(h : ∀ i ∈ s, f i < 0)
(hs : s.Nonempty)


@[simp]
theorem coe_zeta_mul_coe_moebius [Ring R] : (ζ * μ : ArithmeticFunction R) = 1

↑ArithmeticFunction.zeta * ↑ArithmeticFunction.moebius = 1


@[to_additive]
protected theorem Periodic.mul [Add α] [Mul β] (hf : Periodic f c) (hg : Periodic g c) :
    Periodic (f * g) c

{α : Type u_1}
{β : Type u_2}
{f g : α → β}
{c : α}
[Add α]
[Add β]
(hf : Function.Periodic f c)
(hg : Function.Periodic g c)


@[to_additive]
theorem of_mulOpposite (h : UniqueProds Gᵐᵒᵖ) : UniqueProds G

{G : Type u}
[Add G]
(h : UniqueSums Gᵃᵒᵖ)


@[simp] lemma zero_ceilDiv (a : α) : (0 : β) ⌈/⌉ a = 0

{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[CeilDiv α β]
(a : α)


/-- **Bayes' Theorem** -/
theorem cond_eq_inv_mul_cond_mul [IsFiniteMeasure μ]
    (hms : MeasurableSet s) (hmt : MeasurableSet t) : μ[t|s] = (μ s)⁻¹ * μ[s|t] * μ t

{Ω : Type u_1}
{m : MeasurableSpace Ω}
(μ : MeasureTheory.Measure Ω)
{s t : Set Ω}
[MeasureTheory.IsFiniteMeasure μ]
(hms : MeasurableSet s)
(hmt : MeasurableSet t)

(ProbabilityTheory.cond μ s) t = (μ s)⁻¹ * (ProbabilityTheory.cond μ t) s * μ t


theorem congr_inv_of_congr_hom (F G : C ⥤ D) {X Y : C} (e : X ≅ Y) (hX : F.obj X = G.obj X)
    (hY : F.obj Y = G.obj Y)
    (h₂ : F.map e.hom = eqToHom (by rw [hX]) ≫ G.map e.hom ≫ eqToHom (by rw [hY])) :
    F.map e.inv = eqToHom (by rw [hY]) ≫ G.map e.inv ≫ eqToHom (by rw [hX])

(h₂ :
  F.map e.hom =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
      (CategoryTheory.CategoryStruct.comp (G.map e.hom) (CategoryTheory.eqToHom ⋯)))

F.map e.inv =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
    (CategoryTheory.CategoryStruct.comp (G.map e.inv) (CategoryTheory.eqToHom ⋯))


lemma iInf_prod' (f : β → γ → α) : (⨅ i, ⨅ j, f i j) = ⨅ x : β × γ, f x.1 x.2

{α : Type u_1}
{β : Type u_2}
{γ : Type u_4}
[CompleteLattice α]
(f : β → γ → α)


@[ext]
protected theorem ext {a b : ULower α} : a.up = b.up → a = b

{α : Type u_1}
[Encodable α]
{a b : ULower α}


@[mono]
theorem map₂_le_map₂ {f : M →ₗ[R] N →ₗ[R] P} {p₁ p₂ : Submodule R M} {q₁ q₂ : Submodule R N}
    (hp : p₁ ≤ p₂) (hq : q₁ ≤ q₂) : map₂ f p₁ q₁ ≤ map₂ f p₂ q₂

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
{f : M →ₗ[R] N →ₗ[R] P}
{p₁ p₂ : Submodule R M}
{q₁ q₂ : Submodule R N}
(hp : p₁ ≤ p₂)
(hq : q₁ ≤ q₂)

Submodule.map₂ f p₁ q₁ ≤ Submodule.map₂ f p₂ q₂


theorem SuperpolynomialDecay.param_inv_mul (hk : Tendsto k l atTop)
    (hf : SuperpolynomialDecay l k f) : SuperpolynomialDecay l k (f * k⁻¹)

(hf : Asymptotics.SuperpolynomialDecay l k f)

Asymptotics.SuperpolynomialDecay l k (f * k⁻¹)


theorem contDiffOn_id {s} : ContDiffOn 𝕜 n (id : E → E) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{n : ℕ∞}
{s : Set E}


@[simp]
theorem wittPolynomial_zero : wittPolynomial p R 0 = X 0


@[simp]
theorem mem_union {a} {s₁ s₂ : AList β} : a ∈ s₁ ∪ s₂ ↔ a ∈ s₁ ∨ a ∈ s₂

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{s₁ s₂ : AList β}

a ∈ s₁ ∪ s₂ ↔ a ∈ s₁ ∨ a ∈ s₂


@[simp]
theorem adjointAux_apply (A : E →L[𝕜] F) (x : F) :
    adjointAux A x = ((toDual 𝕜 E).symm : NormedSpace.Dual 𝕜 E → E) ((toSesqForm A) x)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[CompleteSpace E]
(A : E →L[𝕜] F)
(x : F)

(ContinuousLinearMap.adjointAux A) x = (InnerProductSpace.toDual 𝕜 E).symm ((ContinuousLinearMap.toSesqForm A) x)


theorem _root_.Antitone.isBoundedUnder_ge_comp [Preorder α] [Preorder β] {l : Filter γ} {u : γ → α}
    {v : α → β} (hv : Antitone v) (hl : l.IsBoundedUnder (· ≤ ·) u) :
    l.IsBoundedUnder (· ≥ ·) (v ∘ u)

(hl : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l u)

Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) l (v ∘ u)


@[simp] theorem Prod.map_apply (f : α → β) (g : γ → δ) (x) (y) :
    Prod.map f g (x, y) = (f x, g y)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(f : α → β)
(g : γ → δ)
(x : α)
(y : γ)

Prod.map f g { fst := x, snd := y } = { fst := f x, snd := g y }


@[simp]
theorem card_eq_top_of_infinite [Infinite α] : card α = ⊤


theorem lt_limit {o} (h : IsLimit o) {a} : a < o ↔ ∃ x < o, a < x

{o : Ordinal.{u_4}}
(h : o.IsLimit)
{a : Ordinal.{u_4}}


@[to_additive (attr := simp)]
theorem mk'_apply (x : G) : mk' N x = x

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]
(x : G)


theorem IsLocalExtrOn.isLocalExtr (hf : IsLocalExtrOn f s a) (hs : s ∈ 𝓝 a) : IsLocalExtr f a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsLocalExtrOn f s a)
(hs : s ∈ 𝓝 a)


/-- If `α` is equivalent to `β`, then `Set α` is equivalent to `Set β`. -/
@[simps]
protected def congr {α β : Type*} (e : α ≃ β) : Set α ≃ Set β

{α : Type u_1}
{β : Type u_2}
(e : α ≃ β)
(s : Set α)


@[simp] lemma ofNat_ne_one (n : ℕ) [n.AtLeastTwo] : (no_index (ofNat n) : R) ≠ 1

{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
(n : ℕ)
[n.AtLeastTwo]


@[simp]
theorem gcd_dedup (s : Multiset α) : (dedup s).gcd = s.gcd

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
[DecidableEq α]
(s : Multiset α)


lemma sUnion_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    ⋃₀ hC.diffFinset hs ht = s \ t

{α : Type u_1}
{C : Set (Set α)}
{s t : Set α}
(hC : MeasureTheory.IsSetSemiring C)
(hs : s ∈ C)
(ht : t ∈ C)


@[simp] theorem equivCongr_apply_apply {δ} (ab : α ≃ β) (cd : γ ≃ δ) (e : α ≃ γ) (x) :
    ab.equivCongr cd e x = cd (e (ab.symm x))

{α : Sort u}
{β : Sort v}
{γ : Sort w}
{δ : Sort u_1}
(ab : α ≃ β)
(cd : γ ≃ δ)
(e : α ≃ γ)
(x : β)

((ab.equivCongr cd) e) x = cd (e (ab.symm x))


/-- A Prop-valued class for a bilinear form to be compatible with a root pairing. -/
class IsRootPositive (P : RootPairing ι R M N) (B : M →ₗ[R] M →ₗ[R] R) : Prop where
  zero_lt_apply_root : ∀ i, 0 < B (P.root i) (P.root i)
  symm : ∀ x y, B x y = B y x
  apply_reflection_eq : ∀ i x y, B (P.reflection i x) (P.reflection i y) = B x y

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[LinearOrderedCommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
{P : RootPairing ι R M N}
{B : M →ₗ[R] M →ₗ[R] R}
[self : P.IsRootPositive B]
(i : ι)


/-- The `p`- and `q`-primary components are disjoint for `p ≠ q`. -/
@[to_additive "The `p`- and `q`-primary components are disjoint for `p ≠ q`."]
theorem primaryComponent.disjoint {p' : ℕ} [hp' : Fact p'.Prime] (hne : p ≠ p') :
    Disjoint (CommMonoid.primaryComponent G p) (CommMonoid.primaryComponent G p')

{G : Type u_1}
[AddCommMonoid G]
{p : ℕ}
[hp : Fact (Nat.Prime p)]
{p' : ℕ}
[hp' : Fact (Nat.Prime p')]
(hne : p ≠ p')

Disjoint (AddCommMonoid.primaryComponent G p) (AddCommMonoid.primaryComponent G p')


lemma cpow_inv_two_im_eq_sqrt {x : ℂ} (hx : 0 ≤ x.im) :
    (x ^ (2⁻¹ : ℂ)).im = sqrt ((abs x - x.re) / 2)

(x ^ 2⁻¹).im = √((Complex.abs x - x.re) / 2)


@[reassoc]
lemma triangleMapOfHomotopy_comm₃ :
    mapOfHomotopy H ≫ (triangle φ₂).mor₃ = (triangle φ₁).mor₃ ≫ a⟦1⟧'

{φ₁ : K₁ ⟶ L₁}

{φ₂ : K₂ ⟶ L₂}

CochainComplex.mappingCone.mapOfHomotopy H ≫ (CochainComplex.mappingCone.triangle φ₂).mor₃ =
  (CochainComplex.mappingCone.triangle φ₁).mor₃ ≫ (CategoryTheory.shiftFunctor (CochainComplex C ℤ) 1).map a


@[simp] lemma intCast_mul_left (h : Commute a b) (m : ℤ) : Commute (m  * a) b

{α : Type u_3}
[Ring α]
{a b : α}
(h : Commute a b)
(m : ℤ)


/-- If the spans of two vectors are equal, twice angles with those vectors on the left are
equal. -/
theorem two_zsmul_oangle_left_of_span_eq {x y : V} (z : V) (h : (ℝ ∙ x) = ℝ ∙ y) :
    (2 : ℤ) • o.oangle x z = (2 : ℤ) • o.oangle y z

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

(h : Submodule.span ℝ {x} = Submodule.span ℝ {y})


protected theorem map_add (f : A →ₑ+[φ] B) (x y : A) : f (x + y) = f x + f y

{M : Type u_1}
[Monoid M]
{N : Type u_2}
[Monoid N]
{φ : M →* N}
{A : Type u_4}
[AddMonoid A]
[DistribMulAction M A]
{B : Type u_5}
[AddMonoid B]
[DistribMulAction N B]
(f : A →ₑ+[φ] B)
(x y : A)


/-- The number of square roots of `a` modulo `p` is determined by the Legendre symbol. -/
theorem card_sqrts (hp : p ≠ 2) (a : ℤ) :
    ↑{x : ZMod p | x ^ 2 = a}.toFinset.card = legendreSym p a + 1

(p : ℕ)
[Fact (Nat.Prime p)]
(hp : p ≠ 2)
(a : ℤ)

↑{x | x ^ 2 = ↑a}.toFinset.card = legendreSym p a + 1


@[simp]
theorem center_zero (z : ℍ) : center z 0 = z


theorem smul_convolution [SMulCommClass ℝ 𝕜 F] {y : 𝕜} : y • f ⋆[L, μ] g = y • (f ⋆[L, μ] g)

{𝕜 : Type u𝕜}
{G : Type uG}
{E : Type uE}
{E' : Type uE'}
{F : Type uF}
[NormedAddCommGroup E]
[NormedAddCommGroup E']
[NormedAddCommGroup F]
{f : G → E}
{g : G → E'}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 E']
[NormedSpace 𝕜 F]
{L : E →L[𝕜] E' →L[𝕜] F}
[MeasurableSpace G]
{μ : MeasureTheory.Measure G}
[NormedSpace ℝ F]
[AddGroup G]
[SMulCommClass ℝ 𝕜 F]
{y : 𝕜}

MeasureTheory.convolution (y • f) g L μ = y • MeasureTheory.convolution f g L μ


lemma coe_corootSpace_eq_span_singleton (α : Weight K H L) :
    (corootSpace α).toSubmodule = K ∙ coroot α

{K : Type u_2}
{L : Type u_3}
[LieRing L]
[Field K]
[LieAlgebra K L]
[FiniteDimensional K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
[LieAlgebra.IsKilling K L]
[CharZero K]
(α : LieModule.Weight K (↥H) L)

↑(LieAlgebra.corootSpace ⇑α) = Submodule.span K {LieAlgebra.IsKilling.coroot α}


@[simp] lemma coe_sup [SemilatticeSup β] (f g : α →o β) :
  ((f ⊔ g : α →o β) : α → β) = (f : α → β) ⊔ g

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[SemilatticeSup β]
(f g : α →o β)


@[to_additive]
theorem continuousAt_inv {x : G} : ContinuousAt Inv.inv x

{G : Type w}
[TopologicalSpace G]
[Inv G]
[ContinuousInv G]
{x : G}


/-- The closure of a set, as an element of `TopologicalSpace.Closeds`. -/
@[simps]
protected def closure (s : Set α) : Closeds α

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

↑(TopologicalSpace.Closeds.closure s) = closure s


theorem supports_insert {K S q} :
    Supports (insert q K) S ↔ TM2.SupportsStmt S (tr q) ∧ Supports K S

{K S : Finset Turing.PartrecToTM2.Λ'}
{q : Turing.PartrecToTM2.Λ'}

Turing.PartrecToTM2.Supports (insert q K) S ↔
  Turing.TM2.SupportsStmt S (Turing.PartrecToTM2.tr q) ∧ Turing.PartrecToTM2.Supports K S


theorem sum_integral_adjacent_intervals_Ico {a : ℕ → ℝ} {m n : ℕ} (hmn : m ≤ n)
    (hint : ∀ k ∈ Ico m n, IntervalIntegrable f μ (a k) (a <| k + 1)) :
    ∑ k ∈ Finset.Ico m n, ∫ x in a k..a <| k + 1, f x ∂μ = ∫ x in a m..a n, f x ∂μ

(hint : ∀ k ∈ Set.Ico m n, IntervalIntegrable f μ (a k) (a (k + 1)))

∑ k ∈ Finset.Ico m n, ∫ (x : ℝ) in a k..a (k + 1), f x ∂μ = ∫ (x : ℝ) in a m..a n, f x ∂μ


lemma leftHomologyMap_congr (h : Homotopy φ₁ φ₂) [S₁.HasLeftHomology] [S₂.HasLeftHomology] :
    leftHomologyMap φ₁ = leftHomologyMap φ₂

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

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

CategoryTheory.ShortComplex.leftHomologyMap φ₁ = CategoryTheory.ShortComplex.leftHomologyMap φ₂


theorem norm_expSeries_div_summable_of_mem_ball (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    Summable fun n => ‖x ^ n / (n ! : 𝔸)‖

(hx : x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

Summable fun n => ‖x ^ n / ↑n.factorial‖


protected theorem HasFDerivAtFilter.snd (h : HasFDerivAtFilter f₂ f₂' x L) :
    HasFDerivAtFilter (fun x => (f₂ x).2) ((snd 𝕜 F G).comp f₂') x L

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{L : Filter E}
{f₂ : E → F × G}
{f₂' : E →L[𝕜] F × G}
(h : HasFDerivAtFilter f₂ f₂' x L)

HasFDerivAtFilter (fun x => (f₂ x).2) ((ContinuousLinearMap.snd 𝕜 F G).comp f₂') x L


@[simp]
theorem eqOn_empty (f₁ f₂ : α → β) : EqOn f₁ f₂ ∅

{α : Type u_1}
{β : Type u_2}
(f₁ f₂ : α → β)


@[simp] theorem reverse_replicate (n) (a : α) : reverse (replicate n a) = replicate n a

(List.replicate n a).reverse = List.replicate n a


theorem apply_le_nfpBFamily (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b ≤ nfpBFamily.{u, v} o f a) ↔ b ≤ nfpBFamily.{u, v} o f a

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

(H : ∀ (i : Ordinal.{u}) (hi : i < o), Ordinal.IsNormal (f i hi))

(∀ (i : Ordinal.{u}) (hi : i < o), f i hi b ≤ o.nfpBFamily f a) ↔ b ≤ o.nfpBFamily f a


lemma isAffine_of_isAffineHom [IsAffineHom f] [IsAffine Y] : IsAffine X

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
[AlgebraicGeometry.IsAffineHom f]
[AlgebraicGeometry.IsAffine Y]


theorem ConcaveOn.congr (hf : ConcaveOn 𝕜 s f) (hfg : EqOn f g s) : ConcaveOn 𝕜 s g

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


theorem ceil_eq_add_one_sub_fract (ha : fract a ≠ 0) : (⌈a⌉ : α) = a + 1 - fract a

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a : α}
(ha : Int.fract a ≠ 0)


theorem pred_lt_self : ∀ {a}, 0 < a → pred a < a


theorem SmoothManifoldWithCorners.mk' {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*}
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) (M : Type*) [TopologicalSpace M] [ChartedSpace H M]
    [gr : HasGroupoid M (contDiffGroupoid ∞ I)] : SmoothManifoldWithCorners I M

[gr : HasGroupoid M (contDiffGroupoid ⊤ I)]


theorem countable_isTop (α : Type*) [PartialOrder α] : { x : α | IsTop x }.Countable


/-- The pigeonhole principle for infinitely many pigeons in finitely many pigeonholes. If there are
infinitely many pigeons in finitely many pigeonholes, then there are at least two pigeons in the
same pigeonhole.

See also: `Fintype.exists_ne_map_eq_of_card_lt`, `Finite.exists_infinite_fiber`.
-/
theorem Finite.exists_ne_map_eq_of_infinite {α β} [Infinite α] [Finite β] (f : α → β) :
    ∃ x y : α, x ≠ y ∧ f x = f y

{α : Sort u_4}
{β : Sort u_5}
[Infinite α]
[Finite β]
(f : α → β)


/-- A dependent version of `Submonoid.iSup_induction`. -/
@[to_additive (attr := elab_as_elim) "A dependent version of `AddSubmonoid.iSup_induction`. "]
theorem iSup_induction' {ι : Sort*} (S : ι → Submonoid M) {C : ∀ x, (x ∈ ⨆ i, S i) → Prop}
    (mem : ∀ (i), ∀ (x) (hxS : x ∈ S i), C x (mem_iSup_of_mem i hxS)) (one : C 1 (one_mem _))
    (mul : ∀ x y hx hy, C x hx → C y hy → C (x * y) (mul_mem ‹_› ‹_›)) {x : M}
    (hx : x ∈ ⨆ i, S i) : C x hx

(mem : ∀ (i : ι) (x : M) (hxS : x ∈ S i), C x ⋯)

(mul : ∀ (x y : M) (hx : x ∈ ⨆ i, S i) (hy : y ∈ ⨆ i, S i), C x hx → C y hy → C (x * y) ⋯)


theorem subset_set_biUnion_of_mem {s : Finset α} {f : α → Set β} {x : α} (h : x ∈ s) :
    f x ⊆ ⋃ y ∈ s, f y

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


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

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

Subgroup.map K.subtype (H.subgroupOf K) = H ⊓ K


@[to_additive (attr := simp) nsmul_univ]
theorem univ_pow [Fintype α] (hn : n ≠ 0) : (univ : Finset α) ^ n = univ

{α : Type u_2}
[DecidableEq α]
[AddMonoid α]
{n : ℕ}
[Fintype α]
(hn : n ≠ 0)


/-- The `sInf` of a union of two sets is the min of the infima of each subset, under the assumptions
that all sets are bounded below and nonempty. -/
theorem csInf_union (hs : BddBelow s) (sne : s.Nonempty) (ht : BddBelow t) (tne : t.Nonempty) :
    sInf (s ∪ t) = sInf s ⊓ sInf t

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s t : Set α}
(hs : BddBelow s)
(sne : s.Nonempty)
(ht : BddBelow t)
(tne : t.Nonempty)


theorem map_spec (as : Array α) (f : α → β) (p : Fin as.size → β → Prop)
    (hs : ∀ i, p i (f as[i])) :
    ∃ eq : (as.map f).size = as.size, ∀ i h, p ⟨i, h⟩ ((as.map f)[i])

(hs : ∀ (i : Fin as.size), p i (f as[i]))

∃ eq, ∀ (i : Nat) (h : i < as.size), p ⟨i, h⟩ (Array.map f as)[i]


theorem compl_surjective : Function.Surjective (compl : α → α)


@[simp]
theorem isLUB_lowerBounds : IsLUB (lowerBounds s) a ↔ IsGLB s a

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


/-- A type bundled with the structure induced by an equivalence. -/
@[simps]
def bundledInduced : CategoryTheory.Bundled.{w'} L.Structure

(L : FirstOrder.Language)
{M : Type w}
[L.Structure M]
{N : Type w'}
(g : M ≃ N)


/-- The **Minkowski Convex Body Theorem for compact domain**. If `s` is a convex compact symmetric
domain of `E` whose volume is large enough compared to the covolume of a lattice `L` of `E`, then it
contains a non-zero lattice point of `L`. Compared to
`exists_ne_zero_mem_lattice_of_measure_mul_two_pow_lt_measure`, this version requires in addition
that `s` is compact and `L` is discrete but provides a weaker inequality rather than a strict
inequality. -/
theorem exists_ne_zero_mem_lattice_of_measure_mul_two_pow_le_measure [NormedAddCommGroup E]
    [NormedSpace ℝ E] [BorelSpace E] [FiniteDimensional ℝ E] [Nontrivial E] [IsAddHaarMeasure μ]
    {L : AddSubgroup E} [Countable L] [DiscreteTopology L] (fund : IsAddFundamentalDomain L F μ)
    (h_symm : ∀ x ∈ s, -x ∈ s) (h_conv : Convex ℝ s) (h_cpt : IsCompact s)
    (h : μ F * 2 ^ finrank ℝ E ≤ μ s) :
    ∃ x ≠ 0, ((x : L) : E) ∈ s

(fund : MeasureTheory.IsAddFundamentalDomain (↥L) F μ)

(h : μ F * 2 ^ FiniteDimensional.finrank ℝ E ≤ μ s)


theorem mk_of_mem (hi : i ∈ s) : (mk s x : ∀ i, β i) i = x ⟨i, hi⟩

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
{s : Finset ι}
{x : (i : ↑↑s) → β ↑i}
{i : ι}
(hi : i ∈ s)


@[elab_without_expected_type]
theorem asymm_of [IsAsymm α r] {a b : α} : a ≺ b → ¬b ≺ a

{α : Sort u}
(r : α → α → Prop)
[IsAsymm α r]
{a b : α}


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

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

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


@[refl]
theorem refl (f : Ω^ N X x) : Homotopic f f

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
(f : ↑(Ω^ N X x))


/-- A component that corresponds to zero in the direct limit is already zero in some
bigger module in the directed system. -/
theorem of.zero_exact [IsDirected ι (· ≤ ·)] [DirectedSystem G fun i j h => f i j h] (i x)
    (h : of G f i x = 0) : ∃ j hij, f i j hij x = 0

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

(h : (AddCommGroup.DirectLimit.of G f i) x = 0)


theorem ContinuousWithinAt.fin_insertNth {n} {π : Fin (n + 1) → Type*}
    [∀ i, TopologicalSpace (π i)] (i : Fin (n + 1)) {f : α → π i} {a : α} {s : Set α}
    (hf : ContinuousWithinAt f s a) {g : α → ∀ j : Fin n, π (i.succAbove j)}
    (hg : ContinuousWithinAt g s a) : ContinuousWithinAt (fun a => i.insertNth (f a) (g a)) s a

[(i : Fin (n + 1)) → TopologicalSpace (π i)]

{g : α → (j : Fin n) → π (i.succAbove j)}


protected theorem zero_pow {n : Nat} (H : 0 < n) : 0 ^ n = 0


theorem sub_lt_add_one (a b) : a - b < a + 1


theorem comap_comap (s : Subsemiring T) (g : S →+* T) (f : R →+* S) :
    (s.comap g).comap f = s.comap (g.comp f)

{R : Type u}
{S : Type v}
{T : Type w}
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring T]
(s : Subsemiring T)
(g : S →+* T)
(f : R →+* S)

Subsemiring.comap f (Subsemiring.comap g s) = Subsemiring.comap (g.comp f) s


theorem Finset.smul_prod {r : α} {f : γ → β} {s : Finset γ} :
    (r • ∏ x ∈ s, f x) = ∏ x ∈ s, r • f x

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Monoid α]
[CommMonoid β]
[MulDistribMulAction α β]
{r : α}
{f : γ → β}
{s : Finset γ}


@[simp]
theorem coe_rTensorHom : (rTensorHom M : (N →ₗ[R] P) → N ⊗[R] M →ₗ[R] P ⊗[R] M) = rTensor M

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]

⇑(LinearMap.rTensorHom M) = LinearMap.rTensor M


/-- Alias of `zpow_left_inj`, for ease of discovery alongside `zsmul_le_zsmul_iff'` and
`zsmul_lt_zsmul_iff'`. -/
@[to_additive "Alias of `zsmul_right_inj`, for ease of discovery alongside `zsmul_le_zsmul_iff'` and
`zsmul_lt_zsmul_iff'`."]
lemma zpow_eq_zpow_iff' (hn : n ≠ 0) : a ^ n = b ^ n ↔ a = b

{α : Type u_1}
[LinearOrderedCommGroup α]
{n : ℤ}
{a b : α}
(hn : n ≠ 0)


/-- Given two finite disjoint sets `s` and `t`, the product of `f i` over `i ∈ s ∪ t` equals the
product of `f i` over `i ∈ s` times the product of `f i` over `i ∈ t`. -/
@[to_additive
      "Given two finite disjoint sets `s` and `t`, the sum of `f i` over `i ∈ s ∪ t` equals
      the sum of `f i` over `i ∈ s` plus the sum of `f i` over `i ∈ t`."]
theorem finprod_mem_union (hst : Disjoint s t) (hs : s.Finite) (ht : t.Finite) :
    ∏ᶠ i ∈ s ∪ t, f i = (∏ᶠ i ∈ s, f i) * ∏ᶠ i ∈ t, f i

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
{f : α → M}
{s t : Set α}
(hst : Disjoint s t)
(hs : s.Finite)
(ht : t.Finite)

∏ᶠ (i : α) (_ : i ∈ s ∪ t), f i = (∏ᶠ (i : α) (_ : i ∈ s), f i) * ∏ᶠ (i : α) (_ : i ∈ t), f i


theorem integral_eq {m : MeasurableSpace α} (μ : Measure α) (f : α →ₛ F) :
    f.integral μ = ∑ x ∈ f.range, (μ (f ⁻¹' {x})).toReal • x

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
(f : MeasureTheory.SimpleFunc α F)

MeasureTheory.SimpleFunc.integral μ f = ∑ x ∈ f.range, (μ (↑f ⁻¹' {x})).toReal • x


@[simp] lemma disjointSum_indep_iff {h I} :
    (M.disjointSum N h).Indep I ↔ M.Indep (I ∩ M.E) ∧ N.Indep (I ∩ N.E) ∧ I ⊆ M.E ∪ N.E

{α : Type u_1}
{M N : Matroid α}
{h : Disjoint M.E N.E}
{I : Set α}


@[simp]
theorem mem_skewAdjointMatricesSubmodule :
    A₁ ∈ skewAdjointMatricesSubmodule J ↔ J.IsSkewAdjoint A₁

{R : Type u_1}
{n : Type u_12}
[CommRing R]
[Fintype n]
(J A₁ : Matrix n n R)
[DecidableEq n]


@[simp] lemma sigma_ground_eq : (Matroid.sigma M).E = univ.sigma fun i ↦ (M i).E

{ι : Type u_1}
{α : ι → Type u_2}
{M : (i : ι) → Matroid (α i)}

(Matroid.sigma M).E = Set.univ.sigma fun i => (M i).E


theorem rfind {p : α → ℕ →. Bool} (hp : Partrec₂ p) : Partrec fun a => Nat.rfind (p a)

{α : Type u_1}
[Primcodable α]
{p : α → ℕ →. Bool}
(hp : Partrec₂ p)


/-- **Fundamental theorem of calculus-1**, strict differentiability at filter in both endpoints.

If `f` is a measurable function integrable on `a..b`, `(la, la')` is an `intervalIntegral.FTCFilter`
pair around `a`, and `f` has a finite limit `c` almost surely at `la'`, then
`(∫ x in v..b, f x) - ∫ x in u..b, f x = -(v - u) • c + o(‖v - u‖)` as `u` and `v` tend to `la`.

This lemma could've been formulated using `HasStrictDerivAtFilter` if we had this definition. -/
theorem integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae_left
    (hab : IntervalIntegrable f volume a b) (hmeas : StronglyMeasurableAtFilter f la')
    (hf : Tendsto f (la' ⊓ ae volume) (𝓝 c)) (hu : Tendsto u lt la) (hv : Tendsto v lt la) :
    (fun t => ((∫ x in v t..b, f x) - ∫ x in u t..b, f x) + (v t - u t) • c) =o[lt] (v - u)

(hab : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas : StronglyMeasurableAtFilter f la' MeasureTheory.volume)

(hf : Filter.Tendsto f (la' ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 c))

(fun t => ((∫ (x : ℝ) in v t..b, f x) - ∫ (x : ℝ) in u t..b, f x) + (v t - u t) • c) =o[lt] (v - u)


/-- The monoidal structure coming from finite coproducts is symmetric.
-/
@[simps]
def symmetricOfHasFiniteCoproducts [HasInitial C] [HasBinaryCoproducts C] :
    SymmetricCategory C

β_ P Q = CategoryTheory.Limits.coprod.braiding P Q


@[simp]
theorem degree_X_pow : degree ((X : R[X]) ^ n) = n

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


@[simp]
theorem mk_pos {f : CauSeq ℚ abs} : 0 < mk f ↔ Pos f


/--
`TopCat.toLightCondSet` yields a functor from `TopCat.{u}` to `LightCondSet.{u}`.
-/
@[simps]
noncomputable def topCatToLightCondSet : TopCat.{u} ⥤ LightCondSet.{u}

∀ {X Y : TopCat} (f : X ⟶ Y) (x : LightProfiniteᵒᵖ) (g : ((fun X => X.toLightCondSet) X).val.obj x),
  (topCatToLightCondSet.map f).val.app x g = ContinuousMap.comp f g


theorem charFn_eq_one [Nontrivial Y] (x : X) (hU : IsClopen U) : charFn Y hU x = (1 : Y) ↔ x ∈ U

{X : Type u_1}
(Y : Type u_2)
[TopologicalSpace X]
[MulZeroOneClass Y]
{U : Set X}
[Nontrivial Y]
(x : X)
(hU : IsClopen U)

(LocallyConstant.charFn Y hU) x = 1 ↔ x ∈ U


theorem linearIndependent_iff_not_smul_mem_span :
    LinearIndependent R v ↔ ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \ {i})) → a = 0

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

LinearIndependent R v ↔ ∀ (i : ι) (a : R), a • v i ∈ Submodule.span R (v '' (Set.univ \ {i})) → a = 0


@[simp]
theorem comp_obj {C D E : Cat} (F : C ⟶ D) (G : D ⟶ E) (X : C) : (F ≫ G).obj X = G.obj (F.obj X)

{C D E : CategoryTheory.Cat}
(F : C ⟶ D)
(G : D ⟶ E)
(X : ↑C)

(CategoryTheory.CategoryStruct.comp F G).obj X = G.obj (F.obj X)


/-- 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 φ.τ₁


/-- Given finite sets `s` and `t`, the product of `f i` over `i ∈ s ∪ t` times the product of
`f i` over `i ∈ s ∩ t` equals the product of `f i` over `i ∈ s` times the product of `f i`
over `i ∈ t`. -/
@[to_additive
      "Given finite sets `s` and `t`, the sum of `f i` over `i ∈ s ∪ t` plus the sum of
      `f i` over `i ∈ s ∩ t` equals the sum of `f i` over `i ∈ s` plus the sum of `f i`
      over `i ∈ t`."]
theorem finprod_mem_union_inter (hs : s.Finite) (ht : t.Finite) :
    ((∏ᶠ i ∈ s ∪ t, f i) * ∏ᶠ i ∈ s ∩ t, f i) = (∏ᶠ i ∈ s, f i) * ∏ᶠ i ∈ t, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{s t : Set α}
(hs : s.Finite)
(ht : t.Finite)

∑ᶠ (i : α) (_ : i ∈ s ∪ t), f i + ∑ᶠ (i : α) (_ : i ∈ s ∩ t), f i =
  ∑ᶠ (i : α) (_ : i ∈ s), f i + ∑ᶠ (i : α) (_ : i ∈ t), f i


@[simp]
theorem degree_of_zero : (0 : Cubic R).toPoly.degree = ⊥


@[simp]
theorem csInf_Ioc [DenselyOrdered α] (h : a < b) : sInf (Ioc a b) = a

{α : Type u_1}
[ConditionallyCompleteLattice α]
{a b : α}
[DenselyOrdered α]
(h : a < b)


theorem X_dvd_iff {s : σ} {φ : MvPowerSeries σ R} :
    (X s : MvPowerSeries σ R) ∣ φ ↔ ∀ m : σ →₀ ℕ, m s = 0 → coeff R m φ = 0

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
{s : σ}
{φ : MvPowerSeries σ R}

MvPowerSeries.X s ∣ φ ↔ ∀ (m : σ →₀ ℕ), m s = 0 → (MvPowerSeries.coeff R m) φ = 0


@[simp]
theorem diff_singleton_eq_self {a : α} {s : Set α} (h : a ∉ s) : s \ {a} = s

{α : Type u}
{a : α}
{s : Set α}
(h : a ∉ s)


/-- The map `coe_fn : (r ↪r s) → (α → β)` is injective. -/
theorem coe_fn_injective : Injective fun f : r ↪r s => (f : α → β)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}


/-- A family of orthogonal idempotents lift along nil ideals. -/
lemma OrthogonalIdempotents.lift_of_isNilpotent_ker [Finite I]
    (h : ∀ x ∈ RingHom.ker f, IsNilpotent x)
    {e : I → S} (he : OrthogonalIdempotents e) (he' : ∀ i, e i ∈ f.range) :
    ∃ e' : I → R, OrthogonalIdempotents e' ∧ f ∘ e' = e

∃ e', OrthogonalIdempotents e' ∧ ⇑f ∘ e' = e


theorem w_def (D : ℝ) :
    (w D : E → ℝ) = fun x => ((∫ x : E, u x ∂μ) * |D| ^ finrank ℝ E)⁻¹ • u (D⁻¹ • x)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
(D : ℝ)

ExistsContDiffBumpBase.w D = fun x =>
  ((∫ (x : E), ExistsContDiffBumpBase.u x ∂MeasureTheory.Measure.addHaar) * |D| ^ FiniteDimensional.finrank ℝ E)⁻¹ •
    ExistsContDiffBumpBase.u (D⁻¹ • x)


/-- `ContinuousMap.HomotopyLike F f₀ f₁` states that `F` is a type of homotopies between `f₀` and
`f₁`.

You should extend this class when you extend `ContinuousMap.Homotopy`. -/
class HomotopyLike {X Y : outParam Type*} [TopologicalSpace X] [TopologicalSpace Y]
    (F : Type*) (f₀ f₁ : outParam <| C(X, Y)) [FunLike F (I × X) Y]
    extends ContinuousMapClass F (I × X) Y : Prop where
  /-- value of the homotopy at 0 -/
  map_zero_left (f : F) : ∀ x, f (0, x) = f₀ x
  /-- value of the homotopy at 1 -/
  map_one_left (f : F) : ∀ x, f (1, x) = f₁ x

[self : ContinuousMap.HomotopyLike F f₀ f₁]


/-- Any two functors out of the empty category are *equal*. You probably want to use
`emptyExt` instead of this.
-/
theorem empty_ext' (F G : Discrete.{w} PEmpty ⥤ C) : F = G

(F G : CategoryTheory.Functor (CategoryTheory.Discrete PEmpty.{w + 1}) C)


@[simp]
theorem uniformity_toTopologicalSpace_eq [UniformSpace F] [UniformAddGroup F] (𝔖 : Set (Set E)) :
    (UniformConvergenceCLM.instUniformSpace σ F 𝔖).toTopologicalSpace =
      UniformConvergenceCLM.instTopologicalSpace σ F 𝔖

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NormedField 𝕜₁]
[NormedField 𝕜₂]
(σ : 𝕜₁ →+* 𝕜₂)
{E : Type u_3}
(F : Type u_4)
[AddCommGroup E]
[Module 𝕜₁ E]
[TopologicalSpace E]
[AddCommGroup F]
[Module 𝕜₂ F]
[UniformSpace F]
[UniformAddGroup F]
(𝔖 : Set (Set E))

UniformSpace.toTopologicalSpace = UniformConvergenceCLM.instTopologicalSpace σ F 𝔖


/-- The functor `(S, F) ⥤ (G(S), F ⋙ G)`. -/
@[simps]
def post (S : C) (F : B ⥤ C) (G : C ⥤ D) :
    StructuredArrow S F ⥤ StructuredArrow (G.obj S) (F ⋙ G)

(X : CategoryTheory.StructuredArrow S F)

(CategoryTheory.StructuredArrow.post S F G).obj X = CategoryTheory.StructuredArrow.mk (G.map X.hom)


@[simp]
theorem rightAngleRotationAux₁_rightAngleRotationAux₁ (x : E) :
    o.rightAngleRotationAux₁ (o.rightAngleRotationAux₁ x) = -x

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


/-- The equivalence between `BddLat` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : BddLat ≌ BddLat


theorem one_apply (a : A) : (1 : A →⋆ₙ+* A) a = a

{A : Type u_1}
[NonUnitalNonAssocSemiring A]
[Star A]
(a : A)


/-- An equivalence between `MonoOver A` and `MonoOver B` gives an equivalence
between `Subobject A` and `Subobject B`. -/
@[simps]
def lowerEquivalence {A : C} {B : D} (e : MonoOver A ≌ MonoOver B) : Subobject A ≌ Subobject B

(e : CategoryTheory.MonoOver A ≌ CategoryTheory.MonoOver B)

(CategoryTheory.Subobject.lowerEquivalence e).unitIso = CategoryTheory.eqToIso ⋯


@[local simp]
private theorem one_div_two : 1/2 = 0


theorem lift_lift'_same_le_lift' {g : Set α → Set α → Set β} :
    (f.lift fun s => f.lift' (g s)) ≤ f.lift' fun s => g s s

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Set α → Set α → Set β}


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

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


@[to_additive]
theorem IsOpen.mul_closure (hs : IsOpen s) (t : Set G) : s * closure t = s * t

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{s : Set G}
(hs : IsOpen s)
(t : Set G)


@[simp] lemma ofNat_ne_zero (n : ℕ) [n.AtLeastTwo] : (no_index (ofNat n) : R) ≠ 0

{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
(n : ℕ)
[n.AtLeastTwo]


theorem map_comp (f : M →ₗ[R] N) (g : N →ₗ[R] P) :
    map I g ∘ₗ map I f = map I (g ∘ₗ f)

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{N : Type u_3}
[AddCommGroup N]
[Module R N]
{P : Type u_4}
[AddCommGroup P]
[Module R P]
(f : M →ₗ[R] N)
(g : N →ₗ[R] P)

AdicCompletion.AdicCauchySequence.map I g ∘ₗ AdicCompletion.AdicCauchySequence.map I f =
  AdicCompletion.AdicCauchySequence.map I (g ∘ₗ f)


theorem fract_eq_fract (m n : E) : fract b m = fract b n ↔ -m + n ∈ span ℤ (Set.range b)

{E : Type u_1}
{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[NormedAddCommGroup E]
[NormedSpace K E]
(b : Basis ι K E)
[FloorRing K]
[Fintype ι]
(m n : E)

Zspan.fract b m = Zspan.fract b n ↔ -m + n ∈ Submodule.span ℤ (Set.range ⇑b)


private theorem succ_le_iff' {a b : Ordinal} : a + 1 ≤ b ↔ a < b


theorem sInter_prod {S : Set (Set α)} (hS : S.Nonempty) (t : Set β) :
    ⋂₀ S ×ˢ t = ⋂ s ∈ S, s ×ˢ t

{α : Type u_1}
{β : Type u_2}
{S : Set (Set α)}
(hS : S.Nonempty)
(t : Set β)

⋂₀ S ×ˢ t = ⋂ s ∈ S, s ×ˢ t


@[to_additive]
theorem update_mul [∀ i, Mul (f i)] [DecidableEq I] (f₁ f₂ : ∀ i, f i) (i : I) (x₁ : f i)
    (x₂ : f i) : update (f₁ * f₂) i (x₁ * x₂) = update f₁ i x₁ * update f₂ i x₂

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

Function.update (f₁ + f₂) i (x₁ + x₂) = Function.update f₁ i x₁ + Function.update f₂ i x₂


theorem minkowskiBound_lt_top : minkowskiBound K I < ⊤

(I : (FractionalIdeal (nonZeroDivisors (NumberField.RingOfIntegers K)) K)ˣ)

NumberField.mixedEmbedding.minkowskiBound K I < ⊤


@[to_additive (attr := simp)]
theorem mulIndicator_apply_eq_self : s.mulIndicator f a = f a ↔ a ∉ s → f a = 1

{α : Type u_1}
{M : Type u_4}
[One M]
{s : Set α}
{f : α → M}
{a : α}


@[simp]
theorem filter_sub [DecidableEq α] (s t : Multiset α) :
    filter p (s - t) = filter p s - filter p t

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

Multiset.filter p (s - t) = Multiset.filter p s - Multiset.filter p t


@[to_additive]
theorem mulEquivOfQuotient_mk (x y) : mulEquivOfQuotient f (mk x y) = f.mk' x y

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{f : S.LocalizationMap N}
(x : M)
(y : ↥S)

(Localization.mulEquivOfQuotient f) (Localization.mk x y) = f.mk' x y


theorem seq_lt_seq_of_le_of_lt (hf : Monotone f) (n : ℕ) (h₀ : x 0 < y 0)
    (hx : ∀ k < n, x (k + 1) ≤ f (x k)) (hy : ∀ k < n, f (y k) < y (k + 1)) : x n < y n

(hx : ∀ (k : ℕ), k < n → x (k + 1) ≤ f (x k))


/-- `OrderDual` as a functor. -/
@[simps]
def dual : FinBddDistLat ⥤ FinBddDistLat

FinBddDistLat.dual.obj X = FinBddDistLat.of (↑X.toBddDistLat.toDistLat)ᵒᵈ


/-- For `D : J ⥤ Coalgebra T`, `D ⋙ forget T` has a limit, then `D` has a limit provided limits
of shape `J` are preserved by `T`.
-/
theorem forget_creates_limits_of_comonad_preserves [PreservesLimitsOfShape J (T : C ⥤ C)]
    (D : J ⥤ Coalgebra T) [HasLimit (D ⋙ forget T)] : HasLimit D

(D : CategoryTheory.Functor J T.Coalgebra)


@[simp]
lemma ι_preimage_self : U.ι ⁻¹ᵁ U = ⊤

{X : AlgebraicGeometry.Scheme}
(U : X.Opens)

(TopologicalSpace.Opens.map U.ι.val.base).obj U = ⊤


@[to_additive add_abs_eq_two_nsmul_posPart]
lemma mul_mabs_eq_oneLePart_sq (a : α) : a * |a|ₘ = a⁺ᵐ ^ 2

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


/-- Reversing a join is the same as reversing the order of parts and reversing all parts. -/
theorem reverse_join (L : List (List α)) :
    L.join.reverse = (L.map reverse).reverse.join

L.join.reverse = (List.map List.reverse L).reverse.join


theorem all_eq_not_any_not (l : List α) (p : α → Bool) : l.all p = !l.any (!p .)

{α : Type u_1}
(l : List α)
(p : α → Bool)


/-- For every nonempty open cover of a Lindelöf set, there exists a subcover indexed by ℕ. -/
theorem IsLindelof.indexed_countable_subcover {ι : Type v} [Nonempty ι]
    (hs : IsLindelof s) (U : ι → Set X) (hUo : ∀ i, IsOpen (U i)) (hsU : s ⊆ ⋃ i, U i) :
    ∃ f : ℕ → ι, s ⊆ ⋃ n, U (f n)

{X : Type u}
[TopologicalSpace X]
{s : Set X}
{ι : Type v}
[Nonempty ι]
(hs : IsLindelof s)
(U : ι → Set X)
(hUo : ∀ (i : ι), IsOpen (U i))
(hsU : s ⊆ ⋃ i, U i)


theorem hasStrictDerivAt_const_rpow {a : ℝ} (ha : 0 < a) (x : ℝ) :
    HasStrictDerivAt (fun x => a ^ x) (a ^ x * log a) x

HasStrictDerivAt (fun x => a ^ x) (a ^ x * Real.log a) x


/-- Induction principle for the class group: to show something holds for all `x : ClassGroup R`,
we can choose a fraction field `K` and show it holds for the equivalence class of each
`I : FractionalIdeal R⁰ K`. -/
@[elab_as_elim]
theorem ClassGroup.induction {P : ClassGroup R → Prop}
    (h : ∀ I : (FractionalIdeal R⁰ K)ˣ, P (ClassGroup.mk I)) (x : ClassGroup R) : P x

(h : ∀ (I : (FractionalIdeal R⁰ K)ˣ), P (ClassGroup.mk I))


/-- The functor `LeftExtension L' F ⥤ LeftExtension L F`
induced by a natural transformation `L' ⟶ L ⋙ G'`. -/
@[simps!]
def LeftExtension.postcomp₁ (f : L' ⟶ L ⋙ G) (F : C ⥤ H) :
    LeftExtension L' F ⥤ LeftExtension L F

(X : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit F) ((CategoryTheory.whiskeringLeft C D' H).obj L'))

∀ {X_1 Y : D} (f_1 : X_1 ⟶ Y),
  ((CategoryTheory.Functor.LeftExtension.postcomp₁ G f F).obj X).right.map f_1 = X.right.map (G.map f_1)


@[simp]
lemma equivPolynomialSelf_apply_eq (p : PolynomialModule R R) :
    equivPolynomialSelf p = equivPolynomial p

{R : Type u_1}
[CommRing R]
(p : PolynomialModule R R)

PolynomialModule.equivPolynomialSelf p = PolynomialModule.equivPolynomial p


@[to_additive (attr := simp)]
theorem unop_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    unop (no_index (OfNat.ofNat n : αᵐᵒᵖ)) = OfNat.ofNat n

{α : Type u_1}
[NatCast α]
(n : ℕ)
[n.AtLeastTwo]

AddOpposite.unop (OfNat.ofNat n) = OfNat.ofNat n


theorem mem_twoCocycles_def (f : G × G → A) :
    f ∈ twoCocycles A ↔ ∀ g h j : G,
      A.ρ g (f (h, j)) - f (g * h, j) + f (g, h * j) - f (g, h) = 0

{k G : Type u}
[CommRing k]
[Group G]
{A : Rep k G}
(f : G × G → CoeSort.coe A)

f ∈ groupCohomology.twoCocycles A ↔ ∀ (g h j : G), (A.ρ g) (f (h, j)) - f (g * h, j) + f (g, h * j) - f (g, h) = 0


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

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

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


theorem OrthogonalFamily.orthonormal_sigma_orthonormal {α : ι → Type*} {v_family : ∀ i, α i → G i}
    (hv_family : ∀ i, Orthonormal 𝕜 (v_family i)) :
    Orthonormal 𝕜 fun a : Σi, α i => V a.1 (v_family a.1 a.2)

(hv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i))

Orthonormal 𝕜 fun a => (V a.fst) (v_family a.fst a.snd)


theorem limit_le {o} (h : IsLimit o) {a} : o ≤ a ↔ ∀ x < o, x ≤ a

{o : Ordinal.{u_4}}
(h : o.IsLimit)
{a : Ordinal.{u_4}}


@[simp, mfld_simps]
theorem map_target {x : β} (h : x ∈ e.target) : e.symm x ∈ e.source

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)
{x : β}
(h : x ∈ e.target)


theorem mk_coe (carrier) (presheaf) (h) :
    (({ carrier
        presheaf
        IsSheaf := h } : SheafedSpace C) : TopCat) = carrier

(h : { carrier := carrier, presheaf := presheaf }.presheaf.IsSheaf)

↑{ carrier := carrier, presheaf := presheaf, IsSheaf := h }.toPresheafedSpace = carrier


theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) :
    HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{c d : 𝕜 → 𝔸}
{c' d' : 𝔸}
(hc : HasStrictDerivAt c c' x)
(hd : HasStrictDerivAt d d' x)


/--
The `Fin.castSucc_eq_zero_iff` in `Lean` only applies in `Fin (n+1)`.
This one instead uses a `NeZero n` typeclass hypothesis.
-/
@[simp]
theorem castSucc_eq_zero_iff' [NeZero n] (a : Fin n) : castSucc a = 0 ↔ a = 0


theorem measure_pos_of_mem_nhds (h : s ∈ 𝓝 x) : 0 < μ s

{X : Type u_1}
[TopologicalSpace X]
{m : MeasurableSpace X}
(μ : MeasureTheory.Measure X)
[μ.IsOpenPosMeasure]
{s : Set X}
{x : X}
(h : s ∈ 𝓝 x)


theorem sqrt_normSq_eq_norm (x : F) : √(normSqF x) = ‖x‖

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
(x : F)

√(InnerProductSpace.Core.normSq x) = ‖x‖


/-- This class assumes that the map `β × γ → β` given by `(x, y) ↦ x ^ y` is measurable. -/
class MeasurablePow (β γ : Type*) [MeasurableSpace β] [MeasurableSpace γ] [Pow β γ] : Prop where
  measurable_pow : Measurable fun p : β × γ => p.1 ^ p.2

{β : Type u_2}
{γ : Type u_3}
[MeasurableSpace β]
[MeasurableSpace γ]
[Pow β γ]
[self : MeasurablePow β γ]


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

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

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


/-- The functor `CostructuredArrow S T ⥤ CostructuredArrow U V` that is deduced from
a natural transformation `F ⋙ U ⟶ S ⋙ G` and a morphism `G.obj T ⟶ V` -/
@[simps!]
def map₂ : CostructuredArrow S T ⥤ CostructuredArrow U V

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

((CategoryTheory.CostructuredArrow.map₂ α β).obj X).right = X.right


theorem denomsClearable_zero (N : ℕ) (a : R) (bu : bi * i b = 1) : DenomsClearable a b N 0 i

{R : Type u_1}
{K : Type u_2}
[Semiring R]
[CommSemiring K]
{i : R →+* K}
{b : R}
{bi : K}
(N : ℕ)
(a : R)
(bu : bi * i b = 1)


/-- If `i` is an `F`-algebra homomorphism from `E` to `K`, then `i x` is contained in
`perfectClosure F K` if and only if `x` is contained in `perfectClosure F E`. -/
theorem map_mem_perfectClosure_iff (i : E →ₐ[F] K) {x : E} :
    i x ∈ perfectClosure F K ↔ x ∈ perfectClosure F E

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
{K : Type w}
[Field K]
[Algebra F K]
(i : E →ₐ[F] K)
{x : E}


@[simp]
theorem modOf_apply_add_self (x : k[G]) (g : G) (d : G) : (x %ᵒᶠ g) (d + g) = 0

{k : Type u_1}
{G : Type u_2}
[Semiring k]
[AddCancelCommMonoid G]
(x : AddMonoidAlgebra k G)
(g d : G)


theorem unitGroup_le_unitGroup {A B : ValuationSubring K} : A.unitGroup ≤ B.unitGroup ↔ A ≤ B

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


theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure

(μ : MeasureTheory.VectorMeasure α ℝ≥0∞)


theorem mk_add {f g : CauSeq ℚ abs} : mk (f + g) = mk f + mk g


theorem hasseDeriv_comp (k l : ℕ) :
    (@hasseDeriv R _ k).comp (hasseDeriv l) = (k + l).choose k • hasseDeriv (k + l)

Polynomial.hasseDeriv k ∘ₗ Polynomial.hasseDeriv l = (k + l).choose k • Polynomial.hasseDeriv (k + l)


lemma antitoneOn_derivWithin (hfc : ConcaveOn ℝ S f) (hfd : DifferentiableOn ℝ f S) :
    AntitoneOn (derivWithin f S) S

{S : Set ℝ}
{f : ℝ → ℝ}
(hfc : ConcaveOn ℝ S f)
(hfd : DifferentiableOn ℝ f S)


theorem mul_lt_mul_of_pos' [PosMulStrictMono α] [MulPosStrictMono α]
    (h₁ : a < b) (h₂ : c < d) (c0 : 0 < c) (b0 : 0 < b) : a * c < b * d

{α : Type u_1}
{a b c d : α}
[Mul α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
[MulPosStrictMono α]
(h₁ : a < b)
(h₂ : c < d)
(c0 : 0 < c)
(b0 : 0 < b)


theorem tsub_add_cancel_iff_le : b - a + a = b ↔ a ≤ b

{α : Type u_1}
[CanonicallyOrderedAddCommMonoid α]
[Sub α]
[OrderedSub α]
{a b : α}


theorem eval_apply_eq_zero_iff (v : V) : (eval K V) v = 0 ↔ v = 0

(K : Type uK)
{V : Type uV}
[CommRing K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]
(v : V)


/-- A copy of `smul_mono_right` that is understood by `gcongr`. -/
@[gcongr]
theorem smul_le_smul_left [SMul M α] [Preorder α] [CovariantClass M α HSMul.hSMul LE.le]
    (m : M) {a b : α} (h : a ≤ b) :
    m • a ≤ m • b

{M : Type u_2}
{α : Type u_3}
[SMul M α]
[Preorder α]
[CovariantClass M α HSMul.hSMul LE.le]
(m : M)
{a b : α}
(h : a ≤ b)


theorem IsBigOWith.exists_nonneg (h : IsBigOWith c l f g') :
    ∃ c' ≥ 0, IsBigOWith c' l f g'

{α : Type u_1}
{E : Type u_3}
{F' : Type u_7}
[Norm E]
[SeminormedAddCommGroup F']
{c : ℝ}
{f : α → E}
{g' : α → F'}
{l : Filter α}
(h : Asymptotics.IsBigOWith c l f g')

∃ c' ≥ 0, Asymptotics.IsBigOWith c' l f g'


@[simp]
theorem associated_one_iff_isUnit [Monoid α] {a : α} : (a : α) ~ᵤ 1 ↔ IsUnit a


lemma ofJ_ne_0_ne_1728 (h0 : j ≠ 0) (h1728 : j ≠ 1728) : ofJ j =
    @ofJ' _ _ j (invertibleOfNonzero h0) (invertibleOfNonzero <| sub_ne_zero_of_ne h1728)

{F : Type u}
[Field F]
(j : F)
[DecidableEq F]
(h0 : j ≠ 0)
(h1728 : j ≠ 1728)

EllipticCurve.ofJ j = EllipticCurve.ofJ' j


@[simp]
theorem fold_cons_left : ∀ (b a : α) (s : Multiset α), (a ::ₘ s).fold op b = a * s.fold op b

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

Multiset.fold op b (a ::ₘ s) = op a (Multiset.fold op b s)


@[simp]
theorem card_uIcc : (uIcc a b).card = (b - a : ℤ).natAbs + 1

(Finset.uIcc a b).card = (↑↑b - ↑↑a).natAbs + 1


@[simp]
theorem fst_comp_prod (f : α →o β) (g : α →o γ) : fst.comp (f.prod g) = f

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


@[to_additive (attr := simp)]
theorem MulHom.coe_comp [Mul M] [Mul N] [Mul P] (g : N →ₙ* P) (f : M →ₙ* N) :
    ↑(g.comp f) = g ∘ f

{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[Mul M]
[Mul N]
[Mul P]
(g : N →ₙ* P)
(f : M →ₙ* N)


theorem Eventually.ne_top_of_lt [PartialOrder β] [OrderTop β] {l : Filter α} {f g : α → β}
    (h : ∀ᶠ x in l, f x < g x) : ∀ᶠ x in l, f x ≠ ⊤

{α : Type u}
{β : Type v}
[PartialOrder β]
[OrderTop β]
{l : Filter α}
{f g : α → β}
(h : ∀ᶠ (x : α) in l, f x < g x)


/-- If `F` has a colimit, so does any naturally isomorphic functor.
-/
theorem hasColimitOfIso {F G : J ⥤ C} [HasColimit F] (α : G ≅ F) : HasColimit G

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : J ⥤ C}
[CategoryTheory.Limits.HasColimit F]
(α : G ≅ F)


@[to_additive]
theorem swap_mem_mulAntidiagonal [CommSemigroup α] {s t : Set α} {a : α} {x : α × α} :
    x.swap ∈ Set.mulAntidiagonal s t a ↔ x ∈ Set.mulAntidiagonal t s a

{α : Type u_1}
[AddCommSemigroup α]
{s t : Set α}
{a : α}
{x : α × α}

x.swap ∈ s.addAntidiagonal t a ↔ x ∈ t.addAntidiagonal s a


/-- Multiplying each row by a fixed `v i` multiplies the determinant by
the product of the `v`s. -/
theorem det_mul_row (v : n → R) (A : Matrix n n R) :
    det (of fun i j => v j * A i j) = (∏ i, v i) * det A

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(v : n → R)
(A : Matrix n n R)

(Matrix.of fun i j => v j * A i j).det = (∏ i : n, v i) * A.det


@[to_additive]
theorem prod_filter_ne_one (s : Finset α) [∀ x, Decidable (f x ≠ 1)] :
    ∏ x ∈ s.filter fun x => f x ≠ 1, f x = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
{f : α → β}
[CommMonoid β]
(s : Finset α)
[(x : α) → Decidable (f x ≠ 1)]

∏ x ∈ Finset.filter (fun x => f x ≠ 1) s, f x = ∏ x ∈ s, f x


theorem map_injective_of_injective {f : G →g G'} (hinj : Function.Injective f) (u v : V) :
    Function.Injective (Walk.map f : G.Walk u v → G'.Walk (f u) (f v))

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
{f : G →g G'}
(hinj : Function.Injective ⇑f)
(u v : V)


/-- A morphism of seminormed abelian groups is a bounded group homomorphism. -/
structure NormedAddGroupHom (V W : Type*) [SeminormedAddCommGroup V]
  [SeminormedAddCommGroup W] where
  /-- The function underlying a `NormedAddGroupHom` -/
  toFun : V → W
  /-- A `NormedAddGroupHom` is additive. -/
  map_add' : ∀ v₁ v₂, toFun (v₁ + v₂) = toFun v₁ + toFun v₂
  /-- A `NormedAddGroupHom` is bounded. -/
  bound' : ∃ C, ∀ v, ‖toFun v‖ ≤ C * ‖v‖

{V : Type u_1}
{W : Type u_2}
[SeminormedAddCommGroup V]
[SeminormedAddCommGroup W]
(self : NormedAddGroupHom V W)
(v₁ v₂ : V)

self.toFun (v₁ + v₂) = self.toFun v₁ + self.toFun v₂


/-- If a graph is cliquefree, any graph that embeds into it is also cliquefree. -/
theorem CliqueFree.comap {H : SimpleGraph β} (f : H ↪g G) : G.CliqueFree n → H.CliqueFree n

{α : Type u_1}
{β : Type u_2}
{G : SimpleGraph α}
{n : ℕ}
{H : SimpleGraph β}
(f : H ↪g G)


theorem add_mem_iff {a : A} {r s : R} : r + s ∈ σ a ↔ r ∈ σ (-↑ₐ s + a)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Ring A]
[Algebra R A]
{a : A}
{r s : R}

r + s ∈ spectrum R a ↔ r ∈ spectrum R (-(algebraMap R A) s + a)


/--
Split equality of linear maps from a product into linear maps over each component, to allow `ext`
to apply lemmas specific to `M →ₗ M₃` and `M₂ →ₗ M₃`.

See note [partially-applied ext lemmas]. -/
@[ext 1100]
theorem prod_ext {f g : M × M₂ →ₗ[R] M₃} (hl : f.comp (inl _ _ _) = g.comp (inl _ _ _))
    (hr : f.comp (inr _ _ _) = g.comp (inr _ _ _)) : f = g

(hl : f ∘ₗ LinearMap.inl R M M₂ = g ∘ₗ LinearMap.inl R M M₂)

(hr : f ∘ₗ LinearMap.inr R M M₂ = g ∘ₗ LinearMap.inr R M M₂)


theorem IsCompactOperator.image_closedBall_subset_compact [ContinuousConstSMul 𝕜₂ M₂]
    {f : M₁ →ₛₗ[σ₁₂] M₂} (hf : IsCompactOperator f) (r : ℝ) :
    ∃ K : Set M₂, IsCompact K ∧ f '' Metric.closedBall 0 r ⊆ K

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NontriviallyNormedField 𝕜₁]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜₁ →+* 𝕜₂}
{M₁ : Type u_3}
{M₂ : Type u_4}
[SeminormedAddCommGroup M₁]
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[NormedSpace 𝕜₁ M₁]
[Module 𝕜₂ M₂]
[ContinuousConstSMul 𝕜₂ M₂]
{f : M₁ →ₛₗ[σ₁₂] M₂}
(hf : IsCompactOperator ⇑f)
(r : ℝ)

∃ K, IsCompact K ∧ ⇑f '' Metric.closedBall 0 r ⊆ K


@[simp]
theorem trailingCoeff_eq_zero : trailingCoeff p = 0 ↔ p = 0


@[simp]
theorem sin_pi_div_four : sin (π / 4) = √2 / 2


/-- Assumes right covariance. -/
theorem Right.mul_le_one_of_le_of_le [MulPosMono α] (ha : a ≤ 1) (hb : b ≤ 1) (b0 : 0 ≤ b) :
    a * b ≤ 1

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


theorem ringHom_injective {γ : Type w} [Nonempty I] [∀ i, NonAssocSemiring (f i)]
    [NonAssocSemiring γ] (g : ∀ i, γ →+* f i) (hg : ∀ i, Function.Injective (g i)) :
    Function.Injective (Pi.ringHom g)

(hg : ∀ (i : I), Function.Injective ⇑(g i))


theorem nndist_midpoint_midpoint_le' (p₁ p₂ p₃ p₄ : P) :
    nndist (midpoint 𝕜 p₁ p₂) (midpoint 𝕜 p₃ p₄) ≤ (nndist p₁ p₃ + nndist p₂ p₄) / ‖(2 : 𝕜)‖₊

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

nndist (midpoint 𝕜 p₁ p₂) (midpoint 𝕜 p₃ p₄) ≤ (nndist p₁ p₃ + nndist p₂ p₄) / ‖2‖₊


/-- (Implementation Detail) The glue data associated to a disjoint union. -/
@[simps]
noncomputable
def disjointGlueData' : GlueData' Scheme

{ι : Type u}
(f : ι → AlgebraicGeometry.Scheme)

∀ (x x_1 x_2 : ι) (x_3 : x ≠ x_1) (x_4 : x ≠ x_2) (x_5 : x_1 ≠ x_2),
  (AlgebraicGeometry.disjointGlueData' f).t' x x_1 x_2 x_3 x_4 x_5 =
    CategoryTheory.Limits.pullback.fst ((fun x x_6 x_7 => (f x).emptyTo) x x_1 x_3)
        ((fun x x_6 x_7 => (f x).emptyTo) x x_2 x_4) ≫
      (CategoryTheory.Limits.pullback ((fun x x_6 x_7 => (f x).emptyTo) x_1 x_2 x_5)
          ((fun x x_6 x_7 => (f x).emptyTo) x_1 x ⋯)).emptyTo


theorem lintegral_rpow_add_lt_top_of_lintegral_rpow_lt_top {p : ℝ} {f g : α → ℝ≥0∞}
    (hf : AEMeasurable f μ) (hf_top : (∫⁻ a, f a ^ p ∂μ) < ⊤) (hg_top : (∫⁻ a, g a ^ p ∂μ) < ⊤)
    (hp1 : 1 ≤ p) : (∫⁻ a, (f + g) a ^ p ∂μ) < ⊤

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{p : ℝ}
{f g : α → ENNReal}
(hf : AEMeasurable f μ)
(hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤)
(hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤)
(hp1 : 1 ≤ p)


theorem one_natPow : Nat.pow (nat_lit 1) b = nat_lit 1


@[reassoc (attr := simp)]
theorem pullbackDiagonalMapIdIso_inv_snd_fst :
    (pullbackDiagonalMapIdIso f g i).inv ≫ pullback.snd _ _ ≫ pullback.fst _ _ =
      pullback.fst _ _

[CategoryTheory.Limits.HasPullback (f ≫ i) (g ≫ i)]

[CategoryTheory.Limits.HasPullback (CategoryTheory.Limits.pullback.diagonal i)
    (CategoryTheory.Limits.pullback.map (f ≫ i) (g ≫ i) i i f g (𝟙 S) ⋯ ⋯)]

(CategoryTheory.Limits.pullbackDiagonalMapIdIso f g i).inv ≫
    CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.diagonal i)
        (CategoryTheory.Limits.pullback.map (f ≫ i) (g ≫ i) i i f g (𝟙 S) ⋯ ⋯) ≫
      CategoryTheory.Limits.pullback.fst (f ≫ i) (g ≫ i) =
  CategoryTheory.Limits.pullback.fst f g


theorem smul_apply [Monoid γ] [∀ i, AddMonoid (β i)] [∀ i, DistribMulAction γ (β i)] (b : γ)
    (v : Π₀ i, β i) (i : ι) : (b • v) i = b • v i

{ι : Type u}
{γ : Type w}
{β : ι → Type v}
[Monoid γ]
[(i : ι) → AddMonoid (β i)]
[(i : ι) → DistribMulAction γ (β i)]
(b : γ)
(v : Π₀ (i : ι), β i)
(i : ι)


theorem isPredLimit_top [OrderTop α] : IsPredLimit (⊤ : α)

{α : Type u_1}
[Preorder α]
[OrderTop α]


theorem unitsSMulGroup_snd (u : ℤˣ) (g : G) :
    (unitsSMulGroup φ d u g).2 = ((d.compl u).equiv g).2

(d : HNNExtension.NormalWord.TransversalPair G A B)

(HNNExtension.NormalWord.unitsSMulGroup φ d u g).2 = (⋯.equiv g).2


theorem toNat_testBit (x i : Nat) :
    (x.testBit i).toNat = x / 2 ^ i % 2


theorem length_toList' : ∀ t : Ordnode α, (toList t).length = t.realSize


@[simp 1100] theorem mem_singleton {a b : α} : a ∈ [b] ↔ a = b


@[simp, norm_cast] lemma coe_pow (x : ℝ≥0) (n : ℕ) : (↑(x ^ n) : ℝ≥0∞) = x ^ n


theorem finSuccEquiv_support (f : MvPolynomial (Fin (n + 1)) R) :
    (finSuccEquiv R n f).support = Finset.image (fun m : Fin (n + 1) →₀ ℕ => m 0) f.support

{R : Type u}
[CommSemiring R]
{n : ℕ}
(f : MvPolynomial (Fin (n + 1)) R)

((MvPolynomial.finSuccEquiv R n) f).support = Finset.image (fun m => m 0) f.support


@[simp]
theorem root_isInv (r : R) : of _ r * root (C r * X - 1) = 1

(AdjoinRoot.of (Polynomial.C r * Polynomial.X - 1)) r * AdjoinRoot.root (Polynomial.C r * Polynomial.X - 1) = 1


/-- Construct a bundled monotone map `α →o Π i, π i` from a family of monotone maps
`f i : α →o π i`. -/
@[simps]
def pi (f : ∀ i, α →o π i) : α →o ∀ i, π i

{α : Type u_2}
[Preorder α]
{ι : Type u_6}
{π : ι → Type u_7}
[(i : ι) → Preorder (π i)]
(f : (i : ι) → α →o π i)
(x : α)
(i : ι)


@[simp]
theorem formPerm_cons_cons (x y : α) (l : List α) :
    formPerm (x :: y :: l) = swap x y * formPerm (y :: l)

{α : Type u_1}
[DecidableEq α]
(x y : α)
(l : List α)

(x :: y :: l).formPerm = Equiv.swap x y * (y :: l).formPerm


/-- If a left-invariant measure gives positive mass to a compact set, then it gives positive mass to
any open set. -/
@[to_additive
"If a left-invariant measure gives positive mass to a compact set, then it gives positive mass to
any open set."]
theorem isOpenPosMeasure_of_mulLeftInvariant_of_compact (K : Set G) (hK : IsCompact K)
    (h : μ K ≠ 0) : IsOpenPosMeasure μ

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
{μ : MeasureTheory.Measure G}
[Group G]
[TopologicalGroup G]
[μ.IsMulLeftInvariant]
(K : Set G)
(hK : IsCompact K)
(h : μ K ≠ 0)


@[simp]
theorem stereographic_target (hv : ‖v‖ = 1) : (stereographic hv).target = Set.univ

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{v : E}
(hv : ‖v‖ = 1)


@[to_additive]
theorem IsCyclic.iff_exponent_eq_card [CommGroup α] [Fintype α] :
    IsCyclic α ↔ exponent α = Fintype.card α

{α : Type u}
[AddCommGroup α]
[Fintype α]

IsAddCyclic α ↔ AddMonoid.exponent α = Fintype.card α


theorem copy_eq (f : LatticeHom α β) (f' : α → β) (h : f' = f) : f.copy f' h = f

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[Lattice β]
(f : LatticeHom α β)
(f' : α → β)
(h : f' = ⇑f)


theorem norm_iteratedFDeriv_smul_le {f : E → 𝕜'} {g : E → F} {N : ℕ∞} (hf : ContDiff 𝕜 N f)
    (hg : ContDiff 𝕜 N g) (x : E) {n : ℕ} (hn : (n : ℕ∞) ≤ N) :
    ‖iteratedFDeriv 𝕜 n (fun y => f y • g y) x‖ ≤ ∑ i ∈ Finset.range (n + 1),
      (n.choose i : ℝ) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{𝕜' : Type u_2}
[NormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{f : E → 𝕜'}
{g : E → F}
{N : ℕ∞}
(hf : ContDiff 𝕜 N f)
(hg : ContDiff 𝕜 N g)
(x : E)
{n : ℕ}
(hn : ↑n ≤ N)

‖iteratedFDeriv 𝕜 n (fun y => f y • g y) x‖ ≤
  ∑ i ∈ Finset.range (n + 1), ↑(n.choose i) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖


theorem Zag.of_hom {j₁ j₂ : J} (f : j₁ ⟶ j₂) : Zag j₁ j₂

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{j₁ j₂ : J}
(f : j₁ ⟶ j₂)


theorem exists_mem_not_mem_of_ncard_lt_ncard (h : s.ncard < t.ncard)
    (hs : s.Finite := by toFinite_tac) : ∃ e, e ∈ t ∧ e ∉ s

{α : Type u_1}
{s t : Set α}
(h : s.ncard < t.ncard)
(hs : s.Finite := by toFinite_tac)


theorem isGLB_prod {s : Set (α × β)} (p : α × β) :
    IsGLB s p ↔ IsGLB (Prod.fst '' s) p.1 ∧ IsGLB (Prod.snd '' s) p.2

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{s : Set (α × β)}
(p : α × β)


theorem even_cons_cons (a₁ a₂ : α) (s : Stream' α) : even (a₁::a₂::s) = a₁::even s

{α : Type u}
(a₁ a₂ : α)
(s : Stream' α)

(Stream'.cons a₁ (Stream'.cons a₂ s)).even = Stream'.cons a₁ s.even


lemma shiftIso_add (n m a a' a'' : M) (ha' : n + a = a') (ha'' : m + a' = a'') :
    F.shiftIso (m + n) a a'' (by rw [add_assoc, ha', ha'']) =
      isoWhiskerRight (shiftFunctorAdd C m n) _ ≪≫ Functor.associator _ _ _ ≪≫
        isoWhiskerLeft _ (F.shiftIso n a a' ha') ≪≫ F.shiftIso m a' a'' ha''

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

F.shiftIso (m + n) a a'' ⋯ =
  CategoryTheory.isoWhiskerRight (CategoryTheory.shiftFunctorAdd C m n) (F.shift a) ≪≫
    (CategoryTheory.shiftFunctor C m).associator (CategoryTheory.shiftFunctor C n) (F.shift a) ≪≫
      CategoryTheory.isoWhiskerLeft (CategoryTheory.shiftFunctor C m) (F.shiftIso n a a' ha') ≪≫
        F.shiftIso m a' a'' ha''


theorem sup_inf {κ : ι → Type*} (s : Finset ι) (t : ∀ i, Finset (κ i)) (f : ∀ i, κ i → α) :
    (s.sup fun i => (t i).inf (f i)) = (s.pi t).inf fun g => s.attach.sup fun i => f _ <| g _ i.2

{α : Type u_2}
{ι : Type u_5}
[DistribLattice α]
[BoundedOrder α]
[DecidableEq ι]
{κ : ι → Type u_7}
(s : Finset ι)
(t : (i : ι) → Finset (κ i))
(f : (i : ι) → κ i → α)

(s.sup fun i => (t i).inf (f i)) = (s.pi t).inf fun g => s.attach.sup fun i => f (↑i) (g ↑i ⋯)


@[simp]
theorem CuspForm.toSlashInvariantForm_coe (f : CuspForm Γ k) : ⇑f.1 = f

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


@[simp] theorem mk_zero : ⟨0⟩ = (0 : Pos)


theorem degree_C {a : R} (a0 : a ≠ 0) : (C a).degree = 0

{R : Type u_1}
[Semiring R]
{a : R}
(a0 : a ≠ 0)


theorem sdiff_insert_insert_of_mem_of_not_mem {s t : Finset α} {x : α} (hxs : x ∈ s) (hxt : x ∉ t) :
    insert x (s \ insert x t) = s \ t

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
{x : α}
(hxs : x ∈ s)
(hxt : x ∉ t)


@[simp]
theorem projIci_coe (x : Ici a) : projIci a x = x

{α : Type u_1}
[LinearOrder α]
{a : α}
(x : ↑(Set.Ici a))


/-- `seminormFromConst' hf1 hc hpm 1 ≤ 1`. -/
theorem seminormFromConst_one_le : seminormFromConst' hf1 hc hpm 1 ≤ 1

{R : Type u_1}
[CommRing R]
{c : R}
{f : RingSeminorm R}
(hf1 : f 1 ≤ 1)
(hc : f c ≠ 0)
(hpm : IsPowMul ⇑f)


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

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

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


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

(CategoryTheory.Pretriangulated.binaryProductTriangle X₁ X₂).obj₃ = X₂


@[simp]
theorem disjoint_ndinsert_right {a : α} {s t : Multiset α} :
    Disjoint s (ndinsert a t) ↔ a ∉ s ∧ Disjoint s t

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

s.Disjoint (Multiset.ndinsert a t) ↔ a ∉ s ∧ s.Disjoint t


theorem Int.isCoprime_iff_gcd_eq_one {m n : ℤ} : IsCoprime m n ↔ Int.gcd m n = 1


/-- Two submodules `M` and `N` in an algebra `S` over `R` are linearly disjoint if the natural map
`M ⊗[R] N →ₗ[R] S` induced by multiplication in `S` is injective. -/
@[mk_iff]
protected structure LinearDisjoint : Prop where
  injective : Function.Injective (mulMap M N)

{R : Type u}
{S : Type v}
[CommSemiring R]
[Semiring S]
[Algebra R S]
(M N : Submodule R S)

M.LinearDisjoint N ↔ Function.Injective ⇑(M.mulMap N)


@[to_additive (attr := simp)]
protected theorem one_div_mul {r : R} {s t : S} : (1 /ₒ t) * (r /ₒ s) = r /ₒ (s * t)

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
{r : R}
{s t : ↥S}


theorem map_add_right (f : M →ₗ[A] P) (g₁ g₂ : N →ₗ[R] Q) :
    map f (g₁ + g₂) = map f g₁ + map f g₂

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

TensorProduct.AlgebraTensorModule.map f (g₁ + g₂) =
  TensorProduct.AlgebraTensorModule.map f g₁ + TensorProduct.AlgebraTensorModule.map f g₂


@[simp]
theorem le_sup'_iff : a ≤ s.sup' H f ↔ ∃ b ∈ s, a ≤ f b

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
{s : Finset ι}
(H : s.Nonempty)
{f : ι → α}
{a : α}


lemma hasLeftHomology_of_iso {S₁ S₂ : ShortComplex C} (e : S₁ ≅ S₂) [HasLeftHomology S₁] :
    HasLeftHomology S₂


@[simp]
theorem zero_eq_arcsin_iff {x} : 0 = arcsin x ↔ x = 0


@[simp]
theorem image_fst_divisorsAntidiagonal : (divisorsAntidiagonal n).image Prod.fst = divisors n

Finset.image Prod.fst n.divisorsAntidiagonal = n.divisors


@[to_additive]
theorem smul_subset_of_coprime (han : (orderOf a).Coprime n) :
    a • approxOrderOf A n δ ⊆ approxOrderOf A (orderOf a * n) δ

{A : Type u_1}
[SeminormedCommGroup A]
{a : A}
{n : ℕ}
(δ : ℝ)
(han : (orderOf a).Coprime n)


/-- Alternative definition of set strict convexity, using division. -/
theorem strictConvex_iff_div :
    StrictConvex 𝕜 s ↔
      s.Pairwise fun x y =>
        ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → (a / (a + b)) • x + (b / (a + b)) • y ∈ interior s

{𝕜 : Type u_1}
{E : Type u_3}
[LinearOrderedField 𝕜]
[TopologicalSpace E]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}


theorem incMatrix_apply_mul_incMatrix_apply : G.incMatrix R a e * G.incMatrix R b e =
    (G.incidenceSet a ∩ G.incidenceSet b).indicator 1 e

{R : Type u_1}
{α : Type u_2}
(G : SimpleGraph α)
[MulZeroOneClass R]
{a b : α}
{e : Sym2 α}

SimpleGraph.incMatrix R G a e * SimpleGraph.incMatrix R G b e = (G.incidenceSet a ∩ G.incidenceSet b).indicator 1 e


theorem squarefree_of_factorization_le_one {n : ℕ} (hn : n ≠ 0) (hn' : ∀ p, n.factorization p ≤ 1) :
    Squarefree n

(hn' : ∀ (p : ℕ), n.factorization p ≤ 1)


theorem exp_eq_exp_iff_exists_int {x y : ℂ} : exp x = exp y ↔ ∃ n : ℤ, x = y + n * (2 * π * I)

Complex.exp x = Complex.exp y ↔ ∃ n, x = y + ↑n * (2 * ↑Real.pi * Complex.I)


theorem Subtype.preirreducibleSpace (h : IsPreirreducible s) : PreirreducibleSpace s

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


theorem memℒp_iff {f : α →ₛ E} (hp_pos : p ≠ 0) (hp_ne_top : p ≠ ∞) :
    Memℒp f p μ ↔ ∀ y, y ≠ 0 → μ (f ⁻¹' {y}) < ∞

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
{μ : MeasureTheory.Measure α}
{p : ℝ≥0∞}
{f : MeasureTheory.SimpleFunc α E}
(hp_pos : p ≠ 0)
(hp_ne_top : p ≠ ⊤)

MeasureTheory.Memℒp (↑f) p μ ↔ ∀ (y : E), y ≠ 0 → μ (↑f ⁻¹' {y}) < ⊤


theorem card_interedges_finpartition_right [DecidableEq β] (s : Finset α) (P : Finpartition t) :
    (interedges r s t).card = ∑ b ∈ P.parts, (interedges r s b).card

{α : Type u_4}
{β : Type u_5}
(r : α → β → Prop)
[(a : α) → DecidablePred (r a)]
{t : Finset β}
[DecidableEq β]
(s : Finset α)
(P : Finpartition t)

(Rel.interedges r s t).card = ∑ b ∈ P.parts, (Rel.interedges r s b).card


theorem card_ne_zero_of_mem (h : a ∈ s) : s.card ≠ 0

{α : Type u_1}
{s : Finset α}
{a : α}
(h : a ∈ s)


theorem support_extendDomain_subset (f : Subtype P →₀ M) :
    ↑(f.extendDomain).support ⊆ {x | P x}

{α : Type u_1}
{M : Type u_13}
[Zero M]
{P : α → Prop}
[DecidablePred P]
(f : Subtype P →₀ M)


theorem not_isPredLimit [NoMaxOrder α] : ¬IsPredLimit a

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a : α}
[IsPredArchimedean α]
[NoMaxOrder α]


/-- A product of copies of a type can be split as the binary product of one copy and the product
  of all the remaining copies. -/
@[simps!]
def funSplitAt {α : Type*} [DecidableEq α] (i : α) (β : Type*) :
    (α → β) ≃ β × ({ j // j ≠ i } → β)

(f : (fun a => β) i × ((j : { j // j ≠ i }) → (fun a => β) ↑j))

(Equiv.funSplitAt i β).symm f j = if h : j = i then f.1 else f.2 ⟨j, ⋯⟩


theorem lf_congr_right {x y₁ y₂ : PGame} (hy : y₁ ≈ y₂) : x ⧏ y₁ ↔ x ⧏ y₂

{x y₁ y₂ : SetTheory.PGame}
(hy : y₁ ≈ y₂)


/-- For nontrivial filters in linear orders, coboundedness for `≥` implies frequent boundedness
from above. -/
lemma IsCobounded.frequently_le [NeBot F] (cobdd : IsCobounded (· ≥ ·) F) :
    ∃ u, ∃ᶠ x in F, x ≤ u

(cobdd : Filter.IsCobounded (fun x x_1 => x ≥ x_1) F)


theorem subset_setOf {p : α → Prop} {s : Set α} : s ⊆ setOf p ↔ ∀ x, x ∈ s → p x


/-- Reindex a categorical biproduct via an equivalence of the index types. -/
@[simps]
def biproduct.reindex {β γ : Type} [Finite β] (ε : β ≃ γ)
    (f : γ → C) [HasBiproduct f] [HasBiproduct (f ∘ ε)] : ⨁ f ∘ ε ≅ ⨁ f

[CategoryTheory.Limits.HasBiproduct (f ∘ ⇑ε)]

(CategoryTheory.Limits.biproduct.reindex ε f).hom =
  CategoryTheory.Limits.biproduct.desc fun b => CategoryTheory.Limits.biproduct.ι f (ε b)


@[simp]
theorem val_sub (n : ℕ) (f g : AdicCompletion I M) : (f - g).val n = f.val n - g.val n

{R : Type u_1}
[CommRing R]
{I : Ideal R}
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(n : ℕ)
(f g : AdicCompletion I M)


/-- The functor out of the category of elements which forgets the element. -/
@[simps]
def π : F.Elements ⥤ C

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

∀ {X Y : F.Elements} (f : X ⟶ Y), (CategoryTheory.CategoryOfElements.π F).map f = ↑f


theorem inr_injective [Zero R] : Function.Injective ((↑) : A → Unitization R A)


theorem concat_cons (a b : α) (l : List α) : concat (a :: l) b = a :: concat l b


@[simp] theorem ofBddAugment_indep (E : Set α) Indep indep_empty indep_subset indep_aug
    indep_bdd subset_ground : (IndepMatroid.ofBddAugment
      E Indep indep_empty indep_subset indep_aug indep_bdd subset_ground).Indep = Indep

(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)

(indep_aug : ∀ ⦃I J : Set α⦄, Indep I → Indep J → I.encard < J.encard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))

(indep_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n)

(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E)


theorem pNilradical_le_nilradical {R : Type*} [CommSemiring R] {p : ℕ} :
    pNilradical R p ≤ nilradical R


theorem rootSet_prod [CommRing S] [IsDomain S] [Algebra R S] {ι : Type*} (f : ι → R[X])
    (s : Finset ι) (h : s.prod f ≠ 0) : (s.prod f).rootSet S = ⋃ i ∈ s, (f i).rootSet S

{R : Type u}
{S : Type v}
[Field R]
[CommRing S]
[IsDomain S]
[Algebra R S]
{ι : Type u_1}
(f : ι → R[X])
(s : Finset ι)
(h : s.prod f ≠ 0)


theorem Int.alternating_sum_range_choose_of_ne {n : ℕ} (h0 : n ≠ 0) :
    (∑ m ∈ range (n + 1), ((-1) ^ m * ↑(choose n m) : ℤ)) = 0

∑ m ∈ Finset.range (n + 1), (-1) ^ m * ↑(n.choose m) = 0


@[simp]
theorem join_think (S : WSeq (WSeq α)) : join (think S) = think (join S)

{α : Type u}
(S : Stream'.WSeq (Stream'.WSeq α))


@[mono, gcongr]
theorem compRel_mono {f g h k : Set (α × α)} (h₁ : f ⊆ h) (h₂ : g ⊆ k) : f ○ g ⊆ h ○ k

{α : Type ua}
{f g h k : Set (α × α)}
(h₁ : f ⊆ h)
(h₂ : g ⊆ k)


theorem IsSubordinate.biUnionPrepartition [Fintype ι] (h : IsSubordinate π r)
    (πi : ∀ J, Prepartition J) : IsSubordinate (π.biUnionPrepartition πi) r

(πi : (J : BoxIntegral.Box ι) → BoxIntegral.Prepartition J)


@[to_additive (attr := simp)]
theorem iUnion_op_smul_set (s t : Set α) : ⋃ a ∈ t, MulOpposite.op a • s = s * t


@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
theorem vsub_nonempty : (s -ᵥ t : Finset α).Nonempty ↔ s.Nonempty ∧ t.Nonempty

{α : Type u_2}
{β : Type u_3}
[VSub α β]
[DecidableEq α]
{s t : Finset β}

(s -ᵥ t).Nonempty ↔ s.Nonempty ∧ t.Nonempty


@[simp, mfld_simps]
theorem baseSet_at : Z.baseSet i = (Z.localTriv i).baseSet

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(i : ι)


@[to_additive (attr := simp)]
theorem smul_inr : a • (inr c : α ⊕ β) = inr (a • c)

{M : Type u_1}
{α : Type u_4}
{β : Type u_5}
[SMul M α]
[SMul M β]
(a : M)
(c : β)


/-- `x` is in the support of `f` iff `Equiv.Perm.cycle_of f x` is a cycle. -/
theorem isCycle_cycleOf_iff (f : Perm α) [DecidableRel f.SameCycle] :
    IsCycle (cycleOf f x) ↔ f x ≠ x

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


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

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


@[simp, norm_cast]
theorem coe_zero : ((0 : p) : M) = 0

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
{p : Submodule R M}


theorem funMap_cast {n : ℕ} (f : L.Functions n) (x : Fin n → ∀ a, M a) :
    (funMap f fun i => (x i : (u : Filter α).Product M)) =
      (fun a => funMap f fun i => x i a : (u : Filter α).Product M)

{α : Type u_1}
{M : α → Type u_2}
{u : Ultrafilter α}
{L : FirstOrder.Language}
[(a : α) → L.Structure (M a)]
{n : ℕ}
(f : L.Functions n)
(x : Fin n → (a : α) → M a)

(FirstOrder.Language.Structure.funMap f fun i => Quotient.mk' (x i)) =
  Quotient.mk' fun a => FirstOrder.Language.Structure.funMap f fun i => x i a


theorem mul (hφ : IsHomogeneous φ m) (hψ : IsHomogeneous ψ n) : IsHomogeneous (φ * ψ) (m + n)

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
{φ ψ : MvPolynomial σ R}
{m n : ℕ}
(hφ : φ.IsHomogeneous m)
(hψ : ψ.IsHomogeneous n)


lemma Antitone.mapsTo_Ici (h : Antitone f) : MapsTo f (Ici a) (Iic (f a))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{a : α}
(h : Antitone f)

Set.MapsTo f (Set.Ici a) (Set.Iic (f a))


/-- Properties of division with remainder for a / b.  -/
theorem rq_eq : u.r + (u.bp + 1) * u.q = u.ap + 1


lemma coe_id {X : CommSemiRingCat} : (𝟙 X : X → X) = id


/-- A graded version of `Monoid`

Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid. -/
class GMonoid [AddMonoid ι] extends GMul A, GOne A where
  /-- Multiplication by `one` on the left is the identity -/
  one_mul (a : GradedMonoid A) : 1 * a = a
  /-- Multiplication by `one` on the right is the identity -/
  mul_one (a : GradedMonoid A) : a * 1 = a
  /-- Multiplication is associative -/
  mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
  /-- Optional field to allow definitional control of natural powers -/
  gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
  /-- The zeroth power will yield 1 -/
  gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
    apply_gmonoid_gnpowRec_zero_tac
  /-- Successor powers behave as expected -/
  gnpow_succ' :
    ∀ (n : ℕ) (a : GradedMonoid A),
      (GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
    apply_gmonoid_gnpowRec_succ_tac

{ι : Type u_1}
{A : ι → Type u_2}
[AddMonoid ι]
[self : GradedMonoid.GMonoid A]
(n : ℕ)
(a : GradedMonoid A)

GradedMonoid.mk (n.succ • a.fst) (GradedMonoid.GMonoid.gnpow n.succ a.snd) =
  ⟨n • a.fst, GradedMonoid.GMonoid.gnpow n a.snd⟩ * a


protected theorem add_min_add_right : ∀ (a b c : Nat), min (a + c) (b + c) = min a b + c


theorem discreteTopology_bot (α : Type*) : @DiscreteTopology α ⊥


lemma pow_unbounded_of_one_lt [ExistsAddOfLE α] (x : α) (hy1 : 1 < y) : ∃ n : ℕ, x < y ^ n

{α : Type u_1}
[StrictOrderedSemiring α]
[Archimedean α]
{y : α}
[ExistsAddOfLE α]
(x : α)
(hy1 : 1 < y)


theorem unique_iff_exists_unique (α : Sort u) : Nonempty (Unique α) ↔ ∃! _ : α, True


theorem HasSum.op (hf : HasSum f a) : HasSum (fun a ↦ op (f a)) (op a)

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a : α}
(hf : HasSum f a)

HasSum (fun a => MulOpposite.op (f a)) (MulOpposite.op a)


theorem TensorProduct.isBaseChange : IsBaseChange S (TensorProduct.mk R S M 1)

(R : Type u_1)
(M : Type v₁)
(S : Type v₃)
[AddCommMonoid M]
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Module R M]

IsBaseChange S ((TensorProduct.mk R S M) 1)


protected theorem mul_eq_zero {a b : Int} : a * b = 0 ↔ a = 0 ∨ b = 0


theorem restrict_biUnion_congr {s : Set ι} {t : ι → Set α} (hc : s.Countable) :
    μ.restrict (⋃ i ∈ s, t i) = ν.restrict (⋃ i ∈ s, t i) ↔
      ∀ i ∈ s, μ.restrict (t i) = ν.restrict (t i)

{α : Type u_2}
{ι : Type u_6}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{s : Set ι}
{t : ι → Set α}
(hc : s.Countable)


@[reassoc (attr := simp)]
lemma D₂_D₂ (i₁₂ i₁₂' i₁₂'' : I₁₂) : K.D₂ c₁₂ i₁₂ i₁₂' ≫ K.D₂ c₁₂ i₁₂' i₁₂'' = 0

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Preadditive C]
{I₁ : Type u_2}
{I₂ : Type u_3}
{I₁₂ : Type u_4}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
(K : HomologicalComplex₂ C c₁ c₂)
(c₁₂ : ComplexShape I₁₂)
[DecidableEq I₁₂]
[TotalComplexShape c₁ c₂ c₁₂]
[K.HasTotal c₁₂]
(i₁₂ i₁₂' i₁₂'' : I₁₂)


theorem tendsto_ceil_left_pure (n : ℤ) : Tendsto (ceil : α → ℤ) (𝓝[≤] n) (pure n)

{α : Type u_1}
[LinearOrderedRing α]
[FloorRing α]
[TopologicalSpace α]
[OrderClosedTopology α]
(n : ℤ)

Filter.Tendsto Int.ceil (𝓝[≤] ↑n) (pure n)


theorem map_mk_eq_map_mk_of_rel {r : α → α → Prop} {s t : Multiset α} (hst : s.Rel r t) :
    s.map (Quot.mk r) = t.map (Quot.mk r)

{α : Type u_1}
{r : α → α → Prop}
{s t : Multiset α}
(hst : Multiset.Rel r s t)

Multiset.map (Quot.mk r) s = Multiset.map (Quot.mk r) t


/-- The product of two positive extended real numbers is positive. -/
lemma mul_pos {a b : EReal} (ha : 0 < a) (hb : 0 < b) : 0 < a * b


/-- Composing two partial equivs if the target of the first coincides with the source of the
second. -/
@[simps]
protected def trans' (e' : PartialEquiv β γ) (h : e.target = e'.source) : PartialEquiv α γ

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(e : PartialEquiv α β)
(e' : PartialEquiv β γ)
(h : e.target = e'.source)

∀ (a : α), ↑(e.trans' e' h) a = (↑e' ∘ ↑e) a


theorem essInf_eq_sSup {m : MeasurableSpace α} (μ : Measure α) (f : α → β) :
    essInf f μ = sSup { a | μ { x | f x < a } = 0 }

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

essInf f μ = sSup {a | μ {x | f x < a} = 0}


theorem ιInv_comp_map (f : M →ₗ[R] N) :
    ιInv.comp (map f).toLinearMap = f.comp ιInv

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{N : Type u4}
[AddCommGroup N]
[Module R N]
(f : M →ₗ[R] N)

ExteriorAlgebra.ιInv ∘ₗ (ExteriorAlgebra.map f).toLinearMap = f ∘ₗ ExteriorAlgebra.ιInv


@[simp] lemma num_pow (q : ℚ) (n : ℕ) : (q ^ n).num = q.num ^ n


theorem connectedComponentIn_eq {x y : α} {F : Set α} (h : y ∈ connectedComponentIn F x) :
    connectedComponentIn F x = connectedComponentIn F y

{α : Type u}
[TopologicalSpace α]
{x y : α}
{F : Set α}
(h : y ∈ connectedComponentIn F x)


theorem dist_le_tsum_dist_of_tendsto (h : Summable fun n ↦ dist (f n) (f n.succ))
    (ha : Tendsto f atTop (𝓝 a)) (n) : dist (f n) a ≤ ∑' m, dist (f (n + m)) (f (n + m).succ)

(h : Summable fun n => dist (f n) (f n.succ))

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

dist (f n) a ≤ ∑' (m : ℕ), dist (f (n + m)) (f (n + m).succ)


@[simp, mfld_simps]
theorem mem_localTrivAt_baseSet (b : B) : b ∈ (Z.localTrivAt b).baseSet

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


@[simp]
theorem coe_zsmul (r : ℤ) (f : NormedAddGroupHom V₁ V₂) : ⇑(r • f) = r • ⇑f

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(r : ℤ)
(f : NormedAddGroupHom V₁ V₂)


theorem dense_image {s : Set α} : Dense (e '' s) ↔ Dense s

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{e : α → β}
(de : DenseEmbedding e)
{s : Set α}


/-- The original holor can be recovered from its slices by multiplying with unit vectors and
summing up. -/
@[simp]
theorem sum_unitVec_mul_slice [Ring α] (x : Holor α (d :: ds)) :
    (∑ i ∈ (Finset.range d).attach,
        unitVec d i ⊗ slice x i (Nat.succ_le_of_lt (Finset.mem_range.1 i.prop))) =
      x

{α : Type}
{d : ℕ}
{ds : List ℕ}
[Ring α]
(x : Holor α (d :: ds))

∑ i ∈ (Finset.range d).attach, (Holor.unitVec d ↑i).mul (x.slice ↑i ⋯) = x


theorem Continuous.lowerSemicontinuous {f : α → γ} (h : Continuous f) : LowerSemicontinuous f

{α : Type u_1}
[TopologicalSpace α]
{γ : Type u_3}
[LinearOrder γ]
[TopologicalSpace γ]
[OrderTopology γ]
{f : α → γ}
(h : Continuous f)


lemma isSMulRegular_of_isSMulRegular_on_submodule_on_quotient
    (h1 : IsSMulRegular N r) (h2 : IsSMulRegular (M ⧸ N) r) : IsSMulRegular M r

{R : Type u_1}
{M : Type u_3}
[Ring R]
[AddCommGroup M]
[Module R M]
{N : Submodule R M}
{r : R}
(h1 : IsSMulRegular (↥N) r)
(h2 : IsSMulRegular (M ⧸ N) r)


/-- An open embedding is an embedding with open range. -/
@[mk_iff]
structure OpenEmbedding (f : X → Y) extends Embedding f : Prop where
  /-- The range of an open embedding is an open set. -/
  isOpen_range : IsOpen <| range f

{X : Type u_1}
{Y : Type u_2}
[tX : TopologicalSpace X]
[tY : TopologicalSpace Y]
{f : X → Y}
(self : OpenEmbedding f)


protected theorem ediv_lt_iff_lt_mul {a b c : Int} (H : 0 < c) : a / c < b ↔ a < b * c


theorem gc : GaloisConnection (adjoin F : Set E → IntermediateField F E)
    (fun (x : IntermediateField F E) => (x : Set E))

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

GaloisConnection (IntermediateField.adjoin F) fun x => ↑x


theorem unique' {p : A[X]} (hm : p.Monic) (hp : Polynomial.aeval x p = 0)
    (hl : ∀ q : A[X], degree q < degree p → q = 0 ∨ Polynomial.aeval x q ≠ 0) :
    p = minpoly A x

(hl : ∀ (q : A[X]), q.degree < p.degree → q = 0 ∨ (Polynomial.aeval x) q ≠ 0)


theorem t2_iff_ultrafilter :
    T2Space X ↔ ∀ {x y : X} (f : Ultrafilter X), ↑f ≤ 𝓝 x → ↑f ≤ 𝓝 y → x = y


theorem casesAuxOn_succ {motive : Nat → Sort _} (zero : motive 0)
    (succ : ∀ n, motive (n+1)) (n) :
    Nat.casesAuxOn (n+1) zero succ = succ n

{motive : Nat → Sort u_1}
(zero : motive 0)
(succ : (n : Nat) → motive (n + 1))
(n : Nat)

Nat.casesAuxOn (n + 1) zero succ = succ n


theorem str_eq_of_le_nhds {X : Compactum} (F : Ultrafilter X) (x : X) : ↑F ≤ 𝓝 x → X.str F = x

{X : Compactum}
(F : Ultrafilter X.A)
(x : X.A)


@[simp] lemma Fintype.card_multiplicative (α : Type*) [Fintype α] :
    card (Multiplicative α) = card α

Fintype.card (Multiplicative α) = Fintype.card α