theorem iUnion_inter_of_antitone {ι α} [Preorder ι] [IsDirected ι (swap (· ≤ ·))] {s t : ι → Set α}
    (hs : Antitone s) (ht : Antitone t) : ⋃ i, s i ∩ t i = (⋃ i, s i) ∩ ⋃ i, t i

[IsDirected ι (Function.swap fun x x_1 => x ≤ x_1)]


theorem mul_smul' (f g : ArithmeticFunction R) (h : ArithmeticFunction M) :
    (f * g) • h = f • g • h

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(f g : ArithmeticFunction R)
(h : ArithmeticFunction M)


theorem mem_nhds_prod_iff' {x : X} {y : Y} {s : Set (X × Y)} :
    s ∈ 𝓝 (x, y) ↔ ∃ u v, IsOpen u ∧ x ∈ u ∧ IsOpen v ∧ y ∈ v ∧ u ×ˢ v ⊆ s

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{x : X}
{y : Y}
{s : Set (X × Y)}


theorem mulHom_ext [MulOneClass N] ⦃f g : Multiplicative (α →₀ M) →* N⦄
    (H : ∀ x y, f (Multiplicative.ofAdd <| single x y) = g (Multiplicative.ofAdd <| single x y)) :
    f = g

(H : ∀ (x : α) (y : M), f (Multiplicative.ofAdd (Finsupp.single x y)) = g (Multiplicative.ofAdd (Finsupp.single x y)))


@[simp]
theorem coe_sup (s t : ClopenUpperSet α) : (↑(s ⊔ t) : Set α) = ↑s ∪ ↑t

{α : Type u_1}
[TopologicalSpace α]
[LE α]
(s t : ClopenUpperSet α)


/-- A stronger form of **Cramer's rule** that allows us to solve some instances of `A * x = b` even
if the determinant is not a unit. A sufficient (but still not necessary) condition is that `A.det`
divides `b`. -/
@[simp]
theorem mulVec_cramer (A : Matrix n n α) (b : n → α) : A *ᵥ cramer A b = A.det • b

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A : Matrix n n α)
(b : n → α)


/-- A parallelepiped can be expressed on the standard basis. -/
theorem Basis.parallelepiped_eq_map  {ι E : Type*} [Fintype ι] [NormedAddCommGroup E]
    [NormedSpace ℝ E] (b : Basis ι ℝ E) :
    b.parallelepiped = (PositiveCompacts.piIcc01 ι).map b.equivFun.symm
      b.equivFunL.symm.continuous b.equivFunL.symm.isOpenMap

{ι : Type u_1}
{E : Type u_2}
[Fintype ι]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(b : Basis ι ℝ E)

b.parallelepiped =
  TopologicalSpace.PositiveCompacts.map ⇑b.equivFun.symm ⋯ ⋯ (TopologicalSpace.PositiveCompacts.piIcc01 ι)


lemma hasSum_int_cosKernel₀ (a : ℝ) {t : ℝ} (ht : 0 < t) :
    HasSum (fun n : ℤ ↦ if n = 0 then 0 else cexp (2 * π * I * a * n) * rexp (-π * n ^ 2 * t))
    (↑(cosKernel a t) - 1)

HasSum (fun n => if n = 0 then 0 else cexp (2 * ↑π * Complex.I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t)))
  (↑(HurwitzZeta.cosKernel (↑a) t) - 1)


theorem SurjOn.rightInvOn_invFunOn [Nonempty α] (h : SurjOn f s t) :
    RightInvOn (invFunOn f s) f t

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
[Nonempty α]
(h : Set.SurjOn f s t)

Set.RightInvOn (Function.invFunOn f s) f t


/-- The core implementation of `Nat.repr` returns a String with length less than or equal to the
number of digits in the decimal number (represented by `e`). For example, the decimal string
representation of any number less than 1000 (10 ^ 3) has a length less than or equal to 3. -/
lemma repr_length (n e : Nat) : 0 < e → n < 10 ^ e → (Nat.repr n).length <= e


theorem orderedInsert_length : ∀ (L : List α) (a : α), (L.orderedInsert r a).length = L.length + 1

{α : Type u}
(r : α → α → Prop)
[DecidableRel r]
(L : List α)
(a : α)

(List.orderedInsert r a L).length = L.length + 1


@[simp]
theorem toMulBot_symm_bot : toMulBot.symm (Multiplicative.ofAdd (⊥ : WithBot α)) = 0

WithZero.toMulBot.symm (Multiplicative.ofAdd ⊥) = 0


@[measurability]
theorem Measurable.subtype_coe {p : β → Prop} {f : α → Subtype p} (hf : Measurable f) :
    Measurable fun a : α => (f a : β)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{p : β → Prop}
{f : α → Subtype p}
(hf : Measurable f)


theorem toLp_eq_toLp (f : α →ₛ E) (hf : Memℒp f p μ) : (toLp f hf : Lp E p μ) = hf.toLp f

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
(f : MeasureTheory.SimpleFunc α E)
(hf : MeasureTheory.Memℒp (↑f) p μ)

↑(MeasureTheory.Lp.simpleFunc.toLp f hf) = MeasureTheory.Memℒp.toLp (↑f) hf


@[simp]
theorem Cofork.π_ofπ {P : C} (π : Y ⟶ P) (w : f ≫ π = g ≫ π) : (Cofork.ofπ π w).π = π

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

(CategoryTheory.Limits.Cofork.ofπ π w).π = π


@[simp]
theorem stereographic_source (hv : ‖v‖ = 1) : (stereographic hv).source = {⟨v, by simp [hv]⟩}ᶜ

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


theorem tensor_dite {P : Prop} [Decidable P] {W X Y Z : C} (f : W ⟶ X) (g : P → (Y ⟶ Z))
    (g' : ¬P → (Y ⟶ Z)) : (f ⊗ if h : P then g h else g' h) =
    if h : P then f ⊗ g h else f ⊗ g' h

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{P : Prop}
[Decidable P]
{W X Y Z : C}
(f : W ⟶ X)
(g : P → (Y ⟶ Z))
(g' : ¬P → (Y ⟶ Z))

CategoryTheory.MonoidalCategory.tensorHom f (if h : P then g h else g' h) =
  if h : P then CategoryTheory.MonoidalCategory.tensorHom f (g h)
  else CategoryTheory.MonoidalCategory.tensorHom f (g' h)


@[simp]
theorem col_smul [SMul R α] (x : R) (v : m → α) : col ι (x • v) = x • col ι v

{m : Type u_2}
{R : Type u_5}
{α : Type v}
{ι : Type u_6}
[SMul R α]
(x : R)
(v : m → α)

Matrix.col ι (x • v) = x • Matrix.col ι v


@[to_additive (attr := simp)]
theorem curry_mul [∀ a b, Mul (γ a b)] (x y : (i : Σ a, β a) → γ i.1 i.2) :
    Sigma.curry (x * y) = Sigma.curry x * Sigma.curry y

(x y : (i : (a : α) × β a) → γ i.fst i.snd)

Sigma.curry (x + y) = Sigma.curry x + Sigma.curry y


protected theorem neg (h : LiouvilleWith p x) : LiouvilleWith p (-x)


@[simp]
theorem realize_func (v : α → M) {n} (f : L.Functions n) (ts) :
    realize v (func f ts : L.Term α) = funMap f fun i => (ts i).realize v

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
(v : α → M)
{n : ℕ}
(f : L.Functions n)
(ts : Fin n → L.Term α)

FirstOrder.Language.Term.realize v (FirstOrder.Language.func f ts) =
  FirstOrder.Language.Structure.funMap f fun i => FirstOrder.Language.Term.realize v (ts i)


/-- If `E` is an `F`-algebra, and there exists an injective `F`-linear map from `F` to `E`,
then the algebra map from `F` to `E` is also injective. -/
theorem injective_algebraMap_of_linearMap (hb : Function.Injective b) :
    Function.Injective (algebraMap F E)

{F : Type u_1}
{E : Type u_2}
[CommSemiring F]
[Semiring E]
[Algebra F E]
(b : F →ₗ[F] E)
(hb : Function.Injective ⇑b)


theorem eq_toGHSpace_iff {X : Type u} [MetricSpace X] [CompactSpace X] [Nonempty X]
    {p : NonemptyCompacts ℓ_infty_ℝ} :
    ⟦p⟧ = toGHSpace X ↔ ∃ Ψ : X → ℓ_infty_ℝ, Isometry Ψ ∧ range Ψ = p

{p : TopologicalSpace.NonemptyCompacts ↥(lp (fun n => ℝ) ⊤)}

⟦p⟧ = GromovHausdorff.toGHSpace X ↔ ∃ Ψ, Isometry Ψ ∧ Set.range Ψ = ↑p


/-- Equivalence between `Fin n → Fin m` and `Fin (m ^ n)`. -/
@[simps!]
def finFunctionFinEquiv {m n : ℕ} : (Fin n → Fin m) ≃ Fin (m ^ n)

↑(finFunctionFinEquiv.symm a b) = ↑a / m ^ ↑b % m


/-- If distinct points `p₂` and `p₃` lie in `s` but `p₁` does not, the three points are affinely
independent. -/
theorem affineIndependent_of_ne_of_not_mem_of_mem_of_mem {s : AffineSubspace k P} {p₁ p₂ p₃ : P}
    (hp₂p₃ : p₂ ≠ p₃) (hp₁ : p₁ ∉ s) (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) :
    AffineIndependent k ![p₁, p₂, p₃]

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : AffineSubspace k P}
{p₁ p₂ p₃ : P}
(hp₂p₃ : p₂ ≠ p₃)
(hp₁ : p₁ ∉ s)
(hp₂ : p₂ ∈ s)
(hp₃ : p₃ ∈ s)


/-- `functoriality F _ ⋙ postcompose (whisker_left F _)` simplifies to `functoriality F _`. -/
@[simps!]
def functorialityCompPostcompose {H H' : C ⥤ D} (α : H ≅ H') :
    Cones.functoriality F H ⋙ Cones.postcompose (whiskerLeft F α.hom) ≅ Cones.functoriality F H'

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
{F : J ⥤ C}
{H H' : C ⥤ D}
(α : H ≅ H')
(X : CategoryTheory.Limits.Cone F)

((CategoryTheory.Functor.functorialityCompPostcompose α).inv.app X).hom = α.inv.app X.pt


@[simp]
theorem tendsto_iSup {f : α → β} {x : ι → Filter α} {y : Filter β} :
    Tendsto f (⨆ i, x i) y ↔ ∀ i, Tendsto f (x i) y

{α : Type u}
{β : Type v}
{ι : Sort x}
{f : α → β}
{x : ι → Filter α}
{y : Filter β}

Filter.Tendsto f (⨆ i, x i) y ↔ ∀ (i : ι), Filter.Tendsto f (x i) y


theorem op (h : IsPullback fst snd f g) : IsPushout g.op f.op snd.op fst.op

(h : CategoryTheory.IsPullback fst snd f g)

CategoryTheory.IsPushout g.op f.op snd.op fst.op


/-- If a linear endomorphism of a (finite, free) module `M` takes values in a submodule `p ⊆ M`,
then the trace of its restriction to `p` is equal to its trace on `M`. -/
lemma trace_restrict_eq_of_forall_mem [IsDomain R] [IsPrincipalIdealRing R]
    (p : Submodule R M) (f : M →ₗ[R] M)
    (hf : ∀ x, f x ∈ p) (hf' : ∀ x ∈ p, f x ∈ p := fun x _ ↦ hf x) :
    trace R p (f.restrict hf') = trace R M f

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
[Module.Finite R M]
[Module.Free R M]
[IsDomain R]
[IsPrincipalIdealRing R]
(p : Submodule R M)
(f : M →ₗ[R] M)
(hf : ∀ (x : M), f x ∈ p)
(hf' : ∀ x ∈ p, f x ∈ p := ⋯)

(LinearMap.trace R ↥p) (f.restrict hf') = (LinearMap.trace R M) f


theorem productive_iff (s : WSeq α) : Productive s ↔ ∀ n, (get? s n).Terminates

s.Productive ↔ ∀ (n : ℕ), (s.get? n).Terminates


lemma _root_.Finset.eventuallyEq_iInter {ι : Type*} (s : Finset ι) {f g : ι → Set α}
    (heq : ∀ i ∈ s, f i =ᶠ[l] g i) : (⋂ i ∈ s, f i) =ᶠ[l] (⋂ i ∈ s, g i)

{α : Type u}
{l : Filter α}
{ι : Type u_2}
(s : Finset ι)
{f g : ι → Set α}
(heq : ∀ i ∈ s, f i =ᶠ[l] g i)


lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :
    IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y

(h24 : Surreal.Multiplication.IH24 x₁ x₂ y)

(h4 : Surreal.Multiplication.IH4 x₁ x₂ y)

(hl : Surreal.Multiplication.MulOptionsLTMul x₂ y)

Surreal.Multiplication.IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y


theorem mk_multiset_of_infinite (α : Type u) [Infinite α] : #(Multiset α) = #α


/-- The “projection formula” for Frobenius and Verschiebung. -/
theorem verschiebung_mul_frobenius (x y : 𝕎 R) :
    verschiebung (x * frobenius y) = verschiebung x * y

{p : ℕ}
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
[CommRing R]
(x y : WittVector p R)

WittVector.verschiebung (x * WittVector.frobenius y) = WittVector.verschiebung x * y


@[to_additive]
theorem set_smul_subset_iff : a • A ⊆ B ↔ A ⊆ a⁻¹ • B

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[AddAction α β]
{A B : Set β}
{a : α}


@[simp]
theorem ndinsert_of_mem {a : α} {s : Multiset α} : a ∈ s → ndinsert a s = s

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


theorem mem_cyclicPermutations_self (l : List α) : l ∈ cyclicPermutations l


theorem mk_coordChangeL (e e' : Trivialization F (π F E)) [e.IsLinear R] [e'.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet ∩ e'.baseSet) (y : F) :
    (b, coordChangeL R e e' b y) = e' ⟨b, e.symm b y⟩

[TopologicalSpace (Bundle.TotalSpace F E)]

(e e' : Trivialization F Bundle.TotalSpace.proj)

(b, (Trivialization.coordChangeL R e e' b) y) = ↑e' { proj := b, snd := e.symm b y }


@[to_additive (attr := simp)]
theorem div_lt_div_iff_right (c : α) : a / c < b / c ↔ a < b

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


/-- Convert a `Bicone` over a function on `WalkingPair` to a BinaryBicone. -/
@[simps]
def toBinaryBiconeFunctor {X Y : C} : Bicone (pairFunction X Y) ⥤ BinaryBicone X Y

(b : CategoryTheory.Limits.Bicone (CategoryTheory.Limits.pairFunction X Y))

(CategoryTheory.Limits.Bicone.toBinaryBiconeFunctor.obj b).inl = b.ι CategoryTheory.Limits.WalkingPair.left


@[to_additive eq_sub_iff_add_eq']
theorem eq_div_iff_mul_eq'' : a = b / c ↔ c * a = b

{G : Type u_3}
[AddCommGroup G]
{a b c : G}


protected theorem Nodup.filterMap (f : α → Option β) (H : ∀ a a' b, b ∈ f a → b ∈ f a' → a = a') :
    Nodup s → Nodup (filterMap f s)

(H : ∀ (a a' : α), ∀ b ∈ f a, b ∈ f a' → a = a')

s.Nodup → (Multiset.filterMap f s).Nodup


lemma Monovary.pow_left₀ (hf : 0 ≤ f) (hfg : Monovary f g) (n : ℕ) : Monovary (f ^ n) g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedSemiring α]
[OrderedSemiring β]
{f : ι → α}
{g : ι → β}
(hf : 0 ≤ f)
(hfg : Monovary f g)
(n : ℕ)


@[refl]
protected theorem refl (A : Set E) : IsExposed 𝕜 A A

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace 𝕜]
[OrderedRing 𝕜]
[AddCommMonoid E]
[TopologicalSpace E]
[Module 𝕜 E]
(A : Set E)


@[simp]
theorem prodProdProdComm_symm : (prodProdProdComm M N M' N').symm = prodProdProdComm M M' N N'

(M : Type u_5)
(N : Type u_6)
[MulOneClass M]
[MulOneClass N]
(M' : Type u_8)
(N' : Type u_9)
[MulOneClass M']
[MulOneClass N']

(MulEquiv.prodProdProdComm M N M' N').symm = MulEquiv.prodProdProdComm M M' N N'


@[simp] protected theorem pred_zero : pred 0 = 0


theorem Functor.ext {F} :
    ∀ {F1 : Functor F} {F2 : Functor F} [@LawfulFunctor F F1] [@LawfulFunctor F F2],
    (∀ (α β) (f : α → β) (x : F α), @Functor.map _ F1 _ _ f x = @Functor.map _ F2 _ _ f x) →
    F1 = F2

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


@[csimp] theorem take_eq_takeTR : @take = @takeTR


{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{z : ℤ}
{a : α}


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


lemma _root_.isCompl_comm : IsCompl x y ↔ IsCompl y x

{α : Type u_1}
[PartialOrder α]
[BoundedOrder α]
{x y : α}


theorem choose_pos : ∀ {n k}, k ≤ n → 0 < choose n k


theorem cons_injective_of_injective {α} {x₀ : α} {x : Fin n → α} (hx₀ : x₀ ∉ Set.range x)
    (hx : Function.Injective x) : Function.Injective (cons x₀ x : Fin n.succ → α)

{n : ℕ}
{α : Type u_1}
{x₀ : α}
{x : Fin n → α}
(hx₀ : x₀ ∉ Set.range x)
(hx : Function.Injective x)


theorem exists_lt_card_finite_nth_eq (hf : (setOf p).Finite) {x} (h : p x) :
    ∃ n, n < hf.toFinset.card ∧ nth p n = x

{p : ℕ → Prop}
(hf : (setOf p).Finite)
{x : ℕ}
(h : p x)


theorem map_inf' {f g : Filter α} {m : α → β} {t : Set α} (htf : t ∈ f) (htg : t ∈ g)
    (h : InjOn m t) : map m (f ⊓ g) = map m f ⊓ map m g

{α : Type u}
{β : Type v}
{f g : Filter α}
{m : α → β}
{t : Set α}
(htf : t ∈ f)
(htg : t ∈ g)
(h : Set.InjOn m t)

Filter.map m (f ⊓ g) = Filter.map m f ⊓ Filter.map m g


theorem and_pow_two_identity {x : Nat} (lt : x < 2^n) : x &&& 2^n-1 = x


nonrec theorem tsum_mul_left (a : ℝ≥0) (f : α → ℝ≥0) : ∑' x, a * f x = a * ∑' x, f x

{α : Type u_1}
(a : NNReal)
(f : α → NNReal)


nonrec theorem exp_units_conj (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
    exp 𝕂 (U.val * A * (U⁻¹).val) = U.val * exp 𝕂 A * (U⁻¹).val

(𝕂 : Type u_1)
{m : Type u_2}
{𝔸 : Type u_6}
[RCLike 𝕂]
[Fintype m]
[DecidableEq m]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(U : (Matrix m m 𝔸)ˣ)
(A : Matrix m m 𝔸)

NormedSpace.exp 𝕂 (↑U * A * ↑U⁻¹) = ↑U * NormedSpace.exp 𝕂 A * ↑U⁻¹


theorem And.imp (f : a → c) (g : b → d) (h : a ∧ b) : c ∧ d

{a c b d : Prop}
(f : a → c)
(g : b → d)
(h : a ∧ b)


lemma homMk'_id (f : CostructuredArrow S T) : homMk' f (𝟙 f.left) = eqToHom (by aesop_cat)

(f : CategoryTheory.CostructuredArrow S T)

f.homMk' (CategoryTheory.CategoryStruct.id f.left) = CategoryTheory.eqToHom ⋯


/-- A set `s` is compact if and only if
for every family of closed sets whose intersection avoids `s`,
there exists a finite subfamily whose intersection avoids `s`. -/
theorem isCompact_iff_finite_subfamily_closed :
    IsCompact s ↔ ∀ {ι : Type u} (t : ι → Set X),
      (∀ i, IsClosed (t i)) → (s ∩ ⋂ i, t i) = ∅ → ∃ u : Finset ι, (s ∩ ⋂ i ∈ u, t i) = ∅

{X : Type u}
[TopologicalSpace X]
{s : Set X}

IsCompact s ↔ ∀ {ι : Type u} (t : ι → Set X), (∀ (i : ι), IsClosed (t i)) → s ∩ ⋂ i, t i = ∅ → ∃ u, s ∩ ⋂ i ∈ u, t i = ∅


/-- If `M` and `N` are linearly disjoint, if `N` is flat, then any two commutative
elements of `↥(M ⊓ N)` are not `R`-linearly independent (namely, their span is not `R ^ 2`). -/
theorem not_linearIndependent_pair_of_commute_of_flat_right [Module.Flat R N]
    (a b : ↥(M ⊓ N)) (hc : Commute a.1 b.1) : ¬LinearIndependent R ![a, b]

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
[Algebra R S]
{M N : Submodule R S}
(H : M.LinearDisjoint N)
[Nontrivial R]
[Module.Flat R ↥N]
(a b : ↥(M ⊓ N))
(hc : Commute ↑a ↑b)


@[simp]
theorem prod_range_succ_factorial : ∀ n : ℕ, ∏ x ∈ range (n + 1), x ! = sf n

∏ x ∈ Finset.range (n + 1), x.factorial = n.superFactorial


theorem isOpen_B {K : Set (E →L[𝕜] F)} {r s ε : ℝ} : IsOpen (B f K r s ε)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{K : Set (E →L[𝕜] F)}
{r s ε : ℝ}

IsOpen (FDerivMeasurableAux.B f K r s ε)


theorem Compares.le_total [Preorder α] {a b : α} : ∀ {o}, Compares o a b → a ≤ b ∨ b ≤ a

{α : Type u_1}
[Preorder α]
{a b : α}
{o : Ordering}


theorem _root_.OrderIso.apply_blimsup [CompleteLattice γ] (e : α ≃o γ) :
    e (blimsup u f p) = blimsup (e ∘ u) f p

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CompleteLattice α]
{f : Filter β}
{p : β → Prop}
{u : β → α}
[CompleteLattice γ]
(e : α ≃o γ)

e (Filter.blimsup u f p) = Filter.blimsup (⇑e ∘ u) f p


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


theorem biSup_sup {p : ι → Prop} {f : ∀ i, p i → α} {a : α} (h : ∃ i, p i) :
    (⨆ (i) (h : p i), f i h) ⊔ a = ⨆ (i) (h : p i), f i h ⊔ a

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
{p : ι → Prop}
{f : (i : ι) → p i → α}
{a : α}
(h : ∃ i, p i)

(⨆ i, ⨆ (h : p i), f i h) ⊔ a = ⨆ i, ⨆ (h : p i), f i h ⊔ a


@[to_additive]
protected theorem finset_prod' {γ} [CommMonoid β] [ContinuousMul β] {U : γ → ι → Ω → β}
    {s : Finset γ} (h : ∀ c ∈ s, ProgMeasurable f (U c)) : ProgMeasurable f (∏ c ∈ s, U c)

{U : γ → ι → Ω → β}

(h : ∀ c ∈ s, MeasureTheory.ProgMeasurable f (U c))

MeasureTheory.ProgMeasurable f (∏ c ∈ s, U c)


/-- Continuity of interval integral with respect to a parameter, at a point within a set.
  Given `F : X → ℝ → E`, assume `F x` is ae-measurable on `[a, b]` for `x` in a
  neighborhood of `x₀` within `s` and at `x₀`, and assume it is bounded by a function integrable
  on `[a, b]` independent of `x` in a neighborhood of `x₀` within `s`. If `(fun x ↦ F x t)`
  is continuous at `x₀` within `s` for almost every `t` in `[a, b]`
  then the same holds for `(fun x ↦ ∫ t in a..b, F x t ∂μ) s x₀`. -/
theorem continuousWithinAt_of_dominated_interval {F : X → ℝ → E} {x₀ : X} {bound : ℝ → ℝ} {a b : ℝ}
    {s : Set X} (hF_meas : ∀ᶠ x in 𝓝[s] x₀, AEStronglyMeasurable (F x) (μ.restrict <| Ι a b))
    (h_bound : ∀ᶠ x in 𝓝[s] x₀, ∀ᵐ t ∂μ, t ∈ Ι a b → ‖F x t‖ ≤ bound t)
    (bound_integrable : IntervalIntegrable bound μ a b)
    (h_cont : ∀ᵐ t ∂μ, t ∈ Ι a b → ContinuousWithinAt (fun x => F x t) s x₀) :
    ContinuousWithinAt (fun x => ∫ t in a..b, F x t ∂μ) s x₀

(hF_meas : ∀ᶠ (x : X) in nhdsWithin x₀ s, MeasureTheory.AEStronglyMeasurable (F x) (μ.restrict (Ι a b)))

(h_bound : ∀ᶠ (x : X) in nhdsWithin x₀ s, ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ‖F x t‖ ≤ bound t)

(h_cont : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ContinuousWithinAt (fun x => F x t) s x₀)

ContinuousWithinAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) s x₀


theorem liftpPreservation_iff_uniform : q.LiftpPreservation ↔ q.IsUniform


@[norm_cast]
theorem rootsOfUnity.coe_pow [CommMonoid R] (ζ : rootsOfUnity k R) (m : ℕ) :
    (((ζ ^ m :) : Rˣ) : R) = ((ζ : Rˣ) : R) ^ m

{R : Type u_4}
{k : ℕ+}
[CommMonoid R]
(ζ : ↥(rootsOfUnity k R))
(m : ℕ)


theorem right_unique_forall₂' (hr : RightUnique R) :
    ∀ {a b c}, Forall₂ R a b → Forall₂ R a c → b = c

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
(hr : Relator.RightUnique R)
{a : List α}
{b c : List β}

List.Forall₂ R a b → List.Forall₂ R a c → b = c


theorem two_lt_card_iff : 2 < s.card ↔ ∃ a b c, a ∈ s ∧ b ∈ s ∧ c ∈ s ∧ a ≠ b ∧ a ≠ c ∧ b ≠ c


@[simp] theorem pred_le_pred_iff {n : Nat} {a b : Fin n.succ} {ha : a ≠ 0} {hb : b ≠ 0} :
    a.pred ha ≤ b.pred hb ↔ a ≤ b


theorem ae_withDensity_iff {p : α → Prop} {f : α → ℝ≥0∞} (hf : Measurable f) :
    (∀ᵐ x ∂μ.withDensity f, p x) ↔ ∀ᵐ x ∂μ, f x ≠ 0 → p x

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p : α → Prop}
{f : α → ℝ≥0∞}
(hf : Measurable f)

(∀ᵐ (x : α) ∂μ.withDensity f, p x) ↔ ∀ᵐ (x : α) ∂μ, f x ≠ 0 → p x


lemma isSheaf_of_isLimit : Presheaf.IsSheaf J (c.pt.presheaf)

{J : CategoryTheory.GrothendieckTopology C}

[∀ (X : Cᵒᵖ),
    Small.{v, max u₂ v}
      ↑((F ⋙ PresheafOfModules.evaluation R X) ⋙ CategoryTheory.forget (ModuleCat ↑(R.obj X))).sections]

(hF : ∀ (j : D), CategoryTheory.Presheaf.IsSheaf J (F.obj j).presheaf)


theorem disjoint_image_of_injective (hf : Injective f) {s t : Set α} (hd : Disjoint s t) :
    Disjoint (f '' s) (f '' t)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
{s t : Set α}
(hd : Disjoint s t)


@[simp]
theorem preimage_surjective : Surjective (preimage f) ↔ Injective f

Function.Surjective (Set.preimage f) ↔ Function.Injective f


/-- Pushforward a `LeftDistribClass` instance along a surjective function. -/
theorem leftDistribClass [Mul α] [Add α] [LeftDistribClass α] (add : ∀ x y, f (x + y) = f x + f y)
    (mul : ∀ x y, f (x * y) = f x * f y) : LeftDistribClass β

(add : ∀ (x y : α), f (x + y) = f x + f y)

(mul : ∀ (x y : α), f (x * y) = f x * f y)


theorem antitone_nat_of_succ_le {f : ℕ → α} (hf : ∀ n, f (n + 1) ≤ f n) : Antitone f

{α : Type u}
[Preorder α]
{f : ℕ → α}
(hf : ∀ (n : ℕ), f (n + 1) ≤ f n)


theorem sub_right (x y z : M₁) : B₁ x (y - z) = B₁ x y - B₁ x z

{R₁ : Type u_4}
{M₁ : Type u_5}
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
{B₁ : LinearMap.BilinForm R₁ M₁}
(x y z : M₁)


/-- The center of mass of a finite subset of a convex set belongs to the set
provided that all weights are non-negative, and the total weight is positive. -/
theorem Convex.centerMass_mem (hs : Convex R s) :
    (∀ i ∈ t, 0 ≤ w i) → (0 < ∑ i ∈ t, w i) → (∀ i ∈ t, z i ∈ s) → t.centerMass w z ∈ s

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
{s : Set E}
{t : Finset ι}
{w : ι → R}
{z : ι → E}
(hs : Convex R s)

(∀ i ∈ t, 0 ≤ w i) → 0 < ∑ i ∈ t, w i → (∀ i ∈ t, z i ∈ s) → t.centerMass w z ∈ s


theorem map_map₂ (f : α → β → γ) (g : γ → δ) :
    (map₂ f a b).map g = map₂ (fun a b => g (f a b)) a b

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{a : Option α}
{b : Option β}
(f : α → β → γ)
(g : γ → δ)

Option.map g (Option.map₂ f a b) = Option.map₂ (fun a b => g (f a b)) a b


@[simp] lemma infClosure_eq_self : infClosure s = s ↔ InfClosed s

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


lemma Indep_iff_IndepSets (m₁ m₂ : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω} (μ : Measure Ω) :
    Indep m₁ m₂ μ ↔ IndepSets {s | MeasurableSet[m₁] s} {s | MeasurableSet[m₂] s} μ

{Ω : Type u_1}
(m₁ m₂ : MeasurableSpace Ω)
{_mΩ : MeasurableSpace Ω}
(μ : MeasureTheory.Measure Ω)

ProbabilityTheory.Indep m₁ m₂ μ ↔ ProbabilityTheory.IndepSets {s | MeasurableSet s} {s | MeasurableSet s} μ


lemma IsMeasurableRatCDF.tendsto_stieltjesFunction_atBot (a : α) :
    Tendsto (hf.stieltjesFunction a) atBot (𝓝 0)

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)

Filter.Tendsto (↑(hf.stieltjesFunction a)) Filter.atBot (𝓝 0)


/-- Embedding a positive `Fin n` results in a positive `Fin (n + 1)` -/
lemma succAbove_pos [NeZero n] (p : Fin (n + 1)) (i : Fin n) (h : 0 < i) : 0 < p.succAbove i

{n : ℕ}
[NeZero n]
(p : Fin (n + 1))
(i : Fin n)
(h : 0 < i)


theorem himp_le_himp_left (h : a ≤ b) : c ⇨ a ≤ c ⇨ b

{α : Type u_2}
[GeneralizedHeytingAlgebra α]
{a b c : α}
(h : a ≤ b)


theorem mk'_mul_mk' {M M' : Type*} [Semiring M] [Semiring M'] [Algebra R M] [Algebra R M']
    (f : M →ₐ[R] M') [IsLocalizedModule S f.toLinearMap] (m₁ m₂ : M) (s₁ s₂ : S) :
    mk' f.toLinearMap m₁ s₁ * mk' f.toLinearMap m₂ s₂ = mk' f.toLinearMap (m₁ * m₂) (s₁ * s₂)

{R : Type u_1}
[CommSemiring R]
{S : Submonoid R}
{M : Type u_6}
{M' : Type u_7}
[Semiring M]
[Semiring M']
[Algebra R M]
[Algebra R M']
(f : M →ₐ[R] M')
[IsLocalizedModule S f.toLinearMap]
(m₁ m₂ : M)
(s₁ s₂ : ↥S)

IsLocalizedModule.mk' f.toLinearMap m₁ s₁ * IsLocalizedModule.mk' f.toLinearMap m₂ s₂ =
  IsLocalizedModule.mk' f.toLinearMap (m₁ * m₂) (s₁ * s₂)


lemma apply_coe_mem_map (f : LatticeHom α β) (a : L) : f a ∈ L.map f

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
{L : Sublattice α}
(f : LatticeHom α β)
(a : ↥L)


/-- Formula for `hurwitzZetaOdd` as a Dirichlet series in the convergence range, with sum over `ℕ`
(version with absolute values) -/
lemma hasSum_nat_hurwitzZetaOdd (a : ℝ) {s : ℂ} (hs : 1 < re s) :
    HasSum (fun n : ℕ ↦ (SignType.sign (n + a) / (↑|n + a| : ℂ) ^ s
      - SignType.sign (n + 1 - a) / (↑|n + 1 - a| : ℂ) ^ s) / 2) (hurwitzZetaOdd a s)

HasSum (fun n => (↑(SignType.sign (↑n + a)) / ↑|↑n + a| ^ s - ↑(SignType.sign (↑n + 1 - a)) / ↑|↑n + 1 - a| ^ s) / 2)
  (HurwitzZeta.hurwitzZetaOdd (↑a) s)


theorem nhdsWithin_Iio_neBot' {b c : α} (H₁ : (Iio c).Nonempty) (H₂ : b ≤ c) :
    NeBot (𝓝[Iio c] b)

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


/-- The measure of a segment is the distance between its endpoints. -/
@[simp]
theorem hausdorffMeasure_affineSegment (x y : P) : μH[1] (affineSegment ℝ x y) = edist x y

{E : Type u_5}
{P : Type u_6}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace P]
[MetricSpace P]
[NormedAddTorsor E P]
[BorelSpace P]
(x y : P)


@[simp]
theorem Matrix.toLinAlgEquiv'_apply (M : Matrix n n R) (v : n → R) :
    Matrix.toLinAlgEquiv' M v = M *ᵥ v

{R : Type u_1}
[CommSemiring R]
{n : Type u_5}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)
(v : n → R)


@[reassoc (attr := simp)]
lemma tensorHom_snd {X₁ X₂ Y₁ Y₂ : C} (f : X₁ ⟶ X₂) (g : Y₁ ⟶ Y₂) :
    (f ⊗ g) ≫ snd _ _ = snd _ _ ≫ g

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom f g)
    (CategoryTheory.ChosenFiniteProducts.snd X₂ Y₂) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ChosenFiniteProducts.snd X₁ Y₁) g


/-- Let `p` be a predicate on `Box ι`, let `I` be a box. Suppose that the following two properties
hold true.

* Consider a smaller box `J ≤ I`. The hyperplanes passing through the center of `J` split it into
  `2 ^ n` boxes. If `p` holds true on each of these boxes, then it true on `J`.
* For each `z` in the closed box `I.Icc` there exists a neighborhood `U` of `z` within `I.Icc` such
  that for every box `J ≤ I` such that `z ∈ J.Icc ⊆ U`, if `J` is homothetic to `I` with a
  coefficient of the form `1 / 2 ^ m`, then `p` is true on `J`.

Then `p I` is true. See also `BoxIntegral.Box.subbox_induction_on'` for a version using
`BoxIntegral.Box.splitCenterBox` instead of `BoxIntegral.Prepartition.splitCenter`. -/
@[elab_as_elim]
theorem subbox_induction_on {p : Box ι → Prop} (I : Box ι)
    (H_ind : ∀ J ≤ I, (∀ J' ∈ splitCenter J, p J') → p J)
    (H_nhds : ∀ z ∈ Box.Icc I, ∃ U ∈ 𝓝[Box.Icc I] z, ∀ J ≤ I, ∀ (m : ℕ),
      z ∈ Box.Icc J → Box.Icc J ⊆ U →
        (∀ i, J.upper i - J.lower i = (I.upper i - I.lower i) / 2 ^ m) → p J) :
    p I

(H_ind : ∀ J ≤ I, (∀ J' ∈ BoxIntegral.Prepartition.splitCenter J, p J') → p J)

(H_nhds :
  ∀ z ∈ BoxIntegral.Box.Icc I,
    ∃ U ∈ nhdsWithin z (BoxIntegral.Box.Icc I),
      ∀ J ≤ I,
        ∀ (m : ℕ),
          z ∈ BoxIntegral.Box.Icc J →
            BoxIntegral.Box.Icc J ⊆ U → (∀ (i : ι), J.upper i - J.lower i = (I.upper i - I.lower i) / 2 ^ m) → p J)


/-- Rearrangement of `Polynomial.sum_range_pow_eq_bernoulli_sub`. -/
theorem bernoulli_succ_eval (n p : ℕ) : (bernoulli p.succ).eval (n : ℚ) =
    _root_.bernoulli p.succ + (p + 1 : ℚ) * ∑ k ∈ range n, (k : ℚ) ^ p

Polynomial.eval (↑n) (Polynomial.bernoulli p.succ) = bernoulli p.succ + (↑p + 1) * ∑ k ∈ Finset.range n, ↑k ^ p


/-- A specialization of `spectrum.map_polynomial_aeval_of_nonempty` to monic monomials for
convenience. -/
theorem map_pow_of_pos [IsAlgClosed 𝕜] (a : A) {n : ℕ} (hn : 0 < n) :
    σ (a ^ n) = (· ^ n) '' σ a

{𝕜 : Type u}
{A : Type v}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
[IsAlgClosed 𝕜]
(a : A)
{n : ℕ}
(hn : 0 < n)

spectrum 𝕜 (a ^ n) = (fun x => x ^ n) '' spectrum 𝕜 a


/-- If two real probability distributions have the same cdf, they are equal. -/
lemma MeasureTheory.Measure.eq_of_cdf (μ ν : Measure ℝ) [IsProbabilityMeasure μ]
    [IsProbabilityMeasure ν] (h : cdf μ = cdf ν) : μ = ν

(h : ProbabilityTheory.cdf μ = ProbabilityTheory.cdf ν)


lemma inv_apply' (ψ : AddChar A M) (x : A) : ψ⁻¹ x = (ψ x)⁻¹

{A : Type u_1}
{M : Type u_2}
[AddCommGroup A]
[DivisionCommMonoid M]
(ψ : AddChar A M)
(x : A)

ψ⁻¹ x = (ψ x)⁻¹


theorem T_eq_X_mul_T_sub_pol_U (n : ℤ) : T R (n + 2) = X * T R (n + 1) - (1 - X ^ 2) * U R n

Polynomial.Chebyshev.T R (n + 2) =
  Polynomial.X * Polynomial.Chebyshev.T R (n + 1) - (1 - Polynomial.X ^ 2) * Polynomial.Chebyshev.U R n


lemma succ_le_succ_sqrt (n : ℕ) : n + 1 ≤ (sqrt n + 1) * (sqrt n + 1)


@[simp]
theorem isMin_toDual_iff : IsMin (toDual a) ↔ IsMax a


theorem ne_false_iff : {b : Bool} → b ≠ false ↔ b = true


protected theorem image {q : ℚ_[p]} : q ≠ 0 → ∃ n : ℤ, ‖q‖ = ↑((p : ℚ) ^ (-n))

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{q : ℚ_[p]}


lemma predicateShift_GE (a n n' : ℤ) (hn' : a + n = n') :
    (PredicateShift (t.GE n) a) = t.GE n'

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

(t : CategoryTheory.Triangulated.TStructure C)

CategoryTheory.PredicateShift (t.GE n) a = t.GE n'


/-- Equivalence between dependent functions with finite support `s : Finset ι` and functions
`∀ i, {x : β i // x ≠ 0}`. -/
@[simps]
def subtypeSupportEqEquiv (s : Finset ι) :
    {f : Π₀ i, β i // f.support = s} ≃ ∀ i : s, {x : β i // x ≠ 0}

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

∀ (x : { f // f.support = s }) (i : { x // x ∈ s }), ↑((DFinsupp.subtypeSupportEqEquiv s) x i) = ↑x ↑i


/-- Two equivalent partial equivs coincide on the source. -/
theorem EqOnSource.eqOn {e e' : PartialEquiv α β} (h : e ≈ e') : e.source.EqOn e e'

{α : Type u_1}
{β : Type u_2}
{e e' : PartialEquiv α β}
(h : e ≈ e')


@[to_additive]
theorem self_ne_mul_left : b ≠ a * b ↔ a ≠ 1

{M : Type u}
[AddRightCancelMonoid M]
{a b : M}


@[measurability]
theorem Measurable.exp : Measurable fun x => Real.exp (f x)

{α : Type u_1}
{m : MeasurableSpace α}
{f : α → ℝ}
(hf : Measurable f)


theorem inter_maximals_subset : s ∩ maximals r t ⊆ maximals r (s ∩ t)

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


@[measurability]
theorem measurableSet_lt' [SecondCountableTopology α] : MeasurableSet { p : α × α | p.1 < p.2 }

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[LinearOrder α]
[OrderClosedTopology α]
[SecondCountableTopology α]


@[simp]
theorem eventually_const {f : Filter α} [t : NeBot f] {p : Prop} : (∀ᶠ _ in f, p) ↔ p

{α : Type u}
{f : Filter α}
[t : f.NeBot]
{p : Prop}


theorem withDensityᵥ_rnDeriv_smul [HaveLebesgueDecomposition μ ν] (hμν : μ ≪ ν)
    [SigmaFinite μ] {f : α → E} (hf : Integrable f μ) :
    ν.withDensityᵥ (fun x ↦ (rnDeriv μ ν x).toReal • f x) = μ.withDensityᵥ f

{α : Type u_3}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[μ.HaveLebesgueDecomposition ν]
(hμν : μ ≪ ν)
[MeasureTheory.SigmaFinite μ]
{f : α → E}
(hf : MeasureTheory.Integrable f μ)

(ν.withDensityᵥ fun x => (μ.rnDeriv ν x).toReal • f x) = μ.withDensityᵥ f


protected theorem case_strong_induction_on {p : Nat → Prop} (a : Nat) (hz : p 0)
    (hi : ∀ n, (∀ m, m ≤ n → p m) → p (succ n)) : p a

(hi : ∀ (n : ℕ), (∀ (m : ℕ), m ≤ n → p m) → p n.succ)


@[simp] theorem getElem?_map (f : α → β) : ∀ (l : List α) (n : Nat), (map f l)[n]? = Option.map f l[n]?

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


lemma isomorphisms_eq_isOpenImmersion_inf_surjective :
    isomorphisms Scheme = (@IsOpenImmersion ⊓ @Surjective : MorphismProperty Scheme)

CategoryTheory.MorphismProperty.isomorphisms AlgebraicGeometry.Scheme =
  @AlgebraicGeometry.IsOpenImmersion ⊓ @AlgebraicGeometry.Surjective


/-- UV-compression reduces the size of the shadow of `𝒜` if, for all `x ∈ u` there is `y ∈ v` such
that `𝒜` is `(u.erase x, v.erase y)`-compressed. This is the key fact about compression for
Kruskal-Katona. -/
theorem shadow_compression_subset_compression_shadow (u v : Finset α)
    (huv : ∀ x ∈ u, ∃ y ∈ v, IsCompressed (u.erase x) (v.erase y) 𝒜) :
    ∂ (𝓒 u v 𝒜) ⊆ 𝓒 u v (∂ 𝒜)

(huv : ∀ x ∈ u, ∃ y ∈ v, UV.IsCompressed (u.erase x) (v.erase y) 𝒜)

(UV.compression u v 𝒜).shadow ⊆ UV.compression u v 𝒜.shadow


theorem Ioo_inter_Ioo : Ioo a₁ b₁ ∩ Ioo a₂ b₂ = Ioo (a₁ ⊔ a₂) (b₁ ⊓ b₂)

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

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


theorem Prime.not_dvd_prod {p : M} {L : List M} (pp : Prime p) (hL : ∀ a ∈ L, ¬p ∣ a) :
    ¬p ∣ L.prod

{M : Type u_1}
[CommMonoidWithZero M]
{p : M}
{L : List M}
(pp : Prime p)
(hL : ∀ a ∈ L, ¬p ∣ a)


theorem toReal_coe (θ : ℝ) : (θ : Angle).toReal = toIocMod two_pi_pos (-π) θ

(↑θ).toReal = toIocMod Real.two_pi_pos (-π) θ


@[reassoc]
theorem pushout.condition {X Y Z : C} {f : X ⟶ Y} {g : X ⟶ Z} [HasPushout f g] :
    f ≫ (pushout.inl f g) = g ≫ pushout.inr _ _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
{f : X ⟶ Y}
{g : X ⟶ Z}
[CategoryTheory.Limits.HasPushout f g]

f ≫ CategoryTheory.Limits.pushout.inl f g = g ≫ CategoryTheory.Limits.pushout.inr f g


/-- The element `0` is regular if and only if `R` is trivial. -/
theorem isRegular_iff_subsingleton : IsRegular (0 : R) ↔ Subsingleton R


/-- The additive map `Cochain K L n →+ Cochain (K⟦a⟧) (L⟦a⟧) n`. -/
@[simps!]
def shiftAddHom (n a : ℤ) : Cochain K L n →+ Cochain (K⟦a⟧) (L⟦a⟧) n

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

(CochainComplex.HomComplex.Cochain.shiftAddHom K L n a) γ = γ.shift a


@[simp]
theorem whiskerRight {X Y : C} (f : X ⟶ Y) (Z : C) : f ▷ Z = Limits.coprod.map f (𝟙 Z)

CategoryTheory.MonoidalCategory.whiskerRight f Z =
  CategoryTheory.Limits.coprod.map f (CategoryTheory.CategoryStruct.id Z)


/-- The adjoint of a linear isometric equivalence is its inverse. -/
theorem LinearIsometryEquiv.inner_map_eq_flip (f : E ≃ₗᵢ[𝕜] E') (x : E) (y : E') :
    ⟪f x, y⟫_𝕜 = ⟪x, f.symm y⟫_𝕜

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{E' : Type u_7}
[NormedAddCommGroup E']
[InnerProductSpace 𝕜 E']
(f : E ≃ₗᵢ[𝕜] E')
(x : E)
(y : E')


/-- If `forget C` reflects initials and `(forget C).obj X` is empty, then `X` is initial. -/
lemma initial_of_empty_of_reflects [ReflectsColimit (Functor.empty.{0} C) (forget C)] (X : C)
    (h : IsEmpty ((forget C).obj X)) : Nonempty (IsInitial X)

[CategoryTheory.Limits.ReflectsColimit (CategoryTheory.Functor.empty C) (CategoryTheory.forget C)]

(h : IsEmpty ((CategoryTheory.forget C).obj X))


theorem range_finite [CompactSpace X] {f : X → Y} (hf : IsLocallyConstant f) :
    (Set.range f).Finite

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[CompactSpace X]
{f : X → Y}
(hf : IsLocallyConstant f)


theorem Polynomial.toLaurentAlg_apply [CommSemiring R] (f : R[X]) : toLaurentAlg f = toLaurent f

{R : Type u_1}
[CommSemiring R]
(f : R[X])

Polynomial.toLaurentAlg f = Polynomial.toLaurent f


theorem ofMeasurableSpace_toMeasurableSpace
    (h_inter : ∀ s₁ s₂, d.Has s₁ → d.Has s₂ → d.Has (s₁ ∩ s₂)) :
    ofMeasurableSpace (d.toMeasurableSpace h_inter) = d

(h_inter : ∀ (s₁ s₂ : Set α), d.Has s₁ → d.Has s₂ → d.Has (s₁ ∩ s₂))

MeasurableSpace.DynkinSystem.ofMeasurableSpace (d.toMeasurableSpace h_inter) = d


@[refl]
theorem EventuallyLE.refl (l : Filter α) (f : α → β) : f ≤ᶠ[l] f

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


theorem Perm.product {l₁ l₂ : List α} {t₁ t₂ : List β} (p₁ : l₁ ~ l₂) (p₂ : t₁ ~ t₂) :
    product l₁ t₁ ~ product l₂ t₂

{α : Type u_1}
{β : Type u_2}
{l₁ l₂ : List α}
{t₁ t₂ : List β}
(p₁ : l₁.Perm l₂)
(p₂ : t₁.Perm t₂)


theorem lim_zero_bounded_linear_map (hf : IsBoundedLinearMap 𝕜 f) : Tendsto f (𝓝 0) (𝓝 0)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
(hf : IsBoundedLinearMap 𝕜 f)


theorem extend_symm_preimage_inter_range_eventuallyEq {s : Set M} {x : M} (hs : s ⊆ f.source)
    (hx : x ∈ f.source) :
    ((f.extend I).symm ⁻¹' s ∩ range I : Set _) =ᶠ[𝓝 (f.extend I x)] f.extend I '' s

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

↑(f.extend I).symm ⁻¹' s ∩ Set.range ↑I =ᶠ[𝓝 (↑(f.extend I) x)] ↑(f.extend I) '' s


theorem IsHermitian.eq {A : Matrix n n α} (h : A.IsHermitian) : Aᴴ = A

{α : Type u_1}
{n : Type u_4}
[Star α]
{A : Matrix n n α}
(h : A.IsHermitian)


@[simp] theorem beq_eq_false_iff_ne [BEq α] [LawfulBEq α]
    (a b : α) : (a == b) = false ↔ a ≠ b

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


{α : Type u_1}
[DecidableEq α]
{s : Finset α}
(P : Finpartition s)
(G : SimpleGraph α)
[DecidableRel G.Adj]


{α : Type u_1}
[CompleteSemilatticeSup α]
{s : Set α}
{a : α}


/-- Adding a point in the affine span of a set does not change whether that set is collinear. -/
theorem collinear_insert_iff_of_mem_affineSpan {s : Set P} {p : P} (h : p ∈ affineSpan k s) :
    Collinear k (insert p s) ↔ Collinear k s

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : Set P}
{p : P}
(h : p ∈ affineSpan k s)


@[to_additive (attr := simp)]
theorem measure_inv (μ : Measure G) [IsInvInvariant μ] (A : Set G) : μ A⁻¹ = μ A

{G : Type u_2}
[MeasurableSpace G]
[InvolutiveInv G]
[MeasurableInv G]
(μ : MeasureTheory.Measure G)
[μ.IsInvInvariant]
(A : Set G)


theorem det_eq_prod_roots_charpoly_of_splits (hAps : A.charpoly.Splits (RingHom.id R)) :
    A.det = (Matrix.charpoly A).roots.prod

(hAps : Polynomial.Splits (RingHom.id R) A.charpoly)


theorem restrict_trim (hm : m ≤ m0) (μ : Measure α) (hs : @MeasurableSet α m s) :
    @Measure.restrict α m (μ.trim hm) s = (μ.restrict s).trim hm

{α : Type u_1}
{m m0 : MeasurableSpace α}
{s : Set α}
(hm : m ≤ m0)
(μ : MeasureTheory.Measure α)
(hs : MeasurableSet s)

(μ.trim hm).restrict s = (μ.restrict s).trim hm


theorem dvd_choose_pow_iff (hp : Prime p) : p ∣ (p ^ n).choose k ↔ k ≠ 0 ∧ k ≠ p ^ n


lemma asympBound_def' {n : ℕ} :
    asympBound g a b n = n ^ p a b * (1 + (∑ u ∈ range n, g u / u ^ (p a b + 1)))

{α : Type u_1}
[Fintype α]
{g : ℝ → ℝ}
{a b : α → ℝ}
{n : ℕ}

AkraBazziRecurrence.asympBound g a b n =
  ↑n ^ AkraBazziRecurrence.p a b * (1 + ∑ u ∈ Finset.range n, g ↑u / ↑u ^ (AkraBazziRecurrence.p a b + 1))


@[simp] theorem truncate_not {x : BitVec w} (h : k ≤ w) :
    (~~~x).truncate k = ~~~(x.truncate k)

BitVec.truncate k (~~~x) = ~~~BitVec.truncate k x


/-- This is the key to making the proof proceed as a balanced tree of applications instead of
a linear sequence. It is just modus ponens after unwrapping the definitions. -/
theorem IsNatPowT.trans {p : Prop} {b' c' : ℕ} (h1 : IsNatPowT p a b c)
    (h2 : IsNatPowT (Nat.pow a b = c) a b' c') : IsNatPowT p a b' c'

(h1 : Mathlib.Meta.NormNum.IsNatPowT p a b c)

(h2 : Mathlib.Meta.NormNum.IsNatPowT (a.pow b = c) a b' c')

Mathlib.Meta.NormNum.IsNatPowT p a b' c'


theorem tendsto_atTop_of_add_const_right (C : β) (hf : Tendsto (fun x => f x + C) l atTop) :
    Tendsto f l atTop

(hf : Filter.Tendsto (fun x => f x + C) l Filter.atTop)


@[simp]
theorem iso_image_comp_eq_map_iff_eq_comp {C : G.ConnectedComponent} :
    G'.connectedComponentMk (φ v) = C.map ↑(↑φ : G ↪g G') ↔ G.connectedComponentMk v = C

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
{φ : G ≃g G'}
{v : V}
{C : G.ConnectedComponent}

G'.connectedComponentMk (φ v) = SimpleGraph.ConnectedComponent.map (RelIso.toRelEmbedding φ).toRelHom C ↔
  G.connectedComponentMk v = C


@[simp] theorem contains_nil [BEq α] : ([] : List α).contains a = false


@[to_additive]
theorem card_right_transversal (h : S ∈ rightTransversals (H : Set G)) : Nat.card S = H.index

(h : S ∈ AddSubgroup.rightTransversals ↑H)


@[simp] lemma mk_add_mk (x y : K) (hx hy) : (⟨x, hx⟩ : 𝓞 K) + ⟨y, hy⟩ = ⟨x + y, add_mem hx hy⟩

{K : Type u_1}
[Field K]
(x y : K)
(hx : x ∈ integralClosure ℤ K)
(hy : y ∈ integralClosure ℤ K)


@[simp]
theorem dist_partial_sum' (u : ℕ → α) (n : ℕ) :
    dist (∑ k ∈ range n, u k) (∑ k ∈ range (n + 1), u k) = ‖u n‖

{α : Type u_1}
[SeminormedAddCommGroup α]
(u : ℕ → α)
(n : ℕ)

dist (∑ k ∈ Finset.range n, u k) (∑ k ∈ Finset.range (n + 1), u k) = ‖u n‖


/-- `Equiv.piCongr` as a homeomorphism: this is the natural homeomorphism
`Π i₁, Y₁ i ≃ₜ Π i₂, Y₂ i₂` obtained from a bijection `ι₁ ≃ ι₂` and homeomorphisms
`Y₁ i₁ ≃ₜ Y₂ (e i₁)` for each `i₁ : ι₁`. -/
@[simps! apply toEquiv]
def piCongr {ι₁ ι₂ : Type*} {Y₁ : ι₁ → Type*} {Y₂ : ι₂ → Type*}
    [∀ i₁, TopologicalSpace (Y₁ i₁)] [∀ i₂, TopologicalSpace (Y₂ i₂)]
    (e : ι₁ ≃ ι₂) (F : ∀ i₁, Y₁ i₁ ≃ₜ Y₂ (e i₁)) : (∀ i₁, Y₁ i₁) ≃ₜ ∀ i₂, Y₂ i₂

{ι₁ : Type u_6}
{ι₂ : Type u_7}
{Y₁ : ι₁ → Type u_8}
{Y₂ : ι₂ → Type u_9}
[(i₁ : ι₁) → TopologicalSpace (Y₁ i₁)]
[(i₂ : ι₂) → TopologicalSpace (Y₂ i₂)]
(e : ι₁ ≃ ι₂)
(F : (i₁ : ι₁) → Y₁ i₁ ≃ₜ Y₂ (e i₁))

∀ (a : (i : ι₁) → Y₁ i) (i₂ : ι₂),
  (Homeomorph.piCongr e F) a i₂ = ⋯ ▸ (Equiv.piCongrRight fun i => (F i).toEquiv) a (e.symm i₂)


/-- Existence of local integral curves for a $C^1$ vector field at interior points of a smooth
manifold. -/
theorem exists_isIntegralCurveAt_of_contMDiffAt
    (hv : ContMDiffAt I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)) x₀)
    (hx : I.IsInteriorPoint x₀) :
    ∃ γ : ℝ → M, γ t₀ = x₀ ∧ IsIntegralCurveAt γ v t₀

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

∃ γ, γ t₀ = x₀ ∧ IsIntegralCurveAt γ v t₀


@[simp]
theorem symm_refl : (refl k P₁).symm = refl k P₁

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

(AffineEquiv.refl k P₁).symm = AffineEquiv.refl k P₁


theorem tan_add_int_mul_pi (x : ℂ) (n : ℤ) : tan (x + n * π) = tan x

Complex.tan (x + ↑n * ↑Real.pi) = Complex.tan x


/-- Applying `weightedVSub` with given weights.  This is for the case
where a result involving a default base point is OK (for example, when
that base point will cancel out later); a more typical use case for
`weightedVSub` would involve selecting a preferred base point with
`weightedVSub_eq_weightedVSubOfPoint_of_sum_eq_zero` and then
using `weightedVSubOfPoint_apply`. -/
theorem weightedVSub_apply (w : ι → k) (p : ι → P) :
    s.weightedVSub p w = ∑ i ∈ s, w i • (p i -ᵥ Classical.choice S.nonempty)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w : ι → k)
(p : ι → P)

(s.weightedVSub p) w = ∑ i ∈ s, w i • (p i -ᵥ Classical.choice ⋯)


theorem swap_sInf [InfSet α] [InfSet β] (s : Set (α × β)) : (sInf s).swap = sInf (Prod.swap '' s)

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


/-- An algebra iso `A ≃ₐ[R] B` can equivalently be viewed as an algebra iso `Aᵐᵒᵖ ≃ₐ[R] Bᵐᵒᵖ`.
This is the action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[simps!]
def op : (A ≃ₐ[R] B) ≃ Aᵐᵒᵖ ≃ₐ[R] Bᵐᵒᵖ

{R : Type u_1}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(f : Aᵐᵒᵖ ≃ₐ[R] Bᵐᵒᵖ)

∀ (a : B), (AlgEquiv.op.symm f).symm a = MulOpposite.unop ((↑↑f).symm (MulOpposite.op a))


@[to_additive]
theorem prod_erase_lt_of_one_lt {γ : Type*} [DecidableEq α] [OrderedCommMonoid γ]
    [CovariantClass γ γ (· * ·) (· < ·)] {s : Finset α} {d : α} (hd : d ∈ s) {f : α → γ}
    (hdf : 1 < f d) : ∏ m ∈ s.erase d, f m < ∏ m ∈ s, f m

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


private theorem one_le_maxVar : 1 ≤ maxVar X Y

(X : Type u)
(Y : Type v)
[MetricSpace X]
[MetricSpace Y]


/-- A version of `Nat.sub_succ` in the form `_ - 1` instead of `Nat.pred _`. -/
lemma sub_succ' (m n : ℕ) : m - n.succ = m - n - 1


/-- Two linear maps from a module with a decomposition agree if they agree on every piece.

Note this cannot be `@[ext]` as `ℳ` cannot be inferred. -/
theorem decompose_lhom_ext {N} [AddCommMonoid N] [Module R N] ⦃f g : M →ₗ[R] N⦄
    (h : ∀ i, f ∘ₗ (ℳ i).subtype = g ∘ₗ (ℳ i).subtype) : f = g

(h : ∀ (i : ι), f ∘ₗ (ℳ i).subtype = g ∘ₗ (ℳ i).subtype)


@[simp]
theorem ofTypeFunctor_obj : (ofTypeFunctor m).obj = m

(m : Type u → Type v)
[Functor m]
[LawfulFunctor m]

(CategoryTheory.ofTypeFunctor m).obj = m


theorem comap_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.comap f)

{V : Type u}
{W : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G →g G')


/--
If `F ⊣ G` and `F' ⊣ G'` are adjunctions, then giving a natural transformation `G ⟶ G'` is the
same as giving a natural transformation `F' ⟶ F`.
-/
@[simps]
def natTransEquiv {F F' : C ⥤ D} {G G' : D ⥤ C} (adj1 : F ⊣ G) (adj2 : F' ⊣ G') :
    (G ⟶ G') ≃ (F' ⟶ F)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{F F' : C ⥤ D}
{G G' : D ⥤ C}
(adj1 : F ⊣ G)
(adj2 : F' ⊣ G')
(f : F' ⟶ F)
(X : D)

((adj1.natTransEquiv adj2).symm f).app X = adj2.unit.app (G.obj X) ≫ G'.map (f.app (G.obj X) ≫ adj1.counit.app X)


lemma mem_powersetCard_univ : s ∈ powersetCard k (univ : Finset α) ↔ card s = k

{α : Type u_1}
[Fintype α]
{s : Finset α}
{k : ℕ}

s ∈ Finset.powersetCard k Finset.univ ↔ s.card = k


lemma mem_inf_principal {f : Filter α} {s t : Set α} : s ∈ f ⊓ 𝓟 t ↔ { x | x ∈ t → x ∈ s } ∈ f

{α : Type u}
{f : Filter α}
{s t : Set α}


/-- If a function `f` is summable in a uniform additive group `α`, then its sum in `α` is the same
as its sum in `Completion α`. -/
theorem Summable.toCompl_tsum {f : β → α} (hf : Summable f) : ∑' i, toCompl (f i) = ∑' i, f i

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[UniformSpace α]
[UniformAddGroup α]
{f : β → α}
(hf : Summable f)

∑' (i : β), UniformSpace.Completion.toCompl (f i) = ↑α (∑' (i : β), f i)


/-- The trivial pretopology induces the trivial grothendieck topology. -/
theorem toGrothendieck_bot : toGrothendieck C ⊥ = ⊥

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

CategoryTheory.Pretopology.toGrothendieck C ⊥ = ⊥


@[to_additive]
theorem op_inf (S₁ S₂ : Subgroup G) : (S₁ ⊓ S₂).op = S₁.op ⊓ S₂.op

{G : Type u_2}
[Group G]
(S₁ S₂ : Subgroup G)


@[ext]
theorem eq_of_locally_eq (s t : F.1.obj (op (iSup U)))
    (h : ∀ i, F.1.map (Opens.leSupr U i).op s = F.1.map (Opens.leSupr U i).op t) : s = t

(s t : (CategoryTheory.forget C).obj (F.val.obj (Opposite.op (iSup U))))

(h :
  ∀ (i : ι),
    (F.val.map (TopologicalSpace.Opens.leSupr U i).op) s = (F.val.map (TopologicalSpace.Opens.leSupr U i).op) t)


theorem card_sylow_eq_card_quotient_normalizer [Fact p.Prime] [Finite (Sylow p G)]
    (P : Sylow p G) : Nat.card (Sylow p G) = Nat.card (G ⧸ (P : Subgroup G).normalizer)

{p : ℕ}
{G : Type u_1}
[Group G]
[Fact (Nat.Prime p)]
[Finite (Sylow p G)]
(P : Sylow p G)

Nat.card (Sylow p G) = Nat.card (G ⧸ (↑P).normalizer)


theorem _root_.IsLindelof.compl_mem_coLindelof (hs : IsLindelof s) : sᶜ ∈ coLindelof X

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


theorem isOrtho_zero_left (x : M) : IsOrtho B (0 : M) x

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
(x : M)


/-- `mapCommMon` is functorial in the lax braided functor. -/
@[simps]
def mapCommMonFunctor : LaxBraidedFunctor C D ⥤ CommMon_ C ⥤ CommMon_ D

(F : CategoryTheory.LaxBraidedFunctor C D)

(CategoryTheory.LaxBraidedFunctor.mapCommMonFunctor C D).obj F = F.mapCommMon


theorem inter_left_comm (s₁ s₂ s₃ : Set α) : s₁ ∩ (s₂ ∩ s₃) = s₂ ∩ (s₁ ∩ s₃)


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

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

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


/-- **Lévy's upward theorem**, almost everywhere version: given a function `g` and a filtration
`ℱ`, the sequence defined by `𝔼[g | ℱ n]` converges almost everywhere to `𝔼[g | ⨆ n, ℱ n]`. -/
theorem tendsto_ae_condexp (g : Ω → ℝ) :
    ∀ᵐ x ∂μ, Tendsto (fun n => (μ[g|ℱ n]) x) atTop (𝓝 ((μ[g|⨆ n, ℱ n]) x))

{Ω : Type u_1}
{m0 : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
{ℱ : MeasureTheory.Filtration ℕ m0}
[MeasureTheory.IsFiniteMeasure μ]
(g : Ω → ℝ)

∀ᵐ (x : Ω) ∂μ, Filter.Tendsto (fun n => (μ[g|↑ℱ n]) x) Filter.atTop (𝓝 ((μ[g|⨆ n, ↑ℱ n]) x))


/-- The obvious projection functor from costructured arrows. -/
@[simps!]
def proj (S : C ⥤ D) (T : D) : CostructuredArrow S T ⥤ C

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

(CategoryTheory.CostructuredArrow.proj S T).obj X = X.left


theorem pair_comm (a b : α) : ({a, b} : Finset α) = {b, a}

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


@[reassoc (attr := simp)]
theorem pentagon_inv_hom_hom_hom_hom :
    (α_ W X Y).inv ▷ Z ≫ (α_ (W ⊗ X) Y Z).hom ≫ (α_ W X (Y ⊗ Z)).hom =
      (α_ W (X ⊗ Y) Z).hom ≫ W ◁ (α_ X Y Z).hom

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

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.MonoidalCategory.associator W X Y).inv Z)
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.associator (CategoryTheory.MonoidalCategory.tensorObj W X) Y Z).hom
      (CategoryTheory.MonoidalCategory.associator W X (CategoryTheory.MonoidalCategory.tensorObj Y Z)).hom) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.associator W (CategoryTheory.MonoidalCategory.tensorObj X Y) Z).hom
    (CategoryTheory.MonoidalCategory.whiskerLeft W (CategoryTheory.MonoidalCategory.associator X Y Z).hom)


/-- The value of `χ₈ n`, for `n : ℤ`, depends only on `n % 8`. -/
theorem χ₈_int_mod_eight (n : ℤ) : χ₈ n = χ₈ (n % 8 : ℤ)


theorem tendsto_iff_weak_star_tendsto {γ : Type*} {F : Filter γ} {μs : γ → FiniteMeasure Ω}
    {μ : FiniteMeasure Ω} :
    Tendsto μs F (𝓝 μ) ↔ Tendsto (fun i => (μs i).toWeakDualBCNN) F (𝓝 μ.toWeakDualBCNN)

{μs : γ → MeasureTheory.FiniteMeasure Ω}

Filter.Tendsto μs F (𝓝 μ) ↔ Filter.Tendsto (fun i => (μs i).toWeakDualBCNN) F (𝓝 μ.toWeakDualBCNN)


protected theorem dist_self (x : Completion α) : dist x x = 0

{α : Type u}
[PseudoMetricSpace α]
(x : UniformSpace.Completion α)


@[to_additive (attr := simp)]
theorem mem_mk {s : Subsemigroup M} {x : M} (h_one) : x ∈ mk s h_one ↔ x ∈ s

{M : Type u_1}
[MulOneClass M]
{s : Subsemigroup M}
{x : M}
(h_one : 1 ∈ s.carrier)

x ∈ { toSubsemigroup := s, one_mem' := h_one } ↔ x ∈ s


theorem one_apply (a : A) : (1 : A →ₙₐ[R] A) a = a

{R : Type u}
[Monoid R]
{A : Type v}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
(a : A)


@[to_additive (attr := simp)]
theorem map_of (x) : map f (of x) = of (f x)

{α : Type u}
[Add α]
{β : Type v}
[Add β]
(f : AddHom α β)
(x : α)

(AddMagma.FreeAddSemigroup.map f) (AddMagma.FreeAddSemigroup.of x) = AddMagma.FreeAddSemigroup.of (f x)


/-- The proof that `upperCentralSeriesStep H` is the preimage of the centre of `G/H` under
the canonical surjection. -/
theorem upperCentralSeriesStep_eq_comap_center :
    upperCentralSeriesStep H = Subgroup.comap (mk' H) (center (G ⧸ H))

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

upperCentralSeriesStep H = Subgroup.comap (QuotientGroup.mk' H) (Subgroup.center (G ⧸ H))


theorem coeff_zero (n : σ →₀ ℕ) : coeff R n (0 : MvPowerSeries σ R) = 0

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
(n : σ →₀ ℕ)


/-- For any `α` and `β`, the corresponding root spaces are orthogonal with respect to the Killing
form, provided `α + β ≠ 0`. -/
lemma killingForm_apply_eq_zero_of_mem_rootSpace_of_add_ne_zero {α β : H → K} {x y : L}
    (hx : x ∈ rootSpace H α) (hy : y ∈ rootSpace H β) (hαβ : α + β ≠ 0) :
    killingForm K L x y = 0

(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]
{α β : ↥H → K}
{x y : L}
(hx : x ∈ LieAlgebra.rootSpace H α)
(hy : y ∈ LieAlgebra.rootSpace H β)
(hαβ : α + β ≠ 0)


@[reassoc]
lemma comp_homologyMap_comp [S₁.HasHomology] [S₂.HasHomology] (φ : S₁ ⟶ S₂)
    (h₁ : S₁.LeftHomologyData) (h₂ : S₂.RightHomologyData) :
    h₁.π ≫ h₁.homologyIso.inv ≫ homologyMap φ ≫ h₂.homologyIso.hom ≫ h₂.ι =
      h₁.i ≫ φ.τ₂ ≫ h₂.p

CategoryTheory.CategoryStruct.comp h₁.π
    (CategoryTheory.CategoryStruct.comp h₁.homologyIso.inv
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.homologyMap φ)
        (CategoryTheory.CategoryStruct.comp h₂.homologyIso.hom h₂.ι))) =
  CategoryTheory.CategoryStruct.comp h₁.i (CategoryTheory.CategoryStruct.comp φ.τ₂ h₂.p)


@[simp]
theorem id_comp (f : α →Co β) : (ContinuousOrderHom.id β).comp f = f

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
(f : α →Co β)


@[simp]
lemma preimage_coe_Ioc (x y : ℝ) : Real.toEReal ⁻¹' Ioc x y = Ioc x y

Real.toEReal ⁻¹' Set.Ioc ↑x ↑y = Set.Ioc x y


theorem biSup_prod {f : β × γ → α} {s : Set β} {t : Set γ} :
    ⨆ x ∈ s ×ˢ t, f x = ⨆ (a ∈ s) (b ∈ t), f (a, b)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_4}
[CompleteLattice α]
{f : β × γ → α}
{s : Set β}
{t : Set γ}

⨆ x ∈ s ×ˢ t, f x = ⨆ a ∈ s, ⨆ b ∈ t, f (a, b)


lemma dist_r_b' : ∀ᶠ n in atTop, ∀ i, ‖(r i n : ℝ) - b i * n‖ ≤ n / log n ^ 2

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(R : AkraBazziRecurrence T g a b r)

∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), ‖↑(r i n) - b i * ↑n‖ ≤ ↑n / Real.log ↑n ^ 2


@[simp, norm_cast]
protected theorem coe_mul (a b : { x : α // 0 ≤ x }) :
    ((a * b : { x : α // 0 ≤ x }) : α) = a * b

{α : Type u_1}
[MulZeroClass α]
[Preorder α]
[PosMulMono α]
(a b : { x // 0 ≤ x })


lemma trans {X Y : C} {z₁ z₂ z₃ : W.RightFraction X Y}
    [HasRightCalculusOfFractions W]
    (h₁₂ : RightFractionRel z₁ z₂) (h₂₃ : RightFractionRel z₂ z₃) :
    RightFractionRel z₁ z₃

(h₁₂ : CategoryTheory.MorphismProperty.RightFractionRel z₁ z₂)

(h₂₃ : CategoryTheory.MorphismProperty.RightFractionRel z₂ z₃)


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

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


theorem conj_smul_subgroupOf {P H : Subgroup G} (hP : P ≤ H) (h : H) :
    MulAut.conj h • P.subgroupOf H = (MulAut.conj (h : G) • P).subgroupOf H

{G : Type u_2}
[Group G]
{P H : Subgroup G}
(hP : P ≤ H)
(h : ↥H)

MulAut.conj h • P.subgroupOf H = (MulAut.conj ↑h • P).subgroupOf H


/-- A `MorphComponents` can be postcomposed with a morphism. -/
@[simps]
def postComp : MorphComponents X n Z'

(f : AlgebraicTopology.DoldKan.MorphComponents X n Z)


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

{P : TopCat → Prop}
{X Y : CompHausLike P}
(f : X ≅ Y)
(a : ↑X.toTop)


@[simp]
theorem coeFn_toContinuousLinearEquivOfContinuous (e : E ≃ₛₗ[σ] F) (h : Continuous e) :
    ⇑(e.toContinuousLinearEquivOfContinuous h) = e

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{σ' : 𝕜' →+* 𝕜}
[RingHomInvPair σ σ']
[RingHomInvPair σ' σ]
[RingHomIsometric σ]
[RingHomIsometric σ']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
[CompleteSpace F]
[CompleteSpace E]
(e : E ≃ₛₗ[σ] F)
(h : Continuous ⇑e)

⇑(e.toContinuousLinearEquivOfContinuous h) = ⇑e


{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[HasContDiffBump E]
{c : E}
(f : ContDiffBump c)
{x : E}


/-- A side of a right-angled triangle divided by the tangent of the opposite angle equals the
adjacent side. -/
theorem dist_div_tan_oangle_right_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : dist p₁ p₂ / Real.Angle.tan (∡ p₂ p₃ p₁) = dist p₃ p₂

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

dist p₁ p₂ / (∡ p₂ p₃ p₁).tan = dist p₃ p₂


/-- Two linearly equivalent vector spaces have the same dimension. -/
theorem LinearEquiv.rank_eq (f : M ≃ₗ[R] M₁) : Module.rank R M = Module.rank R M₁

{R : Type u}
{M M₁ : Type v}
[Ring R]
[AddCommGroup M]
[AddCommGroup M₁]
[Module R M]
[Module R M₁]
(f : M ≃ₗ[R] M₁)


theorem nthLe_cons_aux {l : List α} {a : α} {n} (hn : n ≠ 0) (h : n < (a :: l).length) :
    n - 1 < l.length

{α : Type u}
{l : List α}
{a : α}
{n : ℕ}
(hn : n ≠ 0)
(h : n < (a :: l).length)


theorem indepFun_iff_indepSet_preimage {mβ : MeasurableSpace β} {mβ' : MeasurableSpace β'}
    [IsMarkovKernel κ] (hf : Measurable f) (hg : Measurable g) :
    IndepFun f g κ μ ↔
      ∀ s t, MeasurableSet s → MeasurableSet t → IndepSet (f ⁻¹' s) (g ⁻¹' t) κ μ

{α : Type u_1}
{Ω : Type u_2}
{β : Type u_4}
{β' : Type u_5}
{_mα : MeasurableSpace α}
{_mΩ : MeasurableSpace Ω}
{κ : ProbabilityTheory.Kernel α Ω}
{μ : MeasureTheory.Measure α}
{f : Ω → β}
{g : Ω → β'}
{mβ : MeasurableSpace β}
{mβ' : MeasurableSpace β'}
[ProbabilityTheory.IsMarkovKernel κ]
(hf : Measurable f)
(hg : Measurable g)

ProbabilityTheory.Kernel.IndepFun f g κ μ ↔
  ∀ (s : Set β) (t : Set β'),
    MeasurableSet s → MeasurableSet t → ProbabilityTheory.Kernel.IndepSet (f ⁻¹' s) (g ⁻¹' t) κ μ


theorem IsTerminal.hasTerminal {X : C} (h : IsTerminal X) : HasTerminal C

(h : CategoryTheory.Limits.IsTerminal X)


/-- If `f` is a conservative map and `s` is a measurable set of nonzero measure, then
for infinitely many values of `m` a positive measure of points `x ∈ s` returns back to `s`
after `m` iterations of `f`. -/
theorem frequently_measure_inter_ne_zero (hf : Conservative f μ) (hs : NullMeasurableSet s μ)
    (h0 : μ s ≠ 0) : ∃ᶠ m in atTop, μ (s ∩ f^[m] ⁻¹' s) ≠ 0

(hs : MeasureTheory.NullMeasurableSet s μ)

∃ᶠ (m : ℕ) in Filter.atTop, μ (s ∩ f^[m] ⁻¹' s) ≠ 0


/-- In a compact space `α`, any function has compact support. -/
@[to_additive]
theorem HasCompactMulSupport.of_compactSpace (f : α → γ) :
    HasCompactMulSupport f

{α : Type u_2}
{γ : Type u_5}
[TopologicalSpace α]
[CompactSpace α]
[Zero γ]
(f : α → γ)


@[simp]
theorem kernelIsoOfEq_refl {h : f = f} : kernelIsoOfEq h = Iso.refl (kernel f)

CategoryTheory.Limits.kernelIsoOfEq h = CategoryTheory.Iso.refl (CategoryTheory.Limits.kernel f)


private theorem toIxxMod_iff (x₁ x₂ x₃ : α) : toIcoMod hp x₁ x₂ ≤ toIocMod hp x₁ x₃ ↔
    toIcoMod hp 0 (x₂ - x₁) + toIcoMod hp 0 (x₁ - x₃) ≤ p

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(x₁ x₂ x₃ : α)


@[simp]
theorem mul_moveLeft_inr {x y : PGame} {i j} :
    (x * y).moveLeft (toLeftMovesMul (Sum.inr (i, j))) =
      x.moveRight i * y + x * y.moveRight j - x.moveRight i * y.moveRight j

{x y : SetTheory.PGame}
{i : x.RightMoves}
{j : y.RightMoves}

(x * y).moveLeft (SetTheory.PGame.toLeftMovesMul (Sum.inr (i, j))) =
  x.moveRight i * y + x * y.moveRight j - x.moveRight i * y.moveRight j


@[to_additive]
lemma inv_mem_units_iff (S : Submonoid M) {x : Mˣ} : x⁻¹ ∈ S.units ↔ x ∈ S.units

{M : Type u_1}
[Monoid M]
(S : Submonoid M)
{x : Mˣ}


theorem to_implicitFunction (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :
    HasStrictFDerivAt (hf.implicitFunction f f' hf' (f a)) (ker f').subtypeL 0

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[FiniteDimensional 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{a : E}
(hf : HasStrictFDerivAt f f' a)
(hf' : LinearMap.range f' = ⊤)

HasStrictFDerivAt (HasStrictFDerivAt.implicitFunction f f' hf hf' (f a)) (LinearMap.ker f').subtypeL 0


@[to_additive]
theorem comp_mulIndicator (h : M → β) (f : α → M) {s : Set α} {x : α} [DecidablePred (· ∈ s)] :
    h (s.mulIndicator f x) = s.piecewise (h ∘ f) (const α (h 1)) x

{α : Type u_1}
{β : Type u_2}
{M : Type u_4}
[One M]
(h : M → β)
(f : α → M)
{s : Set α}
{x : α}
[DecidablePred fun x => x ∈ s]

h (s.mulIndicator f x) = s.piecewise (h ∘ f) (Function.const α (h 1)) x


theorem of_stalk_iso {X Y : Scheme.{u}} (f : X ⟶ Y) (hf : OpenEmbedding f.1.base)
    [∀ x, IsIso (f.stalkMap x)] : IsOpenImmersion f

[∀ (x : ↑↑X.toPresheafedSpace), CategoryTheory.IsIso (AlgebraicGeometry.Scheme.Hom.stalkMap f x)]


/-- The image of a cone in C under a functor G : C ⥤ D is a cone in D. -/
@[simps!]
def mapCone (c : Cone F) : Cone (F ⋙ H)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(H : C ⥤ D)
{F : J ⥤ C}
(c : CategoryTheory.Limits.Cone F)
(j : J)

(H.mapCone c).π.app j = H.map (c.π.app j)


/-- Let `f` and `g` be two maps to the same commutative monoid. This lemma gives a sufficient
condition for comparison of the filter `atTop.map (fun s ↦ ∏ b ∈ s, f b)` with
`atTop.map (fun s ↦ ∏ b ∈ s, g b)`. This is useful to compare the set of limit points of
`Π b in s, f b` as `s → atTop` with the similar set for `g`. -/
@[to_additive "Let `f` and `g` be two maps to the same commutative additive monoid. This lemma gives
a sufficient condition for comparison of the filter `atTop.map (fun s ↦ ∑ b ∈ s, f b)` with
`atTop.map (fun s ↦ ∑ b ∈ s, g b)`. This is useful to compare the set of limit points of
`∑ b ∈ s, f b` as `s → atTop` with the similar set for `g`."]
theorem map_atTop_finset_prod_le_of_prod_eq [CommMonoid α] {f : β → α} {g : γ → α}
    (h_eq : ∀ u : Finset γ,
      ∃ v : Finset β, ∀ v', v ⊆ v' → ∃ u', u ⊆ u' ∧ ∏ x ∈ u', g x = ∏ b ∈ v', f b) :
    (atTop.map fun s : Finset β => ∏ b ∈ s, f b) ≤
      atTop.map fun s : Finset γ => ∏ x ∈ s, g x

(h_eq : ∀ (u : Finset γ), ∃ v, ∀ (v' : Finset β), v ⊆ v' → ∃ u', u ⊆ u' ∧ ∏ x ∈ u', g x = ∏ b ∈ v', f b)

Filter.map (fun s => ∏ b ∈ s, f b) Filter.atTop ≤ Filter.map (fun s => ∏ x ∈ s, g x) Filter.atTop


@[simp]
theorem translate_zpow (x : ℝ) (n : ℤ) :
    translate (Multiplicative.ofAdd x) ^ n = translate (Multiplicative.ofAdd <| ↑n * x)

CircleDeg1Lift.translate (Multiplicative.ofAdd x) ^ n = CircleDeg1Lift.translate (Multiplicative.ofAdd (↑n * x))


{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a : α}


protected theorem sub_right_lt_of_lt_add {a b c : Int} (h : a < b + c) : a - c < b


theorem image2_assoc {f : δ → γ → ε} {g : α → β → δ} {f' : α → ε' → ε} {g' : β → γ → ε'}
    (h_assoc : ∀ a b c, f (g a b) c = f' a (g' b c)) :
    image2 f (image2 g s t) u = image2 f' s (image2 g' t u)

{f : δ → γ → ε}

{g : α → β → δ}

(h_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c))

Set.image2 f (Set.image2 g s t) u = Set.image2 f' s (Set.image2 g' t u)


@[simp]
theorem integral_sin_mul_cos_sq :
    ∫ x in a..b, sin x * cos x ^ 2 = (cos a ^ 3 - cos b ^ 3) / 3

∫ (x : ℝ) in a..b, Real.sin x * Real.cos x ^ 2 = (Real.cos a ^ 3 - Real.cos b ^ 3) / 3


@[simp]
theorem map_bot (f : R →ₙ+* S) : (⊥ : NonUnitalSubring R).map f = ⊥

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
(f : R →ₙ+* S)


@[simp, norm_cast]
protected lemma coe_sup [SemilatticeSup α] {x y : Iic a} :
    (↑(x ⊔ y) : α) = (x : α) ⊔ (y : α)

{α : Type u_1}
{a : α}
[SemilatticeSup α]
{x y : ↑(Set.Iic a)}


/-- A set is in the `countableInterFilter` generated by `g` if and only if
it contains a countable intersection of elements of `g`. -/
theorem mem_countableGenerate_iff {s : Set α} :
    s ∈ countableGenerate g ↔ ∃ S : Set (Set α), S ⊆ g ∧ S.Countable ∧ ⋂₀ S ⊆ s

{α : Type u_2}
{g : Set (Set α)}
{s : Set α}

s ∈ Filter.countableGenerate g ↔ ∃ S ⊆ g, S.Countable ∧ ⋂₀ S ⊆ s


theorem cpow_eq_nhds {a b : ℂ} (ha : a ≠ 0) :
    (fun x => x ^ b) =ᶠ[𝓝 a] fun x => exp (log x * b)

(fun x => x ^ b) =ᶠ[𝓝 a] fun x => Complex.exp (Complex.log x * b)


@[simp]
theorem Equiv.locallyFinite_comp_iff (e : ι' ≃ ι) : LocallyFinite (f ∘ e) ↔ LocallyFinite f

{ι : Type u_1}
{ι' : Type u_2}
{X : Type u_4}
[TopologicalSpace X]
{f : ι → Set X}
(e : ι' ≃ ι)

LocallyFinite (f ∘ ⇑e) ↔ LocallyFinite f


theorem modByMonic_eq_self_iff [Nontrivial R] (hq : Monic q) : p %ₘ q = p ↔ degree p < degree q

{R : Type u}
[Ring R]
{p q : R[X]}
[Nontrivial R]
(hq : q.Monic)


protected theorem inf_le_left {a b : CauSeq α abs} : a ⊓ b ≤ a

{α : Type u_1}
[LinearOrderedField α]
{a b : CauSeq α abs}


theorem next_getLast_cons (h : x ∈ l) (y : α) (h : x ∈ y :: l) (hy : x ≠ y)
    (hx : x = getLast (y :: l) (cons_ne_nil _ _)) (hl : Nodup l) : next (y :: l) x h = y

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

∀ (h : x ∈ y :: l), x ≠ y → x = (y :: l).getLast ⋯ → l.Nodup → (y :: l).next x h = y


theorem U_add_one (n : ℤ) : U R (n + 1) = 2 * X * U R n - U R (n - 1)

Polynomial.Chebyshev.U R (n + 1) = 2 * Polynomial.X * Polynomial.Chebyshev.U R n - Polynomial.Chebyshev.U R (n - 1)


theorem PosSemidef.fromBlocks₁₁ [Fintype m] [DecidableEq m] [Fintype n] {A : Matrix m m 𝕜}
    (B : Matrix m n 𝕜) (D : Matrix n n 𝕜) (hA : A.PosDef) [Invertible A] :
    (fromBlocks A B Bᴴ D).PosSemidef ↔ (D - Bᴴ * A⁻¹ * B).PosSemidef

{m : Type u_2}
{n : Type u_3}
{𝕜 : Type u_5}
[CommRing 𝕜]
[PartialOrder 𝕜]
[StarRing 𝕜]
[StarOrderedRing 𝕜]
[Fintype m]
[DecidableEq m]
[Fintype n]
{A : Matrix m m 𝕜}
(B : Matrix m n 𝕜)
(D : Matrix n n 𝕜)
(hA : A.PosDef)
[Invertible A]

(Matrix.fromBlocks A B B.conjTranspose D).PosSemidef ↔ (D - B.conjTranspose * A⁻¹ * B).PosSemidef


@[simp]
theorem fst_one [One R] [Zero M] : (1 : tsze R M).fst = 1

{R : Type u}
{M : Type v}
[One R]
[Zero M]


theorem MonovaryOn.dual_right : MonovaryOn f g s → AntivaryOn f (toDual ∘ g) s

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}
{s : Set ι}

MonovaryOn f g s → AntivaryOn f (⇑OrderDual.toDual ∘ g) s


/-- If `f` and `g` are quadratic polynomials, then the `f.eval a + g.eval b = 0` has a solution. -/
theorem exists_root_sum_quadratic [Fintype R] {f g : R[X]} (hf2 : degree f = 2) (hg2 : degree g = 2)
    (hR : Fintype.card R % 2 = 1) : ∃ a b, f.eval a + g.eval b = 0

{R : Type u_2}
[CommRing R]
[IsDomain R]
[Fintype R]
{f g : R[X]}
(hf2 : f.degree = 2)
(hg2 : g.degree = 2)
(hR : Fintype.card R % 2 = 1)

∃ a b, Polynomial.eval a f + Polynomial.eval b g = 0


@[to_additive]
theorem cauchySeq_prod_of_eventually_eq {u v : ℕ → E} {N : ℕ} (huv : ∀ n ≥ N, u n = v n)
    (hv : CauchySeq fun n => ∏ k ∈ range (n + 1), v k) :
    CauchySeq fun n => ∏ k ∈ range (n + 1), u k

(hv : CauchySeq fun n => ∏ k ∈ Finset.range (n + 1), v k)

CauchySeq fun n => ∏ k ∈ Finset.range (n + 1), u k


/-- the axiom of choice -/
theorem axiomOfChoice {α : Sort u} {β : α → Sort v} {r : ∀ x, β x → Prop} (h : ∀ x, ∃ y, r x y) : ∃ (f : ∀ x, β x), ∀ x, r x (f x)

{α : Sort u}
{β : α → Sort v}
{r : (x : α) → β x → Prop}
(h : ∀ (x : α), ∃ y, r x y)


/-- A morphism in `SimplexCategory` is an epimorphism if and only if it is a surjective function
-/
theorem epi_iff_surjective {n m : SimplexCategory} {f : n ⟶ m} :
    Epi f ↔ Function.Surjective f.toOrderHom

CategoryTheory.Epi f ↔ Function.Surjective ⇑(SimplexCategory.Hom.toOrderHom f)


@[simp] theorem coe_comp_of {X Y Z : Type u} [CommRing X] [CommRing Y] [CommRing Z]
    (f : X →+* Y) (g : Y →+* Z) :
    @DFunLike.coe no_index (CommRingCat.of X ⟶ CommRingCat.of Z) X
      (fun _ ↦ Z) _
      (CategoryStruct.comp (X := CommRingCat.of X) (Y := CommRingCat.of Y) (Z := CommRingCat.of Z)
        f g) =
    @DFunLike.coe (X →+* Z) X (fun _ ↦ Z) _ (RingHom.comp g f)


@[simp]
theorem coe_restrictScalars (f : MultilinearMap A M₁ M₂) : ⇑(f.restrictScalars R) = f

(R : Type uR)
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
{A : Type u_1}
[Semiring A]
[SMul R A]
[(i : ι) → Module A (M₁ i)]
[Module A M₂]
[∀ (i : ι), IsScalarTower R A (M₁ i)]
[IsScalarTower R A M₂]
(f : MultilinearMap A M₁ M₂)

⇑(MultilinearMap.restrictScalars R f) = ⇑f


/-- If the order of `x` is finite, then `x` is a unit with inverse `x ^ (orderOf x - 1)`. -/
@[simps]
noncomputable
def IsOfFinOrder.unit {M} [Monoid M] {x : M} (hx : IsOfFinOrder x) : Mˣ

{M : Type u_6}
[Monoid M]
{x : M}
(hx : IsOfFinOrder x)


@[simp]
theorem isoSheafify_inv {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) :
    (J.isoSheafify hP).inv = J.sheafifyLift (𝟙 _) hP

(J : CategoryTheory.GrothendieckTopology C)

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

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

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

(hP : CategoryTheory.Presheaf.IsSheaf J P)

(J.isoSheafify hP).inv = J.sheafifyLift (CategoryTheory.CategoryStruct.id P) hP


@[simp]
theorem image_const_sub_Ioc : (fun x => a - x) '' Ioc b c = Ico (a - c) (a - b)

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

(fun x => a - x) '' Set.Ioc b c = Set.Ico (a - c) (a - b)


theorem adjoin_rootSet_eq_range [Algebra K F] (f : K[X]) [IsSplittingField K L f] (i : L →ₐ[K] F) :
    Algebra.adjoin K (rootSet f F) = i.range

{F : Type u}
{K : Type v}
(L : Type w)
[Field K]
[Field L]
[Field F]
[Algebra K L]
[Algebra K F]
(f : K[X])
[Polynomial.IsSplittingField K L f]
(i : L →ₐ[K] F)

Algebra.adjoin K (f.rootSet F) = i.range


/-- The restriction of an extension is the original. -/
@[simp]
theorem restrict_extend {x : FamilyOfElements P R} (t : x.Compatible) :
    x.sieveExtend.restrict (le_generate R) = x

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

{x : CategoryTheory.Presieve.FamilyOfElements P R}

CategoryTheory.Presieve.FamilyOfElements.restrict ⋯ x.sieveExtend = x


theorem preimage_const (b : β) (s : Set β) [Decidable (b ∈ s)] :
    (fun _ : α => b) ⁻¹' s = if b ∈ s then univ else ∅

{α : Type u_1}
{β : Type u_2}
(b : β)
(s : Set β)
[Decidable (b ∈ s)]

(fun x => b) ⁻¹' s = if b ∈ s then Set.univ else ∅


theorem εToSingle₀_comp_eq :
    ((forget₂ _ (ModuleCat.{u} k)).mapHomologicalComplex _).map (εToSingle₀ k G) ≫
        (HomologicalComplex.singleMapHomologicalComplex _ _ _).hom.app _ =
      (forget₂ToModuleCatHomotopyEquiv k G).hom

((CategoryTheory.forget₂ (Rep k G) (ModuleCat k)).mapHomologicalComplex (ComplexShape.down ℕ)).map
      (groupCohomology.resolution.εToSingle₀ k G) ≫
    (HomologicalComplex.singleMapHomologicalComplex (CategoryTheory.forget₂ (Rep k G) (ModuleCat k))
            (ComplexShape.down ℕ) 0).hom.app
      (Rep.trivial k G k) =
  (groupCohomology.resolution.forget₂ToModuleCatHomotopyEquiv k G).hom


/-- The injection of a space in a disjoint union is an isometry -/
theorem isometry_mk (i : ι) : Isometry (Sigma.mk i : E i → Σk, E k)

{ι : Type u_1}
{E : ι → Type u_2}
[(i : ι) → MetricSpace (E i)]
(i : ι)


protected theorem eq (hs : IsWeakAntichain s) : a ∈ s → b ∈ s → a ≺ b → a = b

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Preorder (α i)]
{s : Set ((i : ι) → α i)}
{a b : (i : ι) → α i}
(hs : IsWeakAntichain s)


/-- **Ptolemy's inequality**: in a quadrangle `ABCD`, `|AC| * |BD| ≤ |AB| * |CD| + |BC| * |AD|`. If
`ABCD` is a convex cyclic polygon, then this inequality becomes an equality, see
`EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical`. -/
theorem mul_dist_le_mul_dist_add_mul_dist (a b c d : P) :
    dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(a b c d : P)


/-- A category has finite products if there exists a limit for every diagram
with shape `Discrete J`, where we have `[Finite J]`.

We require this condition only for `J = Fin n` in the definition, then deduce a version for any
`J : Type*` as a corollary of this definition.
-/
class HasFiniteProducts : Prop where
  /-- `C` has finite products -/
  out (n : ℕ) : HasLimitsOfShape (Discrete (Fin n)) C

[self : CategoryTheory.Limits.HasFiniteProducts C]

CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Discrete (Fin n)) C


theorem sub_snd (a b : 𝓜(𝕜, A)) : (a - b).snd = a.snd - b.snd

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
(a b : 𝓜(𝕜, A))

(a - b).toProd.2 = a.toProd.2 - b.toProd.2


theorem effectiveEpiFamily_of_jointly_surjective
    {α : Type} [Finite α] {B : Profinite.{u}}
    (X : α → Profinite.{u}) (π : (a : α) → (X a ⟶ B))
    (surj : ∀ b : B, ∃ (a : α) (x : X a), π a x = b) :
    EffectiveEpiFamily X π

(surj : ∀ (b : ↑B.toTop), ∃ a x, (π a) x = b)


/-- Two partial equivs that have the same `source`, same `toFun` and same `invFun`, coincide. -/
@[ext]
protected theorem ext {e e' : PartialEquiv α β} (h : ∀ x, e x = e' x)
    (hsymm : ∀ x, e.symm x = e'.symm x) (hs : e.source = e'.source) : e = e'

(hsymm : ∀ (x : β), ↑e.symm x = ↑e'.symm x)


@[to_additive (attr := simp)]
theorem prod_univ_get' [CommMonoid β] (l : List α) (f : α → β) :
    ∏ i : Fin l.length, f l[i.1] = (l.map f).prod

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

∑ i : Fin l.length, f l[↑i] = (List.map f l).sum


@[aesop safe 20 apply (rule_sets := [SetLike])]
theorem subset_adjoin (s : Set A) : s ⊆ adjoin R s

(R : Type u)
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
(s : Set A)


lemma apply_inr (h : l.idxFun i = Sum.inr e) : l x i = x e

{η : Type u_5}
{α : Type u_6}
{ι : Type u_7}
{l : Combinatorics.Subspace η α ι}
{x : η → α}
{i : ι}
{e : η}
(h : l.idxFun i = Sum.inr e)


theorem inner_map_map_iff_adjoint_comp_self (u : H →L[𝕜] K) :
    (∀ x y : H, ⟪u x, u y⟫_𝕜 = ⟪x, y⟫_𝕜) ↔ adjoint u ∘L u = 1

{𝕜 : Type u_1}
[RCLike 𝕜]
{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace 𝕜 H]
[CompleteSpace H]
{K : Type u_6}
[NormedAddCommGroup K]
[InnerProductSpace 𝕜 K]
[CompleteSpace K]
(u : H →L[𝕜] K)

(∀ (x y : H), ⟪u x, u y⟫_𝕜 = ⟪x, y⟫_𝕜) ↔ (ContinuousLinearMap.adjoint u).comp u = 1


/-- The image of a set `s` under a continuous linear equiv `f` has measure
equal to `μ s` times the absolute value of the determinant of `f`. -/
@[simp]
theorem addHaar_image_continuousLinearEquiv (f : E ≃L[ℝ] E) (s : Set E) :
    μ (f '' s) = ENNReal.ofReal |LinearMap.det (f : E →ₗ[ℝ] E)| * μ s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(f : E ≃L[ℝ] E)
(s : Set E)

μ (⇑f '' s) = ENNReal.ofReal |LinearMap.det ↑↑f| * μ s


@[simp] lemma replaceVertex_self : G.replaceVertex s s = G

{V : Type u_1}
[DecidableEq V]
(G : SimpleGraph V)
(s : V)


theorem IsCompactOperator.image_subset_compact_of_bounded [ContinuousConstSMul 𝕜₂ M₂]
    {f : M₁ →ₛₗ[σ₁₂] M₂} (hf : IsCompactOperator f) {S : Set M₁} (hS : Bornology.IsBounded S) :
    ∃ K : Set M₂, IsCompact K ∧ f '' S ⊆ 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)
{S : Set M₁}
(hS : Bornology.IsBounded S)


@[elab_as_elim]
protected theorem induction_on' {C : FreeAbelianGroup α → Prop} (z : FreeAbelianGroup α) (C0 : C 0)
    (C1 : ∀ x, C <| pure x) (Cn : ∀ x, C (pure x) → C (-pure x))
    (Cp : ∀ x y, C x → C y → C (x + y)) : C z

(Cn : ∀ (x : α), C (pure x) → C (-pure x))

(Cp : ∀ (x y : FreeAbelianGroup α), C x → C y → C (x + y))


@[simp]
theorem card_le_one {o} : card o ≤ 1 ↔ o ≤ 1


theorem exists_eq_const [PreconnectedSpace X] [Nonempty Y] (f : LocallyConstant X Y) :
    ∃ y, f = const X y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[PreconnectedSpace X]
[Nonempty Y]
(f : LocallyConstant X Y)


/-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`w, z : N` and `y ∈ S`, we have `z = w * (f y)⁻¹ ↔ z * f y = w`. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `w, z : N` and `y ∈ S`, we have `z = w - f y ↔ z + f y = w`."]
theorem mul_inv_right {f : M →* N} (h : ∀ y : S, IsUnit (f y)) (y : S) (w z : N) :
    z = w * (IsUnit.liftRight (f.restrict S) h y)⁻¹ ↔ z * f y = w

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{f : M →* N}
(h : ∀ (y : ↥S), IsUnit (f ↑y))
(y : ↥S)
(w z : N)

z = w * ↑((IsUnit.liftRight (f.restrict S) h) y)⁻¹ ↔ z * f ↑y = w


@[simp]
theorem fractionalIdealLatticeBasis_apply (i : ChooseBasisIndex ℤ I) :
    fractionalIdealLatticeBasis K I i = (mixedEmbedding K) (basisOfFractionalIdeal K I i)

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

(i : Module.Free.ChooseBasisIndex ℤ ↥↑↑I)

(NumberField.mixedEmbedding.fractionalIdealLatticeBasis K I) i =
  (NumberField.mixedEmbedding K) ((NumberField.basisOfFractionalIdeal K I) i)


@[to_additive (attr := simp)]
theorem div_one (a : G) : a / 1 = a

{G : Type u_3}
[SubNegZeroMonoid G]
(a : G)


theorem Submartingale.exists_ae_trim_tendsto_of_bdd [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) :
    ∀ᵐ ω ∂μ.trim (sSup_le fun m ⟨n, hn⟩ => hn ▸ ℱ.le _ : ⨆ n, ℱ n ≤ m0),
      ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)

{f : ℕ → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)

(hbdd : ∀ (n : ℕ), MeasureTheory.eLpNorm (f n) 1 μ ≤ ↑R)

∀ᵐ (ω : Ω) ∂μ.trim ⋯, ∃ c, Filter.Tendsto (fun n => f n ω) Filter.atTop (𝓝 c)


theorem swap_bijective : Function.Bijective (@swap α β)


theorem measure_biUnion_null_iff {I : Set ι} (hI : I.Countable) {s : ι → Set α} :
    μ (⋃ i ∈ I, s i) = 0 ↔ ∀ i ∈ I, μ (s i) = 0

{α : Type u_1}
{ι : Type u_2}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{I : Set ι}
(hI : I.Countable)
{s : ι → Set α}


/-- The right whiskering of a 2-isomorphism is a 2-isomorphism. -/
@[simps!]
def whiskerRightIso {f g : a ⟶ b} (η : f ≅ g) (h : b ⟶ c) : f ≫ h ≅ g ≫ h

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c : B}
{f g : a ⟶ b}
(η : f ≅ g)
(h : b ⟶ c)

(CategoryTheory.Bicategory.whiskerRightIso η h).hom = CategoryTheory.Bicategory.whiskerRight η.hom h


theorem card_edgeFinset_sup_edge [Fintype (edgeSet (G ⊔ edge s t))] (hn : ¬G.Adj s t) (h : s ≠ t) :
    (G ⊔ edge s t).edgeFinset.card = G.edgeFinset.card + 1

[Fintype ↑(G ⊔ SimpleGraph.edge s t).edgeSet]

(G ⊔ SimpleGraph.edge s t).edgeFinset.card = G.edgeFinset.card + 1


/-- A projection on a normed space `X` is said to be an M-projection if, for all `x` in `X`,
$\|x\| = max(\|P x\|,\|(1 - P) x\|)$.

Note that we write `P • x` instead of `P x` for reasons described in the module docstring.
-/
structure IsMprojection (P : M) : Prop where
  proj : IsIdempotentElem P
  Mnorm : ∀ x : X, ‖x‖ = max ‖P • x‖ ‖(1 - P) • x‖

{X : Type u_1}
[NormedAddCommGroup X]
{M : Type u_2}
[Ring M]
[Module M X]
{P : M}
(self : IsMprojection X P)
(x : X)


/-- Construct limit data for a binary product in `ModuleCat R`, using `ModuleCat.of R (M × N)`.
-/
@[simps cone_pt isLimit_lift]
def binaryProductLimitCone (M N : ModuleCat.{v} R) : Limits.LimitCone (pair M N)

(s : CategoryTheory.Limits.Cone (CategoryTheory.Limits.pair M N))

(M.binaryProductLimitCone N).isLimit.lift s =
  LinearMap.prod (s.π.app { as := CategoryTheory.Limits.WalkingPair.left })
    (s.π.app { as := CategoryTheory.Limits.WalkingPair.right })


@[simp] theorem find?_replicate_of_isSome (h : (f a).isSome) : findSome? f (replicate n a) = if n = 0 then none else f a

∀ {α : Type u_1} {α_1 : Type u_2} {f : α → Option α_1} {n : Nat} {a : α},
  (f a).isSome = true → List.findSome? f (List.replicate n a) = if n = 0 then none else f a


@[simp]
theorem map_lt_map {f : α → β} {s t : Multiset α} (h : s < t) : s.map f < t.map f

{α : Type u_1}
{β : Type v}
{f : α → β}
{s t : Multiset α}
(h : s < t)


theorem indepFun_iff_measure_inter_preimage_eq_mul {mβ : MeasurableSpace β}
    {mβ' : MeasurableSpace β'} :
    IndepFun f g κ μ ↔
      ∀ s t, MeasurableSet s → MeasurableSet t
        → ∀ᵐ a ∂μ, κ a (f ⁻¹' s ∩ g ⁻¹' t) = κ a (f ⁻¹' s) * κ a (g ⁻¹' t)

{α : Type u_1}
{Ω : Type u_2}
{β : Type u_4}
{β' : Type u_5}
{_mα : MeasurableSpace α}
{_mΩ : MeasurableSpace Ω}
{κ : ProbabilityTheory.Kernel α Ω}
{μ : MeasureTheory.Measure α}
{f : Ω → β}
{g : Ω → β'}
{mβ : MeasurableSpace β}
{mβ' : MeasurableSpace β'}

ProbabilityTheory.Kernel.IndepFun f g κ μ ↔
  ∀ (s : Set β) (t : Set β'),
    MeasurableSet s → MeasurableSet t → ∀ᵐ (a : α) ∂μ, (κ a) (f ⁻¹' s ∩ g ⁻¹' t) = (κ a) (f ⁻¹' s) * (κ a) (g ⁻¹' t)


/-- A `Groupoid` is a category such that all morphisms are isomorphisms. -/
class Groupoid (obj : Type u) extends Category.{v} obj : Type max u (v + 1) where
  /-- The inverse morphism -/
  inv : ∀ {X Y : obj}, (X ⟶ Y) → (Y ⟶ X)
  /-- `inv f` composed `f` is the identity -/
  inv_comp : ∀ {X Y : obj} (f : X ⟶ Y), comp (inv f) f = id Y := by aesop_cat
  /-- `f` composed with `inv f` is the identity -/
  comp_inv : ∀ {X Y : obj} (f : X ⟶ Y), comp f (inv f) = id X := by aesop_cat

{obj : Type u}
[self : CategoryTheory.Groupoid obj]
{X Y : obj}
(f : X ⟶ Y)

CategoryTheory.CategoryStruct.comp f (CategoryTheory.Groupoid.inv f) = CategoryTheory.CategoryStruct.id X


theorem iterate_derivative_at_0_eq_zero_of_lt (n : ℕ) {ν k : ℕ} :
    k < ν → (Polynomial.derivative^[k] (bernsteinPolynomial R n ν)).eval 0 = 0

(R : Type u_1)
[CommRing R]
(n : ℕ)
{ν k : ℕ}

k < ν → Polynomial.eval 0 ((⇑Polynomial.derivative)^[k] (bernsteinPolynomial R n ν)) = 0


theorem LinearIsometry.norm_compContinuousMultilinearMap (g : G →ₗᵢ[𝕜] G')
    (f : ContinuousMultilinearMap 𝕜 E G) :
    ‖g.toContinuousLinearMap.compContinuousMultilinearMap f‖ = ‖f‖

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


/-- The image of `[0,1]` under the homeomorphism `fun x ↦ a * x + b` is `[b, a+b]`.
-/
theorem affineHomeomorph_image_I (a b : 𝕜) (h : 0 < a) :
    affineHomeomorph a b h.ne.symm '' Set.Icc 0 1 = Set.Icc b (a + b)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[TopologicalRing 𝕜]
(a b : 𝕜)
(h : 0 < a)

⇑(affineHomeomorph a b ⋯) '' Set.Icc 0 1 = Set.Icc b (a + b)


theorem leadingCoeff_sub_of_degree_lt' (h : Polynomial.degree p < Polynomial.degree q) :
    (p - q).leadingCoeff = -q.leadingCoeff

{R : Type u}
[Ring R]
{p q : R[X]}
(h : p.degree < q.degree)


@[to_additive]
theorem toProd_surjective : Surjective (toProd : M ∗ N →* M × N)

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


protected theorem add_le_add_left {a b c : ℚ} : c + a ≤ c + b ↔ a ≤ b


lemma leftHomologyMap'_congr (h : Homotopy φ₁ φ₂) (h₁ : S₁.LeftHomologyData)
    (h₂ : S₂.LeftHomologyData) : leftHomologyMap' φ₁ h₁ h₂ = leftHomologyMap' φ₂ h₁ h₂

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

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

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


protected theorem ext_iff {f g : M₁ →SL[σ₁₂] M₂} : f = g ↔ ∀ x, f x = g x

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
{f g : M₁ →SL[σ₁₂] M₂}


theorem sqrt_eq (n : ℤ) : sqrt (n * n) = n.natAbs


@[to_additive (attr := simp)]
theorem prod_bind [CommMonoid β] (s : Multiset α) (t : α → Multiset β) :
    (s.bind t).prod = (s.map fun a => (t a).prod).prod

{α : Type u_1}
{β : Type v}
[AddCommMonoid β]
(s : Multiset α)
(t : α → Multiset β)

(s.bind t).sum = (Multiset.map (fun a => (t a).sum) s).sum


@[fun_prop]
theorem DifferentiableOn.prod (hf₁ : DifferentiableOn 𝕜 f₁ s) (hf₂ : DifferentiableOn 𝕜 f₂ s) :
    DifferentiableOn 𝕜 (fun x : E => (f₁ x, f₂ x)) s

{𝕜 : 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]
{f₁ : E → F}
{s : Set E}
{f₂ : E → G}
(hf₁ : DifferentiableOn 𝕜 f₁ s)
(hf₂ : DifferentiableOn 𝕜 f₂ s)

DifferentiableOn 𝕜 (fun x => (f₁ x, f₂ x)) s


/-- `mapCocone` commutes with `whisker`
-/
@[simps!]
def mapCoconeWhisker {E : K ⥤ J} {c : Cocone F} :
    mapCocone H (c.whisker E) ≅ (mapCocone H c).whisker E

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(H : C ⥤ D)
{F : J ⥤ C}
{E : K ⥤ J}
{c : CategoryTheory.Limits.Cocone F}

H.mapCoconeWhisker.inv.hom = 𝟙 (H.obj c.pt)


theorem length_toList (l : AssocList α β) : l.toList.length = l.length

{α : Type u_1}
{β : Type u_2}
(l : Batteries.AssocList α β)


theorem monotone_lintegral {_ : MeasurableSpace α} (μ : Measure α) : Monotone (lintegral μ)

∀ {x : MeasurableSpace α} (μ : MeasureTheory.Measure α), Monotone (MeasureTheory.lintegral μ)


@[to_additive]
theorem continuousSMul_inf {t₁ t₂ : TopologicalSpace X} [@ContinuousSMul M X _ _ t₁]
    [@ContinuousSMul M X _ _ t₂] : @ContinuousSMul M X _ _ (t₁ ⊓ t₂)

{M : Type u_2}
{X : Type u_3}
[TopologicalSpace M]
[VAdd M X]
{t₁ t₂ : TopologicalSpace X}
[ContinuousVAdd M X]
[ContinuousVAdd M X]


theorem Smooth.smoothAt (h : Smooth I I' f) : SmoothAt I I' f x

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


theorem DifferentiableAt.cpow (hf : DifferentiableAt ℂ f x) (hg : DifferentiableAt ℂ g x)
    (h0 : f x ∈ slitPlane) : DifferentiableAt ℂ (fun x => f x ^ g x) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f g : E → ℂ}
{x : E}
(hf : DifferentiableAt ℂ f x)
(hg : DifferentiableAt ℂ g x)
(h0 : f x ∈ Complex.slitPlane)


/-- Singletons are bounded. -/
theorem isVonNBounded_singleton (x : E) : IsVonNBounded 𝕜 ({x} : Set E)

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


/-- The linter message "error: SetLike.GradeZero.coe_one.{u_3, u_2, u_1} Left-hand side does
  not simplify, when using the simp lemma on itself." is wrong. The LHS does simplify. -/
@[nolint simpNF, simp, norm_cast] theorem coe_one : ↑(1 : A 0) = (1 : R)

{ι : Type u_1}
{R : Type u_2}
{S : Type u_3}
[SetLike S R]
[Monoid R]
[AddMonoid ι]
{A : ι → S}
[SetLike.GradedMonoid A]


@[to_additive] lemma monovary_inv : Monovary f⁻¹ g⁻¹ ↔ Monovary f g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[OrderedCommGroup β]
{f : ι → α}
{g : ι → β}


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


theorem IsSt.inv {x : ℝ*} {r : ℝ} (hi : ¬Infinitesimal x) (hr : IsSt x r) : IsSt x⁻¹ r⁻¹

{x : ℝ*}
{r : ℝ}
(hi : ¬x.Infinitesimal)
(hr : x.IsSt r)


@[simp]
theorem finsuppLequivDFinsupp_apply_apply [DecidableEq ι] [Semiring R] [AddCommMonoid M]
    [∀ m : M, Decidable (m ≠ 0)] [Module R M] :
    (↑(finsuppLequivDFinsupp (M := M) R) : (ι →₀ M) → _) = Finsupp.toDFinsupp

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

⇑(finsuppLequivDFinsupp R) = Finsupp.toDFinsupp


lemma cfc_eq_restrict (f : C(S, R)) (halg : UniformEmbedding (algebraMap R S)) {a : A} (hpa : p a)
    (hqa : q a) (h : SpectrumRestricts a f) [CompactSpace (spectrum S a)] (g : R → R) :
    cfc g a = cfc (fun x ↦ algebraMap R S (g (f x))) a

(halg : UniformEmbedding ⇑(algebraMap R S))

cfc g a = cfc (fun x => (algebraMap R S) (g (f x))) a


protected theorem le_of_lt {n m : Nat} : n < m → n ≤ m


/-- Given `w : TwoSquare T L R B` and a morphism `g : R.obj X₂ ⟶ B.obj X₃`, this is
the obvious functor `w.StructuredArrowRightwards g ⥤ w.CostructuredArrowDownwards g`. -/
@[simps]
def functor : w.StructuredArrowRightwards g ⥤ w.CostructuredArrowDownwards g

{C₁ : Type u₁}
{C₂ : Type u₂}
{C₃ : Type u₃}
{C₄ : Type u₄}
[CategoryTheory.Category.{v₁, u₁} C₁]
[CategoryTheory.Category.{v₂, u₂} C₂]
[CategoryTheory.Category.{v₃, u₃} C₃]
[CategoryTheory.Category.{v₄, u₄} C₄]
{T : CategoryTheory.Functor C₁ C₂}
{L : CategoryTheory.Functor C₁ C₃}
{R : CategoryTheory.Functor C₂ C₄}
{B : CategoryTheory.Functor C₃ C₄}
(w : CategoryTheory.TwoSquare T L R B)
{X₂ : C₂}
{X₃ : C₃}
(g : R.obj X₂ ⟶ B.obj X₃)
{f₁ f₂ : w.StructuredArrowRightwards g}
(φ : f₁ ⟶ f₂)

(CategoryTheory.TwoSquare.EquivalenceJ.functor w g).map φ =
  CategoryTheory.CostructuredArrow.homMk (CategoryTheory.StructuredArrow.homMk φ.right.left ⋯) ⋯


theorem algebraMap_mem (r : R) : algebraMap R A r ∈ (1 : Submodule R A)

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(r : R)


@[simp] theorem exists_unique_false : ¬∃! _ : α, False


theorem out_injective : Injective (@out p n R _)


/-- A Fraïssé class is a nonempty, isomorphism-invariant, essentially countable class of structures
satisfying the hereditary, joint embedding, and amalgamation properties. -/
class IsFraisse : Prop where
  is_nonempty : K.Nonempty
  FG : ∀ M : Bundled.{w} L.Structure, M ∈ K → Structure.FG L M
  is_equiv_invariant : ∀ M N : Bundled.{w} L.Structure, Nonempty (M ≃[L] N) → (M ∈ K ↔ N ∈ K)
  is_essentially_countable : (Quotient.mk' '' K).Countable
  hereditary : Hereditary K
  jointEmbedding : JointEmbedding K
  amalgamation : Amalgamation K

{K : Set (CategoryTheory.Bundled L.Structure)}

[self : FirstOrder.Language.IsFraisse K]


theorem norm_coe_le_norm (x : α) : ‖f x‖ ≤ ‖f‖

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
(f : BoundedContinuousFunction α β)
(x : α)


@[simp]
theorem zmodEquivZPowers_symm_apply_zpow' (i : ℤ) : h.zmodEquivZPowers.symm ⟨ζ ^ i, i, rfl⟩ = i

{R : Type u_4}
{k : ℕ}
[CommRing R]
{ζ : Rˣ}
(h : IsPrimitiveRoot ζ k)
(i : ℤ)


@[simp]
theorem tensor_eq_tensor {X Y : F C} : X.tensor Y = X ⊗ Y

{X Y : CategoryTheory.FreeMonoidalCategory C}

X.tensor Y = CategoryTheory.MonoidalCategory.tensorObj X Y


theorem not_mem_nil (a : α) : a ∉ @nil α


@[deprecated getElem?_append_right (since := "2024-06-12")]
theorem get?_append_right {l₁ l₂ : List α} {n : Nat} (h : l₁.length ≤ n) :
    (l₁ ++ l₂).get? n = l₂.get? (n - l₁.length)

{α : Type u_1}
{l₁ l₂ : List α}
{n : Nat}
(h : l₁.length ≤ n)


/-- A function `f` continuous on a set `K` is locally integrable on this set with respect
to any locally finite measure. -/
theorem ContinuousOn.locallyIntegrableOn [IsLocallyFiniteMeasure μ]
    [SecondCountableTopologyEither X E] (hf : ContinuousOn f K)
    (hK : MeasurableSet K) : LocallyIntegrableOn f K μ


theorem formPerm_eq_of_isRotated {l l' : List α} (hd : Nodup l) (h : l ~r l') :
    formPerm l = formPerm l'

{α : Type u_1}
[DecidableEq α]
{l l' : List α}
(hd : l.Nodup)
(h : l ~r l')


{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
{a : α}


theorem _root_.Function.Injective.wOppSide_map_iff {s : AffineSubspace R P} {x y : P}
    {f : P →ᵃ[R] P'} (hf : Function.Injective f) :
    (s.map f).WOppSide (f x) (f y) ↔ s.WOppSide x y

{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
{s : AffineSubspace R P}
{x y : P}
{f : P →ᵃ[R] P'}
(hf : Function.Injective ⇑f)

(AffineSubspace.map f s).WOppSide (f x) (f y) ↔ s.WOppSide x y


theorem map_eq {X Y : TopCat} {x₀ x₁ : X} (f : C(X, Y)) (p : Path.Homotopic.Quotient x₀ x₁) :
    (πₘ f).map p = p.mapFn f

{X Y : TopCat}
{x₀ x₁ : ↑X}
(f : C(↑X, ↑Y))
(p : Path.Homotopic.Quotient x₀ x₁)

(FundamentalGroupoid.fundamentalGroupoidFunctor.map f).map p = p.mapFn f


@[simp] protected theorem lt_irrefl (a : Int) : ¬a < a


theorem chain_dartAdj_darts {d : G.Dart} {v w : V} (h : d.snd = v) (p : G.Walk v w) :
    List.Chain G.DartAdj d p.darts

{V : Type u}
{G : SimpleGraph V}
{d : G.Dart}
{v w : V}
(h : d.toProd.2 = v)
(p : G.Walk v w)


@[simp]
theorem coeSubtype : (subtype s : s → R) = ((↑) : s → R)

{R : Type u}
{S : Type v}
[Ring R]
[SetLike S R]
[hSR : SubringClass S R]
(s : S)


/-- If the left cosets of `t` by elements of `s` are disjoint (but not necessarily distinct!), then
the size of `t` divides the size of `s • t`. -/
@[to_additive "If the left cosets of `t` by elements of `s` are disjoint (but not necessarily
distinct!), then the size of `t` divides the size of `s +ᵥ t`."]
theorem card_dvd_card_smul_right {s : Finset α} :
    ((· • t) '' (s : Set α)).PairwiseDisjoint id → t.card ∣ (s • t).card

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

((fun x => x +ᵥ t) '' ↑s).PairwiseDisjoint id → t.card ∣ (s +ᵥ t).card


@[to_additive]
theorem exponent_eq_iSup_orderOf' :
    exponent G = if ∃ g : G, orderOf g = 0 then 0 else ⨆ g : G, orderOf g

AddMonoid.exponent G = if ∃ g, addOrderOf g = 0 then 0 else ⨆ g, addOrderOf g


@[simp]
theorem adjoin_range_X : Algebra.adjoin R (range (X : σ → MvPolynomial σ R)) = ⊤

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

Algebra.adjoin R (Set.range MvPolynomial.X) = ⊤


@[simp]
theorem antitoneOn_toDual_comp_iff : AntitoneOn (toDual ∘ f : α → βᵒᵈ) s ↔ MonotoneOn f s

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

AntitoneOn (⇑OrderDual.toDual ∘ f) s ↔ MonotoneOn f s


theorem distribMulActionHom_ext {f g : (α →₀ M) →+[R] N}
    (h : ∀ (a : α) (m : M), f (single a m) = g (single a m)) : f = g

(h : ∀ (a : α) (m : M), f (Finsupp.single a m) = g (Finsupp.single a m))


lemma isUnit_unit' {ζ : G} {n} (hn) (hζ : IsPrimitiveRoot ζ n) :
    IsPrimitiveRoot (hζ.isUnit hn).unit' n

{G : Type u_3}
[DivisionCommMonoid G]
{ζ : G}
{n : ℕ}
(hn : 0 < n)
(hζ : IsPrimitiveRoot ζ n)


theorem expSeries_div_hasSum_exp (x : 𝔸) : HasSum (fun n => x ^ n / n !) (exp 𝕂 x)

(𝕂 : Type u_1)
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedDivisionRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(x : 𝔸)

HasSum (fun n => x ^ n / ↑n.factorial) (NormedSpace.exp 𝕂 x)


theorem HasDerivAtFilter.add_const (hf : HasDerivAtFilter f f' x L) (c : F) :
    HasDerivAtFilter (fun y => f y + c) f' x L

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{L : Filter 𝕜}
(hf : HasDerivAtFilter f f' x L)
(c : F)


/-- Given an equivalence `e : A ≃ₐ[R] B` of `R`-algebras and a subalgebra `S` of `A`,
`subalgebraMap` is the induced equivalence between `S` and `S.map e` -/
@[simps!]
def subalgebraMap (e : A ≃ₐ[R] B) (S : Subalgebra R A) : S ≃ₐ[R] S.map (e : A →ₐ[R] B)

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(e : A ≃ₐ[R] B)
(S : Subalgebra R A)
(x : ↑↑S.toAddSubmonoid)


lemma NNReal.ball_zero_eq_Ico (c : ℝ) :
    Metric.ball (0 : ℝ≥0) c = Set.Ico 0 c.toNNReal


/--
We say that `P : MorphismProperty Scheme` is local at the target if
1. `P` respects isomorphisms.
2. `P` holds for `f ∣_ U` for an open cover `U` of `Y` if and only if `P` holds for `f`.
Also see `IsLocalAtTarget.mk'` for a convenient constructor.
-/
class IsLocalAtTarget (P : MorphismProperty Scheme) : Prop where
  /-- `P` respects isomorphisms. -/
  respectsIso : P.RespectsIso := by infer_instance
  /-- `P` holds for `f ∣_ U` for an open cover `U` of `Y` if and only if `P` holds for `f`.  -/
  iff_of_openCover' :
    ∀ {X Y : Scheme.{u}} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover.{u} Y),
      P f ↔ ∀ i, P (𝒰.pullbackHom f i)

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

[self : AlgebraicGeometry.IsLocalAtTarget P]

P f ↔ ∀ (i : (𝒰.pullbackCover f).J), P (𝒰.pullbackHom f i)


theorem coe_replicate : (replicate n a : Multiset α) = Multiset.replicate n a

↑(Sym.replicate n a) = Multiset.replicate n a


@[simp] theorem row_inj [Nonempty ι] {v w : n → α} : row ι v = row ι w ↔ v = w

{n : Type u_3}
{α : Type v}
{ι : Type u_6}
[Nonempty ι]
{v w : n → α}


lemma cfcₙ_apply_pi {ι : Type*} (f : ι → R → R) (a : A) (ha := by cfc_tac)
    (hf : ∀ i, ContinuousOn (f i) (σₙ R a) := by cfc_cont_tac)
    (hf0 : ∀ i, f i 0 = 0 := by cfc_zero_tac) :
    (fun i => cfcₙ (f i) a) = (fun i => cfcₙHom (a := a) ha ⟨⟨_, (hf i).restrict⟩, hf0 i⟩)

(hf : ∀ (i : ι), ContinuousOn (f i) (σₙ R a) := by cfc_cont_tac)

(hf0 : ∀ (i : ι), f i 0 = 0 := by cfc_zero_tac)

(fun i => cfcₙ (f i) a) = fun i =>
  (cfcₙHom ha) { toFun := (σₙ R a).restrict (f i), continuous_toFun := ⋯, map_zero' := ⋯ }


@[simp]
theorem min_eq_right_iff : min a b = b ↔ b ≤ a


/-- Given `S' : Solution'`, then `S'.a` and `S'.b` are both congruent to `1` modulo `λ ^ 4` or are
both congruent to `-1`.  -/
lemma a_cube_b_cube_congr_one_or_neg_one :
    λ ^ 4 ∣ S'.a ^ 3 - 1 ∧ λ ^ 4 ∣ S'.b ^ 3 + 1 ∨ λ ^ 4 ∣ S'.a ^ 3 + 1 ∧ λ ^ 4 ∣ S'.b ^ 3 - 1

(S' : FermatLastTheoremForThreeGen.Solution' hζ)

(hζ.toInteger - 1) ^ 4 ∣ S'.a ^ 3 - 1 ∧ (hζ.toInteger - 1) ^ 4 ∣ S'.b ^ 3 + 1 ∨
  (hζ.toInteger - 1) ^ 4 ∣ S'.a ^ 3 + 1 ∧ (hζ.toInteger - 1) ^ 4 ∣ S'.b ^ 3 - 1


@[to_additive]
theorem toWord_injective : Function.Injective (toWord : FreeGroup α → List (α × Bool))


@[to_additive eventually_cobounded_le_norm]
lemma eventually_cobounded_le_norm' (a : ℝ) : ∀ᶠ x in cobounded E, a ≤ ‖x‖

{E : Type u_3}
[SeminormedAddGroup E]
(a : ℝ)

∀ᶠ (x : E) in Bornology.cobounded E, a ≤ ‖x‖


theorem norm_int_lt_one_iff_dvd (k : ℤ) : ‖(k : ℚ_[p])‖ < 1 ↔ ↑p ∣ k

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(k : ℤ)

‖↑k‖ < 1 ↔ ↑p ∣ k


@[to_additive]
lemma isClosedMap_div_right (a : G) : IsClosedMap (· / a)

{G : Type w}
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
(a : G)


theorem ofRat_sub (x y : β) : ofRat (x - y) = (ofRat x - ofRat y : Cauchy abv)

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

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


lemma eLpNorm_nnreal_eq_eLpNorm' {f : α → F} {p : ℝ≥0} (hp : p ≠ 0) :
    eLpNorm f p μ = eLpNorm' f p μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}
{p : ℝ≥0}
(hp : p ≠ 0)

MeasureTheory.eLpNorm f (↑p) μ = MeasureTheory.eLpNorm' f (↑p) μ


theorem transAt_indep {i} (j) (f g : Ω^ N X x) :
    (⟦transAt i f g⟧ : HomotopyGroup N X x) = ⟦transAt j f g⟧

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

⟦GenLoop.transAt i f g⟧ = ⟦GenLoop.transAt j f g⟧


theorem domCongr_toAlgHom (e : G ≃* H) : (domCongr k A e).toAlgHom = mapDomainAlgHom k A e

(k : Type u₁)
{G : Type u₂}
{H : Type u_1}
[CommSemiring k]
[Monoid G]
[Monoid H]
(A : Type u₃)
[Semiring A]
[Algebra k A]
(e : G ≃* H)

↑(MonoidAlgebra.domCongr k A e) = MonoidAlgebra.mapDomainAlgHom k A e