/-- The exponential map in a commutative Banach algebra `𝔸` over a normed field `𝕂` of
characteristic zero has strict Fréchet derivative `exp 𝕂 x • 1 : 𝔸 →L[𝕂] 𝔸` at any point `x` in
the disk of convergence. -/
theorem hasStrictFDerivAt_exp_of_mem_ball [CharZero 𝕂] {x : 𝔸}
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasStrictFDerivAt (exp 𝕂) (exp 𝕂 x • (1 : 𝔸 →L[𝕂] 𝔸)) x

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

HasStrictFDerivAt (NormedSpace.exp 𝕂) (NormedSpace.exp 𝕂 x • 1) x


theorem ofSets_filter_eq_generate (s : Set (Set α)) :
    (FilterBasis.ofSets s).filter = generate s

(Filter.FilterBasis.ofSets s).filter = Filter.generate s


theorem IsBigO.trans_tendsto_nhds (hfg : f =O[l] g') {y : F'} (hg : Tendsto g' l (𝓝 y)) :
    f =O[l] (fun _x => 1 : α → F)

{α : Type u_1}
{E : Type u_3}
(F : Type u_4)
{F' : Type u_7}
[Norm E]
[Norm F]
[SeminormedAddCommGroup F']
{f : α → E}
{g' : α → F'}
{l : Filter α}
[One F]
[NormOneClass F]
(hfg : f =O[l] g')
{y : F'}
(hg : Filter.Tendsto g' l (𝓝 y))


theorem ι_mul_ι (r₁ r₂) : ι (0 : QuadraticForm R R) r₁ * ι (0 : QuadraticForm R R) r₂ = 0

(CliffordAlgebra.ι 0) r₁ * (CliffordAlgebra.ι 0) r₂ = 0


lemma nnreal_iff [Module ℝ A] [IsScalarTower ℝ A A] [SMulCommClass ℝ A A] {a : A} :
    QuasispectrumRestricts a ContinuousMap.realToNNReal ↔ ∀ x ∈ σₙ ℝ a, 0 ≤ x

{A : Type u_3}
[NonUnitalRing A]
[Module ℝ A]
[IsScalarTower ℝ A A]
[SMulCommClass ℝ A A]
{a : A}

QuasispectrumRestricts a ⇑ContinuousMap.realToNNReal ↔ ∀ x ∈ quasispectrum ℝ a, 0 ≤ x


/-- The presheaf of not-necessarily-continuous functions to
a target type `T` satsifies the sheaf condition.
-/
theorem toType_isSheaf (T : Type u) : (presheafToType X T).IsSheaf


theorem integrableOn_Ioi_of_intervalIntegral_norm_bounded (I a : ℝ)
    (hfi : ∀ i, IntegrableOn f (Ioc a (b i)) μ) (hb : Tendsto b l atTop)
    (h : ∀ᶠ i in l, (∫ x in a..b i, ‖f x‖ ∂μ) ≤ I) : IntegrableOn f (Ioi a) μ

(hfi : ∀ (i : ι), MeasureTheory.IntegrableOn f (Set.Ioc a (b i)) μ)

(h : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ ≤ I)

MeasureTheory.IntegrableOn f (Set.Ioi a) μ


protected theorem tsum_apply {ι α : Type*} {f : ι → α → ℝ≥0∞} {x : α} :
    (∑' i, f i) x = ∑' i, f i x

{ι : Type u_4}
{α : Type u_5}
{f : ι → α → ℝ≥0∞}
{x : α}

tsum (fun i => f i) x = ∑' (i : ι), f i x


/-- Any two modules that are subsingletons are isomorphic. -/
@[simps]
def ofSubsingleton : M ≃ₗ[R] M₂

{R : Type u_1}
(M : Type u_8)
(M₂ : Type u_10)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
[Subsingleton M]
[Subsingleton M₂]

∀ (x : M), (LinearEquiv.ofSubsingleton M M₂) x = 0


theorem finite_def {s : Set α} : s.Finite ↔ Nonempty (Fintype s)


theorem isSheaf_of_isLimit [HasLimits C] {X : TopCat} (F : J ⥤ Presheaf.{v} C X)
    (H : ∀ j, (F.obj j).IsSheaf) {c : Cone F} (hc : IsLimit c) : c.pt.IsSheaf

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{J : Type v}
[CategoryTheory.SmallCategory J]
[CategoryTheory.Limits.HasLimits C]
{X : TopCat}
(F : J ⥤ TopCat.Presheaf C X)
(H : ∀ (j : J), (F.obj j).IsSheaf)
{c : CategoryTheory.Limits.Cone F}
(hc : CategoryTheory.Limits.IsLimit c)


/-- An auxiliary lemma for manipulating sequence indices. -/
theorem lift_index_left {f : PadicSeq p} (hf : ¬f ≈ 0) (v1 v3 : ℕ) :
    padicNorm p (f (stationaryPoint hf)) =
    padicNorm p (f (max v1 (max (stationaryPoint hf) v3)))

{p : ℕ}
[Fact (Nat.Prime p)]
{f : PadicSeq p}
(hf : ¬f ≈ 0)
(v1 v3 : ℕ)

padicNorm p (↑f (PadicSeq.stationaryPoint hf)) = padicNorm p (↑f (max v1 (max (PadicSeq.stationaryPoint hf) v3)))


@[reassoc (attr := simp)]
lemma opcyclesToCycles_homologyπ :
    K.opcyclesToCycles i j ≫ K.homologyπ j = 0


@[measurability]
theorem measurableSet_closedBall : MeasurableSet (Metric.closedBall x ε)

{α : Type u_1}
[PseudoMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
{x : α}
{ε : ℝ}


/-- The function `fun (x, y) => x ^ y` is infinitely smooth at `(x, y)` unless `x = 0`. -/
theorem contDiffAt_rpow_of_ne (p : ℝ × ℝ) (hp : p.1 ≠ 0) {n : ℕ∞} :
    ContDiffAt ℝ n (fun p : ℝ × ℝ => p.1 ^ p.2) p


@[simp]
theorem comp_id (f : L₁ →ₗ⁅R⁆ L₂) : f.comp (id : L₁ →ₗ⁅R⁆ L₁) = f

{R : Type u}
{L₁ : Type v}
{L₂ : Type w}
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]
[LieRing L₂]
[LieAlgebra R L₂]
(f : L₁ →ₗ⁅R⁆ L₂)


/-- Transfer `Algebra.IsAlgebraic` across an `AlgEquiv`. -/
theorem AlgEquiv.isAlgebraic (e : A ≃ₐ[R] B)
    [Algebra.IsAlgebraic R A] : Algebra.IsAlgebraic R B

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
{B : Type u_2}
[Ring B]
[Algebra R B]
(e : A ≃ₐ[R] B)
[Algebra.IsAlgebraic R A]


lemma conjTranspose_mul_self_mulVec_eq_zero (A : Matrix m n R) (v : n → R) :
    (Aᴴ * A) *ᵥ v = 0 ↔ A *ᵥ v = 0

{m : Type u_1}
{n : Type u_2}
{R : Type u_4}
[Fintype m]
[Fintype n]
[PartialOrder R]
[NonUnitalRing R]
[StarRing R]
[StarOrderedRing R]
[NoZeroDivisors R]
(A : Matrix m n R)
(v : n → R)

(A.conjTranspose * A).mulVec v = 0 ↔ A.mulVec v = 0


theorem orderTop_add_orderTop_le_orderTop_mul {Γ} [LinearOrderedCancelAddCommMonoid Γ]
    [NonUnitalNonAssocSemiring R] {x y : HahnSeries Γ R} :
    x.orderTop + y.orderTop ≤ (x * y).orderTop

{R : Type u_3}
{Γ : Type u_5}
[LinearOrderedCancelAddCommMonoid Γ]
[NonUnitalNonAssocSemiring R]
{x y : HahnSeries Γ R}


protected theorem denseEmbedding (h : X ≃ₜ Y) : DenseEmbedding h

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


theorem mk_inj {x y : F (M F)} (h : M.mk x = M.mk y) : x = y

{F : PFunctor.{u}}
{x y : ↑F F.M}
(h : PFunctor.M.mk x = PFunctor.M.mk y)


@[simp]
theorem piCongrRight_apply (e : (i : ι) → φ i ≃ₗ[R] ψ i) (f i) :
    piCongrRight e f i = e i (f i)

{R : Type u}
{ι : Type x}
[Semiring R]
{φ : ι → Type u_1}
{ψ : ι → Type u_2}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[(i : ι) → AddCommMonoid (ψ i)]
[(i : ι) → Module R (ψ i)]
(e : (i : ι) → φ i ≃ₗ[R] ψ i)
(f : (i : ι) → φ i)
(i : ι)

(LinearEquiv.piCongrRight e) f i = (e i) (f i)


/-- If `S / R` and `S' / R'` are algebras, `i : R' →+* R` and `j : S →+* S'` are injective ring
homomorphisms, such that `R' → R → S → S'` and `R' → S'` commute, then the rank of `S / R` is
smaller than or equal to the rank of `S' / R'`. -/
theorem lift_rank_le_of_injective_injective
    (i : R' →+* R) (j : S →+* S') (hi : Injective i) (hj : Injective j)
    (hc : (j.comp (algebraMap R S)).comp i = algebraMap R' S') :
    lift.{v'} (Module.rank R S) ≤ lift.{v} (Module.rank R' S')

Cardinal.lift.{v', v} (Module.rank R S) ≤ Cardinal.lift.{v, v'} (Module.rank R' S')


theorem arctan_lt_pi_div_two (x : ℝ) : arctan x < π / 2


theorem mk_eq_mk' : (mk : R → M → Localization M) = IsLocalization.mk' (Localization M)

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}

Localization.mk = IsLocalization.mk' (Localization M)


@[to_additive (attr := simp)]
theorem inv_div : (a / b)⁻¹ = b / a

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


theorem map_uniformity_set_coe {s : Set α} [UniformSpace α] :
    map (Prod.map (↑) (↑)) (𝓤 s) = 𝓤 α ⊓ 𝓟 (s ×ˢ s)

{α : Type ua}
{s : Set α}
[UniformSpace α]

Filter.map (Prod.map Subtype.val Subtype.val) (𝓤 ↑s) = 𝓤 α ⊓ 𝓟 (s ×ˢ s)


@[simp]
theorem mem_powerset {s t : Finset α} : s ∈ powerset t ↔ s ⊆ t


@[simp] theorem elim_none (x : β) (f : α → β) : none.elim x f = x

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


/-- The canonical isomorphism `G/⊥ ≃* G`. -/
@[to_additive (attr := simps!) "The canonical isomorphism `G/⊥ ≃+ G`."]
def quotientBot : G ⧸ (⊥ : Subgroup G) ≃* G

∀ (a : G), QuotientAddGroup.quotientBot.symm a = ↑a


@[simp] lemma not_in₂₂ : ¬ (graph t).Adj (in₂ c) (in₂ c')

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{t : Finset (α × β × γ)}
{c c' : γ}

¬(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₂ c')


/-- The empty set is nowhere dense. -/
@[simp]
lemma isNowhereDense_empty : IsNowhereDense (∅ : Set X)


theorem mkRat_num_den (z : d ≠ 0) (h : mkRat n d = ⟨n', d', z', c⟩) :
    ∃ m : Nat, m ≠ 0 ∧ n = n' * m ∧ d = d' * m

(h : mkRat n d = { num := n', den := d', den_nz := z', reduced := c })


@[to_additive]
theorem to_mulOpposite (h : UniqueMul A B a0 b0) :
    UniqueMul (B.map ⟨_, op_injective⟩) (A.map ⟨_, op_injective⟩) (op b0) (op a0)

{G : Type u_1}
[Add G]
{A B : Finset G}
{a0 b0 : G}
(h : UniqueAdd A B a0 b0)

UniqueAdd (Finset.map { toFun := AddOpposite.op, inj' := ⋯ } B) (Finset.map { toFun := AddOpposite.op, inj' := ⋯ } A)
  (AddOpposite.op b0) (AddOpposite.op a0)


theorem segment_subset_closure_openSegment : [x -[𝕜] y] ⊆ closure (openSegment 𝕜 x y)

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedRing 𝕜]
[DenselyOrdered 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[ContinuousAdd E]
[Module 𝕜 E]
[ContinuousSMul 𝕜 E]
{x y : E}


@[to_additive]
theorem mul_apply [Mul β] (f g : α →ₛ β) (a : α) : (f * g) a = f a * g a

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Add β]
(f g : MeasureTheory.SimpleFunc α β)
(a : α)


lemma mul_inv_le_one_of_le (h : a ≤ b) (hb : 0 ≤ b) : a * b⁻¹ ≤ 1

{α : Type u_2}
[LinearOrderedSemifield α]
{a b : α}
(h : a ≤ b)
(hb : 0 ≤ b)


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


theorem HasDerivWithinAt.congr_of_mem (h : HasDerivWithinAt f f' s x) (hs : ∀ x ∈ s, f₁ x = f x)
    (hx : x ∈ s) : HasDerivWithinAt f₁ f' s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : 𝕜 → F}
{f' : F}
{x : 𝕜}
{s : Set 𝕜}
(h : HasDerivWithinAt f f' s x)
(hs : ∀ x ∈ s, f₁ x = f x)
(hx : x ∈ s)


/-- We can promote a type-level `Equiv` to
an equivalence between the corresponding `discrete` categories.
-/
@[simps]
def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ Discrete J

(CategoryTheory.Discrete.equivalence e).inverse = CategoryTheory.Discrete.functor (CategoryTheory.Discrete.mk ∘ ⇑e.symm)


private theorem coprime_sq_sub_mul_of_even_odd {m n : ℤ} (h : Int.gcd m n = 1) (hm : m % 2 = 0)
    (hn : n % 2 = 1) : Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1


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

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

∀ {X Y : C} (f : X ⟶ Y), (CategoryTheory.BraidedFunctor.id C).map f = f


lemma revAt_eq_self_of_lt {N i : ℕ} (h : N < i) : revAt N i = i


@[ext]
theorem out_inj {α} (a b : Erased α) (h : a.out = b.out) : a = b

{α : Sort u_1}
(a b : Erased α)
(h : a.out = b.out)


/-- `r` is a unit as a section on the basic open defined by `r`. -/
theorem isUnit_res_toΓSpecMapBasicOpen : IsUnit (X.toToΓSpecMapBasicOpen r r)

(r : ↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))


nonrec theorem self_add_star : a + star a = 2 * a.re


/-- A column partioned matrix when transposed gives a row partioned matrix with columns of the
initial matrix tranposed to become rows. -/
lemma transpose_fromColumns (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) :
    transpose (fromColumns A₁ A₂) = fromRows (transpose A₁) (transpose A₂)

{R : Type u_1}
{m : Type u_2}
{n₁ : Type u_6}
{n₂ : Type u_7}
(A₁ : Matrix m n₁ R)
(A₂ : Matrix m n₂ R)

(A₁.fromColumns A₂).transpose = A₁.transpose.fromRows A₂.transpose


theorem neZero' {n : ℕ+} (hζ : IsPrimitiveRoot ζ n) : NeZero ((n : ℕ) : R)

{R : Type u_4}
{ζ : R}
[CommRing R]
[IsDomain R]
{n : ℕ+}
(hζ : IsPrimitiveRoot ζ ↑n)


/-- If an element `b` becomes right-regular after multiplying it on the right by a right-regular
element, then `b` is right-regular. -/
@[to_additive "If an element `b` becomes add-right-regular after adding to it on the right
an add-right-regular element, then `b` is add-right-regular."]
theorem IsRightRegular.of_mul (ab : IsRightRegular (b * a)) : IsRightRegular b

{R : Type u_1}
[AddSemigroup R]
{a b : R}
(ab : IsAddRightRegular (b + a))


/-- If `S` contains `0` then the localization at `S` is trivial. -/
theorem LocalizationMap.subsingleton  (f : Submonoid.LocalizationMap S N) (h : 0 ∈ S) :
    Subsingleton N

{M : Type u_1}
[CommMonoidWithZero M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoidWithZero N]
(f : S.LocalizationMap N)
(h : 0 ∈ S)


theorem zmod_congr_of_sub_mem_span (n : ℕ) (x : ℤ_[p]) (a b : ℕ)
    (ha : x - a ∈ (Ideal.span {(p : ℤ_[p]) ^ n}))
    (hb : x - b ∈ (Ideal.span {(p : ℤ_[p]) ^ n})) : (a : ZMod (p ^ n)) = b

{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
(n : ℕ)
(x : ℤ_[p])
(a b : ℕ)
(ha : x - ↑a ∈ Ideal.span {↑p ^ n})
(hb : x - ↑b ∈ Ideal.span {↑p ^ n})


theorem PseudoMetricSpace.replaceBornology_eq {α} [m : PseudoMetricSpace α] [B : Bornology α]
    (H : ∀ s, @IsBounded _ B s ↔ @IsBounded _ PseudoMetricSpace.toBornology s) :
    PseudoMetricSpace.replaceBornology _ H = m

(H : ∀ (s : Set α), Bornology.IsBounded s ↔ Bornology.IsBounded s)


theorem le_bsup {o} (f : ∀ a < o, Ordinal) (i h) : f i h ≤ bsup o f

(f : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4})


theorem span_smul_of_span_eq_top {s : Set S} (hs : span R s = ⊤) (t : Set A) :
    span R (s • t) = (span S t).restrictScalars R

{R : Type u}
{S : Type v}
{A : Type w}
[Semiring R]
[Semiring S]
[AddCommMonoid A]
[Module R S]
[Module S A]
[Module R A]
[IsScalarTower R S A]
{s : Set S}
(hs : Submodule.span R s = ⊤)
(t : Set A)

Submodule.span R (s • t) = Submodule.restrictScalars R (Submodule.span S t)


@[to_additive]
theorem eq' {a b : α} : (mk a : α ⧸ s) = mk b ↔ a⁻¹ * b ∈ s

{α : Type u_1}
[Group α]
{s : Subgroup α}
{a b : α}


/-- `μ` has finite spanning sets in `C` if there is a countable sequence of sets in `C` that have
  finite measures. This structure is a type, which is useful if we want to record extra properties
  about the sets, such as that they are monotone.
  `SigmaFinite` is defined in terms of this: `μ` is σ-finite if there exists a sequence of
  finite spanning sets in the collection of all measurable sets. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure FiniteSpanningSetsIn {m0 : MeasurableSpace α} (μ : Measure α) (C : Set (Set α)) where
  protected set : ℕ → Set α
  protected set_mem : ∀ i, set i ∈ C
  protected finite : ∀ i, μ (set i) < ∞
  protected spanning : ⋃ i, set i = univ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{C : Set (Set α)}
(self : μ.FiniteSpanningSetsIn C)
(i : ℕ)


/-- Composition of two partial homeomorphisms when the target of the first and the source of
the second coincide. -/
@[simps! apply symm_apply toPartialEquiv, simps! (config := .lemmasOnly) source target]
protected def trans' (h : e.target = e'.source) : PartialHomeomorph X Z

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(e : PartialHomeomorph X Y)
(e' : PartialHomeomorph Y Z)
(h : e.target = e'.source)


theorem measure_toMeasurable_add_inter_right {s t : Set α} (hs : MeasurableSet s)
    (ht : (μ + ν) t ≠ ∞) : ν (toMeasurable (μ + ν) t ∩ s) = ν (t ∩ s)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{s t : Set α}
(hs : MeasurableSet s)
(ht : (μ + ν) t ≠ ⊤)

ν (MeasureTheory.toMeasurable (μ + ν) t ∩ s) = ν (t ∩ s)


@[simp]
lemma Hom.toAlgHom_X (f : Hom P P') (i) : f.toAlgHom (.X i) = f.val i

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}
{R' : Type u_1}
{S' : Type u_2}
[CommRing R']
[CommRing S']
[Algebra R' S']
{P' : Algebra.Generators R' S'}
[Algebra R R']
[Algebra S S']
(f : P.Hom P')
(i : P.vars)


theorem lt_cons_self (s : Multiset α) (a : α) : s < a ::ₘ s


/-- If a function defined on a topological group has a support contained in a
compact set, then either the function is trivial or the group is locally compact. -/
@[to_additive
      "If a function defined on a topological additive group has a support contained in a compact
      set, then either the function is trivial or the group is locally compact."]
theorem eq_zero_or_locallyCompactSpace_of_support_subset_isCompact_of_group
    [TopologicalSpace α] [Zero α] [T1Space α]
    {f : G → α} {k : Set G} (hk : IsCompact k) (hf : support f ⊆ k) (h'f : Continuous f) :
    f = 0 ∨ LocallyCompactSpace G

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
[TopologicalSpace α]
[Zero α]
[T1Space α]
{f : G → α}
{k : Set G}
(hk : IsCompact k)
(hf : Function.support f ⊆ k)
(h'f : Continuous f)


theorem mem_perpBisector_iff_inner_eq :
    c ∈ perpBisector p₁ p₂ ↔ ⟪c -ᵥ p₁, p₂ -ᵥ p₁⟫ = (dist p₁ p₂) ^ 2 / 2

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c p₁ p₂ : P}

c ∈ AffineSubspace.perpBisector p₁ p₂ ↔ ⟪c -ᵥ p₁, p₂ -ᵥ p₁⟫_ℝ = dist p₁ p₂ ^ 2 / 2


@[simp]
theorem frobenius_norm_map_eq (A : Matrix m n α) (f : α → β) (hf : ∀ a, ‖f a‖ = ‖a‖) :
    ‖A.map f‖ = ‖A‖

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
{β : Type u_6}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
[SeminormedAddCommGroup β]
(A : Matrix m n α)
(f : α → β)
(hf : ∀ (a : α), ‖f a‖ = ‖a‖)


@[to_additive]
theorem exists_pow_eq_self_of_coprime (h : n.Coprime (orderOf x)) : ∃ m : ℕ, (x ^ n) ^ m = x

{G : Type u_1}
[Monoid G]
{x : G}
{n : ℕ}
(h : n.Coprime (orderOf x))


/-- The unit of the adjunction `condensedSetToTopCat ⊣ topCatToCondensedSet` -/
@[simps val_app val_app_apply]
def topCatAdjunctionUnit (X : CondensedSet.{u}) : X ⟶ X.toTopCat.toCondensedSet

(X : CondensedSet)
(S : CompHausᵒᵖ)
(x : X.val.obj S)

X.topCatAdjunctionUnit.val.app S x =
  { toFun := fun s => X.val.map (CompHaus.const (Opposite.unop S) s).op x, continuous_toFun := ⋯ }


@[simp]
nonrec theorem integral_add (hf : IntervalIntegrable f μ a b) (hg : IntervalIntegrable g μ a b) :
    ∫ x in a..b, f x + g x ∂μ = (∫ x in a..b, f x ∂μ) + ∫ x in a..b, g x ∂μ

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ℝ}
{f g : ℝ → E}
{μ : MeasureTheory.Measure ℝ}
(hf : IntervalIntegrable f μ a b)
(hg : IntervalIntegrable g μ a b)

∫ (x : ℝ) in a..b, f x + g x ∂μ = ∫ (x : ℝ) in a..b, f x ∂μ + ∫ (x : ℝ) in a..b, g x ∂μ


/-- The unit isomorphism of the auto-equivalence of categories `triangleRotation C` of
`Triangle C` given by the rotation of triangles. -/
@[simps!]
def rotCompInvRot : 𝟭 (Triangle C) ≅ rotate C ⋙ invRotate C

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

(X : CategoryTheory.Pretriangulated.Triangle C)

(CategoryTheory.Pretriangulated.rotCompInvRot.hom.app X).hom₃ = 𝟙 X.obj₃


/-- Auxiliary definition for `opEquivalence`. -/
@[simps]
def opInverse : HomologicalComplex Vᵒᵖ c.symm ⥤ (HomologicalComplex V c)ᵒᵖ

(HomologicalComplex.opInverse V c).obj X = Opposite.op X.unopSymm


@[to_additive]
theorem op_smul_set_subset_mul : a ∈ t → op a • s ⊆ s * t

{α : Type u_2}
[Add α]
{s t : Set α}
{a : α}


@[simp]
theorem sep_mem_eq : { x ∈ s | x ∈ t } = s ∩ t


/-- The unit isomorphism of the equivalence
`ShortComplex.functorEquivalence : ShortComplex (J ⥤ C) ≌ J ⥤ ShortComplex C`. -/
@[simps!]
def unitIso : 𝟭 _ ≅ functor J C ⋙ inverse J C

(X : CategoryTheory.ShortComplex (CategoryTheory.Functor J C))

∀ (X_1 : J),
  ((CategoryTheory.ShortComplex.FunctorEquivalence.unitIso J C).inv.app X).τ₃.app X_1 =
    CategoryTheory.CategoryStruct.id (X.X₃.obj X_1)


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

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


lemma LieSubalgebra.coe_ad (H : LieSubalgebra R L) (x y : H) :
    (ad R H x y : L) = ad R L x y

(R : Type u)
(L : Type v)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)
(x y : ↥H)

↑(((LieAlgebra.ad R ↥H) x) y) = ((LieAlgebra.ad R L) ↑x) ↑y


theorem lineDifferentiableAt (f : QuadraticMap 𝕜 E F) (a b : E) : LineDifferentiableAt 𝕜 f a b

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(f : QuadraticMap 𝕜 E F)
(a b : E)


/-- The convex hull of a set `s` is the minimal convex set that includes `s`. -/
@[simps! isClosed]
def convexHull : ClosureOperator (Set E)

(𝕜 : Type u_1)
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
(s : Set E)


@[simp, mfld_simps]
theorem ofSet_source (s : Set α) : (PartialEquiv.ofSet s).source = s


theorem adjoin_le_integralClosure {x : A} (hx : IsIntegral R x) :
    Algebra.adjoin R {x} ≤ integralClosure R A

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
{x : A}
(hx : IsIntegral R x)


@[simp, norm_cast]
lemma inr_nonneg_iff {a : A} : 0 ≤ (a : Unitization ℂ A) ↔ 0 ≤ 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 : A}

0 ≤ ↑a ↔ 0 ≤ a


@[mono]
theorem toFilterDistortion_mono (I : Box ι) (h : l₁ ≤ l₂) (hc : c₁ ≤ c₂) :
    l₁.toFilterDistortion I c₁ ≤ l₂.toFilterDistortion I c₂

{ι : Type u_1}
[Fintype ι]
{c₁ c₂ : ℝ≥0}
{l₁ l₂ : BoxIntegral.IntegrationParams}
(I : BoxIntegral.Box ι)
(h : l₁ ≤ l₂)
(hc : c₁ ≤ c₂)


theorem get_toList (n : ℕ) (hn : n < length (toList p x)) :
    (toList p x).get ⟨n, hn⟩ = (p ^ n) x

{α : Type u_1}
[Fintype α]
[DecidableEq α]
(p : Equiv.Perm α)
(x : α)
(n : ℕ)
(hn : n < (p.toList x).length)


theorem le_radius_of_summable_nnnorm (h : Summable fun n => ‖p n‖₊ * r ^ n) : ↑r ≤ p.radius

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{r : ℝ≥0}
(h : Summable fun n => ‖p n‖₊ * r ^ n)


lemma HasFPowerSeriesWithinAt.mono {f : E → F} {p : FormalMultilinearSeries 𝕜 E F}
    {s t : Set E} {x : E} (h : HasFPowerSeriesWithinAt f p t x)
    (hs : s ⊆ t) : HasFPowerSeriesWithinAt f p s x

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{s t : Set E}
{x : E}
(h : HasFPowerSeriesWithinAt f p t x)
(hs : s ⊆ t)


@[simp]
theorem symm_dual_comp (g : BoundedOrderHom βᵒᵈ γᵒᵈ) (f : BoundedOrderHom αᵒᵈ βᵒᵈ) :
    BoundedOrderHom.dual.symm (g.comp f) =
      (BoundedOrderHom.dual.symm g).comp (BoundedOrderHom.dual.symm f)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[BoundedOrder α]
[Preorder β]
[BoundedOrder β]
[Preorder γ]
[BoundedOrder γ]
(g : BoundedOrderHom βᵒᵈ γᵒᵈ)
(f : BoundedOrderHom αᵒᵈ βᵒᵈ)


theorem moebius_ne_zero_iff_squarefree {n : ℕ} : μ n ≠ 0 ↔ Squarefree n

ArithmeticFunction.moebius n ≠ 0 ↔ Squarefree n


theorem smoothWithinAt_proj {s : Set (TotalSpace F E)} {p : TotalSpace F E} :
    SmoothWithinAt (IB.prod 𝓘(𝕜, F)) IB (π F E) s p

[TopologicalSpace (Bundle.TotalSpace F E)]

SmoothWithinAt (IB.prod 𝓘(𝕜, F)) IB Bundle.TotalSpace.proj s p


@[simp]
theorem affineCombination_coord_eq_self [Fintype ι] (q : P) :
    (Finset.univ.affineCombination k b fun i => b.coord i q) = q

{ι : Type u_1}
{k : Type u_3}
{V : Type u_4}
{P : Type u_5}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)
[Fintype ι]
(q : P)

((Finset.affineCombination k Finset.univ ⇑b) fun i => (b.coord i) q) = q


theorem Finset.Nonempty.csSup_eq_max' {s : Finset α} (h : s.Nonempty) : sSup ↑s = s.max' h

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
{s : Finset α}
(h : s.Nonempty)


theorem iInter_eq_if {p : Prop} [Decidable p] (s : Set α) : ⋂ _ : p, s = if p then s else univ

{α : Type u_1}
{p : Prop}
[Decidable p]
(s : Set α)

⋂ (_ : p), s = if p then s else Set.univ


theorem conj_apply_apply (e : M ≃ₗ[R] M₂) (f : Module.End R M) (x : M₂) :
    e.conj f x = e (f (e.symm x))

{R : Type u_1}
{M : Type u_8}
{M₂ : Type u_10}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(e : M ≃ₗ[R] M₂)
(f : Module.End R M)
(x : M₂)


@[simp]
theorem natPred_lt_natPred {m n : ℕ+} : m.natPred < n.natPred ↔ m < n


@[simp, norm_cast]
theorem intCast_im (z : ℤ) : (z : ℍ[R]).im = 0


theorem hasSum_mul_left_iff (h : a₂ ≠ 0) : HasSum (fun i ↦ a₂ * f i) (a₂ * a₁) ↔ HasSum f a₁

{ι : Type u_1}
{α : Type u_4}
[DivisionSemiring α]
[TopologicalSpace α]
[TopologicalSemiring α]
{f : ι → α}
{a₁ a₂ : α}
(h : a₂ ≠ 0)

HasSum (fun i => a₂ * f i) (a₂ * a₁) ↔ HasSum f a₁


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

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


theorem opCoproductIsoProduct'_inv_comp_inj {c : Cofan Z} {f : Fan (op <| Z ·)}
    (hc : IsColimit c) (hf : IsLimit f) (b : α) :
    (opCoproductIsoProduct' hc hf).inv ≫ (c.inj b).op = f.proj b

{f : CategoryTheory.Limits.Fan fun x => Opposite.op (Z x)}

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.Limits.opCoproductIsoProduct' hc hf).inv ≫ (c.inj b).op = f.proj b


/-- Induction up to a finite set `S`. -/
theorem Finite.induction_to {C : Set α → Prop} {S : Set α} (h : S.Finite)
    (S0 : Set α) (hS0 : S0 ⊆ S) (H0 : C S0) (H1 : ∀ s ⊂ S, C s → ∃ a ∈ S \ s, C (insert a s)) :
    C S


private theorem le_trans_aux {x y z : PGame}
    (h₁ : ∀ {i}, y ≤ z → z ≤ x.moveLeft i → y ≤ x.moveLeft i)
    (h₂ : ∀ {j}, z.moveRight j ≤ x → x ≤ y → z.moveRight j ≤ y) (hxy : x ≤ y) (hyz : y ≤ z) :
    x ≤ z

(h₁ : ∀ {i : x.LeftMoves}, y ≤ z → z ≤ x.moveLeft i → y ≤ x.moveLeft i)

(h₂ : ∀ {j : z.RightMoves}, z.moveRight j ≤ x → x ≤ y → z.moveRight j ≤ y)


@[simp]
theorem refl_extend {a : X} : (Path.refl a).extend = fun _ => a

{X : Type u_1}
[TopologicalSpace X]
{a : X}


/-- A sequence `f` of submodules of a noetherian module,
with `f (n+1)` disjoint from the supremum of `f 0`, ..., `f n`,
is eventually zero.
-/
theorem IsNoetherian.disjoint_partialSups_eventually_bot
    (f : ℕ → Submodule R M) (h : ∀ n, Disjoint (partialSups f n) (f (n + 1))) :
    ∃ n : ℕ, ∀ m, n ≤ m → f m = ⊥

(h : ∀ (n : ℕ), Disjoint ((partialSups f) n) (f (n + 1)))


@[simp] theorem foldlM_append [Monad m] [LawfulMonad m] (f : β → α → m β) (b) (l l' : List α) :
    (l ++ l').foldlM f b = l.foldlM f b >>= l'.foldlM f

{m : Type u_1 → Type u_2}
{β : Type u_1}
{α : Type u_3}
[Monad m]
[LawfulMonad m]
(f : β → α → m β)
(b : β)
(l l' : List α)

List.foldlM f b (l ++ l') = do
  let init ← List.foldlM f b l
  List.foldlM f init l'


@[simp]
theorem ofAdd_add [Add α] (x y : α) : ofAdd (x + y) = ofAdd x * ofAdd y

Multiplicative.ofAdd (x + y) = Multiplicative.ofAdd x * Multiplicative.ofAdd y


lemma setLIntegral_condKernel_univ_right (hf : Measurable f) (a : α) {s : Set β}
    (hs : MeasurableSet s) :
    ∫⁻ b in s, ∫⁻ ω, f (b, ω) ∂(Kernel.condKernel κ (a, b)) ∂(Kernel.fst κ a)
      = ∫⁻ x in s ×ˢ Set.univ, f x ∂(κ a)

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

{f : β × Ω → ℝ≥0∞}

∫⁻ (b : β) in s, ∫⁻ (ω : Ω), f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a = ∫⁻ (x : β × Ω) in s ×ˢ Set.univ, f x ∂κ a


theorem content_eq_zero_iff {p : R[X]} : content p = 0 ↔ p = 0

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
{p : Polynomial R}


lemma uIcc_of_not_le (h : ¬a ≤ b) : [[a, b]] = Icc b a

{α : Type u_1}
[LinearOrder α]
{a b : α}
(h : ¬a ≤ b)


/-- If `Irreducible (cyclotomic (p ^ (k + 1)) K)` (in particular for `K = ℚ`) and `p` is a prime,
then the norm of `ζ ^ (p ^ s) - 1` is `p ^ (p ^ s)` if `k ≠ 0` and `s ≤ k`. -/
theorem norm_pow_sub_one_eq_prime_pow_of_ne_zero {k s : ℕ} (hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1)))
    [hpri : Fact (p : ℕ).Prime] [hcycl : IsCyclotomicExtension {p ^ (k + 1)} K L]
    (hirr : Irreducible (cyclotomic (↑(p ^ (k + 1)) : ℕ) K)) (hs : s ≤ k) (hk : k ≠ 0) :
    norm K (ζ ^ (p : ℕ) ^ s - 1) = (p : K) ^ (p : ℕ) ^ s

(hirr : Irreducible (Polynomial.cyclotomic (↑(p ^ (k + 1))) K))

(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s


theorem le_comap_map [RingHomSurjective σ₁₂] (f : F) (p : Submodule R M) : p ≤ comap f (map f p)

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
[RingHomSurjective σ₁₂]
(f : F)
(p : Submodule R M)

p ≤ Submodule.comap f (Submodule.map f p)


@[simp, norm_cast]
theorem coe_iInf {ι : Sort*} {S : ι → L.Substructure M} :
    ((⨅ i, S i : L.Substructure M) : Set M) = ⋂ i, (S i : Set M)

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{ι : Sort u_3}
{S : ι → L.Substructure M}


@[simp] theorem zipWithAll_nil_left :
    zipWithAll f [] bs = bs.map fun b => f none (some b)

∀ {α : Type u_1} {α_1 : Type u_2} {α_2 : Type u_3} {f : Option α → Option α_1 → α_2} {bs : List α_1},
  List.zipWithAll f List.nil bs = List.map (fun b => f none (some b)) bs


/-- Rotating the first of two vectors by `θ` scales their Kahler form by `cos θ - sin θ * I`. -/
@[simp]
theorem kahler_rotation_left (x y : V) (θ : Real.Angle) :
    o.kahler (o.rotation θ x) y = conj (θ.expMapCircle : ℂ) * o.kahler x y

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

(o.kahler ((o.rotation θ) x)) y = (starRingEnd ℂ) ↑θ.expMapCircle * (o.kahler x) y


@[simp]
theorem total_equivMapDomain (f : α ≃ α') (l : α →₀ R) :
    (Finsupp.total α' M' R v') (equivMapDomain f l) = (Finsupp.total α M' R (v' ∘ f)) l

{α : Type u_1}
(R : Type u_5)
[Semiring R]
{α' : Type u_7}
{M' : Type u_8}
[AddCommMonoid M']
[Module R M']
{v' : α' → M'}
(f : α ≃ α')
(l : α →₀ R)

(Finsupp.total α' M' R v') (Finsupp.equivMapDomain f l) = (Finsupp.total α M' R (v' ∘ ⇑f)) l


theorem piecewise_ae_eq_of_ae_eq_set [DecidablePred (· ∈ s)] [DecidablePred (· ∈ t)]
    (hst : s =ᵐ[μ] t) : s.piecewise f g =ᵐ[μ] t.piecewise f g

{α : Type u_2}
{β : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s t : Set α}
{f g : α → β}
[DecidablePred fun x => x ∈ s]
[DecidablePred fun x => x ∈ t]
(hst : s =ᵐ[μ] t)


theorem mem_image_const_self : b ∈ s.image (const α b) ↔ s.Nonempty

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{s : Finset α}
{b : β}

b ∈ Finset.image (Function.const α b) s ↔ s.Nonempty


@[simp, norm_cast]
lemma ofENat_top : ofENat ⊤ = ⊤


@[simp]
theorem AffineEquiv.sbtw_map_iff {x y z : P} (f : P ≃ᵃ[R] P') :
    Sbtw R (f x) (f y) (f z) ↔ Sbtw R x y z

{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
{x y z : P}
(f : P ≃ᵃ[R] P')


theorem monomial_sum_one {α : Type*} (s : Finset α) (f : α → σ →₀ ℕ) :
    (monomial (∑ i ∈ s, f i) 1 : MvPolynomial σ R) = ∏ i ∈ s, monomial (f i) 1

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{α : Type u_2}
(s : Finset α)
(f : α → σ →₀ ℕ)

(MvPolynomial.monomial (∑ i ∈ s, f i)) 1 = ∏ i ∈ s, (MvPolynomial.monomial (f i)) 1


@[to_additive (attr := simp)]
theorem one_right (a : M) : Commute a 1


/-- An antitone function is continuous to the left at a point if and only if its left limit
coincides with the value of the function. -/
theorem continuousWithinAt_Iio_iff_leftLim_eq :
    ContinuousWithinAt f (Iio x) x ↔ leftLim f x = f x

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : Antitone f)
{x : α}
[TopologicalSpace α]
[OrderTopology α]

ContinuousWithinAt f (Set.Iio x) x ↔ Function.leftLim f x = f x


@[to_additive (attr := simp)]
theorem mrange_swap : MonoidHom.mrange (swap M N) = ⊤

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

AddMonoidHom.mrange (AddMonoid.Coprod.swap M N) = ⊤


@[to_additive (attr := simp)]
lemma min_mul_max (a b : α) : min a b * max a b = a * b

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


theorem ne_single_iff {n : ℕ} (hn : 0 < n) {c : Composition n} :
    c ≠ single n hn ↔ ∀ i, c.blocksFun i < n

c ≠ Composition.single n hn ↔ ∀ (i : Fin c.length), c.blocksFun i < n


theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) :
    Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.Memℒp f 2 μ ↔ MeasureTheory.Integrable (fun x => ‖f x‖ ^ 2) μ


@[simp]
theorem vsub_empty (s : Finset β) : s -ᵥ (∅ : Finset β) = ∅

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


@[to_additive (attr := simp)]
theorem unop_top : (⊤ : Submonoid Mᵐᵒᵖ).unop = ⊤


@[simp] lemma succ_mod_two_add_mod_two (m : ℕ) : (m + 1) % 2 + m % 2 = 1


@[to_additive (attr := simp)]
theorem prod_insertNone (f : Option α → M) (s : Finset α) :
    ∏ x ∈ insertNone s, f x = f none * ∏ x ∈ s, f (some x)

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

∑ x ∈ Finset.insertNone s, f x = f none + ∑ x ∈ s, f (some x)


theorem map_filterMap_of_inv (f : α → Option β) (g : β → α) (H : ∀ x : α, (f x).map g = some x)
    (l : List α) : map g (filterMap f l) = l

(H : ∀ (x : α), Option.map g (f x) = some x)


theorem eqToHom_c_app {X Y : Scheme} (e : X = Y) (U) :
    (eqToHom e).app U = eqToHom (by subst e; rfl)

{X Y : AlgebraicGeometry.Scheme}
(e : X = Y)
(U : Y.Opens)

AlgebraicGeometry.Scheme.Hom.app (CategoryTheory.eqToHom e) U = CategoryTheory.eqToHom ⋯


@[to_additive (attr := simp) add_pos_iff]
theorem one_lt_mul_iff : 1 < a * b ↔ 1 < a ∨ 1 < b

{α : Type u}
[CanonicallyOrderedCommMonoid α]
{a b : α}


theorem seq_seq {s : Set (β → γ)} {t : Set (α → β)} {u : Set α} :
    seq s (seq t u) = seq (seq ((· ∘ ·) '' s) t) u

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set (β → γ)}
{t : Set (α → β)}
{u : Set α}

s.seq (t.seq u) = (((fun x x_1 => x ∘ x_1) '' s).seq t).seq u


/-- `LocallyConstant.const` as an `AlgHom` -/
@[simps!]
def constₐ (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y] :
    Y →ₐ[R] LocallyConstant X Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
(R : Type u_6)
[CommSemiring R]
[Semiring Y]
[Algebra R Y]
(y : Y)

∀ (a : X), ((LocallyConstant.constₐ R) y) a = y


theorem getElem?_rotate {l : List α} {n m : ℕ} (hml : m < l.length) :
    (l.rotate n)[m]? = l[(m + n) % l.length]?

{α : Type u}
{l : List α}
{n m : ℕ}
(hml : m < l.length)


@[to_additive]
theorem HasProd.compl_mul {s : Set β} (ha : HasProd (f ∘ (↑) : (sᶜ : Set β) → α) a)
    (hb : HasProd (f ∘ (↑) : s → α) b) : HasProd f (a * b)

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a b : α}
[ContinuousAdd α]
{s : Set β}
(ha : HasSum (f ∘ Subtype.val) a)
(hb : HasSum (f ∘ Subtype.val) b)


@[simp, mfld_simps]
theorem toFun_eq_coe (e : PartialHomeomorph X Y) : e.toFun = e

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


theorem Iio_succ_eq_insert (a : α) : Iio (succ a) = insert a (Iio a)

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
[NoMaxOrder α]
(a : α)

Set.Iio (Order.succ a) = insert a (Set.Iio a)


theorem HasDerivWithinAt.congr_of_eventuallyEq_of_mem (h : HasDerivWithinAt f f' s x)
    (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : x ∈ s) : HasDerivWithinAt f₁ f' s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : 𝕜 → F}
{f' : F}
{x : 𝕜}
{s : Set 𝕜}
(h : HasDerivWithinAt f f' s x)
(h₁ : f₁ =ᶠ[𝓝[s] x] f)
(hx : x ∈ s)


/-- Build an isomorphism in the category `Module R` from a `LinearEquiv` between `Module`s. -/
@[simps]
def LinearEquiv.toModuleIso {g₁ : AddCommGroup X₁} {g₂ : AddCommGroup X₂} {m₁ : Module R X₁}
    {m₂ : Module R X₂} (e : X₁ ≃ₗ[R] X₂) : ModuleCat.of R X₁ ≅ ModuleCat.of R X₂

{R : Type u}
[Ring R]
{X₁ X₂ : Type v}
{g₁ : AddCommGroup X₁}
{g₂ : AddCommGroup X₂}
{m₁ : Module R X₁}
{m₂ : Module R X₂}
(e : X₁ ≃ₗ[R] X₂)


theorem sum_antidiagonal_succ {n : ℕ} {f : ℕ × ℕ → N} :
    (∑ p ∈ antidiagonal (n + 1), f p) = f (0, n + 1) + ∑ p ∈ antidiagonal n, f (p.1 + 1, p.2)

{N : Type u_2}
[AddCommMonoid N]
{n : ℕ}
{f : ℕ × ℕ → N}

∑ p ∈ Finset.antidiagonal (n + 1), f p = f (0, n + 1) + ∑ p ∈ Finset.antidiagonal n, f (p.1 + 1, p.2)


@[simp]
theorem lcs_succ : I.lcs M (k + 1) = ⁅I, I.lcs M k⁆

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)
(M : Type u_3)
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(k : ℕ)


theorem mul_eq_max_of_aleph0_le_right {a b : Cardinal} (h' : a ≠ 0) (h : ℵ₀ ≤ b) :
    a * b = max a b

{a b : Cardinal.{u_1}}
(h' : a ≠ 0)
(h : ℵ₀ ≤ b)


@[continuity, fun_prop]
theorem Continuous.prod_mk {f : Z → X} {g : Z → Y} (hf : Continuous f) (hg : Continuous g) :
    Continuous fun x => (f x, g x)

{X : Type u}
{Y : Type v}
{Z : Type u_1}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : Z → X}
{g : Z → Y}
(hf : Continuous f)
(hg : Continuous g)


{V : Type u_1}
[Quiver V]
{W : Type u_2}
(σ : V → W)


/-- This lemma is analogous to `Quotient.mk_out'`. -/
@[simp]
theorem out_proj (x : α) : hs.out (hs.proj x) = hs.some (hs.index x)

{ι : Type u_1}
{α : Type u_2}
{s : ι → Set α}
(hs : IndexedPartition s)
(x : α)


@[simp]
lemma cou_inter_self_right_eq_coe : A ∩ ↑D = ↑D


@[to_additive]
theorem isLUB_hasProd (h : ∀ i, 1 ≤ f i) (hf : HasProd f a) :
    IsLUB (Set.range fun s ↦ ∏ i ∈ s, f i) a

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

IsLUB (Set.range fun s => ∑ i ∈ s, f i) a


/-- If ∠ABC = π then dist C B ≠ 0. -/
theorem right_dist_ne_zero_of_angle_eq_pi {p1 p2 p3 : P} (h : ∠ p1 p2 p3 = π) : dist p3 p2 ≠ 0

(h : EuclideanGeometry.angle p1 p2 p3 = π)


/--
If `g` and `h` commute, then `g` fixes `(h ^ j) • x` iff `g` fixes `x`.
-/
@[to_additive "If `g` and `h` commute, then `g` fixes `(j • h) +ᵥ x` iff `g` fixes `x`."]
theorem smul_zpow_fixedBy_eq_of_commute {g h : G} (comm : Commute g h) (j : ℤ) :
    h ^ j • fixedBy α g = fixedBy α g

{α : Type u_1}
{G : Type u_2}
[Group G]
[MulAction G α]
{g h : G}
(comm : Commute g h)
(j : ℤ)

h ^ j • MulAction.fixedBy α g = MulAction.fixedBy α g


theorem ae (h : QuasiMeasurePreserving f μa μb) {p : β → Prop} (hg : ∀ᵐ x ∂μb, p x) :
    ∀ᵐ x ∂μa, p (f x)

(h : MeasureTheory.Measure.QuasiMeasurePreserving f μa μb)


theorem isCauSeq_im (f : CauSeq K norm) : IsCauSeq abs fun n => im (f n)

{K : Type u_1}
[RCLike K]
(f : CauSeq K norm)


theorem reindexGroupEquiv_apply_simple (i : B') :
    (M.reindexGroupEquiv e) ((M.reindex e).simple i) = M.simple (e.symm i)

{B : Type u_1}
{B' : Type u_2}
(M : CoxeterMatrix B)
(e : B ≃ B')
(i : B')

(M.reindexGroupEquiv e) ((CoxeterMatrix.reindex e M).simple i) = M.simple (e.symm i)


/-- Continuous linear maps between modules. We only put the type classes that are necessary for the
definition, although in applications `M` and `M₂` will be topological modules over the topological
ring `R`. -/
structure ContinuousLinearMap {R : Type*} {S : Type*} [Semiring R] [Semiring S] (σ : R →+* S)
    (M : Type*) [TopologicalSpace M] [AddCommMonoid M] (M₂ : Type*) [TopologicalSpace M₂]
    [AddCommMonoid M₂] [Module R M] [Module S M₂] extends M →ₛₗ[σ] M₂ where
  cont : Continuous toFun := by continuity

{R : Type u_1}
{S : Type u_2}
[Semiring R]
[Semiring S]
{σ : R →+* S}
{M : Type u_3}
[TopologicalSpace M]
[AddCommMonoid M]
{M₂ : Type u_4}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R M]
[Module S M₂]
(self : M →SL[σ] M₂)


@[simp]
theorem zero_prodMap_dualTensorHom (g : Module.Dual R N) (q : Q) :
    (0 : M →ₗ[R] P).prodMap ((dualTensorHom R N Q) (g ⊗ₜ[R] q)) =
      dualTensorHom R (M × N) (P × Q) ((g ∘ₗ snd R M N) ⊗ₜ inr R P Q q)

{R : Type u}
{M : Type v₁}
{N : Type v₂}
{P : Type v₃}
{Q : Type v₄}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
(g : Module.Dual R N)
(q : Q)

LinearMap.prodMap 0 ((dualTensorHom R N Q) (g ⊗ₜ[R] q)) =
  (dualTensorHom R (M × N) (P × Q)) ((g ∘ₗ LinearMap.snd R M N) ⊗ₜ[R] (LinearMap.inr R P Q) q)


@[to_additive (attr := simp)]
theorem compr₂_apply [MulOneClass M] [MulOneClass N] [CommMonoid P] [CommMonoid Q] (f : M →* N →* P)
    (g : P →* Q) (m : M) (n : N) : (compr₂ f g) m n = g (f m n)

{M : Type uM}
{N : Type uN}
{P : Type uP}
{Q : Type uQ}
[AddZeroClass M]
[AddZeroClass N]
[AddCommMonoid P]
[AddCommMonoid Q]
(f : M →+ N →+ P)
(g : P →+ Q)
(m : M)
(n : N)


theorem card_le_card_image₂_left {s : Finset α} (hs : s.Nonempty) (hf : ∀ a, Injective (f a)) :
    t.card ≤ (image₂ f s t).card

{f : α → β → γ}

(hf : ∀ (a : α), Function.Injective (f a))


theorem Indep.exists_base_superset (hI : M.Indep I) : ∃ B, M.Base B ∧ I ⊆ B

{α : Type u_1}
{M : Matroid α}
{I : Set α}
(hI : M.Indep I)


protected theorem map_sub (x y : E) : f (x - y) = f x - f y

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


protected lemma DirectedOn.isLUB_sSup : DirectedOn (· ≤ ·) d → IsLUB d (sSup d)

{α : Type u_2}
[CompletePartialOrder α]
{d : Set α}

DirectedOn (fun x x_1 => x ≤ x_1) d → IsLUB d (sSup d)


theorem cos_add_int_mul_two_pi (x : ℂ) (n : ℤ) : cos (x + n * (2 * π)) = cos x

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


theorem HasDerivAt.comp_hasFDerivWithinAt {f : E → 𝕜'} {f' : E →L[𝕜] 𝕜'} {s} (x)
    (hh : HasDerivAt h₂ h₂' (f x)) (hf : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (h₂ ∘ f) (h₂' • f') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{h₂ : 𝕜' → 𝕜'}
{h₂' : 𝕜'}
{f : E → 𝕜'}
{f' : E →L[𝕜] 𝕜'}
{s : Set E}
(x : E)
(hh : HasDerivAt h₂ h₂' (f x))
(hf : HasFDerivWithinAt f f' s x)


theorem sigmaIsoSigma_inv_apply {ι : Type v} (α : ι → TopCat.{max v u}) (i : ι) (x : α i) :
    (sigmaIsoSigma α).inv ⟨i, x⟩ = (Sigma.ι α i : _) x

{ι : Type v}
(α : ι → TopCat)
(i : ι)
(x : ↑(α i))

(TopCat.sigmaIsoSigma α).inv ⟨i, x⟩ = (CategoryTheory.Limits.Sigma.ι α i) x


theorem left_mem_Icc : a ∈ Icc a b ↔ a ≤ b

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}


/-- The terms of the sequence are nonzero. -/
theorem seq_ne_zero (n : ℕ) : algebraMap (𝓞 K) K (seq K w₁ hB n) ≠ 0

(hB : NumberField.mixedEmbedding.minkowskiBound K 1 < ↑(NumberField.mixedEmbedding.convexBodyLTFactor K) * ↑B)

(algebraMap (𝓞 K) K) ↑(NumberField.Units.dirichletUnitTheorem.seq K w₁ hB n) ≠ 0


@[simp]
theorem mem_filter {a : α} {s} : a ∈ filter p s ↔ a ∈ s ∧ p a

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


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

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


@[fun_prop]
theorem differentiableOn_apply (i : ι) (s' : Set (∀ i, F' i)) :
    DifferentiableOn (𝕜 := 𝕜) (fun f : ∀ i, F' i => f i) s'

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{ι : Type u_6}
[Fintype ι]
{F' : ι → Type u_7}
[(i : ι) → NormedAddCommGroup (F' i)]
[(i : ι) → NormedSpace 𝕜 (F' i)]
(i : ι)
(s' : Set ((i : ι) → F' i))


theorem subset_interior ⦃m n : ℕ⦄ (h : m < n) : K m ⊆ interior (K n)

{X : Type u_1}
[TopologicalSpace X]
(K : CompactExhaustion X)
⦃m n : ℕ⦄
(h : m < n)


theorem le_integralClosure_iff_isIntegral {S : Subalgebra R A} :
    S ≤ integralClosure R A ↔ Algebra.IsIntegral R S

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
{S : Subalgebra R A}

S ≤ integralClosure R A ↔ Algebra.IsIntegral R ↥S


theorem Pi.exists_forall_pos_add_lt [ExistsAddOfLE α] [Finite ι] {x y : ι → α}
    (h : ∀ i, x i < y i) : ∃ ε, 0 < ε ∧ ∀ i, x i + ε < y i

{α : Type u_1}
{ι : Type u_2}
[LinearOrderedCancelAddCommMonoid α]
[Nontrivial α]
[DenselyOrdered α]
[ExistsAddOfLE α]
[Finite ι]
{x y : ι → α}
(h : ∀ (i : ι), x i < y i)


protected theorem add_neg_of_neg_of_nonpos {a b : Int} (ha : a < 0) (hb : b ≤ 0) : a + b < 0


@[simp]
theorem leftUnitor_inv (X : C) : (λ_ X).inv = prod.lift (terminal.from X) (𝟙 _)

(CategoryTheory.MonoidalCategory.leftUnitor X).inv =
  CategoryTheory.Limits.prod.lift (CategoryTheory.Limits.terminal.from X) (CategoryTheory.CategoryStruct.id X)


theorem HasFiniteIntegral.neg {f : α → β} (hfi : HasFiniteIntegral f μ) :
    HasFiniteIntegral (-f) μ

(hfi : MeasureTheory.HasFiniteIntegral f μ)


/-- The product of `f i` over `i ∈ {a}` equals `f a`. -/
@[to_additive "The sum of `f i` over `i ∈ {a}` equals `f a`."]
theorem finprod_mem_singleton : (∏ᶠ i ∈ ({a} : Set α), f i) = f a

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{a : α}


@[simp] lemma norm_eq_zero (x : PUnit) : ‖x‖ = 0


lemma ofJ0_j [Invertible (3 : R)] : (ofJ0 R).j = 0

(R : Type u)
[CommRing R]
[Invertible 3]


lemma tendsto_measure_Icc [NoAtoms μ] (b : ℝ) :
    Tendsto (fun δ ↦ μ (Icc (b - δ) (b + δ))) (𝓝 (0 : ℝ)) (𝓝 0)

Filter.Tendsto (fun δ => μ (Set.Icc (b - δ) (b + δ))) (𝓝 0) (𝓝 0)


@[to_additive]
theorem Red.Step.lift {f : α → β} (H : Red.Step L₁ L₂) : Lift.aux f L₁ = Lift.aux f L₂

{α : Type u}
{L₁ L₂ : List (α × Bool)}
{β : Type v}
[Group β]
{f : α → β}
(H : FreeGroup.Red.Step L₁ L₂)

FreeGroup.Lift.aux f L₁ = FreeGroup.Lift.aux f L₂


/-- If `R` is a Noetherian ring and `M` is a finite `R`-module, then the natural map
given by `AdicCompletion.ofTensorProduct` is an isomorphism. -/
theorem ofTensorProduct_bijective_of_finite_of_isNoetherian [Module.Finite R M] :
    Function.Bijective (ofTensorProduct I M)

{R : Type u}
[CommRing R]
(I : Ideal R)
(M : Type u)
[AddCommGroup M]
[Module R M]
[IsNoetherianRing R]
[Module.Finite R M]

Function.Bijective ⇑(AdicCompletion.ofTensorProduct I M)


theorem MemBaseSet.mono' (I : Box ι) (h : l₁ ≤ l₂) (hc : c₁ ≤ c₂) {π : TaggedPrepartition I}
    (hr : ∀ J ∈ π, r₁ (π.tag J) ≤ r₂ (π.tag J)) (hπ : l₁.MemBaseSet I c₁ r₁ π) :
    l₂.MemBaseSet I c₂ r₂ π


@[simp]
theorem toNNReal_pow (a : ℝ≥0∞) (n : ℕ) : (a ^ n).toNNReal = a.toNNReal ^ n


theorem derivWithin.scomp_of_eq (hg : DifferentiableWithinAt 𝕜' g₁ t' y)
    (hh : DifferentiableWithinAt 𝕜 h s x) (hs : MapsTo h s t') (hxs : UniqueDiffWithinAt 𝕜 s x)
    (hy : y = h x) :
    derivWithin (g₁ ∘ h) s x = derivWithin h s x • derivWithin g₁ t' (h x)


theorem map_expand_pow_char (f : R[X]) (n : ℕ) :
    map (frobenius R p ^ n) (expand R (p ^ n) f) = f ^ p ^ n

{R : Type u}
[CommSemiring R]
(p : ℕ)
[ExpChar R p]
(f : R[X])
(n : ℕ)

Polynomial.map (frobenius R p ^ n) ((Polynomial.expand R (p ^ n)) f) = f ^ p ^ n


@[simp]
theorem symmDiff_sdiff_right : a ∆ b \ b = a \ b

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


@[simp] theorem some_get : ∀ {x : Option α} (h : isSome x), some (x.get h) = x

{α : Type u_1}
{x : Option α}
(h : x.isSome = true)


/-- The glue data associated with an open cover.
The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
@[simps]
def gluedCover : Scheme.GlueData.{u}

{X : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)


theorem lintegral_count' {f : α → ℝ≥0∞} (hf : Measurable f) : ∫⁻ a, f a ∂count = ∑' a, f a

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ≥0∞}
(hf : Measurable f)

∫⁻ (a : α), f a ∂MeasureTheory.Measure.count = ∑' (a : α), f a


protected theorem pow [Pow γ ℕ] [MeasurablePow γ ℕ] (h : IdentDistrib f g μ ν) {n : ℕ} :
    IdentDistrib (fun x => f x ^ n) (fun x => g x ^ n) μ ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

ProbabilityTheory.IdentDistrib (fun x => f x ^ n) (fun x => g x ^ n) μ ν


/-- The range of a function from a `Unique` type contains just the
function applied to its single value. -/
theorem range_unique [h : Unique ι] : range f = {f default}

{α : Type u_1}
{ι : Sort u_4}
{f : ι → α}
[h : Unique ι]


theorem hasColimitsOfShape_iff_isRightAdjoint_const :
    HasColimitsOfShape J C ↔ IsRightAdjoint (const J : C ⥤ _)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]

CategoryTheory.Limits.HasColimitsOfShape J C ↔ (CategoryTheory.Functor.const J).IsRightAdjoint


@[to_additive (attr := simp)]
theorem dist_mul_self_right (a b : E) : dist b (a * b) = ‖a‖

{E : Type u_3}
[SeminormedGroup E]
(a b : E)


@[continuity]
theorem continuous_uLift_down [TopologicalSpace X] : Continuous (ULift.down : ULift.{v, u} X → X)


structure Ref (σ : Type) (α : Type) : Type where
  ref : RefPointed.type
  h   : Nonempty α


theorem sdiff_singleton_eq_erase (a : α) (s : Finset α) : s \ singleton a = erase s a

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


@[simp]
theorem ker_id : (LieModuleHom.id : M →ₗ⁅R,L⁆ M).ker = ⊥

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]


protected theorem isIrrefl (f : r ↪r s) [IsIrrefl β s] : IsIrrefl α r

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ↪r s)
[IsIrrefl β s]


@[simp] lemma map₂_eq_top_iff {f : α → β → γ} {a : WithTop α} {b : WithTop β} :
    map₂ f a b = ⊤ ↔ a = ⊤ ∨ b = ⊤

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : α → β → γ}
{a : WithTop α}
{b : WithTop β}


@[simp]
theorem smul_bot (a : M) : a • (⊥ : Ideal R) = ⊥

{M : Type u_1}
{R : Type u_2}
[Monoid M]
[CommRing R]
[MulSemiringAction M R]
(a : M)


@[to_additive]
theorem NeBot.of_smul_right : (f • g).NeBot → g.NeBot

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{f : Filter α}
{g : Filter β}


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

{X Y : SemilatSupCat}
(a : SupBotHom X.X Y.X)

SemilatSupCat.dual.map a = SupBotHom.dual a


@[simp]
theorem bit1_bits (n : ℕ) : (2 * n + 1).bits = true :: n.bits


theorem crossing_pos_eq (hab : a < b) :
    upperCrossingTime 0 (b - a) (fun n ω => (f n ω - a)⁺) N n = upperCrossingTime a b f N n ∧
      lowerCrossingTime 0 (b - a) (fun n ω => (f n ω - a)⁺) N n = lowerCrossingTime a b f N n

{Ω : Type u_1}
{a b : ℝ}
{f : ℕ → Ω → ℝ}
{N n : ℕ}
(hab : a < b)

MeasureTheory.upperCrossingTime 0 (b - a) (fun n ω => (f n ω - a)⁺) N n = MeasureTheory.upperCrossingTime a b f N n ∧
  MeasureTheory.lowerCrossingTime 0 (b - a) (fun n ω => (f n ω - a)⁺) N n = MeasureTheory.lowerCrossingTime a b f N n


@[to_additive]
theorem haarContent_apply (K₀ : PositiveCompacts G) (K : Compacts G) :
    haarContent K₀ K = show NNReal from ⟨chaar K₀ K, chaar_nonneg _ _⟩

(K₀ : TopologicalSpace.PositiveCompacts G)

(fun s => ↑((MeasureTheory.Measure.haar.addHaarContent K₀).toFun s)) K =
  ↑(let_fun this := ⟨MeasureTheory.Measure.haar.addCHaar K₀ K, ⋯⟩;
    this)


/-- Given `u : α → β` a uniform inducing map, a family `𝓕 : ι → X → α` is equicontinuous at a point
`x₀ : X` within a subset `S : Set X` iff the family `𝓕'`, obtained by composing each function
of `𝓕` by `u`, is equicontinuous at `x₀` within `S`. -/
theorem UniformInducing.equicontinuousWithinAt_iff {F : ι → X → α} {S : Set X} {x₀ : X} {u : α → β}
    (hu : UniformInducing u) : EquicontinuousWithinAt F S x₀ ↔
      EquicontinuousWithinAt ((u ∘ ·) ∘ F) S x₀

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
{β : Type u_9}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
[uβ : UniformSpace β]
{F : ι → X → α}
{S : Set X}
{x₀ : X}
{u : α → β}
(hu : UniformInducing u)

EquicontinuousWithinAt F S x₀ ↔ EquicontinuousWithinAt ((fun x => u ∘ x) ∘ F) S x₀


@[simp]
theorem mem_top (x : R) : x ∈ (⊤ : Subsemiring R)

{R : Type u}
[NonAssocSemiring R]
(x : R)


@[to_additive]
theorem div_inter_subset : s / (t₁ ∩ t₂) ⊆ s / t₁ ∩ (s / t₂)

{α : Type u_2}
[Div α]
{s t₁ t₂ : Set α}


lemma iIndep.meas_iInter [Fintype ι] (h : iIndep m κ μ) (hs : ∀ i, MeasurableSet[m i] (s i)) :
    ∀ᵐ a ∂μ, κ a (⋂ i, s i) = ∏ i, κ a (s i)

(h : ProbabilityTheory.Kernel.iIndep m κ μ)

∀ᵐ (a : α) ∂μ, (κ a) (⋂ i, s i) = ∏ i : ι, (κ a) (s i)


/-- A bicategory is called `Strict` if the left unitors, the right unitors, and the associators are
isomorphisms given by equalities.
-/
class Bicategory.Strict : Prop where
  /-- Identity morphisms are left identities for composition. -/
  id_comp : ∀ {a b : B} (f : a ⟶ b), 𝟙 a ≫ f = f := by aesop_cat
  /-- Identity morphisms are right identities for composition. -/
  comp_id : ∀ {a b : B} (f : a ⟶ b), f ≫ 𝟙 b = f := by aesop_cat
  /-- Composition in a bicategory is associative. -/
  assoc : ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), (f ≫ g) ≫ h = f ≫ g ≫ h := by
    aesop_cat
  /-- The left unitors are given by equalities -/
  leftUnitor_eqToIso : ∀ {a b : B} (f : a ⟶ b), λ_ f = eqToIso (id_comp f) := by aesop_cat
  /-- The right unitors are given by equalities -/
  rightUnitor_eqToIso : ∀ {a b : B} (f : a ⟶ b), ρ_ f = eqToIso (comp_id f) := by aesop_cat
  /-- The associators are given by equalities -/
  associator_eqToIso :
    ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), α_ f g h = eqToIso (assoc f g h) := by
    aesop_cat

[self : CategoryTheory.Bicategory.Strict B]

CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id a) f = f


theorem isColimit_exists_of_rep_eq {D : Cocone F} {i j : J} (hD : IsColimit D)
    (x : F.obj i) (y : F.obj j) (h : D.ι.app _ x = D.ι.app _ y) :
    ∃ (k : _) (f : i ⟶ k) (g : j ⟶ k), F.map f x = F.map g y

[CategoryTheory.Limits.PreservesColimit F (CategoryTheory.forget C)]

(hD : CategoryTheory.Limits.IsColimit D)

(x : (CategoryTheory.forget C).obj (F.obj i))

(y : (CategoryTheory.forget C).obj (F.obj j))


@[to_additive (attr := simp, norm_cast)]
theorem toSubgroup_le : (U : Subgroup G) ≤ (V : Subgroup G) ↔ U ≤ V

{G : Type u_1}
[Group G]
[TopologicalSpace G]
{U V : OpenSubgroup G}

↑U ≤ ↑V ↔ U ≤ V


@[to_additive]
theorem MonoidHom.comp_apply [MulOneClass M] [MulOneClass N] [MulOneClass P]
    (g : N →* P) (f : M →* N) (x : M) : g.comp f x = g (f x)

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


lemma IsMeasurableRatCDF.measurable_stieltjesFunction (x : ℝ) :
    Measurable fun a ↦ hf.stieltjesFunction a x

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)

Measurable fun a => ↑(hf.stieltjesFunction a) x


theorem support_subset [DecidableEq ι] [DecidableEq M] (A : ι → S) (x : DirectSum ι fun i => A i) :
    (Function.support fun i => (x i : M)) ⊆ ↑(DFinsupp.support x)

{ι : Type v}
{M : Type u_1}
{S : Type u_2}
[AddCommMonoid M]
[SetLike S M]
[AddSubmonoidClass S M]
[DecidableEq ι]
[DecidableEq M]
(A : ι → S)
(x : DirectSum ι fun i => ↥(A i))

(Function.support fun i => ↑(x i)) ⊆ ↑(DFinsupp.support x)


lemma IsTopologicalBasis.subset_of_forall_subset {t : Set α} (hB : IsTopologicalBasis B)
    (hs : IsOpen s) (h : ∀ U ∈ B, U ⊆ s → U ⊆ t) : s ⊆ t

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

∀ {t_1 : Set α}, TopologicalSpace.IsTopologicalBasis B → IsOpen s → (∀ U ∈ B, U ⊆ s → U ⊆ t_1) → s ⊆ t_1


@[to_additive]
theorem inv {U : Set G} : U ∈ B → ∃ V ∈ B, V ⊆ (fun x ↦ x⁻¹) ⁻¹' U

{G : Type u}
[Group G]
{B : GroupFilterBasis G}
{U : Set G}

U ∈ B → ∃ V ∈ B, V ⊆ (fun x => x⁻¹) ⁻¹' U


theorem coeff_ne_zero_C {a : R} {n : ℕ} (h : n ≠ 0) : coeff R n (C R a) = 0

{R : Type u_1}
[Semiring R]
{a : R}
{n : ℕ}
(h : n ≠ 0)

(PowerSeries.coeff R n) ((PowerSeries.C R) a) = 0


/-- If `M / R` and `M' / R'` are modules, `i : R' → R` is a map which sends non-zero elements to
non-zero elements, `j : M →+ M'` is an injective group homomorphism, such that the scalar
multiplications on `M` and `M'` are compatible, then the rank of `M / R` is smaller than or equal to
the rank of `M' / R'`. As a special case, taking `R = R'` it is
`LinearMap.lift_rank_le_of_injective`. -/
theorem lift_rank_le_of_injective_injective (i : R' → R) (j : M →+ M')
    (hi : ∀ r, i r = 0 → r = 0) (hj : Injective j)
    (hc : ∀ (r : R') (m : M), j (i r • m) = r • j m) :
    lift.{v'} (Module.rank R M) ≤ lift.{v} (Module.rank R' M')

Cardinal.lift.{v', v} (Module.rank R M) ≤ Cardinal.lift.{v, v'} (Module.rank R' M')


/-- Converse of `TensorProduct.vanishesTrivially_of_sum_tmul_eq_zero_of_rTensor_injective`.

Assume that every expression $\sum_i m_i \otimes n_i$ which vanishes also vanishes trivially.
Then, for every submodule $M' \subseteq M$, the map $M' \otimes N \to M \otimes N$ is injective. -/
theorem rTensor_injective_of_forall_vanishesTrivially
    (hMN : ∀ {ι : Type u} [Fintype ι] {m : ι → M} {n : ι → N},
      ∑ i, m i ⊗ₜ n i = (0 : M ⊗[R] N) → VanishesTrivially R m n)
    (M' : Submodule R M) : Injective (rTensor N M'.subtype)

(hMN :
  ∀ {ι : Type u} [inst : Fintype ι] {m : ι → M} {n : ι → N},
    ∑ i : ι, m i ⊗ₜ[R] n i = 0 → TensorProduct.VanishesTrivially R m n)

Function.Injective ⇑(LinearMap.rTensor N M'.subtype)


theorem coordChange_linear_comp (i j k : ι) :
    ∀ x ∈ Z.baseSet i ∩ Z.baseSet j ∩ Z.baseSet k,
      (Z.coordChange j k x).comp (Z.coordChange i j x) = Z.coordChange i k x

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(Z : VectorBundleCore R B F ι)
(i j k : ι)
(x : B)

x ∈ Z.baseSet i ∩ Z.baseSet j ∩ Z.baseSet k → (Z.coordChange j k x).comp (Z.coordChange i j x) = Z.coordChange i k x


theorem mem_sup_right {S T : NonUnitalStarSubalgebra R A} : ∀ {x : A}, x ∈ T → x ∈ S ⊔ T

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
{S T : NonUnitalStarSubalgebra R A}
{x : A}


theorem eq_of_nonempty_of_subsingleton' {α} [Subsingleton α] {s : Set α} (t : Set α)
    (hs : s.Nonempty) [Nonempty t] : s = t

{α : Type u_1}
[Subsingleton α]
{s : Set α}
(t : Set α)
(hs : s.Nonempty)
[Nonempty ↑t]


theorem locallyConnectedSpace_iff_connected_subsets :
    LocallyConnectedSpace α ↔ ∀ (x : α), ∀ U ∈ 𝓝 x, ∃ V ∈ 𝓝 x, IsPreconnected V ∧ V ⊆ U


/-- The anti-equivalence between cosimplicial objects and simplicial objects. -/
@[simps!]
def cosimplicialSimplicialEquiv : (CosimplicialObject C)ᵒᵖ ≌ SimplicialObject Cᵒᵖ

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(X : SimplexCategoryᵒᵖ ⥤ Cᵒᵖ)

∀ (X_1 : SimplexCategoryᵒᵖ),
  ((CategoryTheory.cosimplicialSimplicialEquiv C).counitIso.hom.app X).app X_1 = 𝟙 (X.obj X_1)


/-- Cardinality of an `Ioo` of finsets. -/
theorem card_Ioo_finset (h : s ⊆ t) : (Ioo s t).card = 2 ^ (t.card - s.card) - 2

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

(Finset.Ioo s t).card = 2 ^ (t.card - s.card) - 2


theorem add_apply {s t : SummableFamily Γ R α} {a : α} : (s + t) a = s a + t a

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddCommMonoid R]
{α : Type u_3}
{s t : HahnSeries.SummableFamily Γ R α}
{a : α}


theorem leOfHom_homOfLE {x y : X} (h : x ≤ y) : h.hom.le = h

{X : Type u}
[Preorder X]
{x y : X}
(h : x ≤ y)


@[to_additive]
nonrec theorem IsUnit.measurable_const_smul_iff {c : M} (hc : IsUnit c) :
    (Measurable fun x => c • f x) ↔ Measurable f

{M : Type u_2}
{β : Type u_3}
{α : Type u_4}
[MeasurableSpace M]
[MeasurableSpace β]
[Monoid M]
[MulAction M β]
[MeasurableSMul M β]
[MeasurableSpace α]
{f : α → β}
{c : M}
(hc : IsUnit c)


@[ext] protected theorem PUnit.ext (x y : PUnit) : x = y


theorem le_of_comm {B : C} {X Y : Subobject B} (f : (X : C) ⟶ (Y : C)) (w : f ≫ Y.arrow = X.arrow) :
    X ≤ Y

(f : CategoryTheory.Subobject.underlying.obj X ⟶ CategoryTheory.Subobject.underlying.obj Y)

(w : CategoryTheory.CategoryStruct.comp f Y.arrow = X.arrow)


@[simp] theorem get?_eq_getElem? (a : Array α) (i : Nat) : a.get? i = a[i]?


/-- For coprime `a` and `b`, the power of `p` in `a * b` is the sum of the powers in `a` and `b` -/
theorem factorization_mul_of_coprime {a b : ℕ} (hab : Coprime a b) :
    (a * b).factorization = a.factorization + b.factorization


theorem symm_coe_proj {x : B} {y : F} (e' : Pretrivialization F (π F E)) (h : x ∈ e'.baseSet) :
    (e'.toPartialEquiv.symm (x, y)).1 = x

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


@[to_additive mem_addCentralizer]
lemma mem_centralizer_iff {c : M} : c ∈ centralizer S ↔ ∀ m ∈ S, m * c = c * m

{M : Type u_1}
{S : Set M}
[Add M]
{c : M}

c ∈ S.addCentralizer ↔ ∀ m ∈ S, m + c = c + m


protected lemma Connected.nonempty {H : G.Subgraph} (h : H.Connected) : H.verts.Nonempty

{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
(h : H.Connected)


theorem sup_eq_zero {a b : ℝ≥0∞} : a ⊔ b = 0 ↔ a = 0 ∧ b = 0


theorem wellFounded_of_noetherian [IsNoetherian R L] :
    WellFounded ((· > ·) : LieSubalgebra R L → LieSubalgebra R L → Prop)

(R : Type u)
(L : Type v)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[IsNoetherian R L]


theorem pred_lt_iff_is_succ {o} : pred o < o ↔ ∃ a, o = succ a


theorem eqvGen_rel_eq (r : R → R → Prop) : EqvGen (Rel r) = RingConGen.Rel r

{R : Type uR}
[Semiring R]
(r : R → R → Prop)

EqvGen (RingQuot.Rel r) = RingConGen.Rel r


/-- The embedding of a unital magma into its magma algebra. -/
@[simps]
def of [MulOneClass G] : G →* MonoidAlgebra k G

(k : Type u₁)
(G : Type u₂)
[Semiring k]
[MulOneClass G]
(a : G)

(MonoidAlgebra.of k G) a = MonoidAlgebra.single a 1


theorem add_le_mul_of_right_le_left [ZeroLEOneClass α] [NeZero (R := α) 1]
    [CovariantClass α α (· + ·) (· ≤ ·)] [PosMulStrictMono α]
    (b2 : 2 ≤ b) (ba : b ≤ a) : a + b ≤ a * b

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


@[simp]
theorem mapsTo_sInter {s : Set α} {T : Set (Set β)} {f : α → β} :
    MapsTo f s (⋂₀ T) ↔ ∀ t ∈ T, MapsTo f s t

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

Set.MapsTo f s (⋂₀ T) ↔ ∀ t ∈ T, Set.MapsTo f s t


theorem pmap_eq_map (p : α → Prop) (f : α → β) (x H) :
    @pmap _ _ p (fun a _ ↦ f a) x H = Option.map f x

{α : Type u_1}
{β : Type u_2}
(p : α → Prop)
(f : α → β)
(x : Option α)
(H : ∀ (a : α), a ∈ x → p a)

Option.pmap (fun a x => f a) x H = Option.map f x


theorem csInf_upper_bounds_eq_csSup {s : Set α} (h : BddAbove s) (hs : s.Nonempty) :
    sInf (upperBounds s) = sSup s

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
(h : BddAbove s)
(hs : s.Nonempty)


theorem iff_isSplitEpi_eq_zero {X Y : C} (f : X ⟶ Y) [IsSplitEpi f] : IsZero Y ↔ f = 0


theorem lt_add_one_iff_lt {x y : PartENat} (hx : x ≠ ⊤) : x < y + 1 ↔ x ≤ y


theorem injective_of_mono {G H : AddCommGrp.{0}} (f : G ⟶ H) [Mono f] : Function.Injective f

{G H : AddCommGrp}
(f : G ⟶ H)
[CategoryTheory.Mono f]


@[to_additive (attr := simp) sub_pos]
theorem one_lt_div' : 1 < a / b ↔ b < a

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


theorem edist_efixedPoint_le' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
    (hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
    edist x (efixedPoint' f hsc hsf hf x hxs hx) ≤ edist x (f x) / (1 - K)

(hf : ContractingWith K (Set.MapsTo.restrict f s s hsf))

edist x (ContractingWith.efixedPoint' f hsc hsf hf x hxs hx) ≤ edist x (f x) / (1 - ↑K)


theorem preimage_embedding [LE α] [LE β] {t : Set β} (ht : IsAntichain (· ≤ ·) t) (φ : α ↪o β) :
    IsAntichain (· ≤ ·) (φ ⁻¹' t)

(ht : IsAntichain (fun x x_1 => x ≤ x_1) t)

(φ : α ↪o β)

IsAntichain (fun x x_1 => x ≤ x_1) (⇑φ ⁻¹' t)


@[simp]
theorem multichoose_neg_succ (n : ℕ) : multichoose (-n : ℤ) (n + 1) = 0


@[simp]
theorem coe_re (z : ℍ) : (z : ℂ).re = z.re


protected theorem le_total (a b : ValueGroup A K) : a ≤ b ∨ b ≤ a

(A : Type u)
[CommRing A]
(K : Type v)
[Field K]
[Algebra A K]
[IsDomain A]
[ValuationRing A]
[IsFractionRing A K]
(a b : ValuationRing.ValueGroup A K)


theorem algebraicIndependent_empty_iff :
    AlgebraicIndependent R ((↑) : (∅ : Set A) → A) ↔ Injective (algebraMap R A)

(R : Type u_3)
(A : Type u_5)
[CommRing R]
[CommRing A]
[Algebra R A]

AlgebraicIndependent R Subtype.val ↔ Function.Injective ⇑(algebraMap R A)


lemma inv_eq_conj (hz : ‖z‖ = 1) : z⁻¹ = conj z


/-- If a partial homeomorphism has source and target equal to univ, then it induces a homeomorphism
between the whole spaces, expressed in this definition. -/
@[simps (config := mfld_cfg) apply symm_apply]
-- Porting note (#11215): TODO: add a `PartialEquiv` version
def toHomeomorphOfSourceEqUnivTargetEqUniv (h : e.source = (univ : Set X)) (h' : e.target = univ) :
    X ≃ₜ Y

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
(h : e.source = Set.univ)
(h' : e.target = Set.univ)

⇑(e.toHomeomorphOfSourceEqUnivTargetEqUniv h h') = ↑e


@[simp]
theorem sndHom_comp_map (f : M →ₗ[R'] N) :
    sndHom R' N ∘ₗ (map f).toLinearMap = f ∘ₗ sndHom R' M

{R' : Type u}
{M : Type v}
[CommSemiring R']
[AddCommMonoid M]
[Module R' M]
[Module R'ᵐᵒᵖ M]
[IsCentralScalar R' M]
{N : Type u_3}
[AddCommMonoid N]
[Module R' N]
[Module R'ᵐᵒᵖ N]
[IsCentralScalar R' N]
(f : M →ₗ[R'] N)

TrivSqZeroExt.sndHom R' N ∘ₗ (TrivSqZeroExt.map f).toLinearMap = f ∘ₗ TrivSqZeroExt.sndHom R' M


theorem le_iInf_mul_iInf {a : ℝ≥0} {g h : ι → ℝ≥0} (H : ∀ i j, a ≤ g i * h j) :
    a ≤ iInf g * iInf h

{ι : Sort u_1}
[Nonempty ι]
{a : ℝ≥0}
{g h : ι → ℝ≥0}
(H : ∀ (i j : ι), a ≤ g i * h j)


@[to_additive]
theorem le_mul_left (h : a ≤ c) : a ≤ b * c

{α : Type u}
[CanonicallyOrderedCommMonoid α]
{a b c : α}
(h : a ≤ c)


theorem isChain_of_trichotomous [IsTrichotomous α r] (s : Set α) : IsChain r s

{α : Type u_1}
{r : α → α → Prop}
[IsTrichotomous α r]
(s : Set α)


lemma IsPullback.mk (h : IsLimit sq.pullbackCone) : sq.IsPullback

(h : CategoryTheory.Limits.IsLimit sq.pullbackCone)


/-- Pointwise supremum of two monotone functions is a monotone function. -/
protected theorem sup [Preorder α] [SemilatticeSup β] {f g : α → β} (hf : Antitone f)
    (hg : Antitone g) :
    Antitone (f ⊔ g)

{α : Type u}
{β : Type v}
[Preorder α]
[SemilatticeSup β]
{f g : α → β}
(hf : Antitone f)
(hg : Antitone g)


theorem eq_of_irreducible [Nontrivial B] {p : A[X]} (hp1 : Irreducible p)
    (hp2 : Polynomial.aeval x p = 0) : p * C p.leadingCoeff⁻¹ = minpoly A x

{A : Type u_1}
{B : Type u_2}
[Field A]
[Ring B]
[Algebra A B]
{x : B}
[Nontrivial B]
{p : A[X]}
(hp1 : Irreducible p)
(hp2 : (Polynomial.aeval x) p = 0)

p * Polynomial.C p.leadingCoeff⁻¹ = minpoly A x


lemma setLIntegral_toKernel_Iic [IsFiniteKernel κ] (hf : IsCondKernelCDF f κ ν)
    (a : α) (x : ℝ) {s : Set β} (hs : MeasurableSet s) :
    ∫⁻ b in s, hf.toKernel f (a, b) (Iic x) ∂(ν a) = κ a (s ×ˢ Iic x)

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

(hf : ProbabilityTheory.IsCondKernelCDF f κ ν)

∫⁻ (b : β) in s, ((ProbabilityTheory.IsCondKernelCDF.toKernel f hf) (a, b)) (Set.Iic x) ∂ν a = (κ a) (s ×ˢ Set.Iic x)


theorem pow_div_pow_eventuallyEq_atTop {p q : ℕ} :
    (fun x : 𝕜 => x ^ p / x ^ q) =ᶠ[atTop] fun x => x ^ ((p : ℤ) - q)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{p q : ℕ}

(fun x => x ^ p / x ^ q) =ᶠ[Filter.atTop] fun x => x ^ (↑p - ↑q)


/-- `t ∈ ∂^k 𝒜` iff `t` is exactly `k` elements less than something in `𝒜`.

See also `Finset.mem_shadow_iterate_iff_exists_sdiff`. -/
lemma mem_shadow_iterate_iff_exists_mem_card_add :
    t ∈ ∂^[k] 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ s.card = t.card + k

{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{t : Finset α}
{k : ℕ}

t ∈ Finset.shadow^[k] 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ s.card = t.card + k


@[fun_prop]
nonrec theorem HasFDerivWithinAt.sub_const (hf : HasFDerivWithinAt f f' s x) (c : F) :
    HasFDerivWithinAt (fun x => f x - c) f' s x

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


/-- The nilpotency class of a subgroup is less or equal to the nilpotency class of the group -/
theorem Subgroup.nilpotencyClass_le (H : Subgroup G) [hG : IsNilpotent G] :
    Group.nilpotencyClass H ≤ Group.nilpotencyClass G

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

Group.nilpotencyClass ↥H ≤ Group.nilpotencyClass G


theorem le_caratheodory [MeasurableSpace X] [BorelSpace X] (hm : IsMetric μ) :
    ‹MeasurableSpace X› ≤ μ.caratheodory

{X : Type u_2}
[EMetricSpace X]
{μ : MeasureTheory.OuterMeasure X}
[MeasurableSpace X]
[BorelSpace X]
(hm : μ.IsMetric)


@[simp]
theorem eventually_smallSets_subset {s : Set α} : (∀ᶠ t in l.smallSets, t ⊆ s) ↔ s ∈ l

{α : Type u_1}
{l : Filter α}
{s : Set α}

(∀ᶠ (t : Set α) in l.smallSets, t ⊆ s) ↔ s ∈ l


theorem add_assoc_equiv {x y z : PGame} : x + y + z ≈ x + (y + z)


lemma IsCondKernel.isProbabilityMeasure [MeasurableSingletonClass α] {a : α} (ha : ρ.fst {a} ≠ 0) :
    IsProbabilityMeasure (ρCond a)

{α : Type u_1}
{Ω : Type u_3}
{mα : MeasurableSpace α}
{mΩ : MeasurableSpace Ω}
(ρ : MeasureTheory.Measure (α × Ω))
[MeasureTheory.IsFiniteMeasure ρ]
(ρCond : ProbabilityTheory.Kernel α Ω)
[ρ.IsCondKernel ρCond]
[MeasurableSingletonClass α]
{a : α}
(ha : ρ.fst {a} ≠ 0)


/-- If a compact set is included in a measurable set, then so is its closure. -/
@[to_additive (attr := deprecated IsCompact.closure_subset_measurableSet (since := "2024-01-28"))]
lemma _root_.IsCompact.closure_subset_of_measurableSet_of_group {k s : Set G}
    (hk : IsCompact k) (hs : MeasurableSet s) (h : k ⊆ s) : closure k ⊆ s

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{k s : Set G}
(hk : IsCompact k)
(hs : MeasurableSet s)
(h : k ⊆ s)


/-- A family of gluing data consists of
1. An index type `J`
2. A presheafed space `U i` for each `i : J`.
3. A presheafed space `V i j` for each `i j : J`.
  (Note that this is `J × J → PresheafedSpace C` rather than `J → J → PresheafedSpace C` to
  connect to the limits library easier.)
4. An open immersion `f i j : V i j ⟶ U i` for each `i j : ι`.
5. A transition map `t i j : V i j ⟶ V j i` for each `i j : ι`.
such that
6. `f i i` is an isomorphism.
7. `t i i` is the identity.
8. `V i j ×[U i] V i k ⟶ V i j ⟶ V j i` factors through `V j k ×[U j] V j i ⟶ V j i` via some
    `t' : V i j ×[U i] V i k ⟶ V j k ×[U j] V j i`.
9. `t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _`.

We can then glue the spaces `U i` together by identifying `V i j` with `V j i`, such
that the `U i`'s are open subspaces of the glued space.
-/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure GlueData extends GlueData (PresheafedSpace.{u, v, v} C) where
  f_open : ∀ i j, IsOpenImmersion (f i j)

(self : AlgebraicGeometry.PresheafedSpace.GlueData C)

AlgebraicGeometry.PresheafedSpace.IsOpenImmersion (self.f i j)


theorem leadingCoeff_div (hpq : q.degree ≤ p.degree) :
    (p / q).leadingCoeff = p.leadingCoeff / q.leadingCoeff

{R : Type u}
[Field R]
{p q : R[X]}
(hpq : q.degree ≤ p.degree)


theorem image_to_eq_image [HasImages V] [HasEqualizers V] {i j : ι} (r : c.Rel i j) :
    imageSubobject (C.dTo j) = imageSubobject (C.d i j)

CategoryTheory.Limits.imageSubobject (C.dTo j) = CategoryTheory.Limits.imageSubobject (C.d i j)


@[to_additive card_nsmul_add_sum]
theorem pow_card_mul_prod {b : β} : b ^ s.card * ∏ a ∈ s, f a = ∏ a ∈ s, b * f a

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f : α → β}
[AddCommMonoid β]
{b : β}

s.card • b + ∑ a ∈ s, f a = ∑ a ∈ s, (b + f a)


theorem carrier.zero_mem : (0 : A) ∈ carrier f_deg q

(q :
  ↑↑(AlgebraicGeometry.Spec.locallyRingedSpaceObj
          (CommRingCat.of (HomogeneousLocalization.Away 𝒜 f))).toPresheafedSpace)

0 ∈ AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier f_deg q


@[to_additive]
protected theorem one_smul (x : X[S⁻¹]) : (1 : R[S⁻¹]) • x = x

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[MulAction R X]
(x : OreLocalization S X)


protected theorem exists_measurableSet_indicator (hf : UnifTight f p μ) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ s, MeasurableSet s ∧ μ s < ∞ ∧ ∀ i, eLpNorm (sᶜ.indicator (f i)) p μ ≤ ε

{α : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f : ι → α → β}
{p : ENNReal}
(hf : MeasureTheory.UnifTight f p μ)
{ε : ENNReal}
(hε : ε ≠ 0)

∃ s, MeasurableSet s ∧ μ s < ⊤ ∧ ∀ (i : ι), MeasureTheory.eLpNorm (sᶜ.indicator (f i)) p μ ≤ ε


@[simp]
theorem toFinsupp_add [AddZeroClass M] [∀ m : M, Decidable (m ≠ 0)] (f g : Π₀ _ : ι, M) :
    (toFinsupp (f + g) : ι →₀ M) = toFinsupp f + toFinsupp g

{ι : Type u_1}
{M : Type u_3}
[DecidableEq ι]
[AddZeroClass M]
[(m : M) → Decidable (m ≠ 0)]
(f g : Π₀ (x : ι), M)

(f + g).toFinsupp = f.toFinsupp + g.toFinsupp


@[to_additive (attr := simp)]
theorem norm_one : norm (1 : FreeGroup α) = 0


/-- Given a finite-dimensional space `E` and subspace `K`, the dimensions of `K` and `Kᗮ` add to
that of `E`. -/
theorem Submodule.finrank_add_finrank_orthogonal' [FiniteDimensional 𝕜 E] {K : Submodule 𝕜 E}
    {n : ℕ} (h_dim : finrank 𝕜 K + n = finrank 𝕜 E) : finrank 𝕜 Kᗮ = n

(h_dim : FiniteDimensional.finrank 𝕜 ↥K + n = FiniteDimensional.finrank 𝕜 E)


theorem some_eq_natCast (n : ℕ) : some n = n


@[simp]
theorem map_subgraphOfAdj (f : G →g G') {v w : V} (hvw : G.Adj v w) :
    Subgraph.map f (G.subgraphOfAdj hvw) = G'.subgraphOfAdj (f.map_adj hvw)

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

SimpleGraph.Subgraph.map f (G.subgraphOfAdj hvw) = G'.subgraphOfAdj ⋯


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

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


/-- The forward direction of the equivalence from coalgebras for the product comonad to the over
category.
-/
@[simps]
def coalgebraToOver : Coalgebra (prodComonad X) ⥤ Over X

∀ {X_1 Y : (CategoryTheory.prodComonad X).Coalgebra} (f : X_1 ⟶ Y),
  (CategoryTheory.coalgebraToOver X).map f = CategoryTheory.Over.homMk f.f ⋯


theorem IsRelPrime.of_mul_right_left (H : IsRelPrime x (y * z)) : IsRelPrime x y

{α : Type u_1}
[CommMonoid α]
{x y z : α}
(H : IsRelPrime x (y * z))


/-- In the canonical isometric isomorphism between a Hilbert sum `E` of `G : ι → Type*` and
`lp G 2`, an "elementary basis vector" in `lp G 2` supported at `i : ι` is the image of the
associated element in `E`. -/
@[simp]
protected theorem IsHilbertSum.linearIsometryEquiv_symm_apply_single (hV : IsHilbertSum 𝕜 G V)
    {i : ι} (x : G i) : hV.linearIsometryEquiv.symm (lp.single 2 i x) = V i x

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[cplt : CompleteSpace E]
{G : ι → Type u_4}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
{V : (i : ι) → G i →ₗᵢ[𝕜] E}
(hV : IsHilbertSum 𝕜 G V)
{i : ι}
(x : G i)

hV.linearIsometryEquiv.symm (lp.single 2 i x) = (V i) x


theorem reindexLinearEquiv_one [DecidableEq m] [DecidableEq m'] [One A] (e : m ≃ m') :
    reindexLinearEquiv R A e e (1 : Matrix m m A) = 1

{m : Type u_2}
{m' : Type u_6}
(R : Type u_11)
(A : Type u_12)
[Semiring R]
[AddCommMonoid A]
[Module R A]
[DecidableEq m]
[DecidableEq m']
[One A]
(e : m ≃ m')

(Matrix.reindexLinearEquiv R A e e) 1 = 1


@[simp, norm_cast]
theorem coe_comap (S : StarSubalgebra R B) (f : A →⋆ₐ[R] B) :
    (S.comap f : Set A) = f ⁻¹' (S : Set B)

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[Semiring B]
[StarRing B]
[Algebra R B]
[StarModule R B]
(S : StarSubalgebra R B)
(f : A →⋆ₐ[R] B)


/-- Embed `Fin n` into `Fin (n + 1)` by appending a new `Fin.last n` to the `univ` -/
theorem Fin.univ_castSuccEmb (n : ℕ) :
    (univ : Finset (Fin (n + 1))) =
      Finset.cons (Fin.last n) (univ.map Fin.castSuccEmb) (by simp [map_eq_image])

Finset.univ = Finset.cons (Fin.last n) (Finset.map Fin.castSuccEmb Finset.univ) ⋯


@[simp] lemma disjoint_primeFactors (ha : a ≠ 0) (hb : b ≠ 0) :
    Disjoint a.primeFactors b.primeFactors ↔ Coprime a b

Disjoint a.primeFactors b.primeFactors ↔ a.Coprime b


theorem and_forall_ne (a : α) : (p a ∧ ∀ b, b ≠ a → p b) ↔ ∀ b, p b

(p a ∧ ∀ (b : α), b ≠ a → p b) ↔ ∀ (b : α), p b


lemma ext_from_X (i j : ι) (hij : c.Rel j i) {A : C} {f g : X φ j ⟶ A}
    (h₁ : inlX φ i j hij ≫ f = inlX φ i j hij ≫ g) (h₂ : inrX φ j ≫ f = inrX φ j ≫ g) :
    f = g

{f g : HomologicalComplex.homotopyCofiber.X φ j ⟶ A}

(h₁ : HomologicalComplex.homotopyCofiber.inlX φ i j hij ≫ f = HomologicalComplex.homotopyCofiber.inlX φ i j hij ≫ g)

(h₂ : HomologicalComplex.homotopyCofiber.inrX φ j ≫ f = HomologicalComplex.homotopyCofiber.inrX φ j ≫ g)


/-- If `F` has odd characteristic, then `quadraticChar F` takes the value `-1` on some unit. -/
lemma quadraticChar_exists_neg_one' (hF : ringChar F ≠ 2) : ∃ a : Fˣ, quadraticChar F a = -1

{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
(hF : ringChar F ≠ 2)


/--
The categories of coherent sheaves and extensive sheaves on `C` are equivalent if `C` is
preregular, finitary extensive, and every object is projective.
-/
@[simps]
def coherentExtensiveEquivalence [Preregular C] [FinitaryExtensive C] [∀ (X : C), Projective X] :
    Sheaf (coherentTopology C) A ≌ Sheaf (extensiveTopology C) A

[∀ (X : C), CategoryTheory.Projective X]

∀ {X Y : CategoryTheory.Sheaf (CategoryTheory.coherentTopology C) A} (f : X ⟶ Y),
  (CategoryTheory.Presheaf.coherentExtensiveEquivalence.functor.map f).val = f.val


theorem ncard_image_of_injOn (H : Set.InjOn f s) : (f '' s).ncard = s.ncard

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


theorem cos_neg_of_pi_div_two_lt_of_lt {x : ℝ} (hx₁ : π / 2 < x) (hx₂ : x < π + π / 2) :
    cos x < 0

{x : ℝ}
(hx₁ : Real.pi / 2 < x)
(hx₂ : x < Real.pi + Real.pi / 2)


/-- If `C.d i j` and `C.d i j'` are both allowed, then we must have `j = j'`,
and so the differentials only differ by an `eqToHom`.
-/
theorem d_comp_eqToHom {i j j' : ι} (rij : c.Rel i j) (rij' : c.Rel i j') :
    C.d i j' ≫ eqToHom (congr_arg C.X (c.next_eq rij' rij)) = C.d i j

C.d i j' ≫ CategoryTheory.eqToHom ⋯ = C.d i j


@[simp]
theorem id_comp (f : A →⋆ₙ+* B) : (NonUnitalStarRingHom.id _).comp f = f

{A : Type u_1}
{B : Type u_2}
[NonUnitalNonAssocSemiring A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Star B]
(f : A →⋆ₙ+* B)


@[simp]
theorem lastFun_prod {α α' β β' : TypeVec (n + 1)} (f : α ⟹ β) (f' : α' ⟹ β') :
    lastFun (f ⊗' f') = Prod.map (lastFun f) (lastFun f')

{n : ℕ}
{α α' β β' : TypeVec.{u_1} (n + 1)}
(f : α.Arrow β)
(f' : α'.Arrow β')

TypeVec.lastFun (TypeVec.prod.map f f') = Prod.map (TypeVec.lastFun f) (TypeVec.lastFun f')


/-- Constructor for short complexes in `ModuleCat.{v} R` taking as inputs
linear maps `f` and `g` and the vanishing of their composition. -/
@[simps]
def moduleCatMk {X₁ X₂ X₃ : Type v} [AddCommGroup X₁] [AddCommGroup X₂] [AddCommGroup X₃]
    [Module R X₁] [Module R X₂] [Module R X₃] (f : X₁ →ₗ[R] X₂) (g : X₂ →ₗ[R] X₃)
    (hfg : g.comp f = 0) : ShortComplex (ModuleCat.{v} R)

{R : Type u}
[Ring R]
{X₁ X₂ X₃ : Type v}
[AddCommGroup X₁]
[AddCommGroup X₂]
[AddCommGroup X₃]
[Module R X₁]
[Module R X₂]
[Module R X₃]
(f : X₁ →ₗ[R] X₂)
(g : X₂ →ₗ[R] X₃)
(hfg : g ∘ₗ f = 0)

(CategoryTheory.ShortComplex.moduleCatMk f g hfg).X₁ = ModuleCat.of R X₁


private
lemma exists_eval_ne_zero_of_totalDegree_le_card_aux {N : ℕ} {F : MvPolynomial (Fin N) R} {n : ℕ}
    (hF : F.IsHomogeneous n) (hF₀ : F ≠ 0) (hnR : n ≤ #R) :
    ∃ r, eval r F ≠ 0

{R : Type u_5}
[CommRing R]
[IsDomain R]
{N : ℕ}
{F : MvPolynomial (Fin N) R}
{n : ℕ}
(hF : F.IsHomogeneous n)
(hF₀ : F ≠ 0)
(hnR : ↑n ≤ Cardinal.mk R)


theorem get?_eq_data_get? (a : Array α) (i : Nat) : a.get? i = a.data.get? i


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

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


@[gcongr]
theorem toNNReal_mono (hb : b ≠ ∞) (h : a ≤ b) : a.toNNReal ≤ b.toNNReal


theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z


protected theorem congr_arg {x x' : M} : x = x' → f x = f x'

{R : Type u_1}
{S : Type u_6}
{M : Type u_9}
{M₃ : Type u_12}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₃]
[Module R M]
[Module S M₃]
{σ : R →+* S}
{f : M →ₛₗ[σ] M₃}
{x x' : M}


theorem pi_closedBall [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (hr : 0 ≤ r) :
    Measure.pi μ (Metric.closedBall x r) = ∏ i, μ i (Metric.closedBall (x i) r)

(μ : (i : ι) → MeasureTheory.Measure (α i))

[∀ (i : ι), MeasureTheory.SigmaFinite (μ i)]

(MeasureTheory.Measure.pi μ) (Metric.closedBall x r) = ∏ i : ι, (μ i) (Metric.closedBall (x i) r)


nonrec theorem sinh_three_mul : sinh (3 * x) = 4 * sinh x ^ 3 + 3 * sinh x

Real.sinh (3 * x) = 4 * Real.sinh x ^ 3 + 3 * Real.sinh x


@[simp]
theorem coe_id_orderHom : (PseudoEpimorphism.id α : α →o α) = OrderHom.id


@[simp]
theorem div_one {I : FractionalIdeal R₁⁰ K} : I / 1 = I

{R₁ : Type u_3}
[CommRing R₁]
{K : Type u_4}
[Field K]
[Algebra R₁ K]
[frac : IsFractionRing R₁ K]
[IsDomain R₁]
{I : FractionalIdeal R₁⁰ K}


@[simp]
theorem coeff_eq_c : P.toPoly.coeff 1 = P.c

{R : Type u_1}
{P : Cubic R}
[Semiring R]


@[simp]
theorem re_sum (f : α → ℂ) : (∑ i ∈ s, f i).re = ∑ i ∈ s, (f i).re

{α : Type u_1}
(s : Finset α)
(f : α → ℂ)


theorem succ_sub_sub_succ (n m k) : succ n - m - succ k = n - m - k


theorem Integrable.mono {f : α → β} {g : α → γ} (hg : Integrable g μ)
    (hf : AEStronglyMeasurable f μ) (h : ∀ᵐ a ∂μ, ‖f a‖ ≤ ‖g a‖) : Integrable f μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)


/-- Binary **rearrangement inequality**. -/
lemma mul_add_mul_le_mul_add_mul [ExistsAddOfLE α] [MulPosMono α]
    [CovariantClass α α (· + ·) (· ≤ ·)] [ContravariantClass α α (· + ·) (· ≤ ·)]
    (hab : a ≤ b) (hcd : c ≤ d) : a * d + b * c ≤ a * c + b * d

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

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


@[simp]
theorem bot_ne_zero : (⊥ : EReal) ≠ 0


theorem integralSum_sub_partitions (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F)
    {π₁ π₂ : TaggedPrepartition I} (h₁ : π₁.IsPartition) (h₂ : π₂.IsPartition) :
    integralSum f vol π₁ - integralSum f vol π₂ =
      ∑ J ∈ (π₁.toPrepartition ⊓ π₂.toPrepartition).boxes,
        (vol J (f <| (π₁.infPrepartition π₂.toPrepartition).tag J) -
          vol J (f <| (π₂.infPrepartition π₁.toPrepartition).tag J))

{π₁ π₂ : BoxIntegral.TaggedPrepartition I}

BoxIntegral.integralSum f vol π₁ - BoxIntegral.integralSum f vol π₂ =
  ∑ J ∈ (π₁.toPrepartition ⊓ π₂.toPrepartition).boxes,
    ((vol J) (f ((π₁.infPrepartition π₂.toPrepartition).tag J)) -
      (vol J) (f ((π₂.infPrepartition π₁.toPrepartition).tag J)))


theorem extChartAt_source_mem_nhdsWithin (x : M) : (extChartAt I x).source ∈ 𝓝[s] x

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
{s : Set M}
[ChartedSpace H M]
(x : M)


theorem gauge_smul_left_of_nonneg [MulActionWithZero α E] [SMulCommClass α ℝ ℝ]
    [IsScalarTower α ℝ ℝ] [IsScalarTower α ℝ E] {s : Set E} {a : α} (ha : 0 ≤ a) :
    gauge (a • s) = a⁻¹ • gauge s

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{α : Type u_4}
[LinearOrderedField α]
[MulActionWithZero α ℝ]
[OrderedSMul α ℝ]
[MulActionWithZero α E]
[SMulCommClass α ℝ ℝ]
[IsScalarTower α ℝ ℝ]
[IsScalarTower α ℝ E]
{s : Set E}
{a : α}
(ha : 0 ≤ a)


@[simp]
theorem multispan_map_fst (a) : I.multispan.map (WalkingMultispan.Hom.fst a) = I.fst a

(I : CategoryTheory.Limits.MultispanIndex C)

I.multispan.map (CategoryTheory.Limits.WalkingMultispan.Hom.fst a) = I.fst a


theorem pow_dvd_of_squarefree_of_pow_succ_dvd_mul_left {k : ℕ}
    (hy : Squarefree y) (hp : Prime p) (h : p ^ (k + 1) ∣ x * y) :
    p ^ k ∣ x

{R : Type u_1}
[CancelCommMonoidWithZero R]
{x y p : R}
{k : ℕ}
(hy : Squarefree y)
(hp : Prime p)
(h : p ^ (k + 1) ∣ x * y)


@[to_additive]
theorem nnnorm_prod_le_of_le (s : Finset ι) {f : ι → E} {n : ι → ℝ≥0} (h : ∀ b ∈ s, ‖f b‖₊ ≤ n b) :
    ‖∏ b ∈ s, f b‖₊ ≤ ∑ b ∈ s, n b

{ι : Type u_4}
{E : Type u_6}
[SeminormedAddCommGroup E]
(s : Finset ι)
{f : ι → E}
{n : ι → ℝ≥0}
(h : ∀ b ∈ s, ‖f b‖₊ ≤ n b)


@[simp] lemma coe_norm [Algebra.IsSeparable K L] (x : 𝓞 L) :
  norm K x = Algebra.norm K (x : L)

{L : Type u_1}
(K : Type u_2)
[Field K]
[Field L]
[Algebra K L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
(x : 𝓞 L)

↑((RingOfIntegers.norm K) x) = (Algebra.norm K) ↑x


/--
If the image of the `(fixedBy α g)ᶜ` set by the pointwise action of `h: G`
is disjoint from `(fixedBy α g)ᶜ`, then `g` and `h` cannot commute.
-/
@[to_additive "If the image of the `(fixedBy α g)ᶜ` set by the pointwise action of `h: G`
is disjoint from `(fixedBy α g)ᶜ`, then `g` and `h` cannot commute."]
theorem not_commute_of_disjoint_movedBy_preimage {g h : G} (ne_one : g ≠ 1)
    (disjoint : Disjoint (fixedBy α g)ᶜ (h • (fixedBy α g)ᶜ)) : ¬Commute g h

(disjoint : Disjoint (AddAction.fixedBy α g)ᶜ (h +ᵥ (AddAction.fixedBy α g)ᶜ))


@[simp]
theorem natTrailingDegree_intCast (n : ℤ) : natTrailingDegree (n : R[X]) = 0


theorem QuasiconcaveOn.inf [SemilatticeInf β] (hf : QuasiconcaveOn 𝕜 s f)
    (hg : QuasiconcaveOn 𝕜 s g) : QuasiconcaveOn 𝕜 s (f ⊓ g)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{s : Set E}
{f g : E → β}
[SemilatticeInf β]
(hf : QuasiconcaveOn 𝕜 s f)
(hg : QuasiconcaveOn 𝕜 s g)


theorem map_mono {S₁ S₂ : Subalgebra R A} {f : A →ₐ[R] B} : S₁ ≤ S₂ → S₁.map f ≤ S₂.map f

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
{S₁ S₂ : Subalgebra R A}
{f : A →ₐ[R] B}

S₁ ≤ S₂ → Subalgebra.map f S₁ ≤ Subalgebra.map f S₂


/-- If `m₁ d ≤ m₂ d` for `d < ε` for some `ε > 0` (we use `≤ᶠ[𝓝[≥] 0]` to state this), then
`mkMetric m₁ hm₁ ≤ mkMetric m₂ hm₂`. -/
theorem mkMetric_mono {m₁ m₂ : ℝ≥0∞ → ℝ≥0∞} (hle : m₁ ≤ᶠ[𝓝[≥] 0] m₂) :
    (mkMetric m₁ : OuterMeasure X) ≤ mkMetric m₂

{X : Type u_2}
[EMetricSpace X]
{m₁ m₂ : ℝ≥0∞ → ℝ≥0∞}
(hle : m₁ ≤ᶠ[𝓝[≥] 0] m₂)

MeasureTheory.OuterMeasure.mkMetric m₁ ≤ MeasureTheory.OuterMeasure.mkMetric m₂


theorem StrictConvex.eq_of_openSegment_subset_frontier [Nontrivial 𝕜] [DenselyOrdered 𝕜]
    (hs : StrictConvex 𝕜 s) (hx : x ∈ s) (hy : y ∈ s) (h : openSegment 𝕜 x y ⊆ frontier s) :
    x = y

{𝕜 : Type u_1}
{E : Type u_3}
[OrderedRing 𝕜]
[TopologicalSpace E]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
{x y : E}
[Nontrivial 𝕜]
[DenselyOrdered 𝕜]
(hs : StrictConvex 𝕜 s)
(hx : x ∈ s)
(hy : y ∈ s)
(h : openSegment 𝕜 x y ⊆ frontier s)


protected lemma _root_.IsCompact.everywherePosSubset (hs : IsCompact s) :
    IsCompact (μ.everywherePosSubset s)

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : IsCompact s)


theorem zmultiples_zsmul_eq_zsmul_iff {ψ θ : R ⧸ AddSubgroup.zmultiples p} {z : ℤ} (hz : z ≠ 0) :
    z • ψ = z • θ ↔ ∃ k : Fin z.natAbs, ψ = θ + ((k : ℕ) • (p / z) : R)

{R : Type u_1}
[DivisionRing R]
[CharZero R]
{p : R}
{ψ θ : R ⧸ AddSubgroup.zmultiples p}
{z : ℤ}
(hz : z ≠ 0)

z • ψ = z • θ ↔ ∃ k, ψ = θ + ↑(↑k • (p / ↑z))


@[simp]
theorem map_id (S : Subalgebra R A) : S.map (AlgHom.id R A) = S

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


@[simp]
theorem preimage_neg_Icc : -Icc a b = Icc (-b) (-a)

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


lemma coeffs_one : coeffs (1 : MvPolynomial σ R) ⊆ {1}

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


theorem get_drop_eq_drop (as : List α) (i : Nat) (h : i < as.length) : as[i] :: as.drop (i+1) = as.drop i

{α : Type u_1}
(as : List α)
(i : Nat)
(h : i < as.length)

getElem as i h :: List.drop (i + 1) as = List.drop i as


/-- If `f : α → β` sends the measure `μa` to `μb` and `g : γ → δ` sends the measure `μc` to `μd`,
then `Prod.map f g` sends `μa.prod μc` to `μb.prod μd`. -/
protected theorem prod [SFinite μa] [SFinite μc] {f : α → β} {g : γ → δ}
    (hf : MeasurePreserving f μa μb) (hg : MeasurePreserving g μc μd) :
    MeasurePreserving (Prod.map f g) (μa.prod μc) (μb.prod μd)

(hf : MeasureTheory.MeasurePreserving f μa μb)

(hg : MeasureTheory.MeasurePreserving g μc μd)

MeasureTheory.MeasurePreserving (Prod.map f g) (μa.prod μc) (μb.prod μd)


@[simp]
lemma rightHomologyMap_sub :
    rightHomologyMap (φ - φ') = rightHomologyMap φ - rightHomologyMap φ'

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(φ φ' : S₁ ⟶ S₂)
[S₁.HasRightHomology]
[S₂.HasRightHomology]

CategoryTheory.ShortComplex.rightHomologyMap (φ - φ') =
  CategoryTheory.ShortComplex.rightHomologyMap φ - CategoryTheory.ShortComplex.rightHomologyMap φ'


/-- The 1-hypercover of `D.glued` in the big Zariski site that is given by the
open cover `D.U` from the glue data `D`.
The "covering of the intersection of two such open subsets" is the trivial
covering given by `D.V`. -/
@[simps]
noncomputable def oneHypercover : Scheme.zariskiTopology.OneHypercover D.glued

(D : AlgebraicGeometry.Scheme.GlueData)
(i : D.J)


theorem mem_interior_iff [TopologicalSpace α] (F : Realizer α) {s : Set α} {a : α} :
    a ∈ interior s ↔ ∃ b, a ∈ F.F b ∧ F.F b ⊆ s

{α : Type u_1}
[TopologicalSpace α]
(F : Ctop.Realizer α)
{s : Set α}
{a : α}

a ∈ interior s ↔ ∃ b, a ∈ F.F.f b ∧ F.F.f b ⊆ s


theorem mul_sub_left_distrib (a b c : α) : a * (b - c) = a * b - a * c

{α : Type u}
[NonUnitalNonAssocRing α]
(a b c : α)


/-- A group is finitely generated if and only if it is finitely generated as a monoid. -/
@[to_additive "An additive group is finitely generated if and only
if it is finitely generated as an additive monoid."]
theorem Group.fg_iff_monoid_fg : Group.FG G ↔ Monoid.FG G


theorem fderivWithin_cosh (hf : DifferentiableWithinAt ℝ f s x) (hxs : UniqueDiffWithinAt ℝ s x) :
    fderivWithin ℝ (fun x => Real.cosh (f x)) s x = Real.sinh (f x) • fderivWithin ℝ f s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{s : Set E}
(hf : DifferentiableWithinAt ℝ f s x)
(hxs : UniqueDiffWithinAt ℝ s x)


/-- `FractionalIdeal.mul` is the product of two fractional ideals,
used to define the `Mul` instance.

This is only an auxiliary definition: the preferred way of writing `I.mul J` is `I * J`.

Elaborated terms involving `FractionalIdeal` tend to grow quite large,
so by making definitions irreducible, we hope to avoid deep unfolds.
-/
irreducible_def mul (lemma := mul_def') (I J : FractionalIdeal S P) : FractionalIdeal S P

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


theorem Filter.HasBasis.mem_uniformity_iff {p : β → Prop} {s : β → Set (α × α)}
    (h : (𝓤 α).HasBasis p s) {t : Set (α × α)} :
    t ∈ 𝓤 α ↔ ∃ i, p i ∧ ∀ a b, (a, b) ∈ s i → (a, b) ∈ t

{α : Type ua}
{β : Type ub}
[UniformSpace α]
{p : β → Prop}
{s : β → Set (α × α)}
(h : (𝓤 α).HasBasis p s)
{t : Set (α × α)}

t ∈ 𝓤 α ↔ ∃ i, p i ∧ ∀ (a b : α), (a, b) ∈ s i → (a, b) ∈ t


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

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


/-- Let `X` and `Y` be R₁ topological spaces
with Borel σ-algebras and measures `μ` and `ν`, respectively.
Suppose that `μ` is inner regular for finite measure sets with respect to compact sets
and `ν` is a locally finite measure.
Let `1 ≤ p < ∞` be an extended nonnegative real number.
Then the composition of a function `g : Lp E p ν`
and a measure preserving continuous function `f : C(X, Y)`
is continuous in both variables. -/
theorem compMeasurePreserving_continuous (hp : p ≠ ∞) :
    Continuous fun gf : Lp E p ν × {f : C(X, Y) // MeasurePreserving f μ ν} ↦
      compMeasurePreserving gf.2.1 gf.2.2 gf.1

Continuous fun gf => (MeasureTheory.Lp.compMeasurePreserving ⇑↑gf.2 ⋯) gf.1


theorem snd_pow_of_smul_comm' [Monoid R] [AddMonoid M] [DistribMulAction R M]
    [DistribMulAction Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] (x : tsze R M) (n : ℕ)
    (h : x.snd <• x.fst = x.fst •> x.snd) : snd (x ^ n) = n • (x.snd <• x.fst ^ n.pred)

{R : Type u}
{M : Type v}
[Monoid R]
[AddMonoid M]
[DistribMulAction R M]
[DistribMulAction Rᵐᵒᵖ M]
[SMulCommClass R Rᵐᵒᵖ M]
(x : tsze R M)
(n : ℕ)
(h : x.snd <• x.fst = x.fst •> x.snd)

(x ^ n).snd = n •> (x.snd <• x.fst ^ n.pred)


theorem fourierChar_apply (x : ℝ) : 𝐞 x = Complex.exp (↑(2 * π * x) * Complex.I)

↑(Real.fourierChar x) = Complex.exp (↑(2 * π * x) * Complex.I)


theorem mdifferentiableWithinAt_snd {s : Set (M × M')} {x : M × M'} :
    MDifferentiableWithinAt (I.prod I') I' Prod.snd s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H')
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
{s : Set (M × M')}
{x : M × M'}


@[simp] lemma mapEmbedding_base_iff {f : α ↪ β} {B : Set β} :
    (M.mapEmbedding f).Base B ↔ M.Base (f ⁻¹' B) ∧ B ⊆ range f

{α : Type u_1}
{β : Type u_2}
{M : Matroid α}
{f : α ↪ β}
{B : Set β}

(M.mapEmbedding f).Base B ↔ M.Base (⇑f ⁻¹' B) ∧ B ⊆ Set.range ⇑f


theorem hasBasis_pi {ι' : ι → Type} {s : ∀ i, ι' i → Set (α i)} {p : ∀ i, ι' i → Prop}
    (h : ∀ i, (f i).HasBasis (p i) (s i)) :
    (pi f).HasBasis (fun If : Set ι × ∀ i, ι' i => If.1.Finite ∧ ∀ i ∈ If.1, p i (If.2 i))
      fun If : Set ι × ∀ i, ι' i => If.1.pi fun i => s i <| If.2 i

(h : ∀ (i : ι), (f i).HasBasis (p i) (s i))

(Filter.pi f).HasBasis (fun If => If.1.Finite ∧ ∀ i ∈ If.1, p i (If.2 i)) fun If => If.1.pi fun i => s i (If.2 i)


/-- **Cauchy-Goursat theorem** for a disk: if `f : ℂ → E` is continuous on a closed disk
`{z | ‖z - c‖ ≤ R}` and is complex differentiable at all but countably many points of its interior,
then the integral $\oint_{|z-c|=R}f(z)\,dz$ equals zero. -/
theorem circleIntegral_eq_zero_of_differentiable_on_off_countable {R : ℝ} (h0 : 0 ≤ R) {f : ℂ → E}
    {c : ℂ} {s : Set ℂ} (hs : s.Countable) (hc : ContinuousOn f (closedBall c R))
    (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) : (∮ z in C(c, R), f z) = 0

(hc : ContinuousOn f (Metric.closedBall c R))

(hd : ∀ z ∈ Metric.ball c R \ s, DifferentiableAt ℂ f z)


lemma CFC.eq_algebraMap_of_spectrum_subset_singleton (r : R) (h_spec : spectrum R a ⊆ {r})
    (ha : p a := by cfc_tac) : a = algebraMap R A r

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


@[simp] theorem coprodᵢ_bot' : Filter.coprodᵢ (⊥ : ∀ i, Filter (α i)) = ⊥


theorem lt_six {r : ℕ+} (H : 1 < sumInv {2, 3, r}) : r < 6

(H : 1 < ADEInequality.sumInv {2, 3, r})


@[simp]
theorem digits_inj_iff {b n m : ℕ} : b.digits n = b.digits m ↔ n = m


lemma IsRatCondKernelCDFAux.bddBelow_range (hf : IsRatCondKernelCDFAux f κ ν) (a : α) :
    ∀ᵐ t ∂(ν a), ∀ q : ℚ, BddBelow (range fun (r : Ioi q) ↦ f (a, t) r)

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

{f : α × β → ℚ → ℝ}

(hf : ProbabilityTheory.IsRatCondKernelCDFAux f κ ν)

∀ᵐ (t : β) ∂ν a, ∀ (q : ℚ), BddBelow (Set.range fun r => f (a, t) ↑r)


theorem IsGreatest.csSup_mem (H : IsGreatest s a) : sSup s ∈ s

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
{a : α}
(H : IsGreatest s a)


@[to_additive]
theorem mul_def [Mul M] [Mul N] (p q : M × N) : p * q = (p.1 * q.1, p.2 * q.2)

{M : Type u_5}
{N : Type u_6}
[Add M]
[Add N]
(p q : M × N)


theorem integral_mono_measure {f : α → ℝ} {ν} (hle : μ ≤ ν) (hf : 0 ≤ᵐ[ν] f)
    (hfi : Integrable f ν) : ∫ a, f a ∂μ ≤ ∫ a, f a ∂ν

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


@[simp]
lemma unitForward_naturality₂ {F : Cᵒᵖ ⥤ Type v} (η : F ⟶ A) (X Y : C) (f : X ⟶ Y)
    (p : YonedaCollection (restrictedYonedaObj η) Y) :
    unitForward η X (YonedaCollection.map₂ (restrictedYonedaObj η) f p) =
      F.map f.op (unitForward η Y p)

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

(p : CategoryTheory.OverPresheafAux.YonedaCollection (CategoryTheory.OverPresheafAux.restrictedYonedaObj η) Y)

CategoryTheory.OverPresheafAux.unitForward η X
    (CategoryTheory.OverPresheafAux.YonedaCollection.map₂ (CategoryTheory.OverPresheafAux.restrictedYonedaObj η) f p) =
  F.map f.op (CategoryTheory.OverPresheafAux.unitForward η Y p)


theorem card_eq {α β} [_F : Fintype α] [_G : Fintype β] : card α = card β ↔ Nonempty (α ≃ β)

{α : Type u_4}
{β : Type u_5}
[_F : Fintype α]
[_G : Fintype β]

Fintype.card α = Fintype.card β ↔ Nonempty (α ≃ β)


theorem not_lt_of_le [Preorder α] {a b : α} (h : a ≤ b) : ¬b < a

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


/-- The **deduction theorem** in the Heyting algebra model of intuitionistic logic:
an implication holds iff the conclusion follows from the hypothesis. -/
@[simp]
theorem himp_eq_top_iff : a ⇨ b = ⊤ ↔ a ≤ b

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


/-- If `f` semiconjugates `ga` to `gb` and `ga'` to `gb'`,
then it semiconjugates `ga ∘ ga'` to `gb ∘ gb'`. -/
theorem comp_right (h : Semiconj f ga gb) (h' : Semiconj f ga' gb') :
    Semiconj f (ga ∘ ga') (gb ∘ gb')

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{ga ga' : α → α}
{gb gb' : β → β}
(h : Function.Semiconj f ga gb)
(h' : Function.Semiconj f ga' gb')

Function.Semiconj f (ga ∘ ga') (gb ∘ gb')


/-- An object is injective if its preadditive Yoneda functor preserves finite colimits. -/
theorem injective_of_preservesFiniteColimits_preadditiveYonedaObj (J : C)
    [hP : PreservesFiniteColimits (preadditiveYonedaObj J)] : Injective J

[hP : CategoryTheory.Limits.PreservesFiniteColimits (CategoryTheory.preadditiveYonedaObj J)]


theorem coprime_fintype_prod_right_iff [Fintype ι] {x : ℕ} {s : ι → ℕ} :
    Coprime x (∏ i, s i) ↔ ∀ i, Coprime x (s i)

{ι : Type u_1}
[Fintype ι]
{x : ℕ}
{s : ι → ℕ}

x.Coprime (∏ i : ι, s i) ↔ ∀ (i : ι), x.Coprime (s i)


theorem embDomain_eq_mapDomain (f : α ↪ β) (v : α →₀ M) : embDomain f v = mapDomain f v

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
(f : α ↪ β)
(v : α →₀ M)

Finsupp.embDomain f v = Finsupp.mapDomain (⇑f) v


@[to_additive]
theorem mulSupport_along_fiber_subset (f : α × β → M) (a : α) :
    (mulSupport fun b => f (a, b)) ⊆ (mulSupport f).image Prod.snd

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[Zero M]
(f : α × β → M)
(a : α)

(Function.support fun b => f (a, b)) ⊆ Prod.snd '' Function.support f


@[to_additive (attr := simp)]
theorem mclosure_range_inl_union_inr :
    Submonoid.closure (range (inl : M →* M ∗ N) ∪ range (inr : N →* M ∗ N)) = ⊤

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

Submonoid.closure (Set.range ⇑Monoid.Coprod.inl ∪ Set.range ⇑Monoid.Coprod.inr) = ⊤


@[to_additive (attr := simp)]
theorem div_ball : s / ball x δ = x⁻¹ • thickening δ s

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(s : Set E)
(x : E)

s - Metric.ball x δ = -x +ᵥ Metric.thickening δ s


lemma mul_bot' : ∀ (a : WithBot α), a * ⊥ = if a = 0 then 0 else ⊥

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


@[to_additive (attr := simp, norm_cast)]
theorem coe_one : ((1 : S) : M) = 1

{M : Type u_1}
[AddZeroClass M]
(S : AddSubmonoid M)