theorem equicontinuousWithinAt_iInf_rng {u : κ → UniformSpace α'} {F : ι → X → α'}
    {S : Set X} {x₀ : X} : EquicontinuousWithinAt (uα :=  ⨅ k, u k) F S x₀ ↔
      ∀ k, EquicontinuousWithinAt (uα :=  u k) F S x₀

{ι : Type u_1}
{κ : Type u_2}
{X : Type u_3}
{α' : Type u_8}
[tX : TopologicalSpace X]
{u : κ → UniformSpace α'}
{F : ι → X → α'}
{S : Set X}
{x₀ : X}

EquicontinuousWithinAt F S x₀ ↔ ∀ (k : κ), EquicontinuousWithinAt F S x₀


/-- Split equalizers are absolute: they are preserved by any functor. -/
@[simps]
def IsSplitEqualizer.map {W : C} {ι : W ⟶ X} (q : IsSplitEqualizer f g ι) (F : C ⥤ D) :
    IsSplitEqualizer (F.map f) (F.map g) (F.map ι)

(q : CategoryTheory.IsSplitEqualizer f g ι)

(q.map F).leftRetraction = F.map q.leftRetraction


theorem homeomorphCircle_apply (hT : T ≠ 0) (x : AddCircle T) :
    homeomorphCircle hT x = toCircle x

(AddCircle.homeomorphCircle hT) x = x.toCircle


theorem Nat.closedEmbedding_coe_rat : ClosedEmbedding ((↑) : ℕ → ℚ)


theorem left_lt_add_div_two : a < (a + b) / 2 ↔ a < b

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


/-- The natural `ℝ`-linear isometry equivalence between `𝕜` satisfying `RCLike 𝕜` and `ℂ` when
`RCLike.im RCLike.I = 1`. -/
@[simps]
def _root_.RCLike.complexLinearIsometryEquiv {𝕜 : Type*} [RCLike 𝕜]
    (h : RCLike.im (RCLike.I : 𝕜) = 1) : 𝕜 ≃ₗᵢ[ℝ] ℂ

{𝕜 : Type u_2}
[RCLike 𝕜]
(h : RCLike.im RCLike.I = 1)

∀ (a : 𝕜), (RCLike.complexLinearIsometryEquiv h) a = (RCLike.complexRingEquiv h).toFun a


theorem X_pow_mul_sub_C_irreducible
    {n m : ℕ} {a : K} (hm : Irreducible (X ^ m - C a))
    (hn : ∀ (E : Type u) [Field E] [Algebra K E] (x : E) (hx : minpoly K x = X ^ m - C a),
      Irreducible (X ^ n - C (AdjoinSimple.gen K x))) :
    Irreducible (X ^ (n * m) - C a)

(hm : Irreducible (Polynomial.X ^ m - Polynomial.C a))

(hn :
  ∀ (E : Type u) [inst : Field E] [inst_1 : Algebra K E] (x : E),
    minpoly K x = Polynomial.X ^ m - Polynomial.C a →
      Irreducible (Polynomial.X ^ n - Polynomial.C (IntermediateField.AdjoinSimple.gen K x)))

Irreducible (Polynomial.X ^ (n * m) - Polynomial.C a)


theorem quotMapCMapSpanMkEquivQuotMapCQuotMapSpanMk_mk (p : R[X]) :
    quotMapCMapSpanMkEquivQuotMapCQuotMapSpanMk I f (Ideal.Quotient.mk _ (mk f p)) =
      quotQuotMk (I.map C) (span {f}) p

{R : Type u}
[CommRing R]
(I : Ideal R)
(f p : R[X])

(AdjoinRoot.quotMapCMapSpanMkEquivQuotMapCQuotMapSpanMk I f)
    ((Ideal.Quotient.mk (Ideal.map (Ideal.Quotient.mk (Ideal.span {f})) (Ideal.map Polynomial.C I)))
      ((AdjoinRoot.mk f) p)) =
  (DoubleQuot.quotQuotMk (Ideal.map Polynomial.C I) (Ideal.span {f})) p


theorem toReal_add_le : (a + b).toReal ≤ a.toReal + b.toReal


/-- Local instance for `TransOrd (oα.lex oβ)`. -/
theorem TransOrd.instOrdLex [oα : Ord α] [oβ : Ord β] [TransOrd α] [TransOrd β] :
    @TransOrd _ (oα.lex oβ)

{α : Type u_1}
{β : Type u_2}
[oα : Ord α]
[oβ : Ord β]
[Batteries.TransOrd α]
[Batteries.TransOrd β]


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

(A₁ A₂ : CategoryTheory.Endofunctor.Algebra F)

(α β : A₁ ⟶ A₂)


lemma PosSMulStrictMono.lift [PosSMulStrictMono α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulStrictMono α β

(hf : ∀ {b₁ b₂ : β}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)

(smul : ∀ (a : α) (b : β), f (a • b) = a • f b)


theorem Antiperiodic.sub_nat_mul_eq [Ring α] [Ring β] (h : Antiperiodic f c) (n : ℕ) :
    f (x - n * c) = (-1) ^ n * f x

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[Ring α]
[Ring β]
(h : Function.Antiperiodic f c)
(n : ℕ)


@[simp]
theorem quot_mul_neg (x y : PGame) : ⟦x * -y⟧ = (-⟦x * y⟧ : Game)


theorem is_ascending_rev_series_of_is_descending {H : ℕ → Subgroup G} {n : ℕ} (hn : H n = ⊥)
    (hdesc : IsDescendingCentralSeries H) : IsAscendingCentralSeries fun m : ℕ => H (n - m)

(G : Type u_1)
[Group G]
{H : ℕ → Subgroup G}
{n : ℕ}
(hn : H n = ⊥)
(hdesc : IsDescendingCentralSeries H)

IsAscendingCentralSeries fun m => H (n - m)


@[simp]
theorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1

{R : Type u}
[Monoid R]
{A : Type v}
{B : Type w}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]

(NonUnitalAlgHom.fst R A B).prod (NonUnitalAlgHom.snd R A B) = 1


@[field_simps]
theorem divp_add_divp [CommRing α] (a b : α) (u₁ u₂ : αˣ) :
    a /ₚ u₁ + b /ₚ u₂ = (a * u₂ + u₁ * b) /ₚ (u₁ * u₂)

{α : Type u}
[CommRing α]
(a b : α)
(u₁ u₂ : αˣ)

a /ₚ u₁ + b /ₚ u₂ = (a * ↑u₂ + ↑u₁ * b) /ₚ (u₁ * u₂)


theorem sameRay_of_arg_eq (h : x.arg = y.arg) : SameRay ℝ x y


theorem HasFiniteFPowerSeriesAt.add (hf : HasFiniteFPowerSeriesAt f pf x n)
    (hg : HasFiniteFPowerSeriesAt g pg x m) :
    HasFiniteFPowerSeriesAt (f + g) (pf + pg) x (max n m)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{pf pg : FormalMultilinearSeries 𝕜 E F}
{x : E}
{n m : ℕ}
(hf : HasFiniteFPowerSeriesAt f pf x n)
(hg : HasFiniteFPowerSeriesAt g pg x m)


@[simp]
lemma tilted_of_not_integrable (hf : ¬ Integrable (fun x ↦ exp (f x)) μ) : μ.tilted f = 0

(hf : ¬MeasureTheory.Integrable (fun x => rexp (f x)) μ)


@[simp] theorem msb_and {x y : BitVec w} : (x &&& y).msb = (x.msb && y.msb)


theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b


@[simp]
theorem ite_eq_eq_distrib (c : Prop) [Decidable c] (a b : Ordering) :
    ((if c then a else b) = Ordering.eq) = if c then a = Ordering.eq else b = Ordering.eq


@[simp] lemma map_map (g : LatticeHom β γ) (f : LatticeHom α β) :
    (L.map f).map g = L.map (g.comp f)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Lattice α]
[Lattice β]
[Lattice γ]
{L : Sublattice α}
(g : LatticeHom β γ)
(f : LatticeHom α β)

Sublattice.map g (Sublattice.map f L) = Sublattice.map (g.comp f) L


/-- If a monotone sequence `u` is such that `u ⌊c^n⌋₊ / ⌊c^n⌋₊` converges to a limit `l` for all
`c > 1`, then `u n / n` tends to `l`. It is even enough to have the assumption for a sequence of
`c`s converging to `1`. -/
theorem tendsto_div_of_monotone_of_tendsto_div_floor_pow (u : ℕ → ℝ) (l : ℝ) (hmono : Monotone u)
    (c : ℕ → ℝ) (cone : ∀ k, 1 < c k) (clim : Tendsto c atTop (𝓝 1))
    (hc : ∀ k, Tendsto (fun n : ℕ => u ⌊c k ^ n⌋₊ / ⌊c k ^ n⌋₊) atTop (𝓝 l)) :
    Tendsto (fun n => u n / n) atTop (𝓝 l)

(clim : Filter.Tendsto c Filter.atTop (𝓝 1))

(hc : ∀ (k : ℕ), Filter.Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) Filter.atTop (𝓝 l))

Filter.Tendsto (fun n => u n / ↑n) Filter.atTop (𝓝 l)


theorem range_some_union_none (α : Type*) : range (some : α → Option α) ∪ {none} = univ


theorem map_smul [SMul R α] [SMul R β] (f : α → β) (r : R) (hf : ∀ a, f (r • a) = r • f a)
    (M : Matrix m n α) : (r • M).map f = r • M.map f

{m : Type u_2}
{n : Type u_3}
{R : Type u_7}
{α : Type v}
{β : Type w}
[SMul R α]
[SMul R β]
(f : α → β)
(r : R)
(hf : ∀ (a : α), f (r • a) = r • f a)
(M : Matrix m n α)


/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise scalar multiplication of
`f` and `g`, which antivary together, is strictly decreased by a permutation if and only if
`f ∘ σ` and `g` do not antivary together. Stated by permuting the entries of `f`. -/
theorem AntivaryOn.sum_smul_lt_sum_comp_perm_smul_iff (hfg : AntivaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f i • g i < ∑ i ∈ s, f (σ i) • g i ↔ ¬AntivaryOn (f ∘ σ) g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{s : Finset ι}
{σ : Equiv.Perm ι}
{f : ι → α}
{g : ι → β}
(hfg : AntivaryOn f g ↑s)
(hσ : {x | σ x ≠ x} ⊆ ↑s)

∑ i ∈ s, f i • g i < ∑ i ∈ s, f (σ i) • g i ↔ ¬AntivaryOn (f ∘ ⇑σ) g ↑s


/-- A functor `F : C ⥤ H` has a right derived functor with respect to
`W : MorphismProperty C` if it has a left Kan extension along
`W.Q : C ⥤ W.Localization` (or any localization functor `L : C ⥤ D`
for `W`, see `hasRightDerivedFunctor_iff`). -/
class HasRightDerivedFunctor : Prop where
  hasLeftKanExtension' : HasLeftKanExtension W.Q F

{C : Type u_1}
{H : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} H]
{F : CategoryTheory.Functor C H}
{W : CategoryTheory.MorphismProperty C}
[self : F.HasRightDerivedFunctor W]


theorem Injective.sum_elim {f : α → γ} {g : β → γ} (hf : Injective f) (hg : Injective g)
    (hfg : ∀ a b, f a ≠ g b) : Injective (Sum.elim f g)

{α : Type u}
{β : Type v}
{γ : Type u_1}
{f : α → γ}
{g : β → γ}
(hf : Function.Injective f)
(hg : Function.Injective g)
(hfg : ∀ (a : α) (b : β), f a ≠ g b)


theorem not_coe_le_bot (a : α) : ¬(a : WithBot α) ≤ ⊥


/-- The minimal polynomial (over `K`) of `σ : Gal(L/K)` is `X ^ (orderOf σ) - 1`. -/
lemma minpoly_algHom_toLinearMap (σ : L →ₐ[K] L) (hσ : IsOfFinOrder σ) :
    minpoly K σ.toLinearMap = X ^ (orderOf σ) - C 1

{K : Type u_1}
{L : Type u_2}
[Field K]
[CommRing L]
[IsDomain L]
[Algebra K L]
(σ : L →ₐ[K] L)
(hσ : IsOfFinOrder σ)

minpoly K σ.toLinearMap = Polynomial.X ^ orderOf σ - Polynomial.C 1


theorem eq_of_subset_of_card_le {s t : Finset α} (h : s ⊆ t) (h₂ : t.card ≤ s.card) : s = t

{α : Type u_1}
{s t : Finset α}
(h : s ⊆ t)
(h₂ : t.card ≤ s.card)


@[to_additive]
theorem map_eq_lift : map f x = lift (of ∘ f) x

{α : Type u}
{β : Type v}
{f : α → β}
{x : FreeGroup α}

(FreeGroup.map f) x = (FreeGroup.lift (FreeGroup.of ∘ f)) x


/-- If a functor inverts homotopy equivalences, it sends homotopic maps to the same map. -/
lemma _root_.Homotopy.map_eq_of_inverts_homotopyEquivalences
    {φ₀ φ₁ : F ⟶ G} (h : Homotopy φ₀ φ₁) (hc : ∀ j, ∃ i, c.Rel i j)
    [∀ i, HasBinaryBiproduct (F.X i) (F.X i)]
    [HasHomotopyCofiber (biprod.lift (𝟙 F) (-𝟙 F))]
    {D : Type*} [Category D] (H : HomologicalComplex C c ⥤ D)
    (hH : (homotopyEquivalences C c).IsInvertedBy H) :
    H.map φ₀ = H.map φ₁

{φ₀ φ₁ : F ⟶ G}

[∀ (i : ι), CategoryTheory.Limits.HasBinaryBiproduct (F.X i) (F.X i)]

[HomologicalComplex.HasHomotopyCofiber (CategoryTheory.Limits.biprod.lift (𝟙 F) (-𝟙 F))]

(hH : (HomologicalComplex.homotopyEquivalences C c).IsInvertedBy H)


@[simp]
theorem coeToFun_mul (χ χ' : MulChar R R') : ⇑(χ * χ') = χ * χ'

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommMonoidWithZero R']
(χ χ' : MulChar R R')

⇑(χ * χ') = ⇑χ * ⇑χ'


/-- If the angle between two vectors is 0, the norm of their difference equals
the absolute value of the difference of their norms. -/
theorem norm_sub_eq_abs_sub_norm_of_angle_eq_zero {x y : V} (h : angle x y = 0) :
    ‖x - y‖ = |‖x‖ - ‖y‖|

(h : InnerProductGeometry.angle x y = 0)


theorem natDegree_X_sub_C_le (r : R) : (X - C r).natDegree ≤ 1

(Polynomial.X - Polynomial.C r).natDegree ≤ 1


theorem of_results_bind {s : Computation α} {f : α → Computation β} {b k} :
    Results (bind s f) b k → ∃ a m n, Results s a m ∧ Results (f a) b n ∧ k = n + m

{α : Type u}
{β : Type v}
{s : Computation α}
{f : α → Computation β}
{b : β}
{k : ℕ}

(s.bind f).Results b k → ∃ a m n, s.Results a m ∧ (f a).Results b n ∧ k = n + m


theorem left_distrib [Mul R] [Add R] [LeftDistribClass R] (a b c : R) :
    a * (b + c) = a * b + a * c

{R : Type x}
[Mul R]
[Add R]
[LeftDistribClass R]
(a b c : R)


/-- The left homology functor `ShortComplex C ⥤ C`, where the left homology of a
short complex `S` is understood as a cokernel of the obvious map `S.toCycles : S.X₁ ⟶ S.cycles`
where `S.cycles` is a kernel of `S.g : S.X₂ ⟶ S.X₃`. -/
@[simps]
noncomputable def leftHomologyFunctor : ShortComplex C ⥤ C

(CategoryTheory.ShortComplex.leftHomologyFunctor C).obj S = S.leftHomology


theorem count_singleton_self (a : α) : count a ({a} : Multiset α) = 1


private lemma max_mem_aux {s t : Colex α} (hst : s ≠ t) : (ofColex s ∆ ofColex t).Nonempty

{α : Type u_1}
[LinearOrder α]
{s t : Finset.Colex α}
(hst : s ≠ t)


@[simp]
lemma gaussianPDF_zero_var (μ : ℝ) : gaussianPDF μ 0 = 0


@[simp]
theorem edist_map (x y : E) : edist (e x) (e y) = edist x y

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


theorem prev_nil : ∀ {it}, ValidFor [] r it → ValidFor [] r it.prev

String.Iterator.ValidFor [] r it → String.Iterator.ValidFor [] r it.prev


theorem IntFractPair.get?_seq1_eq_succ_get?_stream :
    (IntFractPair.seq1 v).snd.get? n = (IntFractPair.stream v) (n + 1)

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
{v : K}
{n : ℕ}

(GenContFract.IntFractPair.seq1 v).2.get? n = GenContFract.IntFractPair.stream v (n + 1)


/-- The isomorphism `K.homology i ≅ L.homology i` induced by a morphism `f : K ⟶ L` such
that `[QuasiIsoAt f i]` holds. -/
@[simps! hom]
noncomputable def isoOfQuasiIsoAt (f : K ⟶ L) (i : ι) [K.HasHomology i] [L.HasHomology i]
    [QuasiIsoAt f i] : K.homology i ≅ L.homology i

(isoOfQuasiIsoAt f i).hom = HomologicalComplex.homologyMap f i


theorem coe_mem_one (x : R) : algebraMap R P x ∈ (1 : FractionalIdeal S P)

{R : Type u_1}
[CommRing R]
(S : Submonoid R)
{P : Type u_2}
[CommRing P]
[Algebra R P]
(x : R)


protected theorem measurableSet_eq_of_countable_range' (hτ : IsStoppingTime f τ)
    (h_countable : (Set.range τ).Countable) (i : ι) :
    MeasurableSet[hτ.measurableSpace] {ω | τ ω = i}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
(hτ : MeasureTheory.IsStoppingTime f τ)
(h_countable : (Set.range τ).Countable)
(i : ι)


/-- subsemigroup closure of a set is monotone in its argument: if `s ⊆ t`,
then `closure s ≤ closure t`. -/
@[to_additive "Additive subsemigroup closure of a set is monotone in its argument: if `s ⊆ t`,
  then `closure s ≤ closure t`"]
theorem closure_mono ⦃s t : Set M⦄ (h : s ⊆ t) : closure s ≤ closure t

{M : Type u_1}
[Add M]
⦃s t : Set M⦄
(h : s ⊆ t)

AddSubsemigroup.closure s ≤ AddSubsemigroup.closure t


@[to_additive (attr := simp)]
theorem coe_inv (S : Submonoid G) : ↑S⁻¹ = (S : Set G)⁻¹

{G : Type u_2}
[Group G]
(S : Submonoid G)

↑S⁻¹ = (↑S)⁻¹


theorem extract_extract {s1 e2 e1 s2 : Nat} {a : Array α} (h : s1 + e2 ≤ e1) :
    (a.extract s1 e1).extract s2 e2 = a.extract (s1 + s2) (s1 + e2)

{α : Type u}
{s1 e2 e1 s2 : Nat}
{a : Array α}
(h : s1 + e2 ≤ e1)


theorem isCoprime_group_smul_left : IsCoprime (x • y) z ↔ IsCoprime y z

{R : Type u_1}
{G : Type u_2}
[CommSemiring R]
[Group G]
[MulAction G R]
[SMulCommClass G R R]
[IsScalarTower G R R]
(x : G)
(y z : R)


lemma mul_ite_zero : a * ite P b 0 = ite P (a * b) 0

{α : Type u}
[MulZeroClass α]
(P : Prop)
[Decidable P]
(a b : α)

(a * if P then b else 0) = if P then a * b else 0


@[simp]
theorem ascFactorial_zero (n : ℕ) : n.ascFactorial 0 = 1


@[to_additive]
protected theorem Multipliable.map [CommMonoid γ] [TopologicalSpace γ] (hf : Multipliable f) {G}
    [FunLike G α γ] [MonoidHomClass G α γ] (g : G) (hg : Continuous g) : Multipliable (g ∘ f)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
[AddCommMonoid γ]
[TopologicalSpace γ]
(hf : Summable f)
{G : Type u_5}
[FunLike G α γ]
[AddMonoidHomClass G α γ]
(g : G)
(hg : Continuous ⇑g)


@[simp]
lemma length_toList (x : RelSeries r) : x.toList.length = x.length + 1

{α : Type u_1}
{r : Rel α α}
(x : RelSeries r)


theorem QuotientMap.preimage_connectedComponent [TopologicalSpace β] {f : α → β}
    (hf : QuotientMap f) (h_fibers : ∀ y : β, IsConnected (f ⁻¹' {y})) (a : α) :
    f ⁻¹' connectedComponent (f a) = connectedComponent a

(h_fibers : ∀ (y : β), IsConnected (f ⁻¹' {y}))


@[grind_norm] theorem Int.lt_eq (a b : Int) : (a < b) = (a + 1 ≤ b)


@[to_additive (attr := simp)] theorem swap_inr (x : N) : swap M N (inr x) = inl x

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(x : N)

(Monoid.Coprod.swap M N) (Monoid.Coprod.inr x) = Monoid.Coprod.inl x


theorem constr_pow_gen (pb : PowerBasis A S) {y : S'} (hy : aeval y (minpoly A pb.gen) = 0) :
    pb.basis.constr A (fun i => y ^ (i : ℕ)) pb.gen = y

(hy : (Polynomial.aeval y) (minpoly A pb.gen) = 0)

((pb.basis.constr A) fun i => y ^ ↑i) pb.gen = y


private theorem newton_seq_is_cauchy : IsCauSeq norm newton_seq

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


theorem norm_cderiv_le (hr : 0 < r) (hf : ∀ w ∈ sphere z r, ‖f w‖ ≤ M) :
    ‖cderiv r f z‖ ≤ M / r

(hf : ∀ w ∈ Metric.sphere z r, ‖f w‖ ≤ M)


/-- The filter of right neighborhoods has a basis of closed intervals. -/
theorem nhdsWithin_Ici_basis_Icc [NoMaxOrder α] [DenselyOrdered α] {a : α} :
    (𝓝[≥] a).HasBasis (a < ·) (Icc a)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[NoMaxOrder α]
[DenselyOrdered α]
{a : α}

(𝓝[≥] a).HasBasis (fun x => a < x) (Set.Icc a)


@[to_additive (attr := simp, norm_cast) coe_lt_zero]
theorem coe_lt_one [LT α] : (a : WithBot α) < 1 ↔ a < 1


lemma Monotone.vecCons (hf : Monotone f) (ha : a ≤ f 0) : Monotone (vecCons a f)

{α : Type u_1}
[Preorder α]
{n : ℕ}
{f : Fin (n + 1) → α}
{a : α}
(hf : Monotone f)
(ha : a ≤ f 0)


theorem ae_eq_restrict_iUnion_iff [Countable ι] (s : ι → Set α) (f g : α → δ) :
    f =ᵐ[μ.restrict (⋃ i, s i)] g ↔ ∀ i, f =ᵐ[μ.restrict (s i)] g

{α : Type u_2}
{δ : Type u_4}
{ι : Type u_6}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[Countable ι]
(s : ι → Set α)
(f g : α → δ)

f =ᵐ[μ.restrict (⋃ i, s i)] g ↔ ∀ (i : ι), f =ᵐ[μ.restrict (s i)] g


theorem eLpNorm_smul_measure_of_ne_zero {p : ℝ≥0∞} {f : α → F} {c : ℝ≥0∞} (hc : c ≠ 0) :
    eLpNorm f p (c • μ) = c ^ (1 / p).toReal • eLpNorm f p μ

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

MeasureTheory.eLpNorm f p (c • μ) = c ^ (1 / p).toReal • MeasureTheory.eLpNorm f p μ


/-- The counit isomorphism for `functorProdFunctorEquiv` -/
@[simps!]
def functorProdFunctorEquivCounitIso :
    functorProdToProdFunctor A B C ⋙ prodFunctorToFunctorProd A B C ≅ 𝟭 _

(A : Type u₁)
[CategoryTheory.Category.{v₁, u₁} A]
(B : Type u₂)
[CategoryTheory.Category.{v₂, u₂} B]
(C : Type u₃)
[CategoryTheory.Category.{v₃, u₃} C]
(X : CategoryTheory.Functor A (B × C))

∀ (X_1 : A),
  ((CategoryTheory.functorProdFunctorEquivCounitIso A B C).hom.app X).app X_1 =
    (CategoryTheory.CategoryStruct.id (X.obj X_1).1, CategoryTheory.CategoryStruct.id (X.obj X_1).2)


theorem edist_le_of_le (h : HolderWith C r f) {x y : X} {d : ℝ≥0∞} (hd : edist x y ≤ d) :
    edist (f x) (f y) ≤ (C : ℝ≥0∞) * d ^ (r : ℝ)

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
{C r : ℝ≥0}
{f : X → Y}
(h : HolderWith C r f)
{x y : X}
{d : ℝ≥0∞}
(hd : edist x y ≤ d)


@[simp] lemma mop_rightUnitor (X : C) : (ρ_ X).mop = (λ_ (mop X))

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

(CategoryTheory.MonoidalCategory.rightUnitor X).mop = CategoryTheory.MonoidalCategory.leftUnitor { unmop := X }


theorem toNonUnitalSubalgebra_injective :
    Function.Injective
      (toNonUnitalSubalgebra : NonUnitalStarSubalgebra R A → NonUnitalSubalgebra R A)

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


/-- In general, the annihilator of a simple module is called a primitive ideal, and it is
always a two-sided prime ideal, but mathlib's `Ideal.IsPrime` is not the correct definition
for noncommutative rings. -/
theorem IsSimpleModule.annihilator_isMaximal {R} [CommRing R] [Module R M]
    [simple : IsSimpleModule R M] : (Module.annihilator R M).IsMaximal

{M : Type u_4}
[AddCommGroup M]
{R : Type u_6}
[CommRing R]
[Module R M]
[simple : IsSimpleModule R M]


@[simp] theorem mem_filterMap (f : α → Option β) (l : Array α) {b : β} :
    b ∈ filterMap f l ↔ ∃ a, a ∈ l ∧ f a = some b

{α : Type u_1}
{β : Type u_2}
(f : α → Option β)
(l : Array α)
{b : β}

b ∈ Array.filterMap f l 0 ↔ ∃ a, a ∈ l ∧ f a = some b


@[to_additive (attr := simp)]
lemma stabilizer_singleton (b : α) : stabilizer G ({b} : Set α) = stabilizer G b

{G : Type u_1}
{α : Type u_3}
[AddGroup G]
[AddAction G α]
(b : α)

AddAction.stabilizer G {b} = AddAction.stabilizer G b


@[to_additive]
theorem map_div_left_ae (μ : Measure G) [IsMulLeftInvariant μ] [IsInvInvariant μ] (x : G) :
    Filter.map (fun t => x / t) (ae μ) = ae μ

{G : Type u_2}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd G]
[MeasurableNeg G]
(μ : MeasureTheory.Measure G)
[μ.IsAddLeftInvariant]
[μ.IsNegInvariant]
(x : G)

Filter.map (fun t => x - t) (MeasureTheory.ae μ) = MeasureTheory.ae μ


@[to_additive (attr := simp)]
lemma orbitRel.Quotient.orbit.coe_smul {g : G} {x : orbitRel.Quotient G α} {a : x.orbit} :
    ↑(g • a) = g • (a : α)

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]
{g : G}
{x : AddAction.orbitRel.Quotient G α}
{a : ↑x.orbit}


/-- Construct the Beck fork in the category of coalgebras. This fork is coreflexive as well as an
equalizer.
-/
@[simps!]
def beckCoalgebraFork : Fork (CofreeEqualizer.topMap X) (CofreeEqualizer.bottomMap X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T : CategoryTheory.Comonad C}
(X : T.Coalgebra)

∀ (X_1 : CategoryTheory.Limits.WalkingParallelPair),
  (CategoryTheory.Comonad.beckCoalgebraFork X).π.app X_1 =
    CategoryTheory.Limits.WalkingParallelPair.rec (motive := fun t =>
      X_1 = t →
        (X ⟶
          (CategoryTheory.Limits.parallelPair (CategoryTheory.Comonad.CofreeEqualizer.topMap X)
                (CategoryTheory.Comonad.CofreeEqualizer.bottomMap X)).obj
            X_1))
      (fun h => ⋯ ▸ CategoryTheory.Comonad.CofreeEqualizer.ι X)
      (fun h =>
        ⋯ ▸
          CategoryTheory.CategoryStruct.comp (CategoryTheory.Comonad.CofreeEqualizer.ι X)
            (CategoryTheory.Comonad.CofreeEqualizer.topMap X))
      X_1 ⋯


/-- `∫⁻ a in s, f a ∂μ` is defined as the supremum of integrals of simple functions
`φ : α →ₛ ℝ≥0∞` such that `φ ≤ f`. This lemma says that it suffices to take
functions `φ : α →ₛ ℝ≥0`. -/
theorem lintegral_eq_nnreal {m : MeasurableSpace α} (f : α → ℝ≥0∞) (μ : Measure α) :
    ∫⁻ a, f a ∂μ =
      ⨆ (φ : α →ₛ ℝ≥0) (_ : ∀ x, ↑(φ x) ≤ f x), (φ.map ((↑) : ℝ≥0 → ℝ≥0∞)).lintegral μ

{α : Type u_1}
{m : MeasurableSpace α}
(f : α → ℝ≥0∞)
(μ : MeasureTheory.Measure α)

∫⁻ (a : α), f a ∂μ =
  ⨆ φ, ⨆ (_ : ∀ (x : α), ↑(↑φ x) ≤ f x), (MeasureTheory.SimpleFunc.map ENNReal.ofNNReal φ).lintegral μ


@[elementwise]
theorem stalkMap_toStalk {R S : CommRingCat.{u}} (f : R ⟶ S) (p : PrimeSpectrum S) :
    toStalk R (PrimeSpectrum.comap f p) ≫ (Spec.sheafedSpaceMap f).stalkMap p =
      f ≫ toStalk S p

{R S : CommRingCat}
(f : R ⟶ S)
(p : PrimeSpectrum ↑S)

CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.StructureSheaf.toStalk (↑R) ((PrimeSpectrum.comap f) p))
    (AlgebraicGeometry.PresheafedSpace.Hom.stalkMap (AlgebraicGeometry.Spec.sheafedSpaceMap f) p) =
  CategoryTheory.CategoryStruct.comp f (AlgebraicGeometry.StructureSheaf.toStalk (↑S) p)


theorem wSameSide_of_right_mem {s : AffineSubspace R P} (x : P) {y : P} (hy : y ∈ s) :
    s.WSameSide x y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
(x : P)
{y : P}
(hy : y ∈ s)


@[simp]
theorem involute_comp_involute : involute.comp involute = AlgHom.id R (CliffordAlgebra Q)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}

CliffordAlgebra.involute.comp CliffordAlgebra.involute = AlgHom.id R (CliffordAlgebra Q)


protected theorem flip [IsSymm α r] (hs : IsStrongAntichain r s) : IsStrongAntichain (flip r) s

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
[IsSymm α r]
(hs : IsStrongAntichain r s)


@[to_additive]
theorem map_id_apply (h : N ≤ Subgroup.comap (MonoidHom.id _) N := (Subgroup.comap_id N).le) (x) :
    map N N (MonoidHom.id _) h x = x

(h : N ≤ Subgroup.comap (MonoidHom.id G) N := ⋯)

(QuotientGroup.map N N (MonoidHom.id G) h) x = x


/-- The identity map as an `AddConstEquiv`. -/
@[simps! toEquiv apply]
def refl (a : G) : G ≃+c[a, a] G

(AddConstEquiv.refl a).toEquiv = Equiv.refl G


protected theorem forall₂_congr' {α₁ α₂ β₁ β₂ : Sort*} {p : α₁ → β₁ → Prop} {q : α₂ → β₂ → Prop}
    (eα : α₁ ≃ α₂) (eβ : β₁ ≃ β₂) (h : ∀ {x y}, p (eα.symm x) (eβ.symm y) ↔ q x y) :
    (∀ x y, p x y) ↔ ∀ x y, q x y

(eα : α₁ ≃ α₂)

(eβ : β₁ ≃ β₂)

(h : ∀ {x : α₂} {y : β₂}, p (eα.symm x) (eβ.symm y) ↔ q x y)

(∀ (x : α₁) (y : β₁), p x y) ↔ ∀ (x : α₂) (y : β₂), q x y


@[to_additive (attr := simp)]
theorem closure_closure_coe_preimage {k : Set G} : closure (((↑) : closure k → G) ⁻¹' k) = ⊤

Subgroup.closure (Subtype.val ⁻¹' k) = ⊤


protected theorem gcd (hm : IsPeriodicPt f m x) (hn : IsPeriodicPt f n x) :
    IsPeriodicPt f (m.gcd n) x

{α : Type u_1}
{f : α → α}
{x : α}
{m n : ℕ}
(hm : Function.IsPeriodicPt f m x)
(hn : Function.IsPeriodicPt f n x)


theorem exists_not_isUnit_of_not_isField [Nontrivial R] (hf : ¬IsField R) :
    ∃ (x : R) (_hx : x ≠ (0 : R)), ¬IsUnit x

{R : Type u_1}
[CommSemiring R]
[Nontrivial R]
(hf : ¬IsField R)


theorem mk_coe (k : ℤ_[p]) : (⟨k, k.2⟩ : ℤ_[p]) = k

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


@[simp]
theorem bind_eq_nil {l : List α} {f : α → List β} : List.bind l f = [] ↔ ∀ x ∈ l, f x = []

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

l.bind f = [] ↔ ∀ (x : α), x ∈ l → f x = []


@[to_additive]
theorem map_inf_comap_of_surjective (S T : Submonoid N) : (S.comap f ⊓ T.comap f).map f = S ⊓ T

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{f : F}
(hf : Function.Surjective ⇑f)
(S T : AddSubmonoid N)

AddSubmonoid.map f (AddSubmonoid.comap f S ⊓ AddSubmonoid.comap f T) = S ⊓ T


@[simp, norm_cast]
protected theorem coe_lt_coe_iff {x y : ℝ} : (x : EReal) < (y : EReal) ↔ x < y


@[simp]
lemma map_add : (z + z').map Φ = z.map Φ + z'.map Φ

(z z' : CochainComplex.HomComplex.Cochain K L n)


theorem exists_superset_subset_encard_eq {k : ℕ∞}
    (hst : s ⊆ t) (hsk : s.encard ≤ k) (hkt : k ≤ t.encard) :
    ∃ r, s ⊆ r ∧ r ⊆ t ∧ r.encard = k

{α : Type u_1}
{s t : Set α}
{k : ℕ∞}
(hst : s ⊆ t)
(hsk : s.encard ≤ k)
(hkt : k ≤ t.encard)


theorem indexesOf_cons [BEq α] : (x :: xs : List α).indexesOf y =
    bif x == y then 0 :: (xs.indexesOf y).map (· + 1) else (xs.indexesOf y).map (· + 1)

{α : Type u_1}
{x : α}
{xs : List α}
{y : α}
[BEq α]

List.indexesOf y (x :: xs) =
  bif x == y then 0 :: List.map (fun x => x + 1) (List.indexesOf y xs)
  else List.map (fun x => x + 1) (List.indexesOf y xs)


/-- Continuity from above: the measure of the intersection of a sequence of measurable
sets such that one has finite measure is the limit of the measures of the partial intersections. -/
theorem tendsto_measure_iInter' {α ι : Type*} [MeasurableSpace α] {μ : Measure α} [Countable ι]
    [Preorder ι] [IsDirected ι (· ≤ ·)] {f : ι → Set α} (hm : ∀ i, MeasurableSet (f i))
    (hf : ∃ i, μ (f i) ≠ ∞) :
    Tendsto (fun i ↦ μ (⋂ j ∈ {j | j ≤ i}, f j)) atTop (𝓝 (μ (⋂ i, f i)))

{α : Type u_8}
{ι : Type u_9}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[Countable ι]
[Preorder ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{f : ι → Set α}
(hm : ∀ (i : ι), MeasurableSet (f i))
(hf : ∃ i, μ (f i) ≠ ⊤)

Filter.Tendsto (fun i => μ (⋂ j ∈ {j | j ≤ i}, f j)) Filter.atTop (nhds (μ (⋂ i, f i)))


theorem tsub_add_eq_max : a - b + b = max a b


@[to_additive]
theorem sSup_mul : sSup (s * t) = sSup s * sSup t

[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]


@[to_additive]
theorem closure_preimage_eq_top (s : Set G) : closure ((closure s).subtype ⁻¹' s) = ⊤

Subgroup.closure (⇑(Subgroup.closure s).subtype ⁻¹' s) = ⊤


@[simp]
lemma term_zero (f : ℕ → ℂ) (s : ℂ) : term f s 0 = 0


@[reassoc]
theorem coconePointsIsoOfNatIso_hom_desc {F G : J ⥤ C} {s : Cocone F} {r t : Cocone G}
    (P : IsColimit s) (Q : IsColimit t) (w : F ≅ G) :
    (coconePointsIsoOfNatIso P Q w).hom ≫ Q.desc r = P.map _ w.hom

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F G : J ⥤ C}
{s : CategoryTheory.Limits.Cocone F}
{r t : CategoryTheory.Limits.Cocone G}
(P : CategoryTheory.Limits.IsColimit s)
(Q : CategoryTheory.Limits.IsColimit t)
(w : F ≅ G)

(P.coconePointsIsoOfNatIso Q w).hom ≫ Q.desc r = P.map r w.hom


theorem IsMaxOn.lineDerivWithin_eq_zero (h : IsMaxOn f s a)
    (h' : ∀ᶠ t : ℝ in 𝓝 0, a + t • b ∈ s) : lineDerivWithin ℝ f s a b = 0

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
{f : E → ℝ}
{s : Set E}
{a b : E}
(h : IsMaxOn f s a)
(h' : ∀ᶠ (t : ℝ) in 𝓝 0, a + t • b ∈ s)


/-- The category of cones on `F` is just the comma category `(Δ ↓ F)`, where `Δ` is the constant
    functor. -/
@[simps! (config := { notRecursive := [`PLift, `ULift] })]
def Cone.equivCostructuredArrow (F : J ⥤ C) : Cone F ≌ CostructuredArrow (const J) F

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
(F : CategoryTheory.Functor J C)
(X : CategoryTheory.Limits.Cone F)

((CategoryTheory.Limits.Cone.equivCostructuredArrow F).unitIso.hom.app X).hom = CategoryTheory.CategoryStruct.id X.pt


@[to_additive (attr := simp)]
theorem smul_ball (c : G) (x : X) (r : ℝ≥0∞) : c • ball x r = ball (c • x) r

{G : Type v}
{X : Type w}
[PseudoEMetricSpace X]
[AddGroup G]
[AddAction G X]
[IsometricVAdd G X]
(c : G)
(x : X)
(r : ℝ≥0∞)

c +ᵥ EMetric.ball x r = EMetric.ball (c +ᵥ x) r


@[simp, reassoc]
lemma eqToHom_comp_homOfLE_op {a b c : X} (hab : op a = op b) (hbc : c ≤ b) :
    eqToHom hab ≫ (homOfLE hbc).op = (homOfLE (hbc.trans (le_of_eq (op_injective hab.symm)))).op

{X : Type u}
[Preorder X]
{a b c : X}
(hab : Opposite.op a = Opposite.op b)
(hbc : c ≤ b)

CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom hab) (CategoryTheory.homOfLE hbc).op =
  (CategoryTheory.homOfLE ⋯).op


theorem ofArrows_pUnit : (ofArrows _ fun _ : PUnit => f) = singleton f

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

(CategoryTheory.Presieve.ofArrows (fun x => Y) fun x => f) = CategoryTheory.Presieve.singleton f


theorem equalizer.existsUnique {W : C} (k : W ⟶ X) (h : k ≫ f = k ≫ g) :
    ∃! l : W ⟶ equalizer f g, l ≫ equalizer.ι f g = k

(h : CategoryTheory.CategoryStruct.comp k f = CategoryTheory.CategoryStruct.comp k g)

∃! l, CategoryTheory.CategoryStruct.comp l (CategoryTheory.Limits.equalizer.ι f g) = k


theorem clog_of_right_le_one (b : ℕ) {r : R} (hr : r ≤ 1) : clog b r = -Nat.log b ⌊r⁻¹⌋₊

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


lemma tilted_const (μ : Measure α) [IsProbabilityMeasure μ] (c : ℝ) :
    μ.tilted (fun _ ↦ c) = μ

{α : Type u_1}
{mα : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsProbabilityMeasure μ]
(c : ℝ)


@[simp] lemma toHomeomorph_symm (e : X ≃ Y) (he) :
  (e.toHomeomorph he).symm = e.symm.toHomeomorph fun s ↦ by convert (he _).symm; simp

(he : ∀ (s : Set Y), IsOpen (⇑e ⁻¹' s) ↔ IsOpen s)

(e.toHomeomorph he).symm = e.symm.toHomeomorph ⋯


theorem mul_def (I J : FractionalIdeal S P) :
    I * J = ⟨I * J, I.isFractional.mul J.isFractional⟩

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
(I J : FractionalIdeal S P)


/-- A small family of games is bounded above. -/
lemma bddAbove_range_of_small {ι : Type*} [Small.{u} ι] (f : ι → Game.{u}) :
    BddAbove (Set.range f)

{ι : Type u_1}
[Small.{u, u_1} ι]
(f : ι → SetTheory.Game)


/-- Specialization of `Finset.prod_bij` that automatically fills in most arguments.

See `Fintype.prod_bijective` for the version where `s` and `t` are `univ`. -/
@[to_additive "`Specialization of `Finset.sum_bij` that automatically fills in most arguments.

See `Fintype.sum_bijective` for the version where `s` and `t` are `univ`."]
lemma prod_bijective (e : ι → κ) (he : e.Bijective) (hst : ∀ i, i ∈ s ↔ e i ∈ t)
    (hfg : ∀ i ∈ s, f i = g (e i)) :
    ∏ i ∈ s, f i = ∏ i ∈ t, g i

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[CommMonoid α]
{s : Finset ι}
{t : Finset κ}
{f : ι → α}
{g : κ → α}
(e : ι → κ)
(he : Function.Bijective e)
(hst : ∀ (i : ι), i ∈ s ↔ e i ∈ t)
(hfg : ∀ i ∈ s, f i = g (e i))


theorem HasFPowerSeriesOnBall.differentiableOn [CompleteSpace F]
    (h : HasFPowerSeriesOnBall f p x r) : DifferentiableOn 𝕜 f (EMetric.ball x r)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : FormalMultilinearSeries 𝕜 E F}
{r : ℝ≥0∞}
{f : E → F}
{x : E}
[CompleteSpace F]
(h : HasFPowerSeriesOnBall f p x r)


lemma cfc_nonneg_iff (f : R → R) (a : A) (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)
    (ha : p a := by cfc_tac) : 0 ≤ cfc f a ↔ ∀ x ∈ spectrum R a, 0 ≤ f x

[∀ (α : Type u_1) [inst : TopologicalSpace α], StarOrderedRing C(α, R)]


theorem mem_pointwise_smul_iff_inv_smul_mem₀ {a : α} (ha : a ≠ 0) (S : AddSubgroup A) (x : A) :
    x ∈ a • S ↔ a⁻¹ • x ∈ S

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[GroupWithZero α]
[DistribMulAction α A]
{a : α}
(ha : a ≠ 0)
(S : AddSubgroup A)
(x : A)

x ∈ a • S ↔ a⁻¹ • x ∈ S


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


@[reassoc (attr := simp)]
lemma d_f_comp_d_f (K : HomologicalComplex₂ C c₁ c₂)
    (i₁ i₁' i₁'' : I₁) (i₂ : I₂) :
    (K.d i₁ i₁').f i₂ ≫ (K.d i₁' i₁'').f i₂ = 0


lemma map_Ψ (n : ℤ) : (W.map f).Ψ n = (W.Ψ n).map (mapRingHom f)

{R : Type r}
{S : Type s}
[CommRing R]
[CommRing S]
(W : WeierstrassCurve R)
(f : R →+* S)
(n : ℤ)

(W.map f).Ψ n = Polynomial.map (Polynomial.mapRingHom f) (W.Ψ n)


/-- Equivalences between measurable spaces. Main application is the simplification of measurability
statements along measurable equivalences. -/
structure MeasurableEquiv (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] extends α ≃ β where
  /-- The forward function of a measurable equivalence is measurable. -/
  measurable_toFun : Measurable toEquiv
  /-- The inverse function of a measurable equivalence is measurable. -/
  measurable_invFun : Measurable toEquiv.symm

{α : Type u_6}
{β : Type u_7}
[MeasurableSpace α]
[MeasurableSpace β]
(self : α ≃ᵐ β)


/-- Functor translating a functor into the category of commutative monoid objects
to a commutative monoid object in the functor category
-/
@[simps!]
def inverse : (C ⥤ CommMon_ D) ⥤ CommMon_ (C ⥤ D)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
[CategoryTheory.BraidedCategory D]
(F : C ⥤ CommMon_ D)
(X : C)

(CategoryTheory.Monoidal.CommMonFunctorCategoryEquivalence.inverse.obj F).mul.app X = (F.obj X).mul


theorem colimit.map_post {D : Type u'} [Category.{v'} D] [HasColimitsOfShape J D]
    (H : C ⥤ D) :/- H (colimit F) ⟶ H (colimit G) ⟶ colimit (G ⋙ H) vs
             H (colimit F) ⟶ colimit (F ⋙ H) ⟶ colimit (G ⋙ H) -/
          colimit.post
          F H ≫
        H.map (colim.map α) =
      colim.map (whiskerRight α H) ≫ colimit.post G H

CategoryTheory.Limits.colimit.post F H ≫ H.map (CategoryTheory.Limits.colim.map α) =
  CategoryTheory.Limits.colim.map (CategoryTheory.whiskerRight α H) ≫ CategoryTheory.Limits.colimit.post G H


theorem prod_mono {p p' : Submodule R M} {q q' : Submodule R M'} :
    p ≤ p' → q ≤ q' → prod p q ≤ prod p' q'

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{M' : Type u_9}
[AddCommMonoid M']
[Module R M']
{p p' : Submodule R M}
{q q' : Submodule R M'}


theorem exists_unique_prop {p q : Prop} : (∃! _ : p, q) ↔ p ∧ q


theorem mirror_mirror : p.mirror.mirror = p

{R : Type u_1}
[Semiring R]
(p : Polynomial R)


/-- **Hölder inequality**: the scalar product of two functions is bounded by the product of their
`L^p` and `L^q` norms when `p` and `q` are conjugate exponents. Version for sums over finite sets,
with `ℝ≥0∞`-valued functions. -/
theorem inner_le_Lp_mul_Lq (hpq : p.IsConjExponent q) :
    ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) * (∑ i ∈ s, g i ^ q) ^ (1 / q)

{ι : Type u}
(s : Finset ι)
(f g : ι → ℝ≥0∞)
{p q : ℝ}
(hpq : p.IsConjExponent q)


lemma StrictMono.image_Ioc_subset (h : StrictMono f) : f '' Ioc a b ⊆ Ioc (f a) (f b)

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


/-- If `(⊥ : SubAlgebra A B) = ⊤`, then `IsCyclotomicExtension {1} A B`. -/
theorem singleton_one_of_bot_eq_top (h : (⊥ : Subalgebra A B) = ⊤) :
    IsCyclotomicExtension {1} A B

{A : Type u}
{B : Type v}
[CommRing A]
[CommRing B]
[Algebra A B]
(h : ⊥ = ⊤)


@[simp]
theorem edist_equiv_symm_fst (x₁ x₂ : α) :
    edist ((WithLp.equiv p (α × β)).symm (x₁, 0)) ((WithLp.equiv p (α × β)).symm (x₂, 0)) =
      edist x₁ x₂

(p : ℝ≥0∞)
(α : Type u_2)
(β : Type u_3)
[hp : Fact (1 ≤ p)]
[SeminormedAddCommGroup α]
[SeminormedAddCommGroup β]
(x₁ x₂ : α)


@[to_additive (attr := simp)]
theorem one_compContinuous [TopologicalSpace γ] (f : C(γ, α)) : (1 : α →ᵇ β).compContinuous f = 1

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[PseudoMetricSpace β]
[One β]
[TopologicalSpace γ]
(f : C(γ, α))

BoundedContinuousFunction.compContinuous 1 f = 1


lemma continuous_compactOpen {f : X → C(Y, Z)} :
    Continuous f ↔ ∀ K, IsCompact K → ∀ U, IsOpen U → IsOpen {x | MapsTo (f x) K U}

{X : Type u_2}
{Y : Type u_3}
{Z : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X → C(Y, Z)}

Continuous f ↔ ∀ (K : Set Y), IsCompact K → ∀ (U : Set Z), IsOpen U → IsOpen {x | Set.MapsTo (⇑(f x)) K U}


@[simp] lemma UniformFun.toFun_ofFun (f : α → β) : toFun (ofFun f) = f

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

UniformFun.toFun (UniformFun.ofFun f) = f


/-- `φ`, `ψ` and `ψ ∘ φ` for` a `CompTriple` -/
theorem comp {M N P : Type*}
    {φ : M → N} {ψ : N → P} :
    CompTriple φ ψ  (ψ.comp φ)

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
{φ : M → N}
{ψ : N → P}


theorem closure_pi_set {ι : Type*} {α : ι → Type*} [∀ i, TopologicalSpace (α i)] (I : Set ι)
    (s : ∀ i, Set (α i)) : closure (pi I s) = pi I fun i => closure (s i)

{ι : Type u_7}
{α : ι → Type u_8}
[(i : ι) → TopologicalSpace (α i)]
(I : Set ι)
(s : (i : ι) → Set (α i))

closure (I.pi s) = I.pi fun i => closure (s i)


@[simp]
theorem compContinuousLinearMap_apply (p : FormalMultilinearSeries 𝕜 F G) (u : E →L[𝕜] F) (n : ℕ)
    (v : Fin n → E) : (p.compContinuousLinearMap u) n v = p n (u ∘ v)

{𝕜 : Type u}
{E : Type v}
{F : Type w}
{G : Type x}
[Ring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]
[AddCommGroup G]
[Module 𝕜 G]
[TopologicalSpace G]
[TopologicalAddGroup G]
[ContinuousConstSMul 𝕜 G]
(p : FormalMultilinearSeries 𝕜 F G)
(u : E →L[𝕜] F)
(n : ℕ)
(v : Fin n → E)

(p.compContinuousLinearMap u n) v = (p n) (⇑u ∘ v)


/-- The product of two monotone functions is monotone. -/
@[to_additive add "The sum of two monotone functions is monotone."]
theorem Monotone.mul' [CovariantClass α α (· * ·) (· ≤ ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] (hf : Monotone f) (hg : Monotone g) :
    Monotone fun x => f x * g x

[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]


@[simp]
theorem _root_.LinearEquiv.toAddEquiv_toIntLinearEquiv (e : M ≃ₗ[ℤ] M₂) :
    AddEquiv.toIntLinearEquiv (e : M ≃+ M₂) = e

{M : Type u_8}
{M₂ : Type u_10}
[AddCommGroup M]
[AddCommGroup M₂]
(e : M ≃ₗ[ℤ] M₂)


protected theorem le {b : α} (hb : b ∈ P.parts) : b ≤ a

{α : Type u_1}
[Lattice α]
[OrderBot α]
{a : α}
(P : Finpartition a)
{b : α}
(hb : b ∈ P.parts)


@[to_additive]
theorem mulIndicator_union_mul_inter_apply (f : α → M) (s t : Set α) (a : α) :
    mulIndicator (s ∪ t) f a * mulIndicator (s ∩ t) f a
      = mulIndicator s f a * mulIndicator t f a

{α : Type u_1}
{M : Type u_4}
[AddZeroClass M]
(f : α → M)
(s t : Set α)
(a : α)

(s ∪ t).indicator f a + (s ∩ t).indicator f a = s.indicator f a + t.indicator f a


/-- Constructor for null homotopic morphisms, see also `Homotopy.ofNullHomotopic`
and `Homotopy.eq_add_nullHomotopic`. -/
@[simps]
def nullHomotopic (h₀ : S₁.X₁ ⟶ S₂.X₁) (h₀_f : h₀ ≫ S₂.f = 0)
    (h₁ : S₁.X₂ ⟶ S₂.X₁) (h₂ : S₁.X₃ ⟶ S₂.X₂) (h₃ : S₁.X₃ ⟶ S₂.X₃) (g_h₃ : S₁.g ≫ h₃ = 0) :
    S₁ ⟶ S₂

(h₀_f : CategoryTheory.CategoryStruct.comp h₀ S₂.f = 0)

(g_h₃ : CategoryTheory.CategoryStruct.comp S₁.g h₃ = 0)

(S₁.nullHomotopic S₂ h₀ h₀_f h₁ h₂ h₃ g_h₃).τ₁ = h₀ + CategoryTheory.CategoryStruct.comp S₁.f h₁


/-- Composition of two relation homomorphisms is a relation homomorphism. -/
@[simps]
protected def comp (g : s →r t) (f : r →r s) : r →r t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
{t : γ → γ → Prop}
(g : s →r t)
(f : r →r s)
(x : α)


/-- Any two measures satisfying `QuotientMeasureEqMeasurePreimage` are equal. -/
@[to_additive]
lemma QuotientMeasureEqMeasurePreimage.unique
    [hasFun : HasFundamentalDomain G α ν] (μ μ' : Measure (Quotient α_mod_G))
    [QuotientMeasureEqMeasurePreimage ν μ] [QuotientMeasureEqMeasurePreimage ν μ'] :
    μ = μ'

[hasFun : MeasureTheory.HasFundamentalDomain G α ν]

(μ μ' : MeasureTheory.Measure (Quotient (MulAction.orbitRel G α)))


protected theorem ContMDiffOn.coordChange (hf : ContMDiffOn IM IB n f s)
    (hg : ContMDiffOn IM 𝓘(𝕜, F) n g s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
    ContMDiffOn IM 𝓘(𝕜, F) n (fun y ↦ e.coordChange e' (f y) (g y)) s

[TopologicalSpace (Bundle.TotalSpace F E)]

{e e' : Trivialization F Bundle.TotalSpace.proj}

ContMDiffOn IM 𝓘(𝕜, F) n (fun y => e.coordChange e' (f y) (g y)) s


@[simps (config := .lemmasOnly) toSemigroup_toMul_mul toOne_one]
instance End : Monoid (A →ₐ[R] A)

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


lemma dens_union_le (s t : Finset α) : dens (s ∪ t) ≤ dens s + dens t

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


theorem RelIso.cof_eq_lift {α : Type u} {β : Type v} {r s} [IsRefl α r] [IsRefl β s] (f : r ≃r s) :
    Cardinal.lift.{max u v} (Order.cof r) = Cardinal.lift.{max u v} (Order.cof s)

{α : Type u}
{β : Type v}
{r : α → α → Prop}
{s : β → β → Prop}
[IsRefl α r]
[IsRefl β s]
(f : r ≃r s)

Cardinal.lift.{max u v, u} (Order.cof r) = Cardinal.lift.{max u v, v} (Order.cof s)


@[to_additive sub_nsmul]
lemma pow_sub (a : G) {m n : ℕ} (h : n ≤ m) : a ^ (m - n) = a ^ m * (a ^ n)⁻¹

{G : Type u_3}
[AddGroup G]
(a : G)
{m n : ℕ}
(h : n ≤ m)


lemma mem_singleton_set_smul [SMulCommClass R S M] (r : S) (x : M) :
    x ∈ ({r} : Set S) • N ↔ ∃ (m : M), m ∈ N ∧ x = r • m

{R : Type u_2}
{M : Type u_3}
[Semiring R]
{S : Type u_4}
[Monoid S]
[AddCommMonoid M]
[Module R M]
[DistribMulAction S M]
(N : Submodule R M)
[SMulCommClass R S M]
(r : S)
(x : M)


@[to_additive (attr := simp)]
theorem Subgroup.topologicalClosure_coe {s : Subgroup G} :
    (s.topologicalClosure : Set G) = _root_.closure s

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{s : AddSubgroup G}


/-- Inversion sends an affine subspace passing through the center to itself. -/
theorem mapsTo_inversion_affineSubspace_of_mem {p : AffineSubspace ℝ P} (hp : c ∈ p) :
    MapsTo (inversion c R) p p

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c : P}
{R : ℝ}
{p : AffineSubspace ℝ P}
(hp : c ∈ p)

Set.MapsTo (EuclideanGeometry.inversion c R) ↑p ↑p


theorem getD_of_ne_none {x : Option α} (hx : x ≠ none) (y : α) : some (x.getD y) = x

{α : Type u_1}
{x : Option α}
(hx : x ≠ none)
(y : α)


/-- A real function into a finite dimensional real vector space with bounded variation on a set
is differentiable almost everywhere in this set. -/
theorem ae_differentiableWithinAt_of_mem {f : ℝ → V} {s : Set ℝ}
    (h : LocallyBoundedVariationOn f s) : ∀ᵐ x, x ∈ s → DifferentiableWithinAt ℝ f s x

{V : Type u_3}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[FiniteDimensional ℝ V]
{f : ℝ → V}
{s : Set ℝ}
(h : LocallyBoundedVariationOn f s)

∀ᵐ (x : ℝ), x ∈ s → DifferentiableWithinAt ℝ f s x


@[simp]
theorem concatRec_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
    @concatRec _ _ motive @Hnil @Hconcat _ _ (p.concat h) =
      Hconcat p h (concatRec @Hnil @Hconcat p)

{motive : (u v : V) → G.Walk u v → Sort u_1}

(Hnil : {u : V} → motive u u SimpleGraph.Walk.nil)

(Hconcat : {u v w : V} → (p : G.Walk u v) → (h : G.Adj v w) → motive u v p → motive u w (p.concat h))

SimpleGraph.Walk.concatRec Hnil Hconcat (p.concat h) = Hconcat p h (SimpleGraph.Walk.concatRec Hnil Hconcat p)


@[to_additive (attr := simp)]
theorem mem_inf {p p' : Subsemigroup M} {x : M} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'

{M : Type u_1}
[Mul M]
{p p' : Subsemigroup M}
{x : M}


/-- A group is isomorphic to its group of units. -/
@[to_additive (attr := simps apply_val symm_apply)
"An additive group is isomorphic to its group of additive units"]
def toUnits [Group G] : G ≃* Gˣ


theorem mem_of_mem_nsmul {a : α} {s : Multiset α} {n : ℕ} (h : a ∈ n • s) : a ∈ s

{α : Type u_1}
{a : α}
{s : Multiset α}
{n : ℕ}
(h : a ∈ n • s)


theorem isSheaf_iff_preservesFiniteProducts_and_equalizerCondition
    [Preregular C] [FinitaryExtensive C]
    [h : ∀ {Y X : C} (f : Y ⟶ X) [EffectiveEpi f], HasPullback f f] :
    IsSheaf (coherentTopology C) F ↔ Nonempty (PreservesFiniteProducts F) ∧
      EqualizerCondition F

[h : ∀ {Y X : C} (f : Y ⟶ X) [inst : CategoryTheory.EffectiveEpi f], CategoryTheory.Limits.HasPullback f f]

CategoryTheory.Presheaf.IsSheaf (CategoryTheory.coherentTopology C) F ↔
  Nonempty (CategoryTheory.Limits.PreservesFiniteProducts F) ∧ CategoryTheory.regularTopology.EqualizerCondition F


lemma imp_congr_eq {a b c d : Prop} (h₁ : a = c) (h₂ : b = d) : (a → b) = (c → d)


/-- Make a cofan `f` into a colimit cofan by providing `desc`, `fac`, and `uniq` --
  just a convenience lemma to avoid having to go through `Discrete` -/
@[simps]
def mkCofanColimit {f : β → C} (s : Cofan f) (desc : ∀ t : Cofan f, s.pt ⟶ t.pt)
    (fac : ∀ (t : Cofan f) (j : β), s.inj j ≫ desc t = t.inj j := by aesop_cat)
    (uniq : ∀ (t : Cofan f) (m : s.pt ⟶ t.pt) (_ : ∀ j : β, s.inj j ≫ m = t.inj j),
      m = desc t := by aesop_cat) :
    IsColimit s

(desc : (t : CategoryTheory.Limits.Cofan f) → s.pt ⟶ t.pt)

(fac : ∀ (t : CategoryTheory.Limits.Cofan f) (j : β), s.inj j ≫ desc t = t.inj j := by aesop_cat)

(uniq : ∀ (t : CategoryTheory.Limits.Cofan f) (m : s.pt ⟶ t.pt), (∀ (j : β), s.inj j ≫ m = t.inj j) → m = desc t := by
  aesop_cat)

(CategoryTheory.Limits.mkCofanColimit s desc fac uniq).desc t = desc t


theorem IsNormal.deriv_fp {f} (H : IsNormal f) : ∀ o, f (deriv f o) = deriv f o

{f : Ordinal.{u_1} → Ordinal.{u_1}}
(H : Ordinal.IsNormal f)
(o : Ordinal.{u_1})

f (Ordinal.deriv f o) = Ordinal.deriv f o


@[simp]
theorem coe_mk' {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubgroup R} (ha : ↑sa = s) :
    (Subring.mk' s sm sa hm ha : Set R) = s

{R : Type u}
[Ring R]
{s : Set R}
{sm : Submonoid R}
(hm : ↑sm = s)
{sa : AddSubgroup R}
(ha : ↑sa = s)


@[simp]
theorem expMapCircle_zero : expMapCircle 0 = 1


theorem ofDigits_append {b : ℕ} {l1 l2 : List ℕ} :
    ofDigits b (l1 ++ l2) = ofDigits b l1 + b ^ l1.length * ofDigits b l2

Nat.ofDigits b (l1 ++ l2) = Nat.ofDigits b l1 + b ^ l1.length * Nat.ofDigits b l2


theorem IndepSets.indep_aux {m₂ m : MeasurableSpace Ω}
    {κ : Kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] {p1 p2 : Set (Set Ω)} (h2 : m₂ ≤ m)
    (hp2 : IsPiSystem p2) (hpm2 : m₂ = generateFrom p2) (hyp : IndepSets p1 p2 κ μ) {t1 t2 : Set Ω}
    (ht1 : t1 ∈ p1) (ht1m : MeasurableSet[m] t1) (ht2m : MeasurableSet[m₂] t2) :
    ∀ᵐ a ∂μ, κ a (t1 ∩ t2) = κ a t1 * κ a t2

(hpm2 : m₂ = MeasurableSpace.generateFrom p2)

(hyp : ProbabilityTheory.Kernel.IndepSets p1 p2 κ μ)


theorem card_erase_le {a : α} {s : Multiset α} : card (s.erase a) ≤ card s

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

Multiset.card (s.erase a) ≤ Multiset.card s


/-- Subtracting a point from itself produces 0. -/
@[simp]
theorem vsub_self (p : P) : p -ᵥ p = (0 : G)

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
(p : P)


theorem one_le {n : ℕ} [NeZero n] : 1 ≤ n


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

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[Lattice β]
[BoundedOrder α]
[BoundedOrder β]
{f g : BoundedLatticeHom α β}
(h : ∀ (a : α), f a = g a)


lemma SMulPosReflectLT.lift [SMulPosReflectLT α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b)
    (zero : f 0 = 0) : SMulPosReflectLT α β

(hf : ∀ {b₁ b₂ : β}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)

(smul : ∀ (a : α) (b : β), f (a • b) = a • f b)


/-- **Equational criterion for flatness** [Stacks 00HK](https://stacks.math.columbia.edu/tag/00HK).

A module $M$ is flat if and only if every relation $\sum_i f_i x_i = 0$ in $M$ is trivial. -/
theorem iff_forall_isTrivialRelation : Flat R M ↔ ∀ {ι : Type u} [Fintype ι] {f : ι → R}
    {x : ι → M}, ∑ i, f i • x i = 0 → IsTrivialRelation f x

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]

Module.Flat R M ↔
  ∀ {ι : Type u} [inst : Fintype ι] {f : ι → R} {x : ι → M}, ∑ i : ι, f i • x i = 0 → Module.IsTrivialRelation f x


@[simp, norm_cast]
theorem cast_to_nat [AddMonoidWithOne α] : ∀ n : Num, ((n : ℕ) : α) = n

{α : Type u_1}
[AddMonoidWithOne α]
(n : Num)


theorem Integrable.convolution_integrand (hf : Integrable f ν) (hg : Integrable g μ) :
    Integrable (fun p : G × G => L (f p.2) (g (p.1 - p.2))) (μ.prod ν)

{𝕜 : Type u𝕜}
{G : Type uG}
{E : Type uE}
{E' : Type uE'}
{F : Type uF}
[NormedAddCommGroup E]
[NormedAddCommGroup E']
[NormedAddCommGroup F]
{f : G → E}
{g : G → E'}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 E']
[NormedSpace 𝕜 F]
(L : E →L[𝕜] E' →L[𝕜] F)
[MeasurableSpace G]
{μ ν : MeasureTheory.Measure G}
[AddGroup G]
[MeasurableAdd₂ G]
[MeasurableNeg G]
[MeasureTheory.SFinite μ]
[μ.IsAddRightInvariant]
[MeasureTheory.SFinite ν]
(hf : MeasureTheory.Integrable f ν)
(hg : MeasureTheory.Integrable g μ)

MeasureTheory.Integrable (fun p => (L (f p.2)) (g (p.1 - p.2))) (μ.prod ν)


@[simp] lemma coe_hom (x : Subgraph G) :
    (x.hom : x.verts → V) = (fun (v : x.verts) => (v : V))

{V : Type u}
{G : SimpleGraph V}
(x : G.Subgraph)


/-- coercion from `ContinuousAlgHom` to `AlgHom` as a `RingHom`. -/
@[simps]
def toAlgHomMonoidHom : (A →A[R] A) →* A →ₐ[R] A

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

ContinuousAlgHom.toAlgHomMonoidHom f = ↑f


lemma mem_subcategoryAcyclic_iff (X : HomotopyCategory C (ComplexShape.up ℤ)) :
    (subcategoryAcyclic C).P X ↔ ∀ (n : ℤ), IsZero ((homologyFunctor _ _ n).obj X)

(HomotopyCategory.subcategoryAcyclic C).P X ↔
  ∀ (n : ℤ), CategoryTheory.Limits.IsZero ((HomotopyCategory.homologyFunctor C (ComplexShape.up ℤ) n).obj X)


lemma Exact.moduleCat_range_eq_ker (hS : S.Exact) :
    LinearMap.range S.f = LinearMap.ker S.g

{S : CategoryTheory.ShortComplex (ModuleCat R)}


@[simp]
theorem nat_lt_lift_iff {n : ℕ} {a : Cardinal.{u}} : n < lift.{v} a ↔ n < a


/-- **Gauss's Lemma** for GCD domains states that a primitive polynomial is irreducible iff it is
  irreducible in the fraction field. -/
theorem IsPrimitive.irreducible_iff_irreducible_map_fraction_map {p : R[X]} (hp : p.IsPrimitive) :
    Irreducible p ↔ Irreducible (p.map (algebraMap R K))

{R : Type u_1}
[CommRing R]
{K : Type u_2}
[Field K]
[Algebra R K]
[IsFractionRing R K]
[IsDomain R]
[NormalizedGCDMonoid R]
{p : R[X]}
(hp : p.IsPrimitive)

Irreducible p ↔ Irreducible (Polynomial.map (algebraMap R K) p)


private lemma toAffine_addX_of_eq {P : Fin 3 → F} {n d : F} (hPz : P z ≠ 0) (hd : d ≠ 0) :
    W.toAffine.addX (P x / P z ^ 2) (P x / P z ^ 2) (-n / (P z * d)) =
      (n ^ 2 - W.a₁ * n * P z * d - W.a₂ * P z ^ 2 * d ^ 2 - 2 * P x * d ^ 2) / (P z * d) ^ 2

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
{n d : F}
(hPz : P z ≠ 0)
(hd : d ≠ 0)


lemma CstarRing.conjugate_le_norm_smul' {a b : A} (hb : IsSelfAdjoint b := by cfc_tac) :
    a * b * star a ≤ ‖b‖ • (a * star a)

{A : Type u_1}
[NonUnitalNormedRing A]
[CompleteSpace A]
[PartialOrder A]
[StarRing A]
[StarOrderedRing A]
[CstarRing A]
[NormedSpace ℂ A]
[StarModule ℂ A]
[SMulCommClass ℂ A A]
[IsScalarTower ℂ A A]
{a b : A}
(hb : IsSelfAdjoint b := by cfc_tac)


/-- An induction principle for elements of `⨆ i, S i`.
If `C` holds for `1` and all elements of `S i` for all `i`, and is preserved under multiplication,
then it holds for all elements of the supremum of `S`. -/
@[to_additive (attr := elab_as_elim)
      " An induction principle for elements of `⨆ i, S i`.
      If `C` holds for `0` and all elements of `S i` for all `i`, and is preserved under addition,
      then it holds for all elements of the supremum of `S`. "]
theorem iSup_induction {ι : Sort*} (S : ι → Submonoid M) {C : M → Prop} {x : M} (hx : x ∈ ⨆ i, S i)
    (mem : ∀ (i), ∀ x ∈ S i, C x) (one : C 1) (mul : ∀ x y, C x → C y → C (x * y)) : C x

(mul : ∀ (x y : M), C x → C y → C (x * y))


theorem liftMonoidWithZeroHom_apply_ofFractionRing_mk (φ : R[X] →*₀ G₀) (hφ : R[X]⁰ ≤ G₀⁰.comap φ)
    (n : R[X]) (d : R[X]⁰) :
    liftMonoidWithZeroHom φ hφ (ofFractionRing (Localization.mk n d)) = φ n / φ d

{G₀ : Type u_1}
{R : Type u_3}
[CommGroupWithZero G₀]
[CommRing R]
(φ : R[X] →*₀ G₀)
(hφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)
(n : R[X])
(d : ↥R[X]⁰)

(RatFunc.liftMonoidWithZeroHom φ hφ) { toFractionRing := Localization.mk n d } = φ n / φ ↑d


theorem C_mul_X_eq_monomial : C a * X = monomial 1 a

Polynomial.C a * Polynomial.X = (Polynomial.monomial 1) a


/-- A nontrivial torsion group is not torsion-free. -/
@[to_additive AddMonoid.IsTorsion.not_torsion_free
      "A nontrivial additive torsion group is not torsion-free."]
theorem IsTorsion.not_torsion_free [hN : Nontrivial G] : IsTorsion G → ¬IsTorsionFree G

{G : Type u_1}
[Group G]
[hN : Nontrivial G]

Monoid.IsTorsion G → ¬Monoid.IsTorsionFree G


/-- The sum of the dimensions of s + t and s ∩ t is the sum of the dimensions of s and t -/
theorem finrank_sup_add_finrank_inf_eq (s t : Submodule K V) [FiniteDimensional K s]
    [FiniteDimensional K t] :
    finrank K ↑(s ⊔ t) + finrank K ↑(s ⊓ t) = finrank K ↑s + finrank K ↑t

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(s t : Submodule K V)
[FiniteDimensional K ↥s]
[FiniteDimensional K ↥t]

FiniteDimensional.finrank K ↥(s ⊔ t) + FiniteDimensional.finrank K ↥(s ⊓ t) =
  FiniteDimensional.finrank K ↥s + FiniteDimensional.finrank K ↥t


/-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ)

(CochainComplex.mappingCone.triangleRotateShortComplex φ).f = (CochainComplex.mappingCone.triangle φ).rotate.mor₁


theorem norm_mem_spanNorm {I : Ideal S} (x : S) (hx : x ∈ I) : Algebra.norm R x ∈ I.spanNorm R

(R : Type u_1)
[CommRing R]
{S : Type u_2}
[CommRing S]
[Algebra R S]
{I : Ideal S}
(x : S)
(hx : x ∈ I)


@[simp]
theorem continuousMultilinearCurryFin1_apply (f : G[×1]→L[𝕜] G') (x : G) :
    continuousMultilinearCurryFin1 𝕜 G G' f x = f (Fin.snoc 0 x)

(f : ContinuousMultilinearMap 𝕜 (fun i => G) G')

((continuousMultilinearCurryFin1 𝕜 G G') f) x = f (Fin.snoc 0 x)


theorem add_biSup' {ι : Sort*} {p : ι → Prop} (h : ∃ i, p i) {f : ι → ℝ≥0∞} :
    (a + ⨆ (i) (_ : p i), f i) = ⨆ (i) (_ : p i), a + f i

{a : ℝ≥0∞}
{ι : Sort u_4}
{p : ι → Prop}
(h : ∃ i, p i)
{f : ι → ℝ≥0∞}

a + ⨆ i, ⨆ (_ : p i), f i = ⨆ i, ⨆ (_ : p i), a + f i


theorem strictMono_nat_of_lt_succ {f : ℕ → α} (hf : ∀ n, f n < f (n + 1)) : StrictMono f

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


@[simp] lemma last_eraseLast (p : RelSeries r) :
    p.eraseLast.last = p ⟨p.length.pred, Nat.lt_succ_iff.2 (Nat.pred_le _)⟩

{α : Type u_1}
{r : Rel α α}
(p : RelSeries r)

p.eraseLast.last = p.toFun ⟨p.length.pred, ⋯⟩


theorem Filter.map_mapsTo_Iic_iff_tendsto {m : α → β} :
    MapsTo (map m) (Iic F) (Iic G) ↔ Tendsto m F G

{α : Type u_1}
{β : Type u_2}
{F : Filter α}
{G : Filter β}
{m : α → β}

Set.MapsTo (Filter.map m) (Set.Iic F) (Set.Iic G) ↔ Filter.Tendsto m F G


@[simp] theorem castAdd_zero : (castAdd 0 : Fin n → Fin (n + 0)) = cast rfl


theorem card_uIcc :
    (uIcc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, ((t.count i - s.count i : ℤ).natAbs + 1)

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

(Finset.uIcc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, ((↑(Multiset.count i t) - ↑(Multiset.count i s)).natAbs + 1)


theorem Commute.self_zpow (A : M) (n : ℤ) : Commute A (A ^ n)

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
(A : Matrix n' n' R)
(n : ℤ)


theorem eval_smul (p : R[X]) (q : PolynomialModule R M) (r : R) :
    eval r (p • q) = p.eval r • eval r q

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(p : R[X])
(q : PolynomialModule R M)
(r : R)

(PolynomialModule.eval r) (p • q) = Polynomial.eval r p • (PolynomialModule.eval r) q


@[simp]
theorem toFinset_eq_empty_iff (l : List α) : l.toFinset = ∅ ↔ l = nil

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


@[to_additive]
theorem exponent_ne_zero : exponent G ≠ 0 ↔ ExponentExists G

Monoid.exponent G ≠ 0 ↔ Monoid.ExponentExists G


/-- A topology `Inducing` map from a T₀ space is a topological embedding. -/
protected theorem Inducing.embedding [TopologicalSpace Y] [T0Space X] {f : X → Y}
    (hf : Inducing f) : Embedding f

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


theorem image_image [DecidableEq γ] {g : β → γ} : (s.image f).image g = s.image (g ∘ f)

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

Finset.image g (Finset.image f s) = Finset.image (g ∘ f) s


@[simp]
theorem toEquiv_mulRight₀ {g : G₀} (hg : g ≠ 0) : (mulRight₀ g hg).toEquiv = Equiv.mulRight₀ g hg

{G₀ : Type u_2}
[MeasurableSpace G₀]
[GroupWithZero G₀]
[MeasurableMul G₀]
{g : G₀}
(hg : g ≠ 0)

(MeasurableEquiv.mulRight₀ g hg).toEquiv = Equiv.mulRight₀ g hg


theorem lt_of_nadd_lt_nadd_right : ∀ {a b c}, b ♯ a < c ♯ a → b < c


@[to_additive]
lemma iIndepFun.indepFun_mul_left (hf_indep : iIndepFun (fun _ ↦ m) f κ μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) :
    IndepFun (f i * f j) (f k) κ μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.Kernel.iIndepFun (fun x => m) f κ μ)

ProbabilityTheory.Kernel.IndepFun (f i + f j) (f k) κ μ


theorem exists_rat_near (x : α) (ε0 : 0 < ε) : ∃ q : ℚ, |x - q| < ε

{α : Type u_1}
[LinearOrderedField α]
[Archimedean α]
{ε : α}
(x : α)
(ε0 : 0 < ε)


@[to_additive (attr := simp)]
theorem _root_.MulEquiv.withOneCongr_trans (e₁ : α ≃* β) (e₂ : β ≃* γ) :
    e₁.withOneCongr.trans e₂.withOneCongr = (e₁.trans e₂).withOneCongr

{α : Type u}
{β : Type v}
{γ : Type w}
[Add α]
[Add β]
[Add γ]
(e₁ : α ≃+ β)
(e₂ : β ≃+ γ)

e₁.withZeroCongr.trans e₂.withZeroCongr = (e₁.trans e₂).withZeroCongr


protected theorem Tendsto.Icc {l₁ l₂ : Filter α} [TendstoIxxClass Icc l₁ l₂] {lb : Filter β}
    {u₁ u₂ : β → α} (h₁ : Tendsto u₁ lb l₁) (h₂ : Tendsto u₂ lb l₁) :
    Tendsto (fun x => Icc (u₁ x) (u₂ x)) lb l₂.smallSets

{α : Type u_1}
{β : Type u_2}
[Preorder α]
{l₁ l₂ : Filter α}
[Filter.TendstoIxxClass Set.Icc l₁ l₂]
{lb : Filter β}
{u₁ u₂ : β → α}
(h₁ : Filter.Tendsto u₁ lb l₁)
(h₂ : Filter.Tendsto u₂ lb l₁)

Filter.Tendsto (fun x => Set.Icc (u₁ x) (u₂ x)) lb l₂.smallSets


/-- A convenience wrapper for `MeasureTheory.Measure.isHaarMeasure_map`. -/
@[to_additive "A convenience wrapper for `MeasureTheory.Measure.isAddHaarMeasure_map`."]
nonrec theorem _root_.MulEquiv.isHaarMeasure_map [BorelSpace G] [TopologicalGroup G] {H : Type*}
    [Group H] [TopologicalSpace H] [MeasurableSpace H] [BorelSpace H]
    [TopologicalGroup H] (e : G ≃* H) (he : Continuous e) (hesymm : Continuous e.symm) :
    IsHaarMeasure (Measure.map e μ)

{G : Type u_2}
[MeasurableSpace G]
[Group G]
[TopologicalSpace G]
(μ : MeasureTheory.Measure G)
[μ.IsHaarMeasure]
[BorelSpace G]
[TopologicalGroup G]
{H : Type u_4}
[Group H]
[TopologicalSpace H]
[MeasurableSpace H]
[BorelSpace H]
[TopologicalGroup H]
(e : G ≃* H)
(he : Continuous ⇑e)
(hesymm : Continuous ⇑e.symm)


theorem sum_eq_one {x : X} (hx : x ∈ s) : ∑ᶠ i, f i x = 1

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
(f : PartitionOfUnity ι X s)
{x : X}
(hx : x ∈ s)


theorem add_one_mul (n m : Nat) : (n + 1) * m = (n * m) + m


@[simp]
theorem ofFinsupp_mul (a b) : (⟨a * b⟩ : R[X]) = ⟨a⟩ * ⟨b⟩

{ toFinsupp := a * b } = { toFinsupp := a } * { toFinsupp := b }


@[mono, gcongr]
theorem pow_le_pow_left {a b : R} (ha : 0 ≤ a) (hab : a ≤ b) : ∀ n, a ^ n ≤ b ^ n

{R : Type u_3}
[OrderedSemiring R]
{a b : R}
(ha : 0 ≤ a)
(hab : a ≤ b)
(n : ℕ)


theorem eq_coeff_of_valuation_sub_lt {d n : ℤ} {f g : LaurentSeries K}
    (H : Valued.v (g - f) ≤ ↑(Multiplicative.ofAdd (-d))) : n < d → g.coeff n = f.coeff n


@[to_additive]
theorem eq_one_iff_eq_one_of_mul_eq_one {a b : M} (h : a * b = 1) : a = 1 ↔ b = 1

{M : Type u}
[MulOneClass M]
{a b : M}
(h : a * b = 1)


protected theorem antilipschitz : AntilipschitzWith 1 f

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(f : P →ᵃⁱ[𝕜] P₂)


lemma differentiable_completedSinZeta (a : UnitAddCircle) :
    Differentiable ℂ (completedSinZeta a)

Differentiable ℂ (HurwitzZeta.completedSinZeta a)


@[continuity]
theorem Continuous.matrix_diagonal [Zero R] [DecidableEq n] {A : X → n → R} (hA : Continuous A) :
    Continuous fun x => diagonal (A x)

{X : Type u_1}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[Zero R]
[DecidableEq n]
{A : X → n → R}
(hA : Continuous A)

Continuous fun x => Matrix.diagonal (A x)


/-- `Equiv.mulRight` as an `OrderIso`. See also `OrderEmbedding.mulRight`. -/
@[to_additive (attr := simps! (config := { simpRhs := true }) toEquiv apply)
  "`Equiv.addRight` as an `OrderIso`. See also `OrderEmbedding.addRight`."]
def OrderIso.mulRight (a : α) : α ≃o α

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


lemma integral_fun_norm_addHaar (f : ℝ → F) :
    ∫ x, f (‖x‖) ∂μ = dim E • (μ (ball 0 1)).toReal • ∫ y in Ioi (0 : ℝ), y ^ (dim E - 1) • f y

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[Nontrivial E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(f : ℝ → F)

∫ (x : E), f ‖x‖ ∂μ = dim E • (μ (Metric.ball 0 1)).toReal • ∫ (y : ℝ) in Set.Ioi 0, y ^ (dim E - 1) • f y


/-- Oriented angles are continuous when neither end point equals the middle point. -/
theorem continuousAt_oangle {x : P × P × P} (hx12 : x.1 ≠ x.2.1) (hx32 : x.2.2 ≠ x.2.1) :
    ContinuousAt (fun y : P × P × P => ∡ y.1 y.2.1 y.2.2) x

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

ContinuousAt (fun y => ∡ y.1 y.2.1 y.2.2) x


theorem Adapted.measurable_upcrossingsBefore (hf : Adapted ℱ f) (hab : a < b) :
    Measurable (upcrossingsBefore a b f N)

{Ω : Type u_1}
{m0 : MeasurableSpace Ω}
{a b : ℝ}
{f : ℕ → Ω → ℝ}
{N : ℕ}
{ℱ : MeasureTheory.Filtration ℕ m0}
(hf : MeasureTheory.Adapted ℱ f)
(hab : a < b)

Measurable (MeasureTheory.upcrossingsBefore a b f N)


/-- To show a property hold on all `Unitization R A` it suffices to show it holds
on terms of the form `inl r + a`.

This can be used as `induction x`. -/
@[elab_as_elim, induction_eliminator, cases_eliminator]
theorem ind {R A} [AddZeroClass R] [AddZeroClass A] {P : Unitization R A → Prop}
    (inl_add_inr : ∀ (r : R) (a : A), P (inl r + (a : Unitization R A))) (x) : P x

(inl_add_inr : ∀ (r : R) (a : A), P (Unitization.inl r + ↑a))


@[simp]
theorem image_sub_const_Ici : (fun x => x - a) '' Ici b = Ici (b - a)

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

(fun x => x - a) '' Set.Ici b = Set.Ici (b - a)


theorem prod_same_eq : f ×ˢ f = f.lift' fun t : Set α => t ×ˢ t


/-- This is an auxiliary lemma used to prove two statements at once. Use one of the next two
lemmas instead. -/
theorem HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO (hl : l.bRiemann = false)
    (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0 ≤ B J) (g : ι →ᵇᵃ[I] F) (s : Set ℝⁿ) (hs : s.Countable)
    (hlH : s.Nonempty → l.bHenstock = true)
    (H₁ : ∀ (c : ℝ≥0), ∀ x ∈ Box.Icc I ∩ s, ∀ ε > (0 : ℝ),
      ∃ δ > 0, ∀ J ≤ I, Box.Icc J ⊆ Metric.closedBall x δ → x ∈ Box.Icc J →
        (l.bDistortion → J.distortion ≤ c) → dist (vol J (f x)) (g J) ≤ ε)
    (H₂ : ∀ (c : ℝ≥0), ∀ x ∈ Box.Icc I \ s, ∀ ε > (0 : ℝ),
      ∃ δ > 0, ∀ J ≤ I, Box.Icc J ⊆ Metric.closedBall x δ → (l.bHenstock → x ∈ Box.Icc J) →
        (l.bDistortion → J.distortion ≤ c) → dist (vol J (f x)) (g J) ≤ ε * B J) :
    HasIntegral I l f vol (g I)

(hB0 : ∀ (J : BoxIntegral.Box ι), 0 ≤ B J)

(H₁ :
  ∀ (c : ℝ≥0),
    ∀ x ∈ BoxIntegral.Box.Icc I ∩ s,
      ∀ ε > 0,
        ∃ δ > 0,
          ∀ J ≤ I,
            BoxIntegral.Box.Icc J ⊆ Metric.closedBall x δ →
              x ∈ BoxIntegral.Box.Icc J → (l.bDistortion = true → J.distortion ≤ c) → dist ((vol J) (f x)) (g J) ≤ ε)

(H₂ :
  ∀ (c : ℝ≥0),
    ∀ x ∈ BoxIntegral.Box.Icc I \ s,
      ∀ ε > 0,
        ∃ δ > 0,
          ∀ J ≤ I,
            BoxIntegral.Box.Icc J ⊆ Metric.closedBall x δ →
              (l.bHenstock = true → x ∈ BoxIntegral.Box.Icc J) →
                (l.bDistortion = true → J.distortion ≤ c) → dist ((vol J) (f x)) (g J) ≤ ε * B J)


lemma rightUnshift_v {n' a : ℤ} (γ : Cochain K (L⟦a⟧) n') (n : ℤ) (hn : n' + a = n)
    (p q : ℤ) (hpq : p + n = q) (p' : ℤ) (hp' : p + n' = p') :
    (γ.rightUnshift n hn).v p q hpq = γ.v p p' hp' ≫
      (L.shiftFunctorObjXIso a p' q (by rw [← hpq, ← hn, ← add_assoc, hp'])).hom

(γ : CochainComplex.HomComplex.Cochain K ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj L) n')

(γ.rightUnshift n hn).v p q hpq = γ.v p p' hp' ≫ (L.shiftFunctorObjXIso a p' q ⋯).hom


@[ext]
theorem ext ⦃f g : M →[L] N⦄ (h : ∀ x, f x = g x) : f = g

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
⦃f g : L.Hom M N⦄
(h : ∀ (x : M), f x = g x)


@[simp]
theorem map_adj (f : V ↪ W) (G : SimpleGraph V) (u v : W) :
    (G.map f).Adj u v ↔ ∃ u' v' : V, G.Adj u' v' ∧ f u' = u ∧ f v' = v

{V : Type u_1}
{W : Type u_2}
(f : V ↪ W)
(G : SimpleGraph V)
(u v : W)

(SimpleGraph.map f G).Adj u v ↔ ∃ u' v', G.Adj u' v' ∧ f u' = u ∧ f v' = v


@[simp]
theorem closedComplemented_bot : ClosedComplemented (⊥ : Submodule R M)

{R : Type u_1}
[Ring R]
{M : Type u_2}
[TopologicalSpace M]
[AddCommGroup M]
[Module R M]


/-- A left fraction from `X : C` to `Y : C` for `W : MorphismProperty C` consists of the
datum of an object `Y' : C` and maps `f : X ⟶ Y'` and `s : Y ⟶ Y'` such that `W s`. -/
structure LeftFraction (W : MorphismProperty C) (X Y : C) where
  /-- the auxiliary object of a left fraction -/
  {Y' : C}
  /-- the numerator of a left fraction -/
  f : X ⟶ Y'
  /-- the denominator of a left fraction -/
  s : Y ⟶ Y'
  /-- the condition that the denominator belongs to the given morphism property -/
  hs : W s

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(self : W.LeftFraction X Y)


@[to_additive (attr := ext 1100)]
theorem hom_ext {β : Type v} [Mul β] {f g : FreeSemigroup α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g

(h : ⇑f ∘ FreeAddSemigroup.of = ⇑g ∘ FreeAddSemigroup.of)


theorem _root_.Set.Countable.substructure_closure
    [Countable (Σl, L.Functions l)] (h : s.Countable) : Countable.{w + 1} (closure L s)

(L : FirstOrder.Language)
{M : Type w}
[L.Structure M]
{s : Set M}
[Countable ((l : ℕ) × L.Functions l)]
(h : s.Countable)

Countable ↥((FirstOrder.Language.Substructure.closure L).toFun s)


@[nolint unusedHavesSuffices] -- Porting note: false positive
theorem strongInduction_eq {p : Finset α → Sort*} (H : ∀ s, (∀ t ⊂ s, p t) → p s)
    (s : Finset α) : strongInduction H s = H s fun t _ => strongInduction H t

(H : (s : Finset α) → ((t : Finset α) → t ⊂ s → p t) → p s)

Finset.strongInduction H s = H s fun t x => Finset.strongInduction H t


theorem propComplete (a : Prop) : a = True ∨ a = False


/-- Construct a new `Word` without any reduction. The underlying list of
`cons m w _ _` is `⟨_, m⟩::w`  -/
@[simps]
def cons {i} (m : M i) (w : Word M) (hmw : w.fstIdx ≠ some i) (h1 : m ≠ 1) : Word M

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
{i : ι}
(m : M i)
(w : Monoid.CoprodI.Word M)
(hmw : w.fstIdx ≠ some i)
(h1 : m ≠ 1)

(Monoid.CoprodI.Word.cons m w hmw h1).toList = ⟨i, m⟩ :: w.toList


@[simp]
theorem foldr.ofFreeMonoid_comp_of (f : β → α → α) :
    Foldr.ofFreeMonoid f ∘ FreeMonoid.of = Foldr.mk ∘ f

⇑(Monoid.Foldr.ofFreeMonoid f) ∘ FreeMonoid.of = Monoid.Foldr.mk ∘ f


theorem of_smul_measure (c : ℝ≥0∞) (hc_ne_top : c ≠ ∞) (hT : FinMeasAdditive (c • μ) T) :
    FinMeasAdditive μ T

(hT : MeasureTheory.FinMeasAdditive (c • μ) T)


theorem totalVariation_mutuallySingular_iff (s : SignedMeasure α) (μ : Measure α) :
    s.totalVariation ⟂ₘ μ ↔
      s.toJordanDecomposition.posPart ⟂ₘ μ ∧ s.toJordanDecomposition.negPart ⟂ₘ μ

{α : Type u_1}
[MeasurableSpace α]
(s : MeasureTheory.SignedMeasure α)
(μ : MeasureTheory.Measure α)


lemma const_add (β : Type*) [MeasurableSpace β] (μ ν : Measure α) :
    const β (μ + ν) = const β μ + const β ν

{α : Type u_1}
{mα : MeasurableSpace α}
(β : Type u_4)
[MeasurableSpace β]
(μ ν : MeasureTheory.Measure α)

ProbabilityTheory.Kernel.const β (μ + ν) = ProbabilityTheory.Kernel.const β μ + ProbabilityTheory.Kernel.const β ν


@[simp]
theorem leadingCoeff_quadratic (ha : a ≠ 0) : leadingCoeff (C a * X ^ 2 + C b * X + C c) = a

{R : Type u}
{a b c : R}
[Semiring R]
(ha : a ≠ 0)

(Polynomial.C a * Polynomial.X ^ 2 + Polynomial.C b * Polynomial.X + Polynomial.C c).leadingCoeff = a


@[ext]
theorem ext {l m : Language α} (h : ∀ (x : List α), x ∈ l ↔ x ∈ m) : l = m

{α : Type u_1}
{l m : Language α}
(h : ∀ (x : List α), x ∈ l ↔ x ∈ m)


/-- Every Schwartz function is differentiable at any point. -/
protected theorem differentiableAt (f : 𝓢(E, F)) {x : E} : DifferentiableAt ℝ f x

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : SchwartzMap E F)
{x : E}


protected theorem injective (s : CompositionSeries X) : Function.Injective s

{X : Type u}
[Lattice X]
[JordanHolderLattice X]
(s : CompositionSeries X)


@[simp]
theorem toFinset_insert [DecidableEq α] {a : α} {s : Set α} [Fintype (insert a s : Set α)]
    [Fintype s] : (insert a s).toFinset = insert a s.toFinset

{α : Type u_1}
[DecidableEq α]
{a : α}
{s : Set α}
[Fintype ↑(insert a s)]
[Fintype ↑s]


theorem comap_comap (s : Subfield M) (g : L →+* M) (f : K →+* L) :
    (s.comap g).comap f = s.comap (g.comp f)

{K : Type u}
{L : Type v}
{M : Type w}
[DivisionRing K]
[DivisionRing L]
[DivisionRing M]
(s : Subfield M)
(g : L →+* M)
(f : K →+* L)

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


theorem up_surjective : Surjective (@up α)


theorem choose_eq_descFactorial_div_factorial (n k : ℕ) : n.choose k = n.descFactorial k / k !


theorem add_eq_sup (a b : α) : a + b = a ⊔ b

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


/-- `Prop` structure holding the hypotheses of the Picard-Lindelöf theorem.

The similarly named `PicardLindelof` structure is part of the internal API for convenience, so as
not to constantly invoke choice, but is not intended for public use. -/
structure IsPicardLindelof {E : Type*} [NormedAddCommGroup E] (v : ℝ → E → E) (tMin t₀ tMax : ℝ)
    (x₀ : E) (L : ℝ≥0) (R C : ℝ) : Prop where
  ht₀ : t₀ ∈ Icc tMin tMax
  hR : 0 ≤ R
  lipschitz : ∀ t ∈ Icc tMin tMax, LipschitzOnWith L (v t) (closedBall x₀ R)
  cont : ∀ x ∈ closedBall x₀ R, ContinuousOn (fun t : ℝ => v t x) (Icc tMin tMax)
  norm_le : ∀ t ∈ Icc tMin tMax, ∀ x ∈ closedBall x₀ R, ‖v t x‖ ≤ C
  C_mul_le_R : (C : ℝ) * max (tMax - t₀) (t₀ - tMin) ≤ R

(self : IsPicardLindelof v tMin t₀ tMax x₀ L R C)


@[to_additive (attr := simp)]
theorem inv_eq_one : a⁻¹ = 1 ↔ a = 1

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


@[to_additive (attr := simp, norm_cast)]
lemma val_div_eq_div_val : ∀ u₁ u₂ : αˣ, ↑(u₁ / u₂) = (u₁ / u₂ : α)

{α : Type u}
[DivisionMonoid α]
(u₁ u₂ : αˣ)


@[to_additive (attr := simp)]
lemma mulEquiv_coe_eq {X Y : Type _} [Semigroup X] [Semigroup Y] (e : X ≃* Y) :
    (@DFunLike.coe (Semigrp.of X ⟶ Semigrp.of Y) _ (fun _ => (forget Semigrp).obj _)
      ConcreteCategory.instFunLike (e : X →ₙ* Y) : X → Y) = ↑e

{X Y : Type u_1}
[AddSemigroup X]
[AddSemigroup Y]
(e : X ≃+ Y)


@[simp]
theorem coe_zero : ((0 : 𝔻) : ℂ) = 0


/-- The value of `χ₄ n`, for `n : ℕ`, depends only on `n % 4`. -/
theorem χ₄_nat_mod_four (n : ℕ) : χ₄ n = χ₄ (n % 4 : ℕ)


theorem one_div_ne_zero {a : G₀} (h : a ≠ 0) : 1 / a ≠ 0

{G₀ : Type u_3}
[GroupWithZero G₀]
{a : G₀}
(h : a ≠ 0)


@[to_additive]
theorem mrangeRestrict_mker (f : M →* N) : mker (mrangeRestrict f) = mker f

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(f : M →* N)

MonoidHom.mker f.mrangeRestrict = MonoidHom.mker f


/-- The map sending a congruence relation to its underlying equivalence relation is injective. -/
@[to_additive "The map sending an additive congruence relation to its underlying equivalence
relation is injective."]
theorem toSetoid_inj {c d : Con M} (H : c.toSetoid = d.toSetoid) : c = d

{M : Type u_1}
[Mul M]
{c d : Con M}
(H : c.toSetoid = d.toSetoid)


theorem Valid'.balanceR {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)
    (H : (∃ l', Raised (size l) l' ∧ BalancedSz l' (size r)) ∨
        ∃ r', Raised r' (size r) ∧ BalancedSz (size l) r') :
    Valid' o₁ (@balanceR α l x r) o₂

(H :
  (∃ l', Ordnode.Raised l.size l' ∧ Ordnode.BalancedSz l' r.size) ∨
    ∃ r', Ordnode.Raised r' r.size ∧ Ordnode.BalancedSz l.size r')


/-- The **Gagliardo-Nirenberg-Sobolev inequality**.  Let `u` be a continuously differentiable
compactly-supported function `u` on a normed space `E` of finite dimension `n`, equipped
with Haar measure, let `1 < p < n` and let `p'⁻¹ := p⁻¹ - n⁻¹`.
Then the `Lᵖ'` norm of `u` is bounded above by a constant times the `Lᵖ` norm of
the Fréchet derivative of `u`.

This is the version where the codomain of `u` is a finite dimensional normed space.
-/
theorem eLpNorm_le_eLpNorm_fderiv_of_eq [FiniteDimensional ℝ F]
    {u : E → F} (hu : ContDiff ℝ 1 u) (h2u : HasCompactSupport u)
    {p p' : ℝ≥0} (hp : 1 ≤ p) (hn : 0 < finrank ℝ E)
    (hp' : (p' : ℝ)⁻¹ = p⁻¹ - (finrank ℝ E : ℝ)⁻¹) :
    eLpNorm u p' μ ≤ SNormLESNormFDerivOfEqConst F μ p * eLpNorm (fderiv ℝ u) p μ

(hn : 0 < FiniteDimensional.finrank ℝ E)

(hp' : (↑p')⁻¹ = ↑p⁻¹ - (↑(FiniteDimensional.finrank ℝ E))⁻¹)

MeasureTheory.eLpNorm u (↑p') μ ≤
  ↑(MeasureTheory.SNormLESNormFDerivOfEqConst F μ ↑p) * MeasureTheory.eLpNorm (fderiv ℝ u) (↑p) μ


@[to_additive]
protected theorem Finset.hasProd (s : Finset β) (f : β → α) :
    HasProd (f ∘ (↑) : (↑s : Set β) → α) (∏ b ∈ s, f b)

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


/-- Left inverse to a continuous map from a homeomorphism, mirroring `Equiv.symm_comp_self`. -/
@[simp]
theorem symm_comp_toContinuousMap :
    (f.symm : C(β, α)).comp (f : C(α, β)) = ContinuousMap.id α

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : α ≃ₜ β)

f.symm.toContinuousMap.comp f.toContinuousMap = ContinuousMap.id α


lemma ker_comapₗ [Semiring R] [AddCommMonoid Z] [Module R Z] (f : C(X, Y))
    (hfs : Function.Surjective f) :
    LinearMap.ker (comapₗ R f : LocallyConstant Y Z →ₗ[R] LocallyConstant X Z) = ⊥

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{R : Type u_5}
[TopologicalSpace Y]
{Z : Type u_6}
[Semiring R]
[AddCommMonoid Z]
[Module R Z]
(f : C(X, Y))
(hfs : Function.Surjective ⇑f)

LinearMap.ker (LocallyConstant.comapₗ R f) = ⊥


@[to_additive abs_pos_of_pos] lemma one_lt_mabs_pos_of_one_lt (h : 1 < a) : 1 < |a|ₘ

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


@[to_additive (attr := simp)]
protected theorem map_one {f : α ↪ β} : map f 1 = {f 1}

{α : Type u_2}
{β : Type u_3}
[One α]
{f : α ↪ β}


/-- "A special case of `Multipliable.map_iff_of_leftInverse` for convenience" -/
@[to_additive "A special case of `Summable.map_iff_of_leftInverse` for convenience"]
protected theorem Multipliable.map_iff_of_equiv [CommMonoid γ] [TopologicalSpace γ] {G}
    [EquivLike G α γ] [MulEquivClass G α γ] (g : G) (hg : Continuous g)
    (hg' : Continuous (EquivLike.inv g : γ → α)) : Multipliable (g ∘ f) ↔ Multipliable f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
[CommMonoid γ]
[TopologicalSpace γ]
{G : Type u_5}
[EquivLike G α γ]
[MulEquivClass G α γ]
(g : G)
(hg : Continuous ⇑g)
(hg' : Continuous (EquivLike.inv g))


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

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


/-- `weightedVSub` gives the sum of the results of subtracting any
base point, when the sum of the weights is 0. -/
theorem weightedVSub_eq_weightedVSubOfPoint_of_sum_eq_zero (w : ι → k) (p : ι → P)
    (h : ∑ i ∈ s, w i = 0) (b : P) : s.weightedVSub p w = s.weightedVSubOfPoint p b w

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w : ι → k)
(p : ι → P)
(h : ∑ i ∈ s, w i = 0)
(b : P)

(s.weightedVSub p) w = (s.weightedVSubOfPoint p b) w


@[simp]
theorem singleton_inter_of_mem {a : α} {s : Finset α} (H : a ∈ s) : {a} ∩ s = {a}

{α : Type u_1}
[DecidableEq α]
{a : α}
{s : Finset α}
(H : a ∈ s)


/-- If `f : M → N` is a submultiplicative function, `f (x * y) ≤ f x * f y` and `g i`, `i ∈ s`, is a
nonempty finite family of elements of `M`, then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_nonempty_of_subadditive]
theorem le_prod_nonempty_of_submultiplicative (f : M → N) (h_mul : ∀ x y, f (x * y) ≤ f x * f y)
    {s : Finset ι} (hs : s.Nonempty) (g : ι → M) : f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)

(h_mul : ∀ (x y : M), f (x + y) ≤ f x + f y)


theorem Integrable.smul {c : 𝕜} {f : α →ₘ[μ] β} : Integrable f → Integrable (c • f)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{𝕜 : Type u_5}
[NormedRing 𝕜]
[Module 𝕜 β]
[BoundedSMul 𝕜 β]
{c : 𝕜}
{f : α →ₘ[μ] β}


@[continuity]
theorem homothety_continuous (x : F) (t : R) : Continuous <| homothety x t

{R : Type u_1}
{F : Type u_3}
[AddCommGroup F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[CommRing R]
[Module R F]
[ContinuousConstSMul R F]
(x : F)
(t : R)


@[simp]
theorem zeroLocus_empty : zeroLocus (∅ : Set R) = Set.univ


theorem IsDiag.conjTranspose [Semiring α] [StarRing α] {A : Matrix n n α} (ha : A.IsDiag) :
    Aᴴ.IsDiag

{α : Type u_1}
{n : Type u_4}
[Semiring α]
[StarRing α]
{A : Matrix n n α}
(ha : A.IsDiag)


lemma Odd.neg_pow : Odd n → ∀ a : α, (-a) ^ n = -a ^ n

{α : Type u_2}
[Monoid α]
[HasDistribNeg α]
{n : ℕ}


theorem restrict_eq (f : α → β) (s : Set α) : s.restrict f = f ∘ Subtype.val

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


@[simp]
theorem abs_ofNat (n : ℕ) [n.AtLeastTwo] :
    Complex.abs (no_index (OfNat.ofNat n : ℂ)) = OfNat.ofNat n

Complex.abs (OfNat.ofNat n) = OfNat.ofNat n


theorem injective_boxes : Function.Injective (boxes : Prepartition I → Finset (Box ι))


@[to_additive (attr := simp)]
theorem mulRothNumber_map_mul_right :
    mulRothNumber (s.map <| mulRightEmbedding a) = mulRothNumber s

{α : Type u_2}
[DecidableEq α]
[AddCancelCommMonoid α]
(s : Finset α)
(a : α)

addRothNumber (Finset.map (addRightEmbedding a) s) = addRothNumber s


theorem exists_nested_lieIdeal_coe_eq_iff {K' : LieSubalgebra R L} (h : K ≤ K') :
    (∃ I : LieIdeal R K', ↑I = ofLe h) ↔ ∀ x y : L, x ∈ K' → y ∈ K → ⁅x, y⁆ ∈ K

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{K K' : LieSubalgebra R L}
(h : K ≤ K')

(∃ I, lieIdealSubalgebra R (↥K') I = LieSubalgebra.ofLe h) ↔ ∀ (x y : L), x ∈ K' → y ∈ K → ⁅x, y⁆ ∈ K


theorem splits_of_splits_gcd_right [DecidableEq K] {f g : K[X]} (hg0 : g ≠ 0) (hg : Splits i g) :
    Splits i (EuclideanDomain.gcd f g)

{K : Type v}
{L : Type w}
[Field K]
[Field L]
(i : K →+* L)
[DecidableEq K]
{f g : K[X]}
(hg0 : g ≠ 0)
(hg : Polynomial.Splits i g)

Polynomial.Splits i (EuclideanDomain.gcd f g)


@[to_additive (attr := simp)]
theorem prod_map_inv : (m.map fun i => (f i)⁻¹).prod = (m.map f).prod⁻¹

{ι : Type u_2}
{α : Type u_3}
[DivisionCommMonoid α]
{m : Multiset ι}
{f : ι → α}

(Multiset.map (fun i => (f i)⁻¹) m).prod = (Multiset.map f m).prod⁻¹


protected theorem max_def (n m : Int) : max n m = if n ≤ m then m else n


lemma d₁_eq {i₁ i₁' : I₁} (h : c₁.Rel i₁ i₁') (i₂ : I₂) (i₁₂ : I₁₂)
    (h' : ComplexShape.π c₁ c₂ c₁₂ ⟨i₁', i₂⟩ = i₁₂) :
    K.d₁ c₁₂ i₁ i₂ i₁₂ = ComplexShape.ε₁ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ • ((K.d i₁ i₁').f i₂ ≫
      K.ιTotal c₁₂ i₁' i₂ i₁₂ h')

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

K.d₁ c₁₂ i₁ i₂ i₁₂ = c₁.ε₁ c₂ c₁₂ (i₁, i₂) • (K.d i₁ i₁').f i₂ ≫ K.ιTotal c₁₂ i₁' i₂ i₁₂ h'


@[to_additive]
theorem equicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [TopologicalSpace G]
    [UniformSpace M] [Group G] [Group M] [TopologicalGroup G] [UniformGroup M]
    [FunLike hom G M] [MonoidHomClass hom G M] (F : ι → hom)
    (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    Equicontinuous ((↑) ∘ F)

(hf : EquicontinuousAt (DFunLike.coe ∘ F) 1)


@[simp]
theorem recOn_succ (n : ℕ+) {p : ℕ+ → Sort*} (p1 hp) :
    @PNat.recOn (n + 1) p p1 hp = hp n (@PNat.recOn n p p1 hp)

(n + 1).recOn p1 hp = hp n (n.recOn p1 hp)


theorem mul_add_div (a) {b : Ordinal} (b0 : b ≠ 0) (c) : (b * a + c) / b = a + c / b

(a : Ordinal.{u_4})
{b : Ordinal.{u_4}}
(b0 : b ≠ 0)
(c : Ordinal.{u_4})


theorem length_dropUntil_le {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
    (p.dropUntil u h).length ≤ p.length

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


/-- The L-series of the convolution product `f ⍟ g` of two sequences `f` and `g`
equals the product of their L-series, assuming both L-series converge. -/
lemma LSeriesHasSum.convolution {f g : ℕ → ℂ} {s a b : ℂ} (hf : LSeriesHasSum f s a)
    (hg : LSeriesHasSum g s b) :
    LSeriesHasSum (f ⍟ g) s (a * b)


@[simp]
theorem exp_int_mul_two_pi_mul_I (n : ℤ) : exp (n * (2 * π * I)) = 1

Complex.exp (↑n * (2 * ↑Real.pi * Complex.I)) = 1


theorem reindexLinearEquiv_comp_apply (e₁ : m ≃ m') (e₂ : n ≃ n') (e₁' : m' ≃ m'') (e₂' : n' ≃ n'')
    (M : Matrix m n A) :
    (reindexLinearEquiv R A e₁' e₂') (reindexLinearEquiv R A e₁ e₂ M) =
      reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂') M

{m : Type u_2}
{n : Type u_3}
{m' : Type u_6}
{n' : Type u_7}
{m'' : Type u_9}
{n'' : Type u_10}
(R : Type u_11)
(A : Type u_12)
[Semiring R]
[AddCommMonoid A]
[Module R A]
(e₁ : m ≃ m')
(e₂ : n ≃ n')
(e₁' : m' ≃ m'')
(e₂' : n' ≃ n'')
(M : Matrix m n A)

(Matrix.reindexLinearEquiv R A e₁' e₂') ((Matrix.reindexLinearEquiv R A e₁ e₂) M) =
  (Matrix.reindexLinearEquiv R A (e₁.trans e₁') (e₂.trans e₂')) M


/-- If a formal power series is invertible, then so is its constant coefficient. -/
theorem isUnit_constantCoeff (φ : R⟦X⟧) (h : IsUnit φ) : IsUnit (constantCoeff R φ)

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

IsUnit ((PowerSeries.constantCoeff R) φ)


theorem support_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.support ⊆ p.support

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


@[continuity, fun_prop]
theorem continuous_extension : Continuous (Completion.extension f)

{α : Type u_1}
[UniformSpace α]
{β : Type u_2}
[UniformSpace β]
{f : α → β}
[CompleteSpace β]


theorem derivative_intCast_mul {n : ℤ} {f : R[X]} : derivative ((n : R[X]) * f) =
    n * derivative f

{R : Type u}
[Ring R]
{n : ℤ}
{f : R[X]}

Polynomial.derivative (↑n * f) = ↑n * Polynomial.derivative f


@[deprecated inter_sdiff_assoc (since := "2024-05-01")]
theorem inter_sdiff (s t u : Finset α) : s ∩ (t \ u) = (s ∩ t) \ u

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


protected theorem naturality {α β : Type u} (f : α → F β) (x : Vector α n) :
    η (x.traverse f) = x.traverse (@η _ ∘ f)

{n : ℕ}
{F G : Type u → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative G]
[LawfulApplicative F]
(η : ApplicativeTransformation F G)
{α β : Type u}
(f : α → F β)
(x : Mathlib.Vector α n)

(fun {α} => η.app α) (Mathlib.Vector.traverse f x) = Mathlib.Vector.traverse ((fun {α} => η.app α) ∘ f) x


theorem elementalStarAlgebra.continuous_characterSpaceToSpectrum (x : A) :
    Continuous (elementalStarAlgebra.characterSpaceToSpectrum x)

{A : Type u_1}
[NormedRing A]
[NormedAlgebra ℂ A]
[StarRing A]
[CstarRing A]
[StarModule ℂ A]
[CompleteSpace A]
(x : A)


@[to_additive]
theorem prod_ite_index (p : Prop) [Decidable p] (s t : Finset α) (f : α → β) :
    ∏ x ∈ if p then s else t, f x = if p then ∏ x ∈ s, f x else ∏ x ∈ t, f x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
(p : Prop)
[Decidable p]
(s t : Finset α)
(f : α → β)

∑ x ∈ if p then s else t, f x = if p then ∑ x ∈ s, f x else ∑ x ∈ t, f x


theorem isRat_neg {α} [Ring α] : ∀ {f : α → α} {a : α} {n n' : ℤ} {d : ℕ},
    f = Neg.neg → IsRat a n d → Int.neg n = n' → IsRat (-a) n' d

{α : Type u_1}
[Ring α]
{f : α → α}
{a : α}
{n n' : ℤ}
{d : ℕ}

f = Neg.neg → Mathlib.Meta.NormNum.IsRat a n d → n.neg = n' → Mathlib.Meta.NormNum.IsRat (-a) n' d


theorem mul_dvd_mul : ∀ {a b c d : α}, a ∣ b → c ∣ d → a * c ∣ b * d

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


lemma IsRatCondKernelCDFAux.tendsto_one_of_monotone (hf : IsRatCondKernelCDFAux f κ ν)
    [IsFiniteKernel ν] (a : α) (seq : ℕ → ℚ) (hseq : Monotone seq)
    (hseq_tendsto : Tendsto seq atTop atTop) :
    ∀ᵐ c ∂(ν a), Tendsto (fun m ↦ f (a, c) (seq m)) atTop (𝓝 1)

{κ : ProbabilityTheory.Kernel α (β × ℝ)}

{f : α × β → ℚ → ℝ}

(hf : ProbabilityTheory.IsRatCondKernelCDFAux f κ ν)

(hseq_tendsto : Filter.Tendsto seq Filter.atTop Filter.atTop)

∀ᵐ (c : β) ∂ν a, Filter.Tendsto (fun m => f (a, c) (seq m)) Filter.atTop (𝓝 1)


lemma Triangle.eqToHom_hom₃ {A B : Triangle C} (h : A = B) :
    (eqToHom h).hom₃ = eqToHom (by subst h; rfl)

{A B : CategoryTheory.Pretriangulated.Triangle C}

(CategoryTheory.eqToHom h).hom₃ = CategoryTheory.eqToHom ⋯


@[simp]
theorem lTensorOne'_one_tmul (n : N) : N.lTensorOne' (1 ⊗ₜ[R] n) = n

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


theorem normal_of_normalizerCondition (hnc : NormalizerCondition G) {p : ℕ} [Fact p.Prime]
    [Finite (Sylow p G)] (P : Sylow p G) : (↑P : Subgroup G).Normal

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


/-- The sequence `stirlingSeq` has a positive lower bound.
-/
theorem stirlingSeq'_bounded_by_pos_constant : ∃ a, 0 < a ∧ ∀ n : ℕ, a ≤ stirlingSeq (n + 1)

∃ a, 0 < a ∧ ∀ (n : ℕ), a ≤ Stirling.stirlingSeq (n + 1)


@[reassoc (attr := simp)]
lemma pOpcycles_opcyclesIsoSc'_hom :
    K.pOpcycles j ≫ (K.opcyclesIsoSc' i j k hi hk).hom = (K.sc' i j k).pOpcycles


/-- **Fréchet–von Neumann–Jordan Theorem**. A normed space `E` whose norm satisfies the
parallelogram identity can be given a compatible inner product. Do
`casesI nonempty_innerProductSpace 𝕜 E` to locally upgrade `InnerProductSpaceable E` to
`InnerProductSpace 𝕜 E`. -/
theorem nonempty_innerProductSpace : Nonempty (InnerProductSpace 𝕜 E)

(𝕜 : Type u_1)
[RCLike 𝕜]
(E : Type u_2)
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[InnerProductSpaceable E]


/--
If `C` has (small) products and a small weakly initial set of objects, then it has a weakly initial
object.
-/
theorem has_weakly_initial_of_weakly_initial_set_and_hasProducts [HasProducts.{v} C] {ι : Type v}
    {B : ι → C} (hB : ∀ A : C, ∃ i, Nonempty (B i ⟶ A)) : ∃ T : C, ∀ X, Nonempty (T ⟶ X)

(hB : ∀ (A : C), ∃ i, Nonempty (B i ⟶ A))


/-- Bundles `fun x : ℝ≥0∞ => x ^ y` into an order isomorphism when `y : ℝ` is positive,
where the inverse is `fun x : ℝ≥0∞ => x ^ (1 / y)`. -/
@[simps! apply]
def orderIsoRpow (y : ℝ) (hy : 0 < y) : ℝ≥0∞ ≃o ℝ≥0∞


theorem castPred_lt_castPred_iff {i j : Fin (n + 1)} {hi : i ≠ last n} {hj : j ≠ last n} :
    castPred i hi < castPred j hj ↔ i < j

{n : ℕ}
{i j : Fin (n + 1)}
{hi : i ≠ Fin.last n}
{hj : j ≠ Fin.last n}


@[simp, fun_prop]
theorem DifferentiableAt.add (hf : DifferentiableAt 𝕜 f x) (hg : DifferentiableAt 𝕜 g x) :
    DifferentiableAt 𝕜 (fun y => f y + g y) x

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


lemma map_le_of_subsingleton (f : V ↪ W) [Subsingleton V] : G.map f ≤ G'

{V : Type u_1}
{W : Type u_2}
(G : SimpleGraph V)
(G' : SimpleGraph W)
(f : V ↪ W)
[Subsingleton V]


@[ext] theorem ext ⦃inst₁ inst₂ : CommSemiring R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂

{R : Type u}
⦃inst₁ inst₂ : CommSemiring R⦄
(h_add : HAdd.hAdd = HAdd.hAdd)
(h_mul : HMul.hMul = HMul.hMul)


@[simp]
theorem rpow_zero {x : ℝ≥0∞} : x ^ (0 : ℝ) = 1


@[to_additive tsum_nonneg]
theorem one_le_tprod (h : ∀ i, 1 ≤ g i) : 1 ≤ ∏' i, g i

{ι : Type u_1}
{α : Type u_3}
[OrderedAddCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{g : ι → α}
(h : ∀ (i : ι), 0 ≤ g i)


theorem extChartAt_self_apply {x y : H} : extChartAt I x y = I y

(𝕜 : Type u_1)
{E : Type u_2}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{x y : H}


/-- If `‖f‖ *[μ] ‖g‖` exists, then `f *[L, μ] g` exists. -/
theorem ConvolutionExistsAt.ofNorm {x₀ : G}
    (h : ConvolutionExistsAt (fun x => ‖f x‖) (fun x => ‖g x‖) x₀ (mul ℝ ℝ) μ)
    (hmf : AEStronglyMeasurable f μ) (hmg : AEStronglyMeasurable g μ) :
    ConvolutionExistsAt f g x₀ L μ

(h : MeasureTheory.ConvolutionExistsAt (fun x => ‖f x‖) (fun x => ‖g x‖) x₀ (ContinuousLinearMap.mul ℝ ℝ) μ)

(hmf : MeasureTheory.AEStronglyMeasurable f μ)

(hmg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.ConvolutionExistsAt f g x₀ L μ


/-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ≌
    OpensLeCover U

{X : TopCat}
{ι : Type w}
(U : ι → TopologicalSpace.Opens ↑X)
{Y : TopologicalSpace.Opens ↑X}
(hY : Y = iSup U)

(TopCat.Presheaf.generateEquivalenceOpensLe U hY).inverse = TopCat.Presheaf.generateEquivalenceOpensLe_inverse' U ⋯


theorem true_xor : ∀ (x : Bool), xor true x = !x


theorem measure_sUnion₀ {S : Set (Set α)} (hs : S.Countable) (hd : S.Pairwise (AEDisjoint μ))
    (h : ∀ s ∈ S, NullMeasurableSet s μ) : μ (⋃₀ S) = ∑' s : S, μ s

(hd : S.Pairwise (MeasureTheory.AEDisjoint μ))

(h : ∀ s ∈ S, MeasureTheory.NullMeasurableSet s μ)


theorem aemeasurable_indicator_iff₀ {s} (hs : NullMeasurableSet s μ) :
    AEMeasurable (indicator s f) μ ↔ AEMeasurable f (μ.restrict s)

(hs : MeasureTheory.NullMeasurableSet s μ)

AEMeasurable (s.indicator f) μ ↔ AEMeasurable f (μ.restrict s)


protected theorem BlockTriangular.neg (hM : BlockTriangular M b) : BlockTriangular (-M) b

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{M : Matrix m m R}
{b : m → α}
[LT α]
(hM : M.BlockTriangular b)


theorem OneOneReducible.mk {α β} [Primcodable α] [Primcodable β] {f : α → β} (q : β → Prop)
    (h : Computable f) (i : Injective f) : (fun a => q (f a)) ≤₁ q

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{f : α → β}
(q : β → Prop)
(h : Computable f)
(i : Function.Injective f)


@[to_additive min_sub_sub_right]
theorem min_div_div_right' (a b c : α) : min (a / c) (b / c) = min a b / c

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


@[simp] lemma of_boundedSpace [BoundedSpace M] : Absorbs M s t

{M : Type u_1}
{α : Type u_2}
[Bornology M]
[SMul M α]
{s t : Set α}
[BoundedSpace M]


@[simp]
theorem perm_permutations'_iff {s t : List α} : permutations' s ~ permutations' t ↔ s ~ t

s.permutations'.Perm t.permutations' ↔ s.Perm t


@[simp] lemma infIrred_iff_of_finite : InfIrred s ↔ ∃ a, Ici a = s

{α : Type u_1}
[PartialOrder α]
{s : UpperSet α}
[Finite α]


theorem fderiv_tsum_apply (hu : Summable u) (hf : ∀ n, Differentiable 𝕜 (f n))
    (hf' : ∀ n x, ‖fderiv 𝕜 (f n) x‖ ≤ u n) (hf0 : Summable fun n => f n x₀) (x : E) :
    fderiv 𝕜 (fun y => ∑' n, f n y) x = ∑' n, fderiv 𝕜 (f n) x

(hf : ∀ (n : α), Differentiable 𝕜 (f n))

(hf' : ∀ (n : α) (x : E), ‖fderiv 𝕜 (f n) x‖ ≤ u n)

fderiv 𝕜 (fun y => ∑' (n : α), f n y) x = ∑' (n : α), fderiv 𝕜 (f n) x


@[to_additive]
theorem smul_apply [SMul R Y] (r : R) (f : LocallyConstant X Y) (x : X) : (r • f) x = r • f x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{R : Type u_4}
[VAdd R Y]
(r : R)
(f : LocallyConstant X Y)
(x : X)


theorem modifyNth_eq_set_get (f : α → α) {n} {l : List α} (h) :
    l.modifyNth f n = l.set n (f (l.get ⟨n, h⟩))

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

List.modifyNth f n l = l.set n (f (l.get ⟨n, h⟩))


@[simp] theorem append_assoc (as bs cs : List α) : (as ++ bs) ++ cs = as ++ (bs ++ cs)


theorem exists_continuous_nonneg_pos [RegularSpace X] [LocallyCompactSpace X] (x : X) :
    ∃ f : C(X, ℝ), HasCompactSupport f ∧ 0 ≤ (f : X → ℝ) ∧ f x ≠ 0

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
[LocallyCompactSpace X]
(x : X)

∃ f, HasCompactSupport ⇑f ∧ 0 ≤ ⇑f ∧ f x ≠ 0


@[simp]
theorem nhds_le_nhdsSet_iff [T1Space X] {s : Set X} {x : X} : 𝓝 x ≤ 𝓝ˢ s ↔ x ∈ s

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
{s : Set X}
{x : X}

𝓝 x ≤ 𝓝ˢ s ↔ x ∈ s


theorem nhds_infty_eq : 𝓝 (∞ : OnePoint X) = map (↑) (coclosedCompact X) ⊔ pure ∞

𝓝 OnePoint.infty = Filter.map OnePoint.some (Filter.coclosedCompact X) ⊔ pure OnePoint.infty


@[simp]
theorem bernstein_apply (n ν : ℕ) (x : I) :
    bernstein n ν x = (n.choose ν : ℝ) * (x : ℝ) ^ ν * (1 - (x : ℝ)) ^ (n - ν)

(bernstein n ν) x = ↑(n.choose ν) * ↑x ^ ν * (1 - ↑x) ^ (n - ν)


@[simp]
protected theorem map_zero (F : C ⥤ D) [PreservesZeroMorphisms F] (X Y : C) :
    F.map (0 : X ⟶ Y) = 0


theorem wittSub_vars (n : ℕ) : (wittSub p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)

(WittVector.wittSub p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)


theorem mapAccumr₂_comm (f : α → α → σ → σ × γ) (comm : ∀ a₁ a₂ s, f a₁ a₂ s = f a₂ a₁ s) :
    mapAccumr₂ f xs ys s = mapAccumr₂ f ys xs s

(f : α → α → σ → σ × γ)

(comm : ∀ (a₁ a₂ : α) (s : σ), f a₁ a₂ s = f a₂ a₁ s)

Mathlib.Vector.mapAccumr₂ f xs ys s = Mathlib.Vector.mapAccumr₂ f ys xs s


theorem toENatAux_le_nat {x : Cardinal} {n : ℕ} : toENatAux x ≤ n ↔ x ≤ n


theorem derivBFamily_isNormal {o : Ordinal} (f : ∀ b < o, Ordinal → Ordinal) :
    IsNormal (derivBFamily o f)

(f : (b : Ordinal.{u_1}) → b < o → Ordinal.{max u_1 u_2} → Ordinal.{max u_1 u_2})


theorem subset_powersetCard_univ_iff : 𝒜 ⊆ powersetCard r univ ↔ (𝒜 : Set (Finset α)).Sized r

{α : Type u_1}
[Fintype α]
{𝒜 : Finset (Finset α)}
{r : ℕ}

𝒜 ⊆ Finset.powersetCard r Finset.univ ↔ Set.Sized r ↑𝒜


theorem isCodetector_def (G : C) :
    IsCodetector G ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ h : X ⟶ G, ∃! h', f ≫ h' = h) → IsIso f

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

CategoryTheory.IsCodetector G ↔
  ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ (h : X ⟶ G), ∃! h', CategoryTheory.CategoryStruct.comp f h' = h) → CategoryTheory.IsIso f


theorem le_of_le_graph {f g : E →ₗ.[R] F} (h : f.graph ≤ g.graph) : f ≤ g

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{f g : E →ₗ.[R] F}
(h : f.graph ≤ g.graph)


@[to_additive]
theorem prod_map_one {l : List ι} :
    (l.map fun _ => (1 : M)).prod = 1

{ι : Type u_1}
{M : Type u_4}
[AddZeroClass M]
{l : List ι}


theorem ncard_eq_succ {n : ℕ} (hs : s.Finite := by toFinite_tac) :
    s.ncard = n + 1 ↔ ∃ a t, a ∉ t ∧ insert a t = s ∧ t.ncard = n

{α : Type u_1}
{s : Set α}
{n : ℕ}
(hs : s.Finite := by toFinite_tac)


/-- Given two points on a circle, the center of that circle may be expressed explicitly as a
multiple (by half the tangent of the angle between the chord and the radius at one of those
points) of a `π / 2` rotation of the vector between those points, plus the midpoint of those
points. -/
theorem tan_div_two_smul_rotation_pi_div_two_vadd_midpoint_eq_center {s : Sphere P} {p₁ p₂ : P}
    (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) (h : p₁ ≠ p₂) :
    (Real.Angle.tan (∡ p₂ p₁ s.center) / 2) • o.rotation (π / 2 : ℝ) (p₂ -ᵥ p₁) +ᵥ
      midpoint ℝ p₁ p₂ = s.center

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

((∡ p₂ p₁ s.center).tan / 2) • (EuclideanGeometry.o.rotation ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = s.center


theorem int_prod_range_pos {m : ℤ} {n : ℕ} (hn : Even n) (hm : m ∉ Ico (0 : ℤ) n) :
    0 < ∏ k ∈ Finset.range n, (m - k)

{m : ℤ}
{n : ℕ}
(hn : Even n)
(hm : m ∉ Set.Ico 0 ↑n)


theorem Ne.lt_or_lt [LinearOrder α] {x y : α} (h : x ≠ y) : x < y ∨ y < x

{α : Type u_2}
[LinearOrder α]
{x y : α}
(h : x ≠ y)


@[simp]
theorem deriv_const_add' (c : F) : (deriv fun y => c + f y) = deriv f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
(c : F)


/-- Given `F : { i // i ≤ j } ⥤ C`, `i : J` such that `hi : i ≤ j`, this is the
cocone consisting of all maps `F.obj ⟨k, hk⟩ ⟶ F.obj ⟨i, hi⟩` for `k : J` such that `k < i`. -/
@[simps]
def coconeOfLE : Cocone (restrictionLT F hi)

(F : CategoryTheory.Functor { i // i ≤ j } C)

(CategoryTheory.Functor.Iteration.coconeOfLE F hi).pt = F.obj ⟨i, hi⟩


lemma hasLeftHomology_of_epi_of_isIso_of_mono (φ : S₁ ⟶ S₂) [HasLeftHomology S₁]
    [Epi φ.τ₁] [IsIso φ.τ₂] [Mono φ.τ₃] : HasLeftHomology S₂


theorem not_isPeriodicPt_of_pos_of_lt_minimalPeriod :
    ∀ {n : ℕ} (_ : n ≠ 0) (_ : n < minimalPeriod f x), ¬IsPeriodicPt f n x

{α : Type u_1}
{f : α → α}
{x : α}
{n : ℕ}

n ≠ 0 → n < Function.minimalPeriod f x → ¬Function.IsPeriodicPt f n x