lemma sup_nhds [Sup L] [ContinuousSup L] (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) :
    Tendsto (fun i => f i ⊔ g i) l (𝓝 (x ⊔ y))

{L : Type u_1}
[TopologicalSpace L]
{α : Type u_3}
{l : Filter α}
{f g : α → L}
{x y : L}
[Sup L]
[ContinuousSup L]
(hf : Filter.Tendsto f l (𝓝 x))
(hg : Filter.Tendsto g l (𝓝 y))

Filter.Tendsto (fun i => f i ⊔ g i) l (𝓝 (x ⊔ y))


theorem ContMDiffAt.prod_map (hf : ContMDiffAt I I' n f x) (hg : ContMDiffAt J J' n g y) :
    ContMDiffAt (I.prod J) (I'.prod J') n (Prod.map f g) (x, y)

{𝕜 : 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 : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{F' : Type u_14}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{G' : Type u_15}
[TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'}
{N' : Type u_16}
[TopologicalSpace N']
[ChartedSpace G' N']
{f : M → M'}
{x : M}
{n : ℕ∞}
{g : N → N'}
{y : N}
(hf : ContMDiffAt I I' n f x)
(hg : ContMDiffAt J J' n g y)


theorem IsCycleOn.pow_card_apply {s : Finset α} (hf : f.IsCycleOn s) (ha : a ∈ s) :
    (f ^ s.card) a = a

{α : Type u_2}
{f : Equiv.Perm α}
{a : α}
{s : Finset α}
(hf : f.IsCycleOn ↑s)
(ha : a ∈ s)


theorem spectrum_eq_range [CompleteSpace 𝕜] (f : C(X, 𝕜)) : spectrum 𝕜 f = Set.range f

{X : Type u_1}
{𝕜 : Type u_4}
[TopologicalSpace X]
[NormedField 𝕜]
[CompleteSpace 𝕜]
(f : C(X, 𝕜))


/-- The separable degree divides the degree, in function of the exponential characteristic of F. -/
theorem IsSeparableContraction.dvd_degree' {g} (hf : IsSeparableContraction q f g) :
    ∃ m : ℕ, g.natDegree * q ^ m = f.natDegree

(hf : Polynomial.HasSeparableContraction q f)

Polynomial.IsSeparableContraction q f g → ∃ m, g.natDegree * q ^ m = f.natDegree


/-- An alternative statement of the Compactness Theorem. A formula `φ` is modeled by a
theory iff there is a finite subset `T0` of the theory such that `φ` is modeled by `T0` -/
theorem models_iff_finset_models {φ : L.Sentence} :
    T ⊨ᵇ φ ↔ ∃ T0 : Finset L.Sentence, (T0 : L.Theory) ⊆ T ∧ (T0 : L.Theory) ⊨ᵇ φ

{L : FirstOrder.Language}
{T : L.Theory}
{φ : L.Sentence}

T ⊨ᵇ φ ↔ ∃ T0, ↑T0 ⊆ T ∧ ↑T0 ⊨ᵇ φ


/-- An open embedding of `X` into `Y`, with `X` nonempty, defines a partial homeomorphism
whose source is all of `X`. The converse is also true; see `PartialHomeomorph.to_openEmbedding`. -/
@[simps! (config := mfld_cfg) apply source target]
noncomputable def toPartialHomeomorph [Nonempty X] : PartialHomeomorph X Y

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(f : X → Y)
(h : OpenEmbedding f)
[Nonempty X]

↑(OpenEmbedding.toPartialHomeomorph f h) = f


@[reassoc (attr := simp)]
theorem kernelIsoOfEq_hom_comp_ι {f g : X ⟶ Y} [HasKernel f] [HasKernel g] (h : f = g) :
    (kernelIsoOfEq h).hom ≫ kernel.ι g = kernel.ι f

(CategoryTheory.Limits.kernelIsoOfEq h).hom ≫ CategoryTheory.Limits.kernel.ι g = CategoryTheory.Limits.kernel.ι f


theorem Convex.quasiconvexOn_of_convex_le (hs : Convex 𝕜 s) (h : ∀ r, Convex 𝕜 { x | f x ≤ r }) :
    QuasiconvexOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LE β]
[SMul 𝕜 E]
{s : Set E}
{f : E → β}
(hs : Convex 𝕜 s)
(h : ∀ (r : β), Convex 𝕜 {x | f x ≤ r})


theorem wronskian_eq_of_sum_zero {a b c : R[X]} (hAdd : a + b + c = 0) :
    wronskian a b = wronskian b c

{R : Type u_1}
[CommRing R]
{a b c : R[X]}
(hAdd : a + b + c = 0)


theorem sub_succ (n m : Nat) : n - succ m = pred (n - m)


protected theorem exists_add_pow_prime_pow_eq (hp : p.Prime) (h : Commute x y) (n : ℕ) :
    ∃ r, (x + y) ^ p ^ n = x ^ p ^ n + y ^ p ^ n + p * r

{R : Type u_1}
[Semiring R]
{p : ℕ}
{x y : R}
(hp : Nat.Prime p)
(h : Commute x y)
(n : ℕ)

∃ r, (x + y) ^ p ^ n = x ^ p ^ n + y ^ p ^ n + ↑p * r


/-- **Tonelli's Theorem**: For `ℝ≥0∞`-valued almost everywhere measurable functions on `α × β`,
  the integral of `f` is equal to the iterated integral. -/
theorem lintegral_prod (f : α × β → ℝ≥0∞) (hf : AEMeasurable f (μ.prod ν)) :
    ∫⁻ z, f z ∂μ.prod ν = ∫⁻ x, ∫⁻ y, f (x, y) ∂ν ∂μ

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
(f : α × β → ℝ≥0∞)
(hf : AEMeasurable f (μ.prod ν))

∫⁻ (z : α × β), f z ∂μ.prod ν = ∫⁻ (x : α), ∫⁻ (y : β), f (x, y) ∂ν ∂μ


theorem hasFTaylorSeriesUpToOn_pi :
    HasFTaylorSeriesUpToOn n (fun x i => φ i x)
        (fun x m => ContinuousMultilinearMap.pi fun i => p' i x m) s ↔
      ∀ i, HasFTaylorSeriesUpToOn n (φ i) (p' i) s

{p' : (i : ι) → E → FormalMultilinearSeries 𝕜 E (F' i)}

HasFTaylorSeriesUpToOn n (fun x i => φ i x) (fun x m => ContinuousMultilinearMap.pi fun i => p' i x m) s ↔
  ∀ (i : ι), HasFTaylorSeriesUpToOn n (φ i) (p' i) s


/-- `WittVector.coeff x 0` as a `RingHom` -/
@[simps]
noncomputable def constantCoeff : 𝕎 R →+* R

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


/-- The identity braided monoidal functor. -/
@[simps!]
def id : BraidedFunctor C C

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

(CategoryTheory.BraidedFunctor.id C).obj X = X


@[simp]
theorem realize_var (v : α → M) (k) : realize v (var k : L.Term α) = v k

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
(v : α → M)
(k : α)

FirstOrder.Language.Term.realize v (FirstOrder.Language.var k) = v k


/-- If `0 : X ⟶ Y` is an epimorphism, then `Y ≅ 0`. -/
@[simps]
def isoZeroOfEpiZero {X Y : C} (h : Epi (0 : X ⟶ Y)) : Y ≅ 0

(CategoryTheory.Limits.isoZeroOfEpiZero h).inv = 0


lemma evalEval_baseChange_polynomial_X_Y :
    (W.baseChange R[X][Y]).toAffine.polynomial.evalEval (C X) Y = W.polynomial

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

Polynomial.evalEval (Polynomial.C Polynomial.X) Y (WeierstrassCurve.baseChange W R[X][Y]).toAffine.polynomial =
  W.polynomial


theorem lf_congr_left {x₁ x₂ y : PGame} (hx : x₁ ≈ x₂) : x₁ ⧏ y ↔ x₂ ⧏ y

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


@[simp]
theorem Vector.mOfFn_part_some {α n} :
    ∀ f : Fin n → α, (Vector.mOfFn fun i => Part.some (f i)) = Part.some (Vector.ofFn f)

(Mathlib.Vector.mOfFn fun i => Part.some (f i)) = Part.some (Mathlib.Vector.ofFn f)


theorem funext_iff {σ : Type*} {p q : MvPolynomial σ R} :
    p = q ↔ ∀ x : σ → R, eval x p = eval x q

{R : Type u_1}
[CommRing R]
[IsDomain R]
[Infinite R]
{σ : Type u_2}
{p q : MvPolynomial σ R}

p = q ↔ ∀ (x : σ → R), (MvPolynomial.eval x) p = (MvPolynomial.eval x) q


/-- The morphism in `ShortComplex C` associated to a morphism in `ShortComplex Cᵒᵖ` -/
@[simps]
def unopMap {S₁ S₂ : ShortComplex Cᵒᵖ} (φ : S₁ ⟶ S₂) : S₂.unop ⟶ S₁.unop

{S₁ S₂ : CategoryTheory.ShortComplex Cᵒᵖ}

(CategoryTheory.ShortComplex.unopMap φ).τ₃ = φ.τ₁.unop


/-- Product of a list of elements in a subring is in the subring. -/
protected theorem list_prod_mem {l : List R} : (∀ x ∈ l, x ∈ s) → l.prod ∈ s

{R : Type u}
[Ring R]
(s : Subring R)
{l : List R}


theorem Gamma0_det (N : ℕ) (A : Gamma0 N) : (A.1.1.det : ZMod N) = 1

(N : ℕ)
(A : ↥(CongruenceSubgroup.Gamma0 N))


theorem norm_apply_le_self [NormOneClass A] [FunLike F A 𝕜] [AlgHomClass F 𝕜 A 𝕜]
    (f : F) (a : A) : ‖f a‖ ≤ ‖a‖

{𝕜 : Type u_1}
{A : Type u_2}
{F : Type u_3}
[NormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
[NormOneClass A]
[FunLike F A 𝕜]
[AlgHomClass F 𝕜 A 𝕜]
(f : F)
(a : A)


/-- A proof that `RankOne.unit v ≠ 1`. -/
theorem unit_ne_one : unit v ≠ 1

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


theorem isCoseparating_op_iff (𝒢 : Set C) : IsCoseparating 𝒢.op ↔ IsSeparating 𝒢

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(𝒢 : Set C)

CategoryTheory.IsCoseparating 𝒢.op ↔ CategoryTheory.IsSeparating 𝒢


/-- A semigroup homomorphism `M →ₙ* N` can equivalently be viewed as a semigroup homomorphism
`Mᵐᵒᵖ →ₙ* Nᵐᵒᵖ`. This is the action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[to_additive (attr := simps)
      "An additive semigroup homomorphism `AddHom M N` can equivalently be viewed as an
      additive semigroup homomorphism `AddHom Mᵃᵒᵖ Nᵃᵒᵖ`. This is the action of the
      (fully faithful)`ᵃᵒᵖ`-functor on morphisms."]
def MulHom.op {M N} [Mul M] [Mul N] : (M →ₙ* N) ≃ (Mᵐᵒᵖ →ₙ* Nᵐᵒᵖ)

{M : Type u_2}
{N : Type u_3}
[Mul M]
[Mul N]
(f : Mᵐᵒᵖ →ₙ* Nᵐᵒᵖ)

∀ (a : M), (MulHom.op.symm f) a = (MulOpposite.unop ∘ ⇑f ∘ MulOpposite.op) a


@[simp]
theorem empty_toFinmap : (⟦∅⟧ : Finmap β) = ∅


/-- If a function `f` is twice differentiable on an open convex set `D ⊆ ℝ` and
`f''` is nonpositive on `D`, then `f` is concave on `D`. -/
theorem concaveOn_of_deriv2_nonpos' {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ}
    (hf' : DifferentiableOn ℝ f D) (hf'' : DifferentiableOn ℝ (deriv f) D)
    (hf''_nonpos : ∀ x ∈ D, deriv^[2] f x ≤ 0) : ConcaveOn ℝ D f


@[reassoc]
theorem rightUnitor_comp (f : a ⟶ b) (g : b ⟶ c) :
    (ρ_ (f ≫ g)).hom = (α_ f g (𝟙 c)).hom ≫ f ◁ (ρ_ g).hom

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

(CategoryTheory.Bicategory.rightUnitor (CategoryTheory.CategoryStruct.comp f g)).hom =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator f g (CategoryTheory.CategoryStruct.id c)).hom
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.rightUnitor g).hom)


theorem mapClusterPt_iff (hf : Inducing f) {x : X} {l : Filter X} :
    MapClusterPt (f x) l f ↔ ClusterPt x l

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(hf : Inducing f)
{x : X}
{l : Filter X}


/-- Any entry of any member of `l.ranges` is strictly smaller than `Nat.sum l`.
See `List.mem_mem_ranges_iff_lt_sum` for the version about `List.sum`. -/
lemma mem_mem_ranges_iff_lt_natSum (l : List ℕ) {n : ℕ} :
    (∃ s ∈ l.ranges, n ∈ s) ↔ n < Nat.sum l


@[simp]
theorem restrict_dite {s : Set α} [∀ x, Decidable (x ∈ s)] (f : ∀ a ∈ s, β)
    (g : ∀ a ∉ s, β) :
    (s.restrict fun a => if h : a ∈ s then f a h else g a h) = (fun a : s => f a a.2)

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

(s.restrict fun a => if h : a ∈ s then f a h else g a h) = fun a => f ↑a ⋯


theorem prime_dvd_prime_iff_eq {p q : ℕ} (pp : p.Prime) (qp : q.Prime) : p ∣ q ↔ p = q

{p q : ℕ}
(pp : Nat.Prime p)
(qp : Nat.Prime q)


/-- The ideal `I` equals the finprod `∏_v v^(val_v(I))`. -/
theorem finprod_heightOneSpectrum_factorization {I : Ideal R} (hI : I ≠ 0) :
    ∏ᶠ v : HeightOneSpectrum R, v.maxPowDividing I = I

{R : Type u_1}
[CommRing R]
[IsDedekindDomain R]
{I : Ideal R}
(hI : I ≠ 0)

∏ᶠ (v : IsDedekindDomain.HeightOneSpectrum R), v.maxPowDividing I = I


theorem zip_map_left (f : α → γ) (l₁ : List α) (l₂ : List β) :
    zip (l₁.map f) l₂ = (zip l₁ l₂).map (Prod.map f id)

{α : Type u_1}
{γ : Type u_2}
{β : Type u_3}
(f : α → γ)
(l₁ : List α)
(l₂ : List β)

(List.map f l₁).zip l₂ = List.map (Prod.map f id) (l₁.zip l₂)


/-- A set of points, whose `vectorSpan` is finite-dimensional, is coplanar if and only if their
`vectorSpan` has dimension at most `2`. -/
theorem coplanar_iff_finrank_le_two {s : Set P} [FiniteDimensional k (vectorSpan k s)] :
    Coplanar k s ↔ finrank k (vectorSpan k s) ≤ 2

{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}
[FiniteDimensional k ↥(vectorSpan k s)]

Coplanar k s ↔ FiniteDimensional.finrank k ↥(vectorSpan k s) ≤ 2


@[to_additive]
theorem eq_inv_of_mul_eq_one_left (h : a * b = 1) : a = b⁻¹

{G : Type u_1}
[DivisionMonoid G]
{a b : G}
(h : a * b = 1)


theorem obj_surjective_of_im_eq_top (hφ : Function.Injective φ.obj) (hφ' : im φ hφ = ⊤) :
    Function.Surjective φ.obj

(hφ' : CategoryTheory.Subgroupoid.im φ hφ = ⊤)


@[to_additive]
theorem controlled_prod_of_mem_closure {s : Subgroup E} (hg : a ∈ closure (s : Set E)) {b : ℕ → ℝ}
    (b_pos : ∀ n, 0 < b n) :
    ∃ v : ℕ → E,
      Tendsto (fun n => ∏ i ∈ range (n + 1), v i) atTop (𝓝 a) ∧
        (∀ n, v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ n, 0 < n → ‖v n‖ < b n

{E : Type u_6}
[SeminormedCommGroup E]
{a : E}
{s : Subgroup E}
(hg : a ∈ closure ↑s)
{b : ℕ → ℝ}
(b_pos : ∀ (n : ℕ), 0 < b n)

∃ v,
  Filter.Tendsto (fun n => ∏ i ∈ Finset.range (n + 1), v i) Filter.atTop (𝓝 a) ∧
    (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n


/-- 1 is of finite order in any monoid. -/
@[to_additive "0 is of finite order in any additive monoid."]
theorem isOfFinOrder_one : IsOfFinOrder (1 : G)


lemma finiteCoproduct.hom_ext {B : LightProfinite.{max u w}} (f g : finiteCoproduct X ⟶ B)
    (h : ∀ a : α, finiteCoproduct.ι X a ≫ f = finiteCoproduct.ι X a ≫ g) : f = g

(f g : LightProfinite.finiteCoproduct X ⟶ B)

(h :
  ∀ (a : α),
    CategoryTheory.CategoryStruct.comp (LightProfinite.finiteCoproduct.ι X a) f =
      CategoryTheory.CategoryStruct.comp (LightProfinite.finiteCoproduct.ι X a) g)


@[simp, norm_cast] lemma coe_nnratCast (q : ℚ≥0) : (q : {x : α // 0 ≤ x}) = (q : α)

{α : Type u_1}
[LinearOrderedSemifield α]
(q : ℚ≥0)


theorem add_le_le (a : Nat) {b c : Nat} (h : b ≤ c) : (a + b ≤ c) = (a ≤ c - b)


theorem add_zero {X Y : C} (a : X ⟶ Y) : a + 0 = a


@[to_additive (attr := simp)] lemma mulDissociated_empty : MulDissociated (∅ : Set α)


/-- The constant factor occurring in the conclusion of `lintegral_pow_le_pow_lintegral_fderiv`.
It only depends on `E`, `μ` and `p`.
It is determined by the ratio of the measures on `E` and `ℝⁿ` and
the operator norm of a chosen equivalence `E ≃ ℝⁿ` (raised to suitable powers involving `p`).-/
irreducible_def lintegralPowLePowLIntegralFDerivConst (p : ℝ) : ℝ≥0

{E : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(p : ℝ)

MeasureTheory.lintegralPowLePowLIntegralFDerivConst μ p =
  let ι := Fin (FiniteDimensional.finrank ℝ E);
  let_fun this := ⋯;
  let e := ContinuousLinearEquiv.ofFinrankEq this;
  let c := μ.addHaarScalarFactor (MeasureTheory.Measure.map (⇑e.symm) MeasureTheory.volume);
  c * ‖↑e.symm‖₊ ^ p * (c ^ p)⁻¹


theorem cmp_to_int : ∀ m n, (Ordering.casesOn (cmp m n) ((m : ℤ) < n) (m = n) ((n : ℤ) < m) : Prop)

Ordering.casesOn (m.cmp n) (↑m < ↑n) (m = n) (↑n < ↑m)


@[to_additive]
theorem orderOf_pow' (h : n ≠ 0) : orderOf (x ^ n) = orderOf x / gcd (orderOf x) n

{G : Type u_1}
[AddMonoid G]
(x : G)
{n : ℕ}
(h : n ≠ 0)

addOrderOf (n • x) = addOrderOf x / (addOrderOf x).gcd n


/-- An auxiliary lemma for
`MeasureTheory.integral_divergence_of_hasFDerivWithinAt_off_countable`. This is exactly
`BoxIntegral.hasIntegral_GP_divergence_of_forall_hasDerivWithinAt` reformulated for the
Bochner integral. -/
theorem integral_divergence_of_hasFDerivWithinAt_off_countable_aux₁ (I : Box (Fin (n + 1)))
    (f : ℝⁿ⁺¹ → Eⁿ⁺¹)
    (f' : ℝⁿ⁺¹ → ℝⁿ⁺¹ →L[ℝ] Eⁿ⁺¹) (s : Set ℝⁿ⁺¹)
    (hs : s.Countable) (Hc : ContinuousOn f (Box.Icc I))
    (Hd : ∀ x ∈ (Box.Icc I) \ s, HasFDerivWithinAt f (f' x) (Box.Icc I) x)
    (Hi : IntegrableOn (fun x => ∑ i, f' x (e i) i) (Box.Icc I)) :
    (∫ x in Box.Icc I, ∑ i, f' x (e i) i) =
      ∑ i : Fin (n + 1),
        ((∫ x in Box.Icc (I.face i), f (i.insertNth (I.upper i) x) i) -
          ∫ x in Box.Icc (I.face i), f (i.insertNth (I.lower i) x) i)

(f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E)

(f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E)

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

(Hd : ∀ x ∈ BoxIntegral.Box.Icc I \ s, HasFDerivWithinAt f (f' x) (BoxIntegral.Box.Icc I) x)

(Hi :
  MeasureTheory.IntegrableOn (fun x => ∑ i : Fin (n + 1), (f' x) (Pi.single i 1) i) (BoxIntegral.Box.Icc I)
    MeasureTheory.volume)

∫ (x : Fin (n + 1) → ℝ) in BoxIntegral.Box.Icc I, ∑ i : Fin (n + 1), (f' x) (Pi.single i 1) i =
  ∑ i : Fin (n + 1),
    ((∫ (x : Fin n → ℝ) in BoxIntegral.Box.Icc (I.face i), f (i.insertNth (I.upper i) x) i) -
      ∫ (x : Fin n → ℝ) in BoxIntegral.Box.Icc (I.face i), f (i.insertNth (I.lower i) x) i)


@[simp]
theorem toNonUnitalRingHom_apply_symm_toNonUnitalRingHom_apply (e : R ≃+* S) :
    ∀ y : S, e.toNonUnitalRingHom (e.symm.toNonUnitalRingHom y) = y

{R : Type u_4}
{S : Type u_5}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(e : R ≃+* S)
(y : S)


theorem image_mem_of_mem_comap {f : Filter α} {c : β → α} (h : range c ∈ f) {W : Set β}
    (W_in : W ∈ comap c f) : c '' W ∈ f

{α : Type u}
{β : Type v}
{f : Filter α}
{c : β → α}
(h : Set.range c ∈ f)
{W : Set β}
(W_in : W ∈ Filter.comap c f)


@[elementwise (attr := simp)]
theorem binaryProductIso_hom_comp_snd (X Y : Type u) :
    (binaryProductIso X Y).hom ≫ _root_.Prod.snd = Limits.prod.snd

(CategoryTheory.Limits.Types.binaryProductIso X Y).hom ≫ Prod.snd = CategoryTheory.Limits.prod.snd


theorem map_of_image (h : f '' I = J) : I.map f = J

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


theorem foldl_eq_foldr' : ∀ a l, foldl f a l = foldr (flip f) a l

{f : α → β → α}

(hf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b)

List.foldl f a l = List.foldr (flip f) a l


theorem Cauchy.le_nhds_lim [CompleteSpace α] {f : Filter α} (hf : Cauchy f) :
    haveI := hf.1.nonempty; f ≤ 𝓝 (lim f)

{α : Type u}
[uniformSpace : UniformSpace α]
[CompleteSpace α]
{f : Filter α}
(hf : Cauchy f)


theorem le_add_left (n m : Nat): n ≤ m + n


@[simp]
theorem lanCompIsoWhisker_inv_right :
    (lanCompIsoWhisker f g h).inv.right = (isKan f g h).desc (lanLeftExtension f (g ≫ h))

[CategoryTheory.Bicategory.Lan.CommuteWith f g h]

(CategoryTheory.Bicategory.Lan.CommuteWith.lanCompIsoWhisker f g h).inv.right =
  (CategoryTheory.Bicategory.Lan.CommuteWith.isKan f g h).desc
    (CategoryTheory.Bicategory.lanLeftExtension f (CategoryTheory.CategoryStruct.comp g h))


/-- A concrete counterexample shows that `Continuous.homeoOfEquivCompactToT2`
cannot be generalized from `T2Space` to `T1Space`.

Let `α = OnePoint ℕ` be the one-point compactification of `ℕ`, and let `β` be the same space
`OnePoint ℕ` with the cofinite topology.  Then `α` is compact, `β` is T1, and the identity map
`id : α → β` is a continuous equivalence that is not a homeomorphism.
-/
theorem Continuous.homeoOfEquivCompactToT2.t1_counterexample :
    ∃ (α β : Type) (_ : TopologicalSpace α) (_ : TopologicalSpace β),
      CompactSpace α ∧ T1Space β ∧ ∃ f : α ≃ β, Continuous f ∧ ¬Continuous f.symm

∃ α β x x_1, CompactSpace α ∧ T1Space β ∧ ∃ f, Continuous ⇑f ∧ ¬Continuous ⇑f.symm


/-- Adjoint equivalences between two objects. -/
structure Equivalence (a b : B) where
  /-- A 1-morphism in one direction. -/
  hom : a ⟶ b
  /-- A 1-morphism in the other direction. -/
  inv : b ⟶ a
  /-- The composition `hom ≫ inv` is isomorphic to the identity. -/
  unit : 𝟙 a ≅ hom ≫ inv
  /-- The composition `inv ≫ hom` is isomorphic to the identity. -/
  counit : inv ≫ hom ≅ 𝟙 b
  /-- The composition of the unit and the counit is equal to the identity up to unitors. -/
  left_triangle : leftZigzagIso unit counit = λ_ hom ≪≫ (ρ_ hom).symm := by aesop_cat

(self : CategoryTheory.Bicategory.Equivalence a b)

CategoryTheory.Bicategory.leftZigzagIso self.unit self.counit =
  CategoryTheory.Bicategory.leftUnitor self.hom ≪≫ (CategoryTheory.Bicategory.rightUnitor self.hom).symm


theorem normalize_zero : normalize (0 : α) = 0

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]


theorem forall_restrictGermPredicate_of_forall
    {P : ∀ x : X, Germ (𝓝 x) Y → Prop} (h : ∀ x, P x f) :
    ∀ x, RestrictGermPredicate P A x f

{X : Type u_3}
{Y : Type u_4}
[TopologicalSpace X]
{f : X → Y}
{A : Set X}
{P : (x : X) → (𝓝 x).Germ Y → Prop}
(h : ∀ (x : X), P x ↑f)
(x : X)


theorem sum_finsupport' (hx₀ : x₀ ∈ s) {I : Finset ι} (hI : ρ.finsupport x₀ ⊆ I) :
    ∑ i ∈ I, ρ i x₀ = 1

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{s : Set M}
(ρ : SmoothPartitionOfUnity ι I M s)
(x₀ : M)
(hx₀ : x₀ ∈ s)

∀ {I_1 : Finset ι}, ρ.finsupport x₀ ⊆ I_1 → ∑ i ∈ I_1, (ρ i) x₀ = 1


theorem setToFun_smul_left (hT : DominatedFinMeasAdditive μ T C) (c : ℝ) (f : α → E) :
    setToFun μ (fun s => c • T s) (hT.smul c) f = c • setToFun μ T hT f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

MeasureTheory.setToFun μ (fun s => c • T s) ⋯ f = c • MeasureTheory.setToFun μ T hT f


@[simp] theorem run'_eq [Monad m] (x : StateCpsT σ m α) (s : σ) : x.run' s = x.runK s (fun a _ => pure a)

{α σ : Type u}
{m : Type u → Type v}
[Monad m]
(x : StateCpsT σ m α)
(s : σ)


/-- **Burnside's lemma** : given a finite group `G` acting on a set `X`, the average number of
elements fixed by each `g ∈ G` is the number of orbits. -/
@[to_additive AddAction.sum_card_fixedBy_eq_card_orbits_mul_card_addGroup
      "**Burnside's lemma** : given a finite additive group `G` acting on a set `X`,
      the average number of elements fixed by each `g ∈ G` is the number of orbits. "]
theorem sum_card_fixedBy_eq_card_orbits_mul_card_group [Fintype α] [∀ a : α, Fintype <| fixedBy β a]
    [Fintype Ω] : (∑ a : α, Fintype.card (fixedBy β a)) = Fintype.card Ω * Fintype.card α

[(a : α) → Fintype ↑(MulAction.fixedBy β a)]

[Fintype (Quotient (MulAction.orbitRel α β))]

∑ a : α, Fintype.card ↑(MulAction.fixedBy β a) = Fintype.card (Quotient (MulAction.orbitRel α β)) * Fintype.card α


protected theorem lt_add_one_iff : m < n + 1 ↔ m ≤ n


theorem sum_take_map_length_splitWrtComposition (l : List α) (c : Composition l.length) (i : ℕ) :
    (((l.splitWrtComposition c).map length).take i).sum = c.sizeUpTo i

{α : Type u_1}
(l : List α)
(c : Composition l.length)
(i : ℕ)

(List.take i (List.map List.length (l.splitWrtComposition c))).sum = c.sizeUpTo i


/-- Let `E` be a topological vector space over a normed field `𝕜`, let `α` be any type.
Let `H` be a submodule of `α →ᵤ E` such that the range of each `f ∈ H` is von Neumann bounded.
Then `H` is a topological vector space over `𝕜`,
i.e., the pointwise scalar multiplication is continuous in both variables.

For convenience we require that `H` is a vector space over `𝕜`
with a topology induced by `UniformFun.ofFun ∘ φ`, where `φ : H →ₗ[𝕜] (α → E)`. -/
lemma UniformFun.continuousSMul_induced_of_range_bounded (φ : hom)
    (hφ : Inducing (ofFun ∘ φ)) (h : ∀ u : H, Bornology.IsVonNBounded 𝕜 (Set.range (φ u))) :
    ContinuousSMul 𝕜 H

(hφ : Inducing (⇑UniformFun.ofFun ∘ ⇑φ))

(h : ∀ (u : H), Bornology.IsVonNBounded 𝕜 (Set.range (φ u)))


@[ext]
protected theorem Path.ext : ∀ {γ₁ γ₂ : Path x y}, (γ₁ : I → X) = γ₂ → γ₁ = γ₂

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{γ₁ γ₂ : Path x y}

⇑γ₁ = ⇑γ₂ → γ₁ = γ₂


theorem mem_compl_zeroLocus_iff_not_mem {f : R} {I : PrimeSpectrum R} :
    I ∈ (zeroLocus {f} : Set (PrimeSpectrum R))ᶜ ↔ f ∉ I.asIdeal

{R : Type u}
[CommSemiring R]
{f : R}
{I : PrimeSpectrum R}

I ∈ (PrimeSpectrum.zeroLocus {f})ᶜ ↔ f ∉ I.asIdeal


private theorem weight_sum (k : ℕ) : ∑ t ∈ pairs σ k, weight σ R k t = 0

(σ : Type u_1)
[Fintype σ]
[DecidableEq σ]
(R : Type u_2)
[CommRing R]
(k : ℕ)

∑ t ∈ MvPolynomial.NewtonIdentities.pairs σ k, MvPolynomial.NewtonIdentities.weight σ R k t = 0


/-- If `i` is an `F`-algebra isomorphism of `E` and `K`, then the image of `perfectClosure F E`
under the map `i` is equal to in `perfectClosure F K`. -/
theorem perfectClosure.map_eq_of_algEquiv (i : E ≃ₐ[F] K) :
    (perfectClosure F E).map i.toAlgHom = perfectClosure F K

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

IntermediateField.map (↑i) (perfectClosure F E) = perfectClosure F K


@[simp]
theorem zeroLocus_span (s : Set A) : zeroLocus 𝒜 (Ideal.span s) = zeroLocus 𝒜 s

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(s : Set A)

ProjectiveSpectrum.zeroLocus 𝒜 ↑(Ideal.span s) = ProjectiveSpectrum.zeroLocus 𝒜 s


@[norm_cast] lemma coe_ne_coe : (p : Set B) ≠ q ↔ p ≠ q

{A : Type u_1}
{B : Type u_2}
[i : SetLike A B]
{p q : A}

↑p ≠ ↑q ↔ p ≠ q


theorem darts_dropUntil_subset {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
    (p.dropUntil u h).darts ⊆ p.darts

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v w : V}
(p : G.Walk v w)
(h : u ∈ p.support)


@[to_additive]
theorem prod_filter (p : α → Prop) [DecidablePred p] (f : α → β) :
    ∏ a ∈ s.filter p, f a = ∏ a ∈ s, if p a then f a else 1

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

∏ a ∈ Finset.filter p s, f a = ∏ a ∈ s, if p a then f a else 1


theorem concaveOn_iff_convex_hypograph :
    ConcaveOn 𝕜 s f ↔ Convex 𝕜 { p : E × β | p.1 ∈ s ∧ p.2 ≤ f p.1 }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}

ConcaveOn 𝕜 s f ↔ Convex 𝕜 {p | p.1 ∈ s ∧ p.2 ≤ f p.1}


/--
A sufficient condition for `ModifyWF` is that the new element compares equal to the original.
-/
theorem ModifyWF.of_eq {t : RBSet α cmp}
    (H : ∀ {x}, RBNode.find? cut t.val = some x → cmpEq cmp (f x) x) : ModifyWF t cut f

(H : ∀ {x : α}, Batteries.RBNode.find? cut t.val = some x → Batteries.RBNode.cmpEq cmp (f x) x)


@[reassoc (attr := simp)]
theorem limitConstTerminal_inv_π {J : Type*} [Category J] {C : Type*} [Category C] [HasTerminal C]
    {j : J} :
    limitConstTerminal.inv ≫ limit.π ((CategoryTheory.Functor.const J).obj (⊤_ C)) j =
      terminal.from _

{J : Type u_1}
[CategoryTheory.Category.{u_3, u_1} J]
{C : Type u_2}
[CategoryTheory.Category.{u_4, u_2} C]
[CategoryTheory.Limits.HasTerminal C]
{j : J}

CategoryTheory.Limits.limitConstTerminal.inv ≫
    CategoryTheory.Limits.limit.π ((CategoryTheory.Functor.const J).obj (⊤_ C)) j =
  CategoryTheory.Limits.terminal.from (⊤_ C)


@[simp]
theorem Ico_diff_Ioo_same (h : a < b) : Ico a b \ Ioo a b = {a}

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


/-- We have that `J(a^e | b) = J(a | b)^e`. -/
theorem pow_left (a : ℤ) (e b : ℕ) : J(a ^ e | b) = J(a | b) ^ e


theorem coe_map : (b.map f : ι → M') = f ∘ b

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(f : M ≃ₗ[R] M')


@[simp]
theorem mem_comap (S : NonUnitalSubalgebra R B) (f : F) (x : A) : x ∈ comap f S ↔ f x ∈ S

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[NonUnitalNonAssocSemiring B]
[Module R A]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
(S : NonUnitalSubalgebra R B)
(f : F)
(x : A)

x ∈ NonUnitalSubalgebra.comap f S ↔ f x ∈ S


@[to_additive (attr := simp)]
theorem Step.cons_not {x b} : Red.Step ((x, b) :: (x, !b) :: L) L

{α : Type u}
{L : List (α × Bool)}
{x : α}
{b : Bool}

FreeGroup.Red.Step ((x, b) :: (x, !b) :: L) L


theorem zpow_eq_one (h : IsPrimitiveRoot ζ k) : ζ ^ (k : ℤ) = 1

{G : Type u_3}
[DivisionCommMonoid G]
{k : ℕ}
{ζ : G}
(h : IsPrimitiveRoot ζ k)


/-- The composition of two bundled monotone functions. -/
@[simps (config := .asFn)]
def comp (g : β →o γ) (f : α →o β) : α →o γ

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


/-- If `K` and `L` are fields and `IsScalarTower R K L`, and `b : ι → L` satisfies
` ∀ i, IsIntegral R (b i)`, then `IsIntegral R (discr K b)`. -/
theorem discr_isIntegral {b : ι → L} (h : ∀ i, IsIntegral R (b i)) : IsIntegral R (discr K b)

{ι : Type w}
[DecidableEq ι]
[Fintype ι]
(K : Type u)
{L : Type v}
[Field K]
[Field L]
[Algebra K L]
[Module.Finite K L]
{R : Type z}
[CommRing R]
[Algebra R K]
[Algebra R L]
[IsScalarTower R K L]
{b : ι → L}
(h : ∀ (i : ι), IsIntegral R (b i))


lemma derivative_addPolynomial_slope {x₁ x₂ y₁ y₂ : F} (h₁ : W.Equation x₁ y₁)
    (h₂ : W.Equation x₂ y₂) (hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂) :
    derivative (W.addPolynomial x₁ y₁ <| W.slope x₁ x₂ y₁ y₂) =
      -((X - C x₁) * (X - C x₂) + (X - C x₁) * (X - C (W.addX x₁ x₂ <| W.slope x₁ x₂ y₁ y₂)) +
          (X - C x₂) * (X - C (W.addX x₁ x₂ <| W.slope x₁ x₂ y₁ y₂)))

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x₁ x₂ y₁ y₂ : F}
(h₁ : W.Equation x₁ y₁)
(h₂ : W.Equation x₂ y₂)
(hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂)

Polynomial.derivative (W.addPolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂)) =
  -((Polynomial.X - Polynomial.C x₁) * (Polynomial.X - Polynomial.C x₂) +
        (Polynomial.X - Polynomial.C x₁) * (Polynomial.X - Polynomial.C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))) +
      (Polynomial.X - Polynomial.C x₂) * (Polynomial.X - Polynomial.C (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂))))


@[simp]
theorem Finset.mem_enum [DecidableEq α] (s : Finset α) (xs : List α) :
    s ∈ Finset.enum xs ↔ ∀ x ∈ s, x ∈ xs

{α : Type u}
[DecidableEq α]
(s : Finset α)
(xs : List α)

s ∈ FinEnum.Finset.enum xs ↔ ∀ x ∈ s, x ∈ xs


theorem norm_condexpIndL1_le (x : G) : ‖condexpIndL1 hm μ s x‖ ≤ (μ s).toReal * ‖x‖

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

‖MeasureTheory.condexpIndL1 hm μ s x‖ ≤ (μ s).toReal * ‖x‖


@[simp]
theorem inter_union_diff (s t : Set α) : s ∩ t ∪ s \ t = s


@[reassoc]
theorem rightUnitor_naturality {f g : a ⟶ b} (η : f ⟶ g) :
    η ▷ 𝟙 b ≫ (ρ_ g).hom = (ρ_ f).hom ≫ η

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight η (CategoryTheory.CategoryStruct.id b))
    (CategoryTheory.Bicategory.rightUnitor g).hom =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.rightUnitor f).hom η


theorem toEquiv_injective : Function.Injective (toEquiv : X ≃ₜ Y → X ≃ Y)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]


theorem ae_sum_iff [Countable ι] {μ : ι → Measure α} {p : α → Prop} :
    (∀ᵐ x ∂sum μ, p x) ↔ ∀ i, ∀ᵐ x ∂μ i, p x

{α : Type u_1}
{ι : Type u_5}
{m0 : MeasurableSpace α}
[Countable ι]
{μ : ι → MeasureTheory.Measure α}
{p : α → Prop}

(∀ᵐ (x : α) ∂MeasureTheory.Measure.sum μ, p x) ↔ ∀ (i : ι), ∀ᵐ (x : α) ∂μ i, p x


/-- To give an isomorphism between cocones, it suffices to give an
  isomorphism between their vertices which commutes with the cocone
  maps. -/
-- Porting note: `@[ext]` used to accept lemmas like this. Now we add an aesop rule
@[aesop apply safe (rule_sets := [CategoryTheory]), simps]
def ext {c c' : Bicone F} (φ : c.pt ≅ c'.pt)
    (wι : ∀ j, c.ι j ≫ φ.hom = c'.ι j := by aesop_cat)
    (wπ : ∀ j, φ.hom ≫ c'.π j = c.π j := by aesop_cat) : c ≅ c'

(wι : ∀ (j : J), c.ι j ≫ φ.hom = c'.ι j := by aesop_cat)

(wπ : ∀ (j : J), φ.hom ≫ c'.π j = c.π j := by aesop_cat)

(CategoryTheory.Limits.Bicones.ext φ wι wπ).inv.hom = φ.inv


theorem mem_carrier {s : NonUnitalStarSubalgebra R A} {x : A} : x ∈ s.carrier ↔ x ∈ s

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
{s : NonUnitalStarSubalgebra R A}
{x : A}


protected theorem sub_max_sub_left (a b c : Nat) : max (a - b) (a - c) = a - min b c


theorem natDegree_prod_of_monic (h : ∀ i ∈ s, (f i).Monic) :
    (∏ i ∈ s, f i).natDegree = ∑ i ∈ s, (f i).natDegree

{R : Type u}
{ι : Type w}
(s : Finset ι)
[CommSemiring R]
(f : ι → R[X])
(h : ∀ i ∈ s, (f i).Monic)


/-- Split off the constant coefficient. -/
theorem eq_shift_mul_X_add_const (φ : R⟦X⟧) :
    φ = (mk fun p => coeff R (p + 1) φ) * X + C R (constantCoeff R φ)

{R : Type u_1}
[Semiring R]
(φ : PowerSeries R)

φ =
  (PowerSeries.mk fun p => (PowerSeries.coeff R (p + 1)) φ) * PowerSeries.X +
    (PowerSeries.C R) ((PowerSeries.constantCoeff R) φ)


@[to_additive (attr := simp)]
theorem pure_bind (f : α → FreeMagma β) (x) : pure x >>= f = f x

{α β : Type u}
(f : α → FreeAddMagma β)
(x : α)


theorem get_iterate (f : α → α) (a : α) (n : ℕ) (i : Fin (iterate f a n).length) :
    get (iterate f a n) i = f^[↑i] a

{α : Type u_1}
(f : α → α)
(a : α)
(n : ℕ)
(i : Fin (List.iterate f a n).length)


theorem measurableSet_preimage (hf : MeasurableEmbedding f) {s : Set β} :
    MeasurableSet (f ⁻¹' s) ↔ MeasurableSet (s ∩ range f)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
(hf : MeasurableEmbedding f)
{s : Set β}

MeasurableSet (f ⁻¹' s) ↔ MeasurableSet (s ∩ Set.range f)


/-- The determinant of `conjAe`, as a linear equiv. -/
@[simp]
theorem linearEquiv_det_conjAe : LinearEquiv.det conjAe.toLinearEquiv = -1

LinearEquiv.det Complex.conjAe.toLinearEquiv = -1


theorem eq_iff_eq {a b} : f a = f b ↔ a = b

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(f : α ↪o β)
{a b : α}


theorem u_inf_l [SemilatticeInf α] [SemilatticeInf β] (gi : GaloisCoinsertion l u) (a b : α) :
    u (l a ⊓ l b) = a ⊓ b

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[SemilatticeInf α]
[SemilatticeInf β]
(gi : GaloisCoinsertion l u)
(a b : α)


theorem liftEquiv_id_apply : liftEquiv M (RingHom.id K) p j = j

{K : Type u_1}
{M : Type u_3}
[CommRing K]
[CommRing M]
(j : K →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar M p]
[PerfectRing M p]

(PerfectRing.liftEquiv M (RingHom.id K) p) j = j


theorem Ioo_ae_eq_Ioc : Ioo a b =ᵐ[μ] Ioc a b

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.NoAtoms μ]
[PartialOrder α]
{a b : α}


theorem BddAbove.image2_bddBelow : BddAbove s → BddAbove t → BddBelow (Set.image2 f s t)

{f : α → β → γ}

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


lemma opNNNorm_mul_flip_apply (a : E) : ‖(mul 𝕜 E).flip a‖₊ = ‖a‖₊

(𝕜 : Type u_1)
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing E]
[StarRing E]
[NormedStarGroup E]
[NormedSpace 𝕜 E]
[IsScalarTower 𝕜 E E]
[SMulCommClass 𝕜 E E]
[RegularNormedAlgebra 𝕜 E]
(a : E)

‖(ContinuousLinearMap.mul 𝕜 E).flip a‖₊ = ‖a‖₊


theorem lt_of_le_of_ne' : a ≤ b → b ≠ a → a < b

{α : Type u_2}
[PartialOrder α]
{a b : α}


private theorem findExistsOneDivLT_spec (hi : ¬s ≤[i] 0) :
    ExistsOneDivLT s i (findExistsOneDivLT s i)

(hi : ¬MeasureTheory.VectorMeasure.restrict s i ≤ MeasureTheory.VectorMeasure.restrict 0 i)

MeasureTheory.SignedMeasure.ExistsOneDivLT s i (MeasureTheory.SignedMeasure.findExistsOneDivLT s i)


nonrec theorem IsLocalMaxOn.comp_antitone (hf : IsLocalMaxOn f s a) {g : β → γ} (hg : Antitone g) :
    IsLocalMinOn (g ∘ f) s a

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[Preorder β]
[Preorder γ]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsLocalMaxOn f s a)
{g : β → γ}
(hg : Antitone g)


theorem IsBlock.iff_top (B : Set X) :
    IsBlock G B ↔ IsBlock (⊤ : Subgroup G) B

{G : Type u_1}
[Group G]
{X : Type u_2}
[MulAction G X]
(B : Set X)

MulAction.IsBlock G B ↔ MulAction.IsBlock (↥⊤) B


@[to_additive]
theorem isClosed_setOf_map_mul [Mul M₁] [Mul M₂] [ContinuousMul M₂] :
    IsClosed { f : M₁ → M₂ | ∀ x y, f (x * y) = f x * f y }

(M₁ : Type u_6)
(M₂ : Type u_7)
[TopologicalSpace M₂]
[T2Space M₂]
[Add M₁]
[Add M₂]
[ContinuousAdd M₂]

IsClosed {f | ∀ (x y : M₁), f (x + y) = f x + f y}


/-- The zeroth cyclotomic polyomial is `1`. -/
@[simp]
theorem cyclotomic_zero (R : Type*) [Ring R] : cyclotomic 0 R = 1


theorem measure_add_measure_compl₀ {s : Set α} (hs : NullMeasurableSet s μ) :
    μ s + μ sᶜ = μ univ

(hs : MeasureTheory.NullMeasurableSet s μ)


/-- Map a kernel cone on the difference of two morphisms to the equalizer fork. -/
@[simps! pt]
def forkOfKernelFork (c : KernelFork (f - g)) : Fork f g

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

(CategoryTheory.Preadditive.forkOfKernelFork c).pt = c.pt


@[simp, nolint simpNF]
theorem zero_apply [HasZeroMorphisms C] (β : Type w) (X Y : GradedObject β C) (b : β) :
    (0 : X ⟶ Y) b = 0


lemma commute_algebraMap_right (r : R) (x : A) : Commute x (algebraMap R A r)

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


protected theorem isAsymm (h : WellFounded r) : IsAsymm α r

{α : Type u_1}
{r : α → α → Prop}
(h : WellFounded r)


theorem HigherFacesVanish.on_Γ₀_summand_id (K : ChainComplex C ℕ) (n : ℕ) :
    @HigherFacesVanish C _ _ (Γ₀.obj K) _ n (n + 1)
      (((Γ₀.splitting K).cofan _).inj (Splitting.IndexSet.id (op [n + 1])))

AlgebraicTopology.DoldKan.HigherFacesVanish (n + 1)
  (((AlgebraicTopology.DoldKan.Γ₀.splitting K).cofan (Opposite.op [n + 1])).inj
    (SimplicialObject.Splitting.IndexSet.id (Opposite.op [n + 1])))


theorem indicatorConstLp_inj {s t : Set α} (hs : MeasurableSet s) (hsμ : μ s ≠ ∞)
    (ht : MeasurableSet t) (htμ : μ t ≠ ∞) {c : E} (hc : c ≠ 0) :
    indicatorConstLp p hs hsμ c = indicatorConstLp p ht htμ c ↔ s =ᵐ[μ] t

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{s t : Set α}
(hs : MeasurableSet s)
(hsμ : μ s ≠ ⊤)
(ht : MeasurableSet t)
(htμ : μ t ≠ ⊤)
{c : E}
(hc : c ≠ 0)

MeasureTheory.indicatorConstLp p hs hsμ c = MeasureTheory.indicatorConstLp p ht htμ c ↔ s =ᵐ[μ] t


theorem hasStrictDerivAt_exp_smul_const' (x : 𝔸) (t : 𝕂) :
    HasStrictDerivAt (fun u : 𝕂 => exp 𝕂 (u • x)) (x * exp 𝕂 (t • x)) t

{𝕂 : Type u_1}
{𝔸 : Type u_3}
[RCLike 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(x : 𝔸)
(t : 𝕂)

HasStrictDerivAt (fun u => NormedSpace.exp 𝕂 (u • x)) (x * NormedSpace.exp 𝕂 (t • x)) t


/-- The normal closure of a set is a subgroup. -/
theorem normalClosure.isSubgroup (s : Set G) : IsSubgroup (normalClosure s)


theorem Ici_mem_nhds (h : a < b) : Ici a ∈ 𝓝 b

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


@[simp]
theorem rangeS_algebraMap {R A : Type*} [CommSemiring R] [CommSemiring A] [Algebra R A]
    (S : Subalgebra R A) : (algebraMap S A).rangeS = S.toSubsemiring

{R : Type u_3}
{A : Type u_4}
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
(S : Subalgebra R A)

(algebraMap (↥S) A).rangeS = S.toSubsemiring


lemma evalEval_polynomial (x y : R) : W.polynomial.evalEval x y =
    y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
(x y : R)

Polynomial.evalEval x y W.polynomial = y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)


theorem ofDigits_cons {b hd} {tl : List ℕ} :
    ofDigits b (hd :: tl) = hd + b * ofDigits b tl

Nat.ofDigits b (hd :: tl) = hd + b * Nat.ofDigits b tl


/-- A constructor for isomorphisms in the category `ShortComplex C`-/
@[simps]
def isoMk (e₁ : S₁.X₁ ≅ S₂.X₁) (e₂ : S₁.X₂ ≅ S₂.X₂) (e₃ : S₁.X₃ ≅ S₂.X₃)
    (comm₁₂ : e₁.hom ≫ S₂.f = S₁.f ≫ e₂.hom := by aesop_cat)
    (comm₂₃ : e₂.hom ≫ S₂.g = S₁.g ≫ e₃.hom := by aesop_cat) :
    S₁ ≅ S₂

(comm₁₂ : CategoryTheory.CategoryStruct.comp e₁.hom S₂.f = CategoryTheory.CategoryStruct.comp S₁.f e₂.hom := by
  aesop_cat)

(comm₂₃ : CategoryTheory.CategoryStruct.comp e₂.hom S₂.g = CategoryTheory.CategoryStruct.comp S₁.g e₃.hom := by
  aesop_cat)

(CategoryTheory.ShortComplex.isoMk e₁ e₂ e₃ comm₁₂ comm₂₃).hom.τ₁ = e₁.hom


lemma shiftFunctorAdd_zero_add_hom_app (a : A) (X : C) :
    (shiftFunctorAdd C 0 a).hom.app X =
    eqToHom (by dsimp; rw [zero_add]) ≫ ((shiftFunctorZero C A).inv.app X)⟦a⟧'

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
[CategoryTheory.HasShift C A]
(a : A)
(X : C)

(CategoryTheory.shiftFunctorAdd C 0 a).hom.app X =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
    ((CategoryTheory.shiftFunctor C a).map ((CategoryTheory.shiftFunctorZero C A).inv.app X))


theorem frequently_cocardinal {p : α → Prop} :
    (∃ᶠ x in cocardinal α hreg, p x) ↔ c ≤ # { x | p x }

{α : Type u}
{c : Cardinal.{u}}
{hreg : c.IsRegular}
{p : α → Prop}

(∃ᶠ (x : α) in Filter.cocardinal α hreg, p x) ↔ c ≤ #↑{x | p x}


/-- The typeclass `IsLocalization (M : Submonoid R) S` where `S` is an `R`-algebra
expresses that `S` is isomorphic to the localization of `R` at `M`. -/
@[mk_iff] class IsLocalization : Prop where
  -- Porting note: add ' to fields, and made new versions of these with either `S` or `M` explicit.
  /-- Everything in the image of `algebraMap` is a unit -/
  map_units' : ∀ y : M, IsUnit (algebraMap R S y)
  /-- The `algebraMap` is surjective -/
  surj' : ∀ z : S, ∃ x : R × M, z * algebraMap R S x.2 = algebraMap R S x.1
  /-- The kernel of `algebraMap` is contained in the annihilator of `M`;
      it is then equal to the annihilator by `map_units'` -/
  exists_of_eq : ∀ {x y}, algebraMap R S x = algebraMap R S y → ∃ c : M, ↑c * x = ↑c * y

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[self : IsLocalization M S]
{x y : R}

(algebraMap R S) x = (algebraMap R S) y → ∃ c, ↑c * x = ↑c * y


theorem self_subset_generateMeasurableRec (s : Set (Set α)) (i : ω₁) :
    s ⊆ generateMeasurableRec s i

(i : (Quotient.out (Cardinal.aleph 1).ord).α)

s ⊆ MeasurableSpace.generateMeasurableRec s i


theorem HasDerivAt.norm_sq {f : ℝ → F} {f' : F} {x : ℝ} (hf : HasDerivAt f f' x) :
    HasDerivAt (‖f ·‖ ^ 2) (2 * Inner.inner (f x) f') x

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{f : ℝ → F}
{f' : F}
{x : ℝ}
(hf : HasDerivAt f f' x)

HasDerivAt (fun x => ‖f x‖ ^ 2) (2 * ⟪f x, f'⟫_ℝ) x


@[to_additive addEquivOfLocalizations_right_inv]
theorem mulEquivOfLocalizations_right_inv (k : LocalizationMap S P) :
    f.ofMulEquivOfLocalizations (f.mulEquivOfLocalizations k) = k

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
(k : S.LocalizationMap P)


@[simp]
theorem span_singleton_neg (x : α) : (span {-x} : Ideal α) = span {x}


theorem coprod.triangle (X Y : C) :
    (coprod.associator X (⊥_ C) Y).hom ≫ coprod.map (𝟙 X) (coprod.leftUnitor Y).hom =
      coprod.map (coprod.rightUnitor X).hom (𝟙 Y)

(CategoryTheory.Limits.coprod.associator X (⊥_ C) Y).hom ≫
    CategoryTheory.Limits.coprod.map (𝟙 X) (CategoryTheory.Limits.coprod.leftUnitor Y).hom =
  CategoryTheory.Limits.coprod.map (CategoryTheory.Limits.coprod.rightUnitor X).hom (𝟙 Y)


@[to_additive (attr := simp) AddEquiv.add_submonoid_map_symm_apply]
theorem submonoidMap_symm_apply (e : M ≃* N) (S : Submonoid M) (g : S.map (e : M →* N)) :
    (e.submonoidMap S).symm g = ⟨e.symm g, SetLike.mem_coe.1 <| Set.mem_image_equiv.1 g.2⟩

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(e : M ≃+ N)
(S : AddSubmonoid M)
(g : ↥(AddSubmonoid.map (↑e) S))

(e.addSubmonoidMap S).symm g = ⟨e.symm ↑g, ⋯⟩


@[simp]
theorem id_apply (a : α) : CompleteLatticeHom.id α a = a

{α : Type u_2}
[CompleteLattice α]
(a : α)


theorem hasStrictDerivAt_rpow_const {x p : ℝ} (hx : x ≠ 0 ∨ 1 ≤ p) :
    HasStrictDerivAt (fun x => x ^ p) (p * x ^ (p - 1)) x


@[fun_prop]
theorem IsBoundedBilinearMap.differentiable (h : IsBoundedBilinearMap 𝕜 b) : Differentiable 𝕜 b

{𝕜 : 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]
{b : E × F → G}
(h : IsBoundedBilinearMap 𝕜 b)


theorem ClassGroup.mk0_integralRep [IsDedekindDomain R]
    (I : (FractionalIdeal R⁰ (FractionRing R))ˣ) :
    ClassGroup.mk0 ⟨ClassGroup.integralRep I, ClassGroup.integralRep_mem_nonZeroDivisors I.ne_zero⟩
      = ClassGroup.mk I

ClassGroup.mk0 ⟨ClassGroup.integralRep ↑I, ⋯⟩ = ClassGroup.mk I


@[simp]
theorem Gamma_ofNat_eq_factorial (n : ℕ) [(n + 1).AtLeastTwo] :
    Gamma (no_index (OfNat.ofNat (n + 1) : ℂ)) = n !

Complex.Gamma (OfNat.ofNat (n + 1)) = ↑n !


/-- If `colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit` for all `d : D`, then `F` is cofinal.
-/
theorem cofinal_of_colimit_comp_coyoneda_iso_pUnit
    (I : ∀ d, colimit (F ⋙ coyoneda.obj (op d)) ≅ PUnit) : Final F

(I : (d : D) → CategoryTheory.Limits.colimit (F.comp (CategoryTheory.coyoneda.obj (Opposite.op d))) ≅ PUnit.{v + 1})


@[simp]
theorem arcsin_one : arcsin 1 = π / 2


@[reassoc (attr := simp)]
lemma mappingConeHomOfDegreewiseSplitIso_inv_comp_triangle_mor₃ :
    (mappingConeHomOfDegreewiseSplitIso S σ).inv ≫
      (mappingCone.triangle (homOfDegreewiseSplit S σ)).mor₃ = -S.g⟦(1 : ℤ)⟧'

(S : CategoryTheory.ShortComplex (CochainComplex C ℤ))

(σ : (n : ℤ) → (S.map (HomologicalComplex.eval C (ComplexShape.up ℤ) n)).Splitting)

(CochainComplex.mappingConeHomOfDegreewiseSplitIso S σ).inv ≫
    (CochainComplex.mappingCone.triangle (CochainComplex.homOfDegreewiseSplit S σ)).mor₃ =
  -(CategoryTheory.shiftFunctor (CochainComplex C ℤ) 1).map S.g


private theorem two_mul_C_half_eq_one [Invertible (2 : R)] : 2 * C (⅟ 2 : R) = 1

(R : Type u_1)
[CommRing R]
[Invertible 2]


theorem exp_hasFPowerSeriesOnBall : HasFPowerSeriesOnBall (exp 𝕂) (expSeries 𝕂 𝔸) 0 ∞

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]

HasFPowerSeriesOnBall (NormedSpace.exp 𝕂) (NormedSpace.expSeries 𝕂 𝔸) 0 ⊤


theorem eq_affineCombination_of_mem_affineSpan_of_fintype [Fintype ι] {p1 : P} {p : ι → P}
    (h : p1 ∈ affineSpan k (Set.range p)) :
    ∃ w : ι → k, ∑ i, w i = 1 ∧ p1 = Finset.univ.affineCombination k p w

{ι : Type u_1}
{k : Type u_2}
{V : Type u_3}
{P : Type u_4}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
[Fintype ι]
{p1 : P}
{p : ι → P}
(h : p1 ∈ affineSpan k (Set.range p))

∃ w, ∑ i : ι, w i = 1 ∧ p1 = (Finset.affineCombination k Finset.univ p) w


theorem repr_injective :
    Injective (repr : OrthonormalBasis ι 𝕜 E → E ≃ₗᵢ[𝕜] EuclideanSpace 𝕜 ι)

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]


@[to_additive (attr := simp)]
theorem units_inv_symm_left_iff {a : Mˣ} {x y : M} : SemiconjBy (↑a⁻¹) y x ↔ SemiconjBy (↑a) x y

{M : Type u_1}
[AddMonoid M]
{a : AddUnits M}
{x y : M}

AddSemiconjBy (↑(-a)) y x ↔ AddSemiconjBy (↑a) x y


@[simp]
theorem antidiagonal_coe' (l : List α) : @antidiagonal α l = revzip (powersetAux' l)

(↑l).antidiagonal = ↑(Multiset.powersetAux' l).revzip


@[simp low]
theorem summable_unop {f : β → αᵐᵒᵖ} : (Summable fun a ↦ unop (f a)) ↔ Summable f

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → αᵐᵒᵖ}

(Summable fun a => MulOpposite.unop (f a)) ↔ Summable f


@[simp]
theorem generate_sieve (S : Sieve X) : generate S = S

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

CategoryTheory.Sieve.generate S.arrows = S


theorem natDegree_derivative_le (p : R[X]) : p.derivative.natDegree ≤ p.natDegree - 1

(Polynomial.derivative p).natDegree ≤ p.natDegree - 1


theorem mem_insert_of_mem {l : List α} (h : a ∈ l) : a ∈ l.insert b

{α : Type u_1}
[BEq α]
[LawfulBEq α]
{a b : α}
{l : List α}
(h : a ∈ l)


@[simp]
theorem refl_toLinearEquiv : refl R A = LinearEquiv.refl R A

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[CoalgebraStruct R A]

↑(CoalgEquiv.refl R A) = LinearEquiv.refl R A


theorem algebraicIndependent_equiv' (e : ι ≃ ι') {f : ι' → A} {g : ι → A} (h : f ∘ e = g) :
    AlgebraicIndependent R g ↔ AlgebraicIndependent R f

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_3}
{A : Type u_5}
[CommRing R]
[CommRing A]
[Algebra R A]
(e : ι ≃ ι')
{f : ι' → A}
{g : ι → A}
(h : f ∘ ⇑e = g)


theorem MeasurableSet.const_smul₀ {G₀ α : Type*} [GroupWithZero G₀] [Zero α]
    [MulActionWithZero G₀ α] [MeasurableSpace G₀] [MeasurableSpace α] [MeasurableSMul G₀ α]
    [MeasurableSingletonClass α] {s : Set α} (hs : MeasurableSet s) (a : G₀) :
    MeasurableSet (a • s)

{G₀ : Type u_1}
{α : Type u_2}
[GroupWithZero G₀]
[Zero α]
[MulActionWithZero G₀ α]
[MeasurableSpace G₀]
[MeasurableSpace α]
[MeasurableSMul G₀ α]
[MeasurableSingletonClass α]
{s : Set α}
(hs : MeasurableSet s)
(a : G₀)


/-- A tagged prepartition is a prepartition enriched with a tagged point for each box of the
prepartition. For simplicity we require that `tag` is defined for all boxes in `ι → ℝ` but
we will use only the values of `tag` on the boxes of the partition. -/
structure TaggedPrepartition (I : Box ι) extends Prepartition I where
  /-- Choice of tagged point of each box in this prepartition:
    we extend this to a total function, on all boxes in `ι → ℝ`. -/
  tag : Box ι → ι → ℝ
  /-- Each tagged point belongs to `I` -/
  tag_mem_Icc : ∀ J, tag J ∈ Box.Icc I

(self : BoxIntegral.TaggedPrepartition I)


theorem IntegrableOn.locallyIntegrableOn (hf : IntegrableOn f s μ) : LocallyIntegrableOn f s μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[TopologicalSpace X]
[NormedAddCommGroup E]
{f : X → E}
{μ : MeasureTheory.Measure X}
{s : Set X}
(hf : MeasureTheory.IntegrableOn f s μ)


@[simp] theorem find?_replicate_of_length_pos (h : 0 < n) : find? p (replicate n a) = if p a then some a else none

∀ {α : Type u_1} {p : α → Bool} {a : α}, 0 < n → List.find? p (List.replicate n a) = if p a = true then some a else none


theorem frequently_imp_distrib_left {f : Filter α} [NeBot f] {p : Prop} {q : α → Prop} :
    (∃ᶠ x in f, p → q x) ↔ p → ∃ᶠ x in f, q x

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

(∃ᶠ (x : α) in f, p → q x) ↔ p → ∃ᶠ (x : α) in f, q x


@[simp]
theorem comap_onQuot_eq (J : Ideal R) (v : AddValuation (R ⧸ J) Γ₀) :
    (v.comap (Ideal.Quotient.mk J)).onQuot (v.self_le_supp_comap J) = v

{R : Type u_1}
{Γ₀ : Type u_2}
[CommRing R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
(J : Ideal R)
(v : AddValuation (R ⧸ J) Γ₀)

(AddValuation.comap (Ideal.Quotient.mk J) v).onQuot ⋯ = v


theorem integral_eq_zero_iff_of_nonneg {f : α → ℝ} (hf : 0 ≤ f) (hfi : Integrable f μ) :
    ∫ x, f x ∂μ = 0 ↔ f =ᵐ[μ] 0

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : 0 ≤ f)
(hfi : MeasureTheory.Integrable f μ)


/-- If a type carries two unital binary operations that distribute over each other,
then these operations are associative.

In fact, they give a commutative monoid structure, see `eckmann_hilton.CommMonoid`. -/
theorem mul_assoc : Std.Associative m₂

(distrib : ∀ (a b c d : X), m₁ (m₂ a b) (m₂ c d) = m₂ (m₁ a c) (m₁ b d))


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

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

Then `f` is equal to zero on the closed fourth quadrant. -/
theorem eq_zero_on_quadrant_IV (hd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0))
    (hB : ∃ c < (2 : ℝ), ∃ B,
      f =O[cobounded ℂ ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * abs z ^ c))
    (hre : ∀ x : ℝ, 0 ≤ x → f x = 0) (him : ∀ x : ℝ, x ≤ 0 → f (x * I) = 0) :
    EqOn f 0 {z | 0 ≤ z.re ∧ z.im ≤ 0}

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

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


/-- The canonical comparison functor between the indexing category of the presentation and the
    comma category `CostructuredArrow yoneda A`. This functor is always final. -/
@[simps! obj_left obj_right_as obj_hom map_left]
def toCostructuredArrow : P.I ⥤ CostructuredArrow yoneda A

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

(P : CategoryTheory.Limits.IndObjectPresentation A)

(P.toCostructuredArrow.obj X).hom = P.cocone.ι.app X


theorem inter_eq_iInter {s₁ s₂ : Set α} : s₁ ∩ s₂ = ⋂ b : Bool, cond b s₁ s₂


@[simp]
theorem image₂_singleton_right : image₂ f s {b} = s.image fun a => f a b

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

Finset.image₂ f s {b} = Finset.image (fun a => f a b) s


@[to_additive]
theorem mul_inv_cancel_assoc (h : Commute a b) : a * (b * a⁻¹) = b

{G : Type u_1}
[AddGroup G]
{a b : G}
(h : AddCommute a b)


/-- If `c` is a closure operator on `α` and `e` an order-isomorphism
between `α` and `β` then `e ∘ c ∘ e⁻¹` is a closure operator on `β`. -/
@[simps apply]
def conjBy {α β} [Preorder α] [Preorder β] (c : ClosureOperator α)
    (e : α ≃o β) : ClosureOperator β

{α : Type u_4}
{β : Type u_5}
[Preorder α]
[Preorder β]
(c : ClosureOperator α)
(e : α ≃o β)
(a : β)


theorem addOrderOf_coe_rat {q : ℚ} : addOrderOf (↑(↑q * p) : AddCircle p) = q.den

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{p : 𝕜}
[hp : Fact (0 < p)]
{q : ℚ}


@[to_additive]
theorem mem_inv_smul_finset_iff : b ∈ a⁻¹ • s ↔ a • b ∈ s

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


@[simp, norm_cast]
theorem coe_mul (z w : 𝔻) : ↑(z * w) = (z * w : ℂ)


/-- To prove `FermatLastTheoremFor 3`, it is enough to prove `FermatLastTheoremForThreeGen`. -/
lemma FermatLastTheoremForThree_of_FermatLastTheoremThreeGen :
    FermatLastTheoremForThreeGen hζ → FermatLastTheoremFor 3

{K : Type u_1}
[Field K]
[NumberField K]
[IsCyclotomicExtension {3} ℚ K]
{ζ : K}
(hζ : IsPrimitiveRoot ζ ↑3)


theorem norm_embedding_of_isReal {w : InfinitePlace K} (hw : IsReal w) (x : K) :
    ‖embedding_of_isReal hw x‖ = w x

{K : Type u_2}
[Field K]
{w : NumberField.InfinitePlace K}
(hw : w.IsReal)
(x : K)

‖(NumberField.InfinitePlace.embedding_of_isReal hw) x‖ = w x


theorem Membership.mem.upper {i : Nat} {r : Std.Range} (h : i ∈ r) : i < r.stop


lemma image_extremePoints (f : L) (s : Set E) :
    f '' extremePoints 𝕜 s = extremePoints 𝕜 (f '' s)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{L : Type u_6}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[AddCommGroup F]
[Module 𝕜 F]
[EquivLike L E F]
[LinearEquivClass L 𝕜 E F]
(f : L)
(s : Set E)

⇑f '' Set.extremePoints 𝕜 s = Set.extremePoints 𝕜 (⇑f '' s)


@[simp]
theorem id_eval (v) : id.eval v = pure v

Turing.ToPartrec.Code.id.eval v = pure v


@[simp]
lemma preNormEDS'_one : preNormEDS' b c d 1 = 1


/-- Finite wide pullbacks are finite limits, so if `C` has all finite limits,
it also has finite wide pullbacks
-/
theorem hasFiniteWidePullbacks_of_hasFiniteLimits [HasFiniteLimits C] : HasFiniteWidePullbacks C


theorem isNat_minFac_4 : {n n' k : ℕ} →
    IsNat n n' → MinFacHelper n' k → (k * k).ble n' = false → IsNat (minFac n) n'

Mathlib.Meta.NormNum.IsNat n n' →
  Mathlib.Meta.NormNum.MinFacHelper n' k → (k * k).ble n' = false → Mathlib.Meta.NormNum.IsNat n.minFac n'


nonrec theorem ContMDiffAt.clm_prodMap {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₄} {x : M}
    (hg : ContMDiffAt I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g x) (hf : ContMDiffAt I 𝓘(𝕜, F₂ →L[𝕜] F₄) n f x) :
    ContMDiffAt I 𝓘(𝕜, F₁ × F₂ →L[𝕜] F₃ × F₄) n (fun x => (g x).prodMap (f x)) x


@[simp]
theorem mk_eq_mk (x : R) : (Submodule.Quotient.mk x : R ⧸ I) = mk I x

{R : Type u}
[CommRing R]
{I : Ideal R}
(x : R)

Submodule.Quotient.mk x = (Ideal.Quotient.mk I) x


@[simp]
theorem pointwise_smul_toAddSubGroup (a : M) (S : Ideal R)
    (ha : Function.Surjective fun r : R => a • r)  :
    (a • S).toAddSubgroup = a • S.toAddSubgroup

(ha : Function.Surjective fun r => a • r)

Submodule.toAddSubgroup (a • S) = a • Submodule.toAddSubgroup S


@[simp]
theorem aevalTower_C (x : R) : aevalTower g y (C x) = g x

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{S : Type u_2}
{A : Type u_3}
[CommSemiring S]
[CommSemiring A]
[Algebra S R]
[Algebra S A]
(g : R →ₐ[S] A)
(y : σ → A)
(x : R)

(MvPolynomial.aevalTower g y) (MvPolynomial.C x) = g x


theorem lie_def (x y : R) : ⁅x, y⁆ = x * y - y * x

{R : Type x}
[NonUnitalNonAssocRing R]
(x y : R)


@[reassoc (attr := simp)]
lemma whiskerRight_fst {X₁ X₂ : C} (f : X₁ ⟶ X₂) (Y : C) :
    (f ▷ Y) ≫ fst _ _ = fst _ _ ≫ f

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight f Y)
    (CategoryTheory.ChosenFiniteProducts.fst X₂ Y) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ChosenFiniteProducts.fst X₁ Y) f


@[to_additive (attr := simp)]
theorem mem_toSubmonoid (K : Subgroup G) (x : G) : x ∈ K.toSubmonoid ↔ x ∈ K

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


@[simp, norm_cast]
theorem coe_sub (h : q ≤ p) : ((p - q : ℚ≥0) : ℚ) = p - q


theorem isTree_iff_existsUnique_path :
    G.IsTree ↔ Nonempty V ∧ ∀ v w : V, ∃! p : G.Walk v w, p.IsPath

G.IsTree ↔ Nonempty V ∧ ∀ (v w : V), ∃! p, p.IsPath


@[simp]
theorem self_trans_inv (e : Perm α) : e.trans e⁻¹ = 1


@[simp]
theorem floor_add_nat (a : α) (n : ℕ) : ⌊a + n⌋ = ⌊a⌋ + n

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)
(n : ℕ)


/-- Construct a bundled monoid homomorphism from a pointwise limit of monoid homomorphisms. -/
@[to_additive (attr := simps! (config := .asFn))
  "Construct a bundled additive monoid homomorphism from a pointwise limit of additive
monoid homomorphisms"]
def monoidHomOfTendsto (f : M₁ → M₂) (g : α → F) [l.NeBot]
    (h : Tendsto (fun a x => g a x) l (𝓝 f)) : M₁ →* M₂

(h : Filter.Tendsto (fun a x => (g a) x) l (𝓝 f))


theorem measurableSet_eq_stopping_time_of_countable [Countable ι] [TopologicalSpace ι]
    [MeasurableSpace ι] [BorelSpace ι] [OrderTopology ι] [MeasurableSingletonClass ι]
    [SecondCountableTopology ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
    MeasurableSet[hτ.measurableSpace] {ω | τ ω = π ω}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ π : Ω → ι}
[Countable ι]
[TopologicalSpace ι]
[MeasurableSpace ι]
[BorelSpace ι]
[OrderTopology ι]
[MeasurableSingletonClass ι]
[SecondCountableTopology ι]
(hτ : MeasureTheory.IsStoppingTime f τ)
(hπ : MeasureTheory.IsStoppingTime f π)


/-- The left unitor isomorphism for binary products with the terminal object. -/
@[simps]
def prod.leftUnitor (P : C) [HasBinaryProduct (⊤_ C) P] : (⊤_ C) ⨯ P ≅ P

[CategoryTheory.Limits.HasBinaryProduct (⊤_ C) P]

(CategoryTheory.Limits.prod.leftUnitor P).hom = CategoryTheory.Limits.prod.snd


theorem liftRel_join.lem (R : α → β → Prop) {S T} {U : WSeq α → WSeq β → Prop}
    (ST : LiftRel (LiftRel R) S T)
    (HU :
      ∀ s1 s2,
        (∃ s t S T,
            s1 = append s (join S) ∧
              s2 = append t (join T) ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
          U s1 s2)
    {a} (ma : a ∈ destruct (join S)) : ∃ b, b ∈ destruct (join T) ∧ LiftRelO R U a b

{U : Stream'.WSeq α → Stream'.WSeq β → Prop}

(ST : Stream'.WSeq.LiftRel (Stream'.WSeq.LiftRel R) S T)

(HU :
  ∀ (s1 : Stream'.WSeq α) (s2 : Stream'.WSeq β),
    (∃ s t S T,
        s1 = s.append S.join ∧
          s2 = t.append T.join ∧ Stream'.WSeq.LiftRel R s t ∧ Stream'.WSeq.LiftRel (Stream'.WSeq.LiftRel R) S T) →
      U s1 s2)

∃ b, b ∈ T.join.destruct ∧ Stream'.WSeq.LiftRelO R U a b


theorem perm_mapsTo_inl_iff_mapsTo_inr {m n : Type*} [Finite m] [Finite n] (σ : Perm (m ⊕ n)) :
    Set.MapsTo σ (Set.range Sum.inl) (Set.range Sum.inl) ↔
      Set.MapsTo σ (Set.range Sum.inr) (Set.range Sum.inr)

{m : Type u_1}
{n : Type u_2}
[Finite m]
[Finite n]
(σ : Equiv.Perm (m ⊕ n))

Set.MapsTo (⇑σ) (Set.range Sum.inl) (Set.range Sum.inl) ↔ Set.MapsTo (⇑σ) (Set.range Sum.inr) (Set.range Sum.inr)


theorem norm_smul (r : α) (x : β) : ‖r • x‖ = ‖r‖ * ‖x‖

{α : Type u_1}
{β : Type u_2}
[NormedDivisionRing α]
[SeminormedAddGroup β]
[MulActionWithZero α β]
[BoundedSMul α β]
(r : α)
(x : β)

‖r • x‖ = ‖r‖ * ‖x‖


theorem uniformContinuous_lift' [T0Space β] (f : α → β) : UniformContinuous (lift' f)

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
[T0Space β]
(f : α → β)


@[simp]
theorem prodLift_fst_comp_snd_comp (f : α →. γ) (g : β →. δ) :
    prodLift (f.comp ((Prod.fst : α × β → α) : α × β →. α))
        (g.comp ((Prod.snd : α × β → β) : α × β →. β)) =
      prodMap f g

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

(f.comp ↑Prod.fst).prodLift (g.comp ↑Prod.snd) = f.prodMap g


theorem EqOn.comp_right (hg : t.EqOn g₁ g₂) (hf : s.MapsTo f t) : s.EqOn (g₁ ∘ f) (g₂ ∘ f)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set α}
{t : Set β}
{f : α → β}
{g₁ g₂ : β → γ}
(hg : Set.EqOn g₁ g₂ t)
(hf : Set.MapsTo f s t)


theorem u_comm_of_l_comm {X : Type*} [PartialOrder X] {Y : Type*} [Preorder Y] {Z : Type*}
    [Preorder Z] {W : Type*} [Preorder W] {lYX : X → Y} {uXY : Y → X}
    (hXY : GaloisConnection lYX uXY) {lWZ : Z → W} {uZW : W → Z} (hZW : GaloisConnection lWZ uZW)
    {lWY : Y → W} {uYW : W → Y} (hWY : GaloisConnection lWY uYW) {lZX : X → Z} {uXZ : Z → X}
    (hXZ : GaloisConnection lZX uXZ) (h : ∀ x, lWZ (lZX x) = lWY (lYX x)) {w : W} :
    uXZ (uZW w) = uXY (uYW w)

(h : ∀ (x : X), lWZ (lZX x) = lWY (lYX x))


@[simp] lemma toDual_ratCast [RatCast α] (n : ℚ) : toDual (n : α) = n


@[simp]
theorem Icc_top : Icc a ⊤ = Ici a

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


@[simp] theorem mem_map {f : α → β} : ∀ {l : List α}, b ∈ l.map f ↔ ∃ a, a ∈ l ∧ f a = b

{α : Type u_1}
{β : Type u_2}
{b : β}
{f : α → β}
{l : List α}


theorem list_cycles_perm_list_cycles {α : Type*} [Finite α] {l₁ l₂ : List (Perm α)}
    (h₀ : l₁.prod = l₂.prod) (h₁l₁ : ∀ σ : Perm α, σ ∈ l₁ → σ.IsCycle)
    (h₁l₂ : ∀ σ : Perm α, σ ∈ l₂ → σ.IsCycle) (h₂l₁ : l₁.Pairwise Disjoint)
    (h₂l₂ : l₂.Pairwise Disjoint) : l₁ ~ l₂

(h₂l₁ : List.Pairwise Equiv.Perm.Disjoint l₁)

(h₂l₂ : List.Pairwise Equiv.Perm.Disjoint l₂)


theorem fundSystem_mk (i : Fin (rank K)) :
    Additive.ofMul ⟦fundSystem K i⟧ = (basisModTorsion K i)

(K : Type u_1)
[Field K]
[NumberField K]
(i : Fin (NumberField.Units.rank K))

Additive.ofMul ⟦NumberField.Units.fundSystem K i⟧ = (NumberField.Units.basisModTorsion K) i


theorem submartingale_iff_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} :
    Submartingale f ℱ μ ↔
      Adapted ℱ f ∧ (∀ i, Integrable (f i) μ) ∧ ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i]

{Ω : Type u_1}
{ι : Type u_3}
[Preorder ι]
{m0 : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
{ℱ : MeasureTheory.Filtration ι m0}
[MeasureTheory.IsFiniteMeasure μ]
{f : ι → Ω → ℝ}

MeasureTheory.Submartingale f ℱ μ ↔
  MeasureTheory.Adapted ℱ f ∧
    (∀ (i : ι), MeasureTheory.Integrable (f i) μ) ∧ ∀ (i j : ι), i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|↑ℱ i]


theorem preimage_interior (h : X ≃ₜ Y) (s : Set Y) : h ⁻¹' interior s = interior (h ⁻¹' s)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)
(s : Set Y)


@[to_additive]
theorem tprod_subtype_mul_tprod_subtype_compl [T2Space α] {f : β → α} (hf : Multipliable f)
    (s : Set β) : (∏' x : s, f x) * ∏' x : ↑sᶜ, f x = ∏' x, f x

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[UniformSpace α]
[UniformGroup α]
[CompleteSpace α]
[T2Space α]
{f : β → α}
(hf : Multipliable f)
(s : Set β)

(∏' (x : ↑s), f ↑x) * ∏' (x : ↑sᶜ), f ↑x = ∏' (x : β), f x


/-- Given a partial homeomorphism `e` from a space `α` into `H`, if its source covers the whole
space `α`, then the induced charted space structure on `α` is `HasGroupoid G` for any structure
groupoid `G` which is closed under restrictions. -/
theorem singleton_hasGroupoid (h : e.source = Set.univ) (G : StructureGroupoid H)
    [ClosedUnderRestriction G] : @HasGroupoid _ _ _ _ (e.singletonChartedSpace h) G

{H : Type u}
[TopologicalSpace H]
{α : Type u_5}
[TopologicalSpace α]
(e : PartialHomeomorph α H)
(h : e.source = Set.univ)
(G : StructureGroupoid H)
[ClosedUnderRestriction G]


@[simp] lemma val_wcovBy_val : s.1 ⩿ t.1 ↔ s ⩿ t


{M : Type u_1}
[CommMonoid M]
{k : ℕ}
{ζ : M}
(h : IsPrimitiveRoot ζ k)


theorem copy_eq (f : Ω^ N X x) {g : (I^N) → X} (h : g = f) : copy f g h = f

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
(f : ↑(Ω^ N X x))
{g : (N → ↑I) → X}
(h : g = ⇑f)


@[elab_as_elim] theorem cases_true_false (p : Prop → Prop)
    (h1 : p True) (h2 : p False) (a : Prop) : p a


theorem Multiplicative.isGroupHom [AddGroup α] [AddGroup β] {f : α → β} (hf : IsAddGroupHom f) :
    @IsGroupHom (Multiplicative α) (Multiplicative β) _ _ f

{α : Type u}
{β : Type v}
[AddGroup α]
[AddGroup β]
{f : α → β}
(hf : IsAddGroupHom f)


/-- A finitely generated torsion module over a Dedekind domain is an internal direct sum of its
`p i ^ e i`-torsion submodules where `p i` are factors of `(⊤ : Submodule R M).annihilator` and
`e i` are their multiplicities. -/
theorem isInternal_prime_power_torsion [Module.Finite R M] (hM : Module.IsTorsion R M) :
    DirectSum.IsInternal fun p : (factors (⊤ : Submodule R M).annihilator).toFinset =>
      torsionBySet R M (p ^ (factors (⊤ : Submodule R M).annihilator).count ↑p : Ideal R)

{R : Type u}
[CommRing R]
[IsDomain R]
{M : Type v}
[AddCommGroup M]
[Module R M]
[IsDedekindDomain R]
[Module.Finite R M]
(hM : Module.IsTorsion R M)

DirectSum.IsInternal fun p =>
  Submodule.torsionBySet R M ↑(↑p ^ Multiset.count (↑p) (UniqueFactorizationMonoid.factors ⊤.annihilator))


theorem inclusion_injective {S₁ S₂ : StarSubalgebra R A} (h : S₁ ≤ S₂) :
    Function.Injective <| inclusion h

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
{S₁ S₂ : StarSubalgebra R A}
(h : S₁ ≤ S₂)


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

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

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


theorem iterate_pos_le_iff {x : ℝ} {m : ℤ} {n : ℕ} (hn : 0 < n) :
    f^[n] x ≤ x + n * m ↔ f x ≤ x + m

(f : CircleDeg1Lift)
{x : ℝ}
{m : ℤ}
{n : ℕ}
(hn : 0 < n)


/-- The automorphism of the polynomial algebra given by `p(X) ↦ p(X+t)`,
  with inverse `p(X) ↦ p(X-t)`. -/
@[simps!]
def algEquivAevalXAddC {R} [CommRing R] (t : R) : R[X] ≃ₐ[R] R[X]

{R : Type u_3}
[CommRing R]
(t : R)
(a : R[X])

(Polynomial.algEquivAevalXAddC t).symm a = (Polynomial.aeval (Polynomial.X - Polynomial.C t)) a


theorem integral_Ico_eq_integral_Ioo' (hx : μ {x} = 0) :
    ∫ t in Ico x y, f t ∂μ = ∫ t in Ioo x y, f t ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{μ : MeasureTheory.Measure X}
[PartialOrder X]
{x y : X}
(hx : μ {x} = 0)

∫ (t : X) in Set.Ico x y, f t ∂μ = ∫ (t : X) in Set.Ioo x y, f t ∂μ


/-- The topological Besicovitch covering theorem: there exist finitely many families of disjoint
balls covering all the centers in a package. More specifically, one can use `N` families if there
are no satellite configurations with `N+1` points. -/
theorem exist_disjoint_covering_families {N : ℕ} {τ : ℝ} (hτ : 1 < τ)
    (hN : IsEmpty (SatelliteConfig α N τ)) (q : BallPackage β α) :
    ∃ s : Fin N → Set β,
      (∀ i : Fin N, (s i).PairwiseDisjoint fun j => closedBall (q.c j) (q.r j)) ∧
        range q.c ⊆ ⋃ i : Fin N, ⋃ j ∈ s i, ball (q.c j) (q.r j)

(hN : IsEmpty (Besicovitch.SatelliteConfig α N τ))

∃ s,
  (∀ (i : Fin N), (s i).PairwiseDisjoint fun j => Metric.closedBall (q.c j) (q.r j)) ∧
    Set.range q.c ⊆ ⋃ i, ⋃ j ∈ s i, Metric.ball (q.c j) (q.r j)


@[simp]
theorem head_mem (v : Vector α (n + 1)) : v.head ∈ v.toList

{α : Type u_1}
{n : ℕ}
(v : Mathlib.Vector α (n + 1))


theorem factors'_cong {a b : α} (h : a ~ᵤ b) : factors' a = factors' b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
{a b : α}
(h : a ~ᵤ b)

Associates.factors' a = Associates.factors' b


theorem foldl_swap (f : β → α → β) (H : RightCommutative f) (b : β) (s : Multiset α) :
    foldl f H b s = foldr (fun x y => f y x) (fun _x _y _z => (H _ _ _).symm) b s

{α : Type u_1}
{β : Type v}
(f : β → α → β)
(H : RightCommutative f)
(b : β)
(s : Multiset α)

Multiset.foldl f H b s = Multiset.foldr (fun x y => f y x) ⋯ b s


theorem getElem_zero {l : List α} (h : 0 < l.length) : l[0] = l.head (length_pos.mp h)

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


theorem symmDiff_eq : a ∆ b = a ⊓ bᶜ ⊔ b ⊓ aᶜ

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


theorem IsCompactOperator.isCompact_closure_image_ball [ContinuousConstSMul 𝕜₂ M₂] [T2Space M₂]
    {f : M₁ →ₛₗ[σ₁₂] M₂} (hf : IsCompactOperator f) (r : ℝ) :
    IsCompact (closure <| f '' Metric.ball 0 r)

{𝕜₁ : 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₂]
[T2Space M₂]
{f : M₁ →ₛₗ[σ₁₂] M₂}
(hf : IsCompactOperator ⇑f)
(r : ℝ)

IsCompact (closure (⇑f '' Metric.ball 0 r))


theorem geom_sum_pos_iff [LinearOrderedRing α] (hn : n ≠ 0) :
    (0 < ∑ i ∈ range n, x ^ i) ↔ Odd n ∨ 0 < x + 1

{α : Type u}
{n : ℕ}
{x : α}
[LinearOrderedRing α]
(hn : n ≠ 0)

0 < ∑ i ∈ Finset.range n, x ^ i ↔ Odd n ∨ 0 < x + 1


@[to_additive addCHaar_mem_clAddPrehaar]
theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G)) :
    chaar K₀ ∈ clPrehaar (K₀ : Set G) V

(K₀ : TopologicalSpace.PositiveCompacts G)

MeasureTheory.Measure.haar.chaar K₀ ∈ MeasureTheory.Measure.haar.clPrehaar (↑K₀) V


theorem bot_eq_zero : (⊥ : Seminorm 𝕜 E) = 0

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]


@[fun_prop]
nonrec theorem HasFDerivAt.const_add (hf : HasFDerivAt f f' x) (c : F) :
    HasFDerivAt (fun x => c + f x) f' x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
(hf : HasFDerivAt f f' x)
(c : F)


@[simp]
theorem ofReal_exp_ofReal_re (x : ℝ) : ((exp x).re : ℂ) = exp x


theorem eLpNorm_one_smul_measure {f : α → F} (c : ℝ≥0∞) :
    eLpNorm f 1 (c • μ) = c * eLpNorm f 1 μ

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

MeasureTheory.eLpNorm f 1 (c • μ) = c * MeasureTheory.eLpNorm f 1 μ


theorem contDiff_smul : ContDiff 𝕜 n fun p : 𝕜 × F => p.1 • p.2

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}


/-- `DFunLike.coe` as a `MonoidHom`. -/
@[to_additive (attr := simps) "`DFunLike.coe` as an `AddMonoidHom`."]
def coeFnMonoidHom [MulOneClass Y] : LocallyConstant X Y →* X → Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[MulOneClass Y]

∀ (a : LocallyConstant X Y) (a_1 : X), LocallyConstant.coeFnMonoidHom a a_1 = a a_1


@[to_additive (attr := simp)]
theorem mul_inv_eq_one {a : α} : a * ↑u⁻¹ = 1 ↔ a = u

{α : Type u}
[AddMonoid α]
{u : AddUnits α}
{a : α}


lemma monovary_iff_forall_mul_nonneg : Monovary f g ↔ ∀ i j, 0 ≤ (f j - f i) * (g j - g i)

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{f g : ι → α}

Monovary f g ↔ ∀ (i j : ι), 0 ≤ (f j - f i) * (g j - g i)


/-- The first projection of a product is a ⋆-algebra homomorphism. -/
@[simps!]
def fst : A × B →⋆ₐ[R] A

(R : Type u_1)
(A : Type u_2)
(B : Type u_3)
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Star A]
[Semiring B]
[Algebra R B]
[Star B]
(self : A × B)


theorem univ_option (α : Type*) [Fintype α] : (univ : Finset (Option α)) = insertNone univ

Finset.univ = Finset.insertNone Finset.univ


theorem degree_derivative_le {p : R[X]} : p.derivative.degree ≤ p.degree

(Polynomial.derivative p).degree ≤ p.degree


theorem isCoatom_iff [OrderTop α] [IsCoatomic α] [OrderTop β] {l : α → β} {u : β → α}
    (gi : GaloisInsertion l u) (h_coatom : ∀ a : α, IsCoatom a → u (l a) = a) (b : β) :
    IsCoatom (u b) ↔ IsCoatom b

(h_coatom : ∀ (a : α), IsCoatom a → u (l a) = a)


theorem condCount_inter_self (hs : s.Finite) : condCount s (s ∩ t) = condCount s t

{Ω : Type u_1}
[MeasurableSpace Ω]
[MeasurableSingletonClass Ω]
{s t : Set Ω}
(hs : s.Finite)

(ProbabilityTheory.condCount s) (s ∩ t) = (ProbabilityTheory.condCount s) t


@[simp]
theorem add_one_le_add_one_iff {α β : Cardinal} : α + 1 ≤ β + 1 ↔ α ≤ β

α + 1 ≤ β + 1 ↔ α ≤ β


/-- Tower law: if `A` is a `K`-module and `K` is an extension of `F` then
$\operatorname{rank}_F(A) = \operatorname{rank}_F(K) * \operatorname{rank}_K(A)$. -/
theorem FiniteDimensional.finrank_mul_finrank : finrank F K * finrank K A = finrank F A

(F : Type u)
(K : Type v)
(A : Type w)
[Ring F]
[Ring K]
[AddCommGroup A]
[Module F K]
[Module K A]
[Module F A]
[IsScalarTower F K A]
[StrongRankCondition F]
[StrongRankCondition K]
[Module.Free F K]
[Module.Free K A]

FiniteDimensional.finrank F K * FiniteDimensional.finrank K A = FiniteDimensional.finrank F A


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

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

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


theorem inf_eq_sInf_image [CompleteLattice β] (s : Finset α) (f : α → β) :
    s.inf f = sInf (f '' s)

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


theorem adc_spec (x y : BitVec w) (c : Bool) :
    adc x y c = (carry w x y c, x + y + zeroExtend w (ofBool c))

x.adc y c = (BitVec.carry w x y c, x + y + BitVec.zeroExtend w (BitVec.ofBool c))


@[simp]
theorem normSq_neg (z : ℂ) : normSq (-z) = normSq z


@[ext]
theorem ext {f g : α →+*o β} (h : ∀ a, f a = g a) : f = g

{α : Type u_2}
{β : Type u_3}
[NonAssocSemiring α]
[Preorder α]
[NonAssocSemiring β]
[Preorder β]
{f g : α →+*o β}
(h : ∀ (a : α), f a = g a)


private theorem candidates_le_maxVar (fA : f ∈ candidates X Y) : f (x, y) ≤ maxVar X Y

(fA : f ∈ GromovHausdorff.candidates X Y)

f (x, y) ≤ ↑(GromovHausdorff.maxVar X Y)


/-- For the equality, see `infEdist_thickening`. -/
theorem infEdist_le_infEdist_thickening_add :
    infEdist x s ≤ infEdist x (thickening δ s) + ENNReal.ofReal δ

{α : Type u}
[PseudoEMetricSpace α]
{δ : ℝ}
{s : Set α}
{x : α}

EMetric.infEdist x s ≤ EMetric.infEdist x (Metric.thickening δ s) + ENNReal.ofReal δ


/-- The image of an octahedron by a triangulated functor. -/
@[simps]
def map : Octahedron (by dsimp; rw [← F.map_comp, comm])
    (F.map_distinguished _ h₁₂) (F.map_distinguished _ h₂₃) (F.map_distinguished _ h₁₃)

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

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

{comm : CategoryTheory.CategoryStruct.comp u₁₂ u₂₃ = u₁₃}

{v₁₂ : X₂ ⟶ Z₁₂}

{w₁₂ : Z₁₂ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₂ : CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₂₃ : X₃ ⟶ Z₂₃}

{w₂₃ : Z₂₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₂}

{h₂₃ : CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₁₃ : X₃ ⟶ Z₁₃}

{w₁₃ : Z₁₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₃ : CategoryTheory.Pretriangulated.Triangle.mk u₁₃ v₁₃ w₁₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

(h : CategoryTheory.Triangulated.Octahedron comm h₁₂ h₂₃ h₁₃)


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


lemma infClosure_min : s ⊆ t → InfClosed t → infClosure s ⊆ t

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


theorem grade_ne_grade_iff : grade 𝕆 a ≠ grade 𝕆 b ↔ a ≠ b

{𝕆 : Type u_1}
{α : Type u_3}
[Preorder 𝕆]
[LinearOrder α]
[GradeOrder 𝕆 α]
{a b : α}


theorem singletonChartedSpace_chartAt_source (h : e.source = Set.univ) {x : α} :
    (@chartAt H _ α _ (e.singletonChartedSpace h) x).source = Set.univ

{H : Type u}
[TopologicalSpace H]
{α : Type u_5}
[TopologicalSpace α]
(e : PartialHomeomorph α H)
(h : e.source = Set.univ)
{x : α}


@[simp]
theorem support_one [MulZeroOneClass R] [Nontrivial R] : support (1 : HahnSeries Γ R) = {0}

{Γ : Type u_1}
{R : Type u_3}
[Zero Γ]
[PartialOrder Γ]
[MulZeroOneClass R]
[Nontrivial R]


theorem lift_sub_val_mem_span (r : R) (n : ℕ) :
    lift f_compat r - (f n r).val ∈ (Ideal.span {(p : ℤ_[p]) ^ n})

(f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1)

(PadicInt.lift f_compat) r - ↑((f n) r).val ∈ Ideal.span {↑p ^ n}


theorem measure_le_inter_add_diff (μ : F) (s t : Set α) : μ s ≤ μ (s ∩ t) + μ (s \ t)

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
(μ : F)
(s t : Set α)


theorem mul_finsum {R : Type*} [Semiring R] (f : α → R) (r : R) (h : (support f).Finite) :
    (r * ∑ᶠ a : α, f a) = ∑ᶠ a : α, r * f a

{α : Type u_1}
{R : Type u_7}
[Semiring R]
(f : α → R)
(r : R)
(h : (Function.support f).Finite)

r * ∑ᶠ (a : α), f a = ∑ᶠ (a : α), r * f a


lemma not_disjoint_iff_nonempty_inter : ¬ Disjoint s t ↔ (s ∩ t).Nonempty


/-- See `lt_tsub_iff_right_of_le` for a weaker statement in a partial order. -/
theorem lt_tsub_iff_right : a < b - c ↔ a + c < b

{α : Type u_1}
{a b c : α}
[LinearOrder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]


@[simp] theorem nil_add (xs : IntList) : [] + xs = xs


@[simp]
theorem symm_toEquiv (e : P₁ ≃ᵃL[k] P₂) : e.toEquiv.symm = e.symm.toEquiv

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(e : P₁ ≃ᵃL[k] P₂)


theorem Subset.trans {l₁ l₂ l₃ : Lists' α true} (h₁ : l₁ ⊆ l₂) (h₂ : l₂ ⊆ l₃) : l₁ ⊆ l₃

{α : Type u_1}
{l₁ l₂ l₃ : Lists' α true}
(h₁ : l₁ ⊆ l₂)
(h₂ : l₂ ⊆ l₃)


theorem laurent_div :
    laurent r (algebraMap _ _ p / algebraMap _ _ q) =
      algebraMap _ _ (taylor r p) / algebraMap _ _ (taylor r q)

{R : Type u}
[CommRing R]
[hdomain : IsDomain R]
(r : R)
(p q : Polynomial R)

(RatFunc.laurent r) ((algebraMap (Polynomial R) (RatFunc R)) p / (algebraMap (Polynomial R) (RatFunc R)) q) =
  (algebraMap (Polynomial R) (RatFunc R)) ((Polynomial.taylor r) p) /
    (algebraMap (Polynomial R) (RatFunc R)) ((Polynomial.taylor r) q)


theorem Ultrafilter.cauchy_of_totallyBounded {s : Set α} (f : Ultrafilter α) (hs : TotallyBounded s)
    (h : ↑f ≤ 𝓟 s) : Cauchy (f : Filter α)

{α : Type u}
[uniformSpace : UniformSpace α]
{s : Set α}
(f : Ultrafilter α)
(hs : TotallyBounded s)
(h : ↑f ≤ 𝓟 s)


/-- A (bundled) complete separated uniform space. -/
structure CpltSepUniformSpace where
  /-- The underlying space -/
  α : Type u
  [isUniformSpace : UniformSpace α]
  [isCompleteSpace : CompleteSpace α]
  [isT0 : T0Space α]


theorem pred_lt_iff_of_not_isMin (ha : ¬IsMin a) : pred a < b ↔ a ≤ b

{α : Type u_1}
[Preorder α]
[PredOrder α]
{a b : α}
(ha : ¬IsMin a)


protected theorem Filter.EventuallyEq.fderivWithin (hs : f₁ =ᶠ[𝓝[s] x] f) :
    fderivWithin 𝕜 f₁ s =ᶠ[𝓝[s] x] fderivWithin 𝕜 f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : E → F}
{x : E}
{s : Set E}
(hs : f₁ =ᶠ[𝓝[s] x] f)


theorem Basis.map_addHaar {ι E F : Type*} [Fintype ι] [NormedAddCommGroup E] [NormedAddCommGroup F]
    [NormedSpace ℝ E] [NormedSpace ℝ F] [MeasurableSpace E] [MeasurableSpace F] [BorelSpace E]
    [BorelSpace F] [SecondCountableTopology F] [SigmaCompactSpace F]
    (b : Basis ι ℝ E) (f : E ≃L[ℝ] F) :
    map f b.addHaar = (b.map f.toLinearEquiv).addHaar

{ι : Type u_1}
{E : Type u_2}
{F : Type u_3}
[Fintype ι]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace ℝ E]
[NormedSpace ℝ F]
[MeasurableSpace E]
[MeasurableSpace F]
[BorelSpace E]
[BorelSpace F]
[SecondCountableTopology F]
[SigmaCompactSpace F]
(b : Basis ι ℝ E)
(f : E ≃L[ℝ] F)

MeasureTheory.Measure.map (⇑f) b.addHaar = (b.map f.toLinearEquiv).addHaar


theorem ncard_exchange {a b : α} (ha : a ∉ s) (hb : b ∈ s) : (insert a (s \ {b})).ncard = s.ncard

{α : Type u_1}
{s : Set α}
{a b : α}
(ha : a ∉ s)
(hb : b ∈ s)


/-- Let `t i` be a nonempty directed subfamily of `𝔖`
such that every `s ∈ 𝔖` is included in some `t i`.
Let `V` bounded by `p` be a basis of entourages of `β`.

Then `UniformOnFun.gen 𝔖 (t i) (V j)` bounded by `p j` is a basis of entourages of `α →ᵤ[𝔖] β`. -/
protected theorem hasBasis_uniformity_of_covering_of_basis {ι ι' : Type*} [Nonempty ι]
    {t : ι → Set α} {p : ι' → Prop} {V : ι' → Set (β × β)} (ht : ∀ i, t i ∈ 𝔖)
    (hdir : Directed (· ⊆ ·) t) (hex : ∀ s ∈ 𝔖, ∃ i, s ⊆ t i) (hb : HasBasis (𝓤 β) p V) :
    (𝓤 (α →ᵤ[𝔖] β)).HasBasis (fun i : ι × ι' ↦ p i.2) fun i ↦
      UniformOnFun.gen 𝔖 (t i.1) (V i.2)

(hdir : Directed (fun x x_1 => x ⊆ x_1) t)

(𝓤 (α →ᵤ[𝔖] β)).HasBasis (fun i => p i.2) fun i => UniformOnFun.gen 𝔖 (t i.1) (V i.2)


theorem dvdNotUnit_of_dvdNotUnit_associated [CommMonoidWithZero α] [Nontrivial α] {p q r : α}
    (h : DvdNotUnit p q) (h' : Associated q r) : DvdNotUnit p r

{α : Type u_1}
[CommMonoidWithZero α]
[Nontrivial α]
{p q r : α}
(h : DvdNotUnit p q)
(h' : q ~ᵤ r)


theorem sInf_add {n : ℕ} {p : ℕ → Prop} (hn : n ≤ sInf { m | p m }) :
    sInf { m | p (m + n) } + n = sInf { m | p m }

{n : ℕ}
{p : ℕ → Prop}
(hn : n ≤ sInf {m | p m})

sInf {m | p (m + n)} + n = sInf {m | p m}


@[simp] lemma toMeasure_prod : (μ.prod ν).toMeasure = μ.toMeasure.prod ν.toMeasure

(μ : MeasureTheory.ProbabilityMeasure α)

(ν : MeasureTheory.ProbabilityMeasure β)


protected theorem symm (h : e.IsImage s t) : e.symm.IsImage t s

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


@[to_additive]
theorem inv_mul_lt_one_iff : a⁻¹ * b < 1 ↔ b < a

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


@[simp] theorem lastCases_last {n : Nat} {motive : Fin (n + 1) → Sort _} {last cast} :
    (Fin.lastCases last cast (Fin.last n) : motive (Fin.last n)) = last

{cast : (i : Fin n) → motive i.castSucc}

Fin.lastCases last cast (Fin.last n) = last


theorem Monotone.mul_const [MulPosMono α]
    (hf : Monotone f) (ha : 0 ≤ a) : Monotone fun x => f x * a

{α : Type u}
{β : Type u_1}
[Semiring α]
[Preorder α]
{a : α}
[Preorder β]
{f : β → α}
[MulPosMono α]
(hf : Monotone f)
(ha : 0 ≤ a)


@[simp]
theorem coe_eraseNone (s : Finset (Option α)) : (eraseNone s : Set α) = some ⁻¹' s


@[to_additive (attr := simp)]
theorem mul_self_lt_one_iff : a * a < 1 ↔ a < 1

{α : Type u_1}
[LinearOrderedAddCommMonoid α]
{a : α}


@[to_additive]
theorem prod_eq_one (f : α → M) (h : ∀ a, f a = 1) : ∏ a, f a = 1

{α : Type u_1}
{M : Type u_4}
[Fintype α]
[AddCommMonoid M]
(f : α → M)
(h : ∀ (a : α), f a = 0)


protected theorem Tendsto.eventually_ge_atTop [Preorder β] {f : α → β} {l : Filter α}
    (hf : Tendsto f l atTop) (c : β) : ∀ᶠ x in l, c ≤ f x

{α : Type u_3}
{β : Type u_4}
[Preorder β]
{f : α → β}
{l : Filter α}
(hf : Filter.Tendsto f l Filter.atTop)
(c : β)


theorem Memℒp.comp_of_map (hg : Memℒp g p (Measure.map f μ)) (hf : AEMeasurable f μ) :
    Memℒp (g ∘ f) p μ

(hg : MeasureTheory.Memℒp g p (MeasureTheory.Measure.map f μ))


theorem mk_denumerable (α : Type u) [Denumerable α] : #α = ℵ₀


/-- 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)

{R : Type u}
[Ring R]
(M N : ModuleCat R)

(M.binaryProductLimitCone N).cone.pt = ModuleCat.of R (↑M × ↑N)


protected theorem ae_eq (hf : UnifIntegrable f p μ) (hfg : ∀ n, f n =ᵐ[μ] g n) :
    UnifIntegrable g p μ

{f g : ι → α → β}

(hf : MeasureTheory.UnifIntegrable f p μ)


theorem det_adjugate (A : Matrix n n α) : (adjugate A).det = A.det ^ (Fintype.card n - 1)

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

A.adjugate.det = A.det ^ (Fintype.card n - 1)


{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(D : LieDerivation R L M)


theorem isOpen_lt_prod : IsOpen { p : α × α | p.1 < p.2 }

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]


@[simp]
theorem StandardOneDimIsocrystal.frobenius_apply (m : ℤ) (x : StandardOneDimIsocrystal p k m) :
    Φ(p, k) x = (p : K(p, k)) ^ m • φ(p, k) x

(x : WittVector.StandardOneDimIsocrystal p k m)

(WittVector.Isocrystal.frobenius p k) x = ↑p ^ m • (WittVector.FractionRing.frobeniusRingHom p k) x


/-- A complemented modular coatomic lattice is strongly atomic.
Not an instance to prevent loops. -/
theorem ComplementedLattice.isStronglyCoatomic' [h : IsCoatomic α] : IsStronglyAtomic α

{α : Type u_2}
[Lattice α]
[BoundedOrder α]
[IsModularLattice α]
[ComplementedLattice α]
[h : IsCoatomic α]


lemma exterior_singleton_eq_ker_nhds (a : α) : exterior {a} = (𝓝 a).ker

{α : Type u_3}
[TopologicalSpace α]
(a : α)


/-- Equivalence between embeddings of `Option α` and a sigma type over the embeddings of `α`. -/
@[simps]
def optionEmbeddingEquiv (α β) : (Option α ↪ β) ≃ Σ f : α ↪ β, ↥(Set.range f)ᶜ

(α : Type u_1)
(β : Type u_2)
(f : Option α ↪ β)

↑((Function.Embedding.optionEmbeddingEquiv α β) f).snd = f none


theorem gcd_dvd_gcd_of_dvd_right {i k : ℤ} (j : ℤ) (H : i ∣ k) : gcd j i ∣ gcd j k


theorem map_mem_edgeSet_iff {e : Sym2 V} : e.map f ∈ G'.edgeSet ↔ e ∈ G.edgeSet

{V : Type u_1}
{W : Type u_2}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G ≃g G')
{e : Sym2 V}

Sym2.map (⇑f) e ∈ G'.edgeSet ↔ e ∈ G.edgeSet


theorem of_mem_supp {α : TypeVec n} {x : F α} {P : ∀ ⦃i⦄, α i → Prop} (h : LiftP P x) (i : Fin2 n) :
    ∀ y ∈ supp x i, P y

{n : ℕ}
{F : TypeVec.{u} n → Type v}
[MvFunctor F]
{α : TypeVec.{u} n}
{x : F α}
{P : ⦃i : Fin2 n⦄ → α i → Prop}
(h : MvFunctor.LiftP P x)
(i : Fin2 n)
(y : α i)


/-- A left homology data for a short complex `S` in the opposite category
induces a right homology data for `S.unop`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : S.LeftHomologyData) : S.unop.RightHomologyData


@[simp]
theorem apply_covBy_apply_iff {E : Type*} [EquivLike E α β] [OrderIsoClass E α β] (e : E) :
    e a ⋖ e b ↔ a ⋖ b

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{a b : α}
{E : Type u_3}
[EquivLike E α β]
[OrderIsoClass E α β]
(e : E)


theorem degree_monomial_le (n : ℕ) (a : R) : degree (monomial n a) ≤ n

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


theorem sizeOf_lt_of_mem [SizeOf α] {as : List α} (h : a ∈ as) : sizeOf a < sizeOf as

{α : Type u_1}
{a : α}
[SizeOf α]
{as : List α}
(h : a ∈ as)


theorem add_mul_succ {a b : Ordinal} (c) (ba : b + a = a) : (a + b) * succ c = a * succ c + b

{a b : Ordinal.{u_1}}
(c : Ordinal.{u_1})
(ba : b + a = a)

(a + b) * Order.succ c = a * Order.succ c + b


@[simp]
theorem lift_aequiv {U : Type*} [CommRing U] (h : IsAdjoinRoot S f) (h' : IsAdjoinRoot T f)
    (i : R →+* U) (x hx z) : h'.lift i x hx (h.aequiv h' z) = h.lift i x hx z

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{f : R[X]}
{T : Type u_1}
[CommRing T]
[Algebra R T]
{U : Type u_2}
[CommRing U]
(h : IsAdjoinRoot S f)
(h' : IsAdjoinRoot T f)
(i : R →+* U)
(x : U)
(hx : Polynomial.eval₂ i x f = 0)
(z : S)

(IsAdjoinRoot.lift i x hx h') ((h.aequiv h') z) = (IsAdjoinRoot.lift i x hx h) z


theorem Monic.degree_pos_of_not_isUnit (hu : ¬IsUnit p) : 0 < degree p

{R : Type u}
[CommSemiring R]
{p : R[X]}
(hp : p.Monic)
(hu : ¬IsUnit p)


/-- `lpMeasSubgroupToLpTrim` preserves the norm. -/
theorem lpMeasSubgroupToLpTrim_norm_map [hp : Fact (1 ≤ p)] (hm : m ≤ m0)
    (f : lpMeasSubgroup F m p μ) : ‖lpMeasSubgroupToLpTrim F p μ hm f‖ = ‖f‖

(f : ↥(MeasureTheory.lpMeasSubgroup F m p μ))

‖MeasureTheory.lpMeasSubgroupToLpTrim F p μ hm f‖ = ‖f‖


@[ext]
theorem ext (h : c.fst = d.fst) : c = d

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}
{c d : Concept α β r}
(h : c.toProd.1 = d.toProd.1)


theorem w_nonneg (D : ℝ) (x : E) : 0 ≤ w D x

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


theorem comap_const_of_not_mem {x : β} (ht : t ∈ g) (hx : x ∉ t) : comap (fun _ : α => x) g = ⊥

{α : Type u}
{β : Type v}
{g : Filter β}
{t : Set β}
{x : β}
(ht : t ∈ g)
(hx : x ∉ t)


theorem Poly.denote_reverseAux (ctx : Context) (p q : Poly) : denote ctx (List.reverseAux p q) = denote ctx (p ++ q)

(ctx : Nat.Linear.Context)
(p q : Nat.Linear.Poly)

Nat.Linear.Poly.denote ctx (List.reverseAux p q) = Nat.Linear.Poly.denote ctx (p ++ q)


protected theorem IsExtrOn.closure (h : IsExtrOn f s a) (hc : ContinuousOn f (closure s)) :
    IsExtrOn f (closure s) a

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[Preorder Y]
[OrderClosedTopology Y]
{f : X → Y}
{s : Set X}
{a : X}
(h : IsExtrOn f s a)
(hc : ContinuousOn f (closure s))


/-- Walks of length two from `u` to `v` correspond bijectively to common neighbours of `u` and `v`.
Note that `u` and `v` may be the same. -/
@[simps]
def walkLengthTwoEquivCommonNeighbors (u v : V) :
    {p : G.Walk u v // p.length = 2} ≃ G.commonNeighbors u v

{V : Type u}
(G : SimpleGraph V)
(u v : V)
(w : ↑(G.commonNeighbors u v))

↑((G.walkLengthTwoEquivCommonNeighbors u v).symm w) = (SimpleGraph.Adj.toWalk ⋯).concat ⋯


theorem nhdsWithin_basis_closed_eball :
    (𝓝[s] x).HasBasis (fun ε : ℝ≥0∞ => 0 < ε) fun ε => closedBall x ε ∩ s

{α : Type u}
[PseudoEMetricSpace α]
{x : α}
{s : Set α}

(𝓝[s] x).HasBasis (fun ε => 0 < ε) fun ε => EMetric.closedBall x ε ∩ s


@[to_additive]
theorem Isometry.nnnorm_map_of_map_one {f : E → F} (hi : Isometry f) (h₁ : f 1 = 1) (x : E) :
    ‖f x‖₊ = ‖x‖₊

{E : Type u_3}
{F : Type u_4}
[SeminormedGroup E]
[SeminormedGroup F]
{f : E → F}
(hi : Isometry f)
(h₁ : f 1 = 1)
(x : E)

‖f x‖₊ = ‖x‖₊


theorem NormedAddGroupHom.completion_coe (f : NormedAddGroupHom G H) (g : G) :
    f.completion g = f g

{G : Type u_1}
[SeminormedAddCommGroup G]
{H : Type u_2}
[SeminormedAddCommGroup H]
(f : NormedAddGroupHom G H)
(g : G)


theorem mfderiv_surjective {x : M} (hx : x ∈ e.source) : Function.Surjective (mfderiv I I' e x)

(he : PartialHomeomorph.MDifferentiable I I' e)

Function.Surjective ⇑(mfderiv I I' (↑e) x)


@[simp]
theorem translationNumber_conj_eq' (f : CircleDeg1Liftˣ) (g : CircleDeg1Lift) :
    τ (↑f⁻¹ * g * f) = τ g

(↑f⁻¹ * g * ↑f).translationNumber = g.translationNumber


@[to_additive]
theorem comp_noncommCoprod {Q : Type*} [Monoid Q] (h : P →* Q) :
    h.comp (f.noncommCoprod g comm) =
      (h.comp f).noncommCoprod (h.comp g) (fun m n ↦ (comm m n).map h)

(comm : ∀ (m : M) (n : N), AddCommute (f m) (g n))

h.comp (f.noncommCoprod g comm) = (h.comp f).noncommCoprod (h.comp g) ⋯


theorem comap_dist_left_atTop_eq_cocompact [ProperSpace α] (x : α) :
    comap (dist x) atTop = cocompact α

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

Filter.comap (dist x) Filter.atTop = Filter.cocompact α


@[simp]
theorem smul_mk [DistribSMul S R] [IsScalarTower S R R] (a : S) (x : R[X]) :
    a • mk f x = mk f (a • x)

{R : Type u}
{S : Type v}
[CommRing R]
(f : R[X])
[DistribSMul S R]
[IsScalarTower S R R]
(a : S)
(x : R[X])

a • (AdjoinRoot.mk f) x = (AdjoinRoot.mk f) (a • x)


/-- When a vector is in `Kᗮ`. -/
theorem mem_orthogonal (v : E) : v ∈ Kᗮ ↔ ∀ u ∈ K, ⟪u, v⟫ = 0

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


theorem eval₂_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R →+* S} {s t : S}
    {φ ψ : R[X]} : f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ

{R : Type u_1}
{S : Type u_2}
[Semiring R]
[Semiring S]
{f g : R →+* S}
{s t : S}
{φ ψ : R[X]}

f = g → s = t → φ = ψ → Polynomial.eval₂ f s φ = Polynomial.eval₂ g t ψ


@[simp] theorem id_hom' (M : Comon_ C) : (𝟙 M : Hom M M).hom = 𝟙 M.X

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


@[to_additive (attr := simp)]
theorem coe_singletonOneHom : (singletonOneHom : α → Set α) = singleton


theorem out_dvd_iff (a : α) (b : Associates α) : b.out ∣ a ↔ b ≤ Associates.mk a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
(a : α)
(b : Associates α)


lemma isUnit_iff' :
    IsUnit P ↔ IsUnit (eval 0 P) ∧ IsNilpotent (P /ₘ X)

{R : Type u_1}
[CommRing R]
{P : Polynomial R}

IsUnit P ↔ IsUnit (Polynomial.eval 0 P) ∧ IsNilpotent (P /ₘ Polynomial.X)


/-- The canonical isomorphism `(𝟭 C).mapTriangle ≅ 𝟭 (Triangle C)`. -/
@[simps!]
def mapTriangleIdIso : (𝟭 C).mapTriangle ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Functor.mapTriangleIdIso C).hom.app X).hom₂ = CategoryTheory.CategoryStruct.id X.obj₂


/-- `Preregular` is preserved by equivalence of categories. -/
theorem preregular : Preregular D

{C : Type u_1}
[CategoryTheory.Category.{u_4, u_1} C]
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_2} D]
(e : C ≌ D)
[CategoryTheory.Preregular C]


@[to_additive]
theorem Submonoid.topologicalClosure_minimal (s : Submonoid M) {t : Submonoid M} (h : s ≤ t)
    (ht : IsClosed (t : Set M)) : s.topologicalClosure ≤ t

{M : Type u_3}
[TopologicalSpace M]
[Monoid M]
[ContinuousMul M]
(s : Submonoid M)
{t : Submonoid M}
(h : s ≤ t)
(ht : IsClosed ↑t)


@[simp]
theorem casesOn'_some (x : β) (f : α → β) (a : α) : casesOn' (some a) x f = f a

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


theorem AddMonoid.End.natCast_def (n : ℕ) :
    (↑n : AddMonoid.End M) = DistribMulAction.toAddMonoidEnd ℕ M n

{M : Type u_5}
[AddCommMonoid M]
(n : ℕ)

↑n = (DistribMulAction.toAddMonoidEnd ℕ M) n


@[to_additive]
theorem map_inf_eq (H K : Subgroup G) (f : G →* N) (hf : Function.Injective f) :
    map f (H ⊓ K) = map f H ⊓ map f K

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(H K : Subgroup G)
(f : G →* N)
(hf : Function.Injective ⇑f)

Subgroup.map f (H ⊓ K) = Subgroup.map f H ⊓ Subgroup.map f K


/-- Given a basis, the `i`th element of the dual basis evaluates to 0 on the `j`th element of the
basis if `j ≠ i`. -/
theorem mk_coord_apply_ne {i j : ι} (h : j ≠ i) : (Basis.mk hli hsp).coord i (v j) = 0

{hsp : ⊤ ≤ Submodule.span R (Set.range v)}


@[simp]
theorem pi_div_four_le_arcsin {x} : π / 4 ≤ arcsin x ↔ √2 / 2 ≤ x


/-- Coproduct of two continuous homomorphisms to the same space. -/
@[to_additive (attr := simps!) "Coproduct of two continuous homomorphisms to the same space."]
def coprod (f : ContinuousMonoidHom A E) (g : ContinuousMonoidHom B E) :
    ContinuousMonoidHom (A × B) E

{A : Type u_2}
{B : Type u_3}
{E : Type u_6}
[Monoid A]
[Monoid B]
[CommGroup E]
[TopologicalSpace A]
[TopologicalSpace B]
[TopologicalSpace E]
[TopologicalGroup E]
(f : ContinuousMonoidHom A E)
(g : ContinuousMonoidHom B E)

∀ (a : A × B), (f.coprod g) a = (ContinuousMonoidHom.mul E).toMonoidHom ((f.prod_map g).toMonoidHom a)


theorem ciInf_subsingleton [Subsingleton ι] (i : ι) (s : ι → α) : ⨅ i, s i = s i

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
[Subsingleton ι]
(i : ι)
(s : ι → α)


@[to_additive (attr := simp) toProd_add]
theorem toProd_mul : (s * t).toProd = s.toProd * t.toProd

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

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


/-- A homology data for a short complex `S` induces a homology data for `S.op`. -/
@[simps]
def op (h : S.HomologyData) : S.op.HomologyData


@[simp]
theorem coe_mulₗᵢ : ⇑(mulₗᵢ 𝕜 𝕜') = mul 𝕜 𝕜'

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
(𝕜' : Type u_3)
[NonUnitalSeminormedRing 𝕜']
[NormedSpace 𝕜 𝕜']
[IsScalarTower 𝕜 𝕜' 𝕜']
[SMulCommClass 𝕜 𝕜' 𝕜']
[RegularNormedAlgebra 𝕜 𝕜']

⇑(ContinuousLinearMap.mulₗᵢ 𝕜 𝕜') = ⇑(ContinuousLinearMap.mul 𝕜 𝕜')


@[simp]
theorem isSymm_compl [Zero α] [One α] (h : A.IsSymm) : A.compl.IsSymm

{V : Type u_1}
{α : Type u_2}
[DecidableEq α]
[DecidableEq V]
(A : Matrix V V α)
[Zero α]
[One α]
(h : A.IsSymm)


@[to_additive (attr := simp)]
lemma isMulFreimanIso_empty : IsMulFreimanIso n (∅ : Set α) (∅ : Set β) f

{α : Type u_2}
{β : Type u_3}
[AddCommMonoid α]
[AddCommMonoid β]
{f : α → β}
{n : ℕ}


@[simp]
theorem not_isReal_of_mk_isComplex {φ : K →+* ℂ} (h : IsComplex (mk φ)) :
    ¬ ComplexEmbedding.IsReal φ

(h : (NumberField.InfinitePlace.mk φ).IsComplex)


theorem toGerm_injective : Injective (toGerm : (α →ₘ[μ] β) → Germ (ae μ) β)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]


/-- The function `fun t ↦ Ring.inverse (x + t) - x⁻¹ + x⁻¹ * t * x⁻¹` is `O(t ^ 2)` as `t → 0`. -/
theorem inverse_add_norm_diff_second_order (x : Rˣ) :
    (fun t : R => inverse (↑x + t) - ↑x⁻¹ + ↑x⁻¹ * t * ↑x⁻¹) =O[𝓝 0] fun t => ‖t‖ ^ 2

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
(x : Rˣ)

(fun t => Ring.inverse (↑x + t) - ↑x⁻¹ + ↑x⁻¹ * t * ↑x⁻¹) =O[𝓝 0] fun t => ‖t‖ ^ 2


theorem map_mul : ∀ x y, v (x * y) = v x * v y

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedCommMonoidWithZero Γ₀]
(v : Valuation R Γ₀)
(x y : R)


@[simp]
theorem intCoe_int (f : ArithmeticFunction ℤ) : ofInt f = f


@[simp]
theorem mem_tails : ∀ s t : List α, s ∈ tails t ↔ s <:+ t


theorem toLex_monotone : Monotone (@toLex (α →₀ N))

{α : Type u_1}
{N : Type u_2}
[Zero N]
[LinearOrder α]
[PartialOrder N]


@[to_additive (attr := simp)]
theorem map_mul (f : α → β) (x y : FreeGroup α) : f <$> (x * y) = f <$> x * f <$> y

{α β : Type u}
(f : α → β)
(x y : FreeGroup α)


private lemma le_min_of_le_of_lt (ha : a ≤ b) (hb : a < c) : a ≤ min b c

{R : Type u_2}
[LinearOrder R]
{a b c : R}
(ha : a ≤ b)
(hb : a < c)


theorem finite [Module.Finite R M] {ι : Type*} {f : ι → M}
    (h : LinearIndependent R f) : Finite ι

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
[Module.Finite R M]
{ι : Type u_1}
{f : ι → M}
(h : LinearIndependent R f)


@[simp]
theorem _root_.PowerBasis.ofGenMemAdjoin'_gen (B : PowerBasis R S) (hint : IsIntegral R x)
    (hx : B.gen ∈ adjoin R ({x} : Set S)) :
    (B.ofGenMemAdjoin' hint hx).gen = x

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[IsDomain R]
[Algebra R S]
[IsDomain S]
[NoZeroSMulDivisors R S]
[IsIntegrallyClosed R]
{x : S}
(B : PowerBasis R S)
(hint : IsIntegral R x)
(hx : B.gen ∈ Algebra.adjoin R {x})


theorem mem_toSubmonoid {s : Subfield K} {x : K} : x ∈ s.toSubmonoid ↔ x ∈ s

{K : Type u}
[DivisionRing K]
{s : Subfield K}
{x : K}


theorem _root_.MeasurableEmbedding.integrable_map_iff {f : α → δ} (hf : MeasurableEmbedding f)
    {g : δ → β} : Integrable g (Measure.map f μ) ↔ Integrable (g ∘ f) μ

{α : Type u_1}
{β : Type u_2}
{δ : Type u_4}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasurableSpace δ]
[NormedAddCommGroup β]
{f : α → δ}
(hf : MeasurableEmbedding f)
{g : δ → β}

MeasureTheory.Integrable g (MeasureTheory.Measure.map f μ) ↔ MeasureTheory.Integrable (g ∘ f) μ


/-- Analog of `Polynomial.induction_on`. -/
@[recursor 5]
theorem induction_on {M : MvPolynomial σ R → Prop} (p : MvPolynomial σ R) (h_C : ∀ a, M (C a))
    (h_add : ∀ p q, M p → M q → M (p + q)) (h_X : ∀ p n, M p → M (p * X n)) : M p

(h_add : ∀ (p q : MvPolynomial σ R), M p → M q → M (p + q))

(h_X : ∀ (p : MvPolynomial σ R) (n : σ), M p → M (p * MvPolynomial.X n))