/-- The Fourier integral of the Fréchet derivative of a function is obtained by multiplying the
Fourier integral of the original function by `2πI x`. -/
theorem fourierIntegral_deriv
    {f : ℝ → E} (hf : Integrable f) (h'f : Differentiable ℝ f) (hf' : Integrable (deriv f)) :
    𝓕 (deriv f) = fun (x : ℝ) ↦ (2 * π * I * x) • (𝓕 f x)

(hf : MeasureTheory.Integrable f MeasureTheory.volume)

(hf' : MeasureTheory.Integrable (deriv f) MeasureTheory.volume)

𝓕 (deriv f) = fun x => (2 * ↑π * Complex.I * ↑x) • 𝓕 f x


/-- **Leibniz rule for formal power series**. -/
theorem derivativeFun_mul (f g : R⟦X⟧) :
    derivativeFun (f * g) = f • g.derivativeFun + g • f.derivativeFun

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

(f * g).derivativeFun = f • g.derivativeFun + g • f.derivativeFun


private lemma chainLength_aux {x} (hx : x ∈ rootSpace H (chainTop α β)) :
    ∃ n : ℕ, n • x = ⁅coroot α, x⁆

(hx : x ∈ LieAlgebra.rootSpace H ⇑(LieModule.chainTop (⇑α) β))

∃ n, n • x = ⁅LieAlgebra.IsKilling.coroot α, x⁆


@[simp]
theorem comap_top (f : F) : (⊤ : NonUnitalStarSubalgebra R B).comap f = ⊤

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
[NonUnitalSemiring B]
[StarRing B]
[Module R B]
[IsScalarTower R B B]
[SMulCommClass R B B]
[StarModule R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(f : F)


/-- In a join of sublists, taking the slice between the indices `A` and `B - 1` gives back the
original sublist of index `i` if `A` is the sum of the lengths of sublists of index `< i`, and
`B` is the sum of the lengths of sublists of index `≤ i`.

See `List.drop_take_succ_join_eq_getElem` for the corresponding statement using `List.sum`. -/
theorem drop_take_succ_join_eq_getElem' (L : List (List α)) (i : Nat) (h : i <  L.length) :
    (L.join.take (Nat.sum ((L.map length).take (i + 1)))).drop (Nat.sum ((L.map length).take i)) =
      L[i]

{α : Type u_1}
(L : List (List α))
(i : ℕ)
(h : i < L.length)

List.drop (Nat.sum (List.take i (List.map List.length L)))
    (List.take (Nat.sum (List.take (i + 1) (List.map List.length L))) L.join) =
  L[i]


@[simp]
theorem IndepSets.union_iff {s₁ s₂ s' : Set (Set Ω)} :
    IndepSets (s₁ ∪ s₂) s' μ ↔ IndepSets s₁ s' μ ∧ IndepSets s₂ s' μ

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

ProbabilityTheory.IndepSets (s₁ ∪ s₂) s' μ ↔ ProbabilityTheory.IndepSets s₁ s' μ ∧ ProbabilityTheory.IndepSets s₂ s' μ


@[to_additive]
theorem inv_mul_eq_iff_eq_mul : a⁻¹ * b = c ↔ b = a * c


/-- The kernel of `zpowersHom G g` is equal to the subgroup generated by `orderOf g`. -/
theorem zpowersHom_ker_eq [Group G] (g : G) :
    (zpowersHom G g).ker = zpowers (Multiplicative.ofAdd ↑(orderOf g))

((zpowersHom G) g).ker = Subgroup.zpowers (Multiplicative.ofAdd ↑(orderOf g))


theorem exists_isOpen_xor'_mem [T0Space X] {x y : X} (h : x ≠ y) :
    ∃ U : Set X, IsOpen U ∧ Xor' (x ∈ U) (y ∈ U)

{X : Type u_1}
[TopologicalSpace X]
[T0Space X]
{x y : X}
(h : x ≠ y)


@[measurability]
protected theorem neg [AddGroup β] [TopologicalAddGroup β] (hf : AEFinStronglyMeasurable f μ) :
    AEFinStronglyMeasurable (-f) μ

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)


@[simp]
theorem snd_intCast [AddGroupWithOne R] [AddGroup M] (z : ℤ) : (z : tsze R M).snd = 0

{R : Type u}
{M : Type v}
[AddGroupWithOne R]
[AddGroup M]
(z : ℤ)


@[to_additive (attr := simp)]
theorem mk_mul_mk (x y : α) (L1 L2 : List α) : mk x L1 * mk y L2 = mk x (L1 ++ y :: L2)

{ head := x, tail := L1 } * { head := y, tail := L2 } = { head := x, tail := L1 ++ y :: L2 }


/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `Q : R[X]` is such that
`aeval B.gen Q = p • z`, then `p ∣ Q.coeff 0`. -/
theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L}
    (hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} {Q : R[X]} (hQ : aeval B.gen Q = p • z)
    (hzint : IsIntegral R z) (hei : (minpoly R B.gen).IsEisensteinAt 𝓟) : p ∣ Q.coeff 0

(hQ : (Polynomial.aeval B.gen) Q = p • z)

(hei : (minpoly R B.gen).IsEisensteinAt (Submodule.span R {p}))


@[simp]
lemma image_subtype_val_Iic_Ici {a : α} (b : Iic a) : Subtype.val '' Ici b = Icc b.1 a

{α : Type u_1}
[Preorder α]
{a : α}
(b : ↑(Set.Iic a))

Subtype.val '' Set.Ici b = Set.Icc (↑b) a


@[simp] lemma antidiagonal_filter_fst_le_of_le {n k : ℕ} (h : k ≤ n) :
    (antidiagonal n).filter (fun a ↦ a.fst ≤ k) = (antidiagonal k).map
      (Embedding.prodMap (Embedding.refl ℕ) ⟨_, add_left_injective (n - k)⟩)

Finset.filter (fun a => a.1 ≤ k) (Finset.antidiagonal n) =
  Finset.map ((Function.Embedding.refl ℕ).prodMap { toFun := fun x => x + (n - k), inj' := ⋯ }) (Finset.antidiagonal k)


theorem inv_lt_of_neg (ha : a < 0) (hb : b < 0) : a⁻¹ < b ↔ b⁻¹ < a

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(ha : a < 0)
(hb : b < 0)


@[simp] theorem preimage_Ioc : e ⁻¹' Ioc (e x) (e y) = Ioc x y

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ↪o β)
(x y : α)

⇑e ⁻¹' Set.Ioc (e x) (e y) = Set.Ioc x y


/-- For an s-finite kernel `κ` and a function `f : α → β → ℝ≥0∞` which is everywhere finite,
`withDensity κ f` is s-finite. -/
nonrec theorem IsSFiniteKernel.withDensity (κ : Kernel α β) [IsSFiniteKernel κ]
    (hf_ne_top : ∀ a b, f a b ≠ ∞) : IsSFiniteKernel (withDensity κ f)

{f : α → β → ℝ≥0∞}

(hf_ne_top : ∀ (a : α) (b : β), f a b ≠ ⊤)


@[simp]
theorem midpoint_le_right : midpoint k a b ≤ b ↔ a ≤ b

{k : Type u_1}
{E : Type u_2}
[LinearOrderedField k]
[OrderedAddCommGroup E]
[Module k E]
[OrderedSMul k E]
{a b : E}


/-- A permutation is a product of transpositions if and only if it has finite support. -/
theorem mem_closure_isSwap' {f : Perm α} :
    f ∈ closure {σ : Perm α | σ.IsSwap} ↔ (fixedBy α f)ᶜ.Finite

{α : Type u_2}
[DecidableEq α]
{f : Equiv.Perm α}

f ∈ Subgroup.closure {σ | σ.IsSwap} ↔ (MulAction.fixedBy α f)ᶜ.Finite


theorem pred_lt_iff_ne_bot : pred a < a ↔ a ≠ ⊥

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a : α}
[OrderBot α]


@[simp]
theorem mem_selfAdjointSubmodule (f : Module.End R M) :
    f ∈ B.selfAdjointSubmodule ↔ B.IsSelfAdjoint f

{R : Type u_1}
{M : Type u_5}
{M₂ : Type u_7}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup M₂]
[Module R M₂]
{B : M →ₗ[R] M →ₗ[R] M₂}
(f : Module.End R M)


@[simp]
theorem toMulBot_le : toMulBot a ≤ toMulBot b ↔ a ≤ b

{α : Type u}
[Add α]
[Preorder α]
(a b : WithZero (Multiplicative α))

WithZero.toMulBot a ≤ WithZero.toMulBot b ↔ a ≤ b


theorem measurableSet_prod {s : Set α} {t : Set β} :
    MeasurableSet (s ×ˢ t) ↔ MeasurableSet s ∧ MeasurableSet t ∨ s = ∅ ∨ t = ∅

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{s : Set α}
{t : Set β}


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

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


/-- If `α` has a basis consisting of compact opens, then an open set in `α` is compact open iff
  it is a finite union of some elements in the basis -/
theorem IsBasis.isCompact_open_iff_eq_finite_iUnion {ι : Type*} (b : ι → Opens α)
    (hb : IsBasis (Set.range b)) (hb' : ∀ i, IsCompact (b i : Set α)) (U : Set α) :
    IsCompact U ∧ IsOpen U ↔ ∃ s : Set ι, s.Finite ∧ U = ⋃ i ∈ s, b i

(hb : TopologicalSpace.Opens.IsBasis (Set.range b))

IsCompact U ∧ IsOpen U ↔ ∃ s, s.Finite ∧ U = ⋃ i ∈ s, ↑(b i)


theorem left_assoc' :
    (R.mul ▷ _) ≫ actLeft P Q = (α_ R.X R.X _).hom ≫ (R.X ◁ actLeft P Q) ≫ actLeft P Q

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

R.mul ▷ Bimod.TensorBimod.X P Q ≫ Bimod.TensorBimod.actLeft P Q =
  (α_ R.X R.X (Bimod.TensorBimod.X P Q)).hom ≫ R.X ◁ Bimod.TensorBimod.actLeft P Q ≫ Bimod.TensorBimod.actLeft P Q


theorem cocompact_le_cofinite : cocompact X ≤ cofinite


theorem cmpLE_swap {α} [LE α] [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x y : α) :
    (cmpLE x y).swap = cmpLE y x

{α : Type u_3}
[LE α]
[IsTotal α fun x x_1 => x ≤ x_1]
[DecidableRel fun x x_1 => x ≤ x_1]
(x y : α)


@[simp]
theorem X_mem_supported [Nontrivial R] {i : σ} : X i ∈ supported R s ↔ i ∈ s

{σ : Type u_1}
{R : Type u}
[CommSemiring R]
{s : Set σ}
[Nontrivial R]
{i : σ}

MvPolynomial.X i ∈ MvPolynomial.supported R s ↔ i ∈ s


theorem pmap_congr {p q : α → Prop} {f : ∀ a, p a → β} {g : ∀ a, q a → β} (l : List α) {H₁ H₂}
    (h : ∀ a ∈ l, ∀ (h₁ h₂), f a h₁ = g a h₂) : pmap f l H₁ = pmap g l H₂

(h : ∀ (a : α), a ∈ l → ∀ (h₁ : p a) (h₂ : q a), f a h₁ = g a h₂)


lemma pred_sub (n m : ℕ) : pred n - m = pred (n - m)


theorem factorial_inj' (h : 1 < n ∨ 1 < m) : n ! = m ! ↔ n = m


theorem y_support {D : ℝ} (Dpos : 0 < D) (D_lt_one : D < 1) :
    support (y D : E → ℝ) = ball (0 : E) (1 + D)

(E : Type u_1)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
{D : ℝ}
(Dpos : 0 < D)
(D_lt_one : D < 1)

Function.support (ExistsContDiffBumpBase.y D) = Metric.ball 0 (1 + D)


theorem eLpNorm'_norm_rpow (f : α → F) (p q : ℝ) (hq_pos : 0 < q) :
    eLpNorm' (fun x => ‖f x‖ ^ q) p μ = eLpNorm' f (p * q) μ ^ q

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

MeasureTheory.eLpNorm' (fun x => ‖f x‖ ^ q) p μ = MeasureTheory.eLpNorm' f (p * q) μ ^ q


@[simp] protected lemma sdiff_eq_left : s.sdiff t = s ↔ Disjoint ↑s t

{α : Type u_1}
[Preorder α]
{s : LowerSet α}
{t : Set α}


theorem SmoothOn.smoothAt (h : SmoothOn I I' f s) (hx : s ∈ 𝓝 x) : SmoothAt I I' f x

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


/-- A bijective `Semigroup` homomorphism is an isomorphism -/
@[to_additive (attr := simps! apply) "A bijective `AddSemigroup` homomorphism is an isomorphism"]
noncomputable def ofBijective {M N F} [Mul M] [Mul N] [FunLike F M N] [MulHomClass F M N]
    (f : F) (hf : Bijective f) : M ≃* N

{M : Type u_12}
{N : Type u_13}
{F : Type u_14}
[Mul M]
[Mul N]
[FunLike F M N]
[MulHomClass F M N]
(f : F)
(hf : Function.Bijective ⇑f)
(a : M)


protected theorem bounded (f : F) : ∃ C, ∀ x y : α, dist ((f : α → β) x) (f y) ≤ C

{F : Type u_1}
{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
[Zero β]
[FunLike F α β]
[ZeroAtInftyContinuousMapClass F α β]
(f : F)


/-- An affine subspace is isomorphic to its image under an injective affine map.
This is the affine version of `Submodule.equivMapOfInjective`.
-/
@[simps linear, simps! toFun]
noncomputable def equivMapOfInjective (E : AffineSubspace 𝕜 P₁) [Nonempty E] (φ : P₁ →ᵃ[𝕜] P₂)
    (hφ : Function.Injective φ) : E ≃ᵃ[𝕜] E.map φ

{𝕜 : Type u_1}
{V₁ : Type u_3}
{V₂ : Type u_5}
{P₁ : Type u_8}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V₁]
[NormedSpace 𝕜 V₁]
[PseudoMetricSpace P₁]
[NormedAddTorsor V₁ P₁]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(E : AffineSubspace 𝕜 P₁)
[Nonempty ↥E]
(φ : P₁ →ᵃ[𝕜] P₂)
(hφ : Function.Injective ⇑φ)

(E.equivMapOfInjective φ hφ).linear =
  (Submodule.equivMapOfInjective φ.linear ⋯ E.direction).trans
    (LinearEquiv.ofEq (Submodule.map φ.linear E.direction) (AffineSubspace.map φ E).direction ⋯)


@[simp]
theorem irrational_int_sub_iff : Irrational (m - x) ↔ Irrational x


@[simp]
theorem transitionMap_comp_eval {m n : ℕ} (hmn : m ≤ n) :
    transitionMap I M hmn ∘ₗ eval I M n = eval I M m

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(M : Type u_2)
[AddCommGroup M]
[Module R M]
{m n : ℕ}
(hmn : m ≤ n)

AdicCompletion.transitionMap I M hmn ∘ₗ AdicCompletion.eval I M n = AdicCompletion.eval I M m


theorem lengthParity_eq_ofAdd_length (w : W) :
    cs.lengthParity w = Multiplicative.ofAdd (↑(ℓ w))

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(w : W)

cs.lengthParity w = Multiplicative.ofAdd ↑(cs.length w)


@[simp]
theorem iterate_derivative_at_0 (n ν : ℕ) :
    (Polynomial.derivative^[ν] (bernsteinPolynomial R n ν)).eval 0 =
      (ascPochhammer R ν).eval ((n - (ν - 1) : ℕ) : R)

Polynomial.eval 0 ((⇑Polynomial.derivative)^[ν] (bernsteinPolynomial R n ν)) =
  Polynomial.eval (↑(n - (ν - 1))) (ascPochhammer R ν)


@[simp]
theorem toEquiv_inj {e e' : P₁ ≃ᵃ[k] P₂} : e.toEquiv = e'.toEquiv ↔ e = e'

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
{e e' : P₁ ≃ᵃ[k] P₂}


/-- Bijection between `MulOpposite` of a subalgebra `S` and its opposite. -/
@[simps!]
def mopAlgEquivOp (S : Subalgebra R A) : Sᵐᵒᵖ ≃ₐ[R] S.op

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

∀ (a : (↥S.toSubsemiring)ᵐᵒᵖ), ↑(S.mopAlgEquivOp a) = MulOpposite.op ↑(MulOpposite.unop a)


/-- Let `f : ℝ → ℝ` be a differentiable function. If `f'` is positive, then
`f` is a strictly monotone function.
Note that we don't require differentiability explicitly as it already implied by the derivative
being strictly positive. -/
theorem strictMono_of_deriv_pos {f : ℝ → ℝ} (hf' : ∀ x, 0 < deriv f x) : StrictMono f

{f : ℝ → ℝ}
(hf' : ∀ (x : ℝ), 0 < deriv f x)


theorem dvd_appr_sub_appr (x : ℤ_[p]) (m n : ℕ) (h : m ≤ n) : p ^ m ∣ x.appr n - x.appr m

{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
(x : ℤ_[p])
(m n : ℕ)
(h : m ≤ n)


theorem dimH_univ_pi_fin (n : ℕ) : dimH (univ : Set (Fin n → ℝ)) = n


theorem fderivWithin.log (hf : DifferentiableWithinAt ℝ f s x) (hx : f x ≠ 0)
    (hxs : UniqueDiffWithinAt ℝ s x) :
    fderivWithin ℝ (fun x => log (f x)) s x = (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)
(hx : f x ≠ 0)
(hxs : UniqueDiffWithinAt ℝ s x)

fderivWithin ℝ (fun x => Real.log (f x)) s x = (f x)⁻¹ • fderivWithin ℝ f s x


theorem image2_image2_image2_comm {f : ε → ζ → ν} {g : α → β → ε} {h : γ → δ → ζ} {f' : ε' → ζ' → ν}
    {g' : α → γ → ε'} {h' : β → δ → ζ'}
    (h_comm : ∀ a b c d, f (g a b) (h c d) = f' (g' a c) (h' b d)) :
    image2 f (image2 g s t) (image2 h u v) = image2 f' (image2 g' s u) (image2 h' t v)

{f : ε → ζ → ν}

{g : α → β → ε}

{h : γ → δ → ζ}

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


@[simp] lemma δ_smul (k : R) (z : Cochain F G n) : δ n m (k • z) = k • δ n m z

(z : CochainComplex.HomComplex.Cochain F G n)

CochainComplex.HomComplex.δ n m (k • z) = k • CochainComplex.HomComplex.δ n m z


protected theorem differentiableWithinAt : DifferentiableWithinAt 𝕜 f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(f : 𝕜 →ᵃ[𝕜] E)
{s : Set 𝕜}
{x : 𝕜}


theorem inter_diff_assoc (a b c : Set α) : (a ∩ b) \ c = a ∩ (b \ c)


@[continuity]
protected theorem continuous [SemilinearIsometryClass 𝓕 σ₁₂ E E₂] (f : 𝓕) : Continuous f

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
{𝓕 : Type u_10}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
[FunLike 𝓕 E E₂]
[SemilinearIsometryClass 𝓕 σ₁₂ E E₂]
(f : 𝓕)


nonrec theorem Smooth.prod_mk {f : M → M'} {g : M → N'} (hf : Smooth I I' f) (hg : Smooth I J' g) :
    Smooth I (I'.prod J') fun x => (f x, g x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{F' : Type u_14}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{G' : Type u_15}
[TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'}
{N' : Type u_16}
[TopologicalSpace N']
[ChartedSpace G' N']
{f : M → M'}
{g : M → N'}
(hf : Smooth I I' f)
(hg : Smooth I J' g)


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

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

((CategoryTheory.Limits.Cocone.equivStructuredArrow F).unitIso.hom.app X).hom = CategoryTheory.CategoryStruct.id X.pt


@[to_additive]
theorem MonoidHom.coe_finset_prod [MulOneClass β] [CommMonoid γ] (f : α → β →* γ) (s : Finset α) :
    ⇑(∏ x ∈ s, f x) = ∏ x ∈ s, ⇑(f x)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[MulOneClass β]
[CommMonoid γ]
(f : α → β →* γ)
(s : Finset α)


theorem AnalyticOn.differentiableOn (h : AnalyticOn 𝕜 f s) : DifferentiableOn 𝕜 f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
(h : AnalyticOn 𝕜 f s)


theorem sublistsLenAux_append :
    ∀ (n : ℕ) (l : List α) (f : List α → β) (g : β → γ) (r : List β) (s : List γ),
      sublistsLenAux n l (g ∘ f) (r.map g ++ s) = (sublistsLenAux n l f r).map g ++ s

{α : Type u}
{β : Type v}
{γ : Type w}
(n : ℕ)
(l : List α)
(f : List α → β)
(g : β → γ)
(r : List β)
(s : List γ)

List.sublistsLenAux n l (g ∘ f) (List.map g r ++ s) = List.map g (List.sublistsLenAux n l f r) ++ s


@[simp]
theorem coe_attach (s : Sym α n) : (s.attach : Multiset { a // a ∈ s }) =
    Multiset.attach (s : Multiset α)


@[simp]
theorem Equivalence_mk'_counitInv (functor inverse unit_iso counit_iso f) :
    (⟨functor, inverse, unit_iso, counit_iso, f⟩ : C ≌ D).counitInv = counit_iso.inv

(unit_iso : CategoryTheory.Functor.id C ≅ functor.comp inverse)

(counit_iso : inverse.comp functor ≅ CategoryTheory.Functor.id D)

(f :
  ∀ (X : C),
    CategoryTheory.CategoryStruct.comp (functor.map (unit_iso.hom.app X)) (counit_iso.hom.app (functor.obj X)) =
      CategoryTheory.CategoryStruct.id (functor.obj X))

{ functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso,
      functor_unitIso_comp := f }.counitInv =
  counit_iso.inv


@[to_additive]
theorem noncommProd_eq_prod {β : Type*} [CommMonoid β] (s : Finset α) (f : α → β) :
    (noncommProd s f fun _ _ _ _ _ => Commute.all _ _) = s.prod f

{α : Type u_3}
{β : Type u_6}
[AddCommMonoid β]
(s : Finset α)
(f : α → β)


/-- The difference of two `C^n` functions within a set at a point is `C^n` within this set
at this point. -/
theorem ContDiffWithinAt.sub {s : Set E} {f g : E → F} (hf : ContDiffWithinAt 𝕜 n f s x)
    (hg : ContDiffWithinAt 𝕜 n g s x) : ContDiffWithinAt 𝕜 n (fun x => f x - g x) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{n : ℕ∞}
{s : Set E}
{f g : E → F}
(hf : ContDiffWithinAt 𝕜 n f s x)
(hg : ContDiffWithinAt 𝕜 n g s x)


theorem edist_le_of_fixedPoint (hf : ContractingWith K f) {x y} (h : edist x y ≠ ∞)
    (hy : IsFixedPt f y) : edist x y ≤ edist x (f x) / (1 - K)

{α : Type u_1}
[EMetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
{x y : α}
(h : edist x y ≠ ⊤)
(hy : Function.IsFixedPt f y)


theorem log_re (x : ℂ) : x.log.re = x.abs.log

(Complex.log x).re = Real.log (Complex.abs x)


lemma apply_def (l : Subspace η α ι) (x : η → α) (i : ι) : l x i = (l.idxFun i).elim id x

{η : Type u_5}
{α : Type u_6}
{ι : Type u_7}
(l : Combinatorics.Subspace η α ι)
(x : η → α)
(i : ι)


theorem measure_closure_of_null_frontier {μ : Measure α'} {s : Set α'} (h : μ (frontier s) = 0) :
    μ (closure s) = μ s

{α' : Type u_6}
[TopologicalSpace α']
[MeasurableSpace α']
{μ : MeasureTheory.Measure α'}
{s : Set α'}
(h : μ (frontier s) = 0)


protected lemma Finset.prod_empty {β α : Type*} [CommSemiring β] (f : α → β) :
    IsNat (Finset.prod ∅ f) 1

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


theorem closedBall_mem_nhds_of_mem {x c : α} {ε : ℝ} (h : x ∈ ball c ε) : closedBall c ε ∈ 𝓝 x

{α : Type u}
[PseudoMetricSpace α]
{x c : α}
{ε : ℝ}
(h : x ∈ Metric.ball c ε)


theorem eventually_of_forall {p : α → Prop} {f : Filter α} (hp : ∀ x, p x) : ∀ᶠ x in f, p x

{α : Type u}
{p : α → Prop}
{f : Filter α}
(hp : ∀ (x : α), p x)


theorem FinitaryPreExtensive.isUniversal_finiteCoproducts [FinitaryPreExtensive C] {ι : Type*}
    [Finite ι] {F : Discrete ι ⥤ C} {c : Cocone F} (hc : IsColimit c) : IsUniversalColimit c

{F : CategoryTheory.Functor (CategoryTheory.Discrete ι) C}

(hc : CategoryTheory.Limits.IsColimit c)


@[to_additive minimalPeriod_eq_one_iff_fixedBy]
theorem minimalPeriod_eq_one_iff_fixedBy {a : α} {g : G} :
    Function.minimalPeriod (fun x => g • x) a = 1 ↔ a ∈ fixedBy α g

{α : Type u_1}
{G : Type u_2}
[AddGroup G]
[AddAction G α]
{a : α}
{g : G}

Function.minimalPeriod (fun x => g +ᵥ x) a = 1 ↔ a ∈ AddAction.fixedBy α g


theorem add_left_cancel [IsLeftCancelAdd α] (ha : a ≠ ⊥) (h : a + b = a + c) : b = c

{α : Type u}
[Add α]
{a b c : WithBot α}
[IsLeftCancelAdd α]
(ha : a ≠ ⊥)
(h : a + b = a + c)


@[to_additive]
theorem one_mem_one : (1 : α) ∈ (1 : Set α)


theorem symm (e : α ≃ᵐ β) {μa : Measure α} {μb : Measure β} (h : MeasurePreserving e μa μb) :
    MeasurePreserving e.symm μb μa

(e : α ≃ᵐ β)

(h : MeasureTheory.MeasurePreserving (⇑e) μa μb)

MeasureTheory.MeasurePreserving (⇑e.symm) μb μa


@[simp]
theorem coeFn_neg (Q : QuadraticMap R M N) : ⇑(-Q) = -Q

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(Q : QuadraticMap R M N)


/-- Contrapositive form of `Nat.factorization_centralBinom_eq_zero_of_two_mul_lt` -/
theorem le_two_mul_of_factorization_centralBinom_pos
    (h_pos : 0 < (centralBinom n).factorization p) : p ≤ 2 * n

(h_pos : 0 < n.centralBinom.factorization p)


lemma associated_num_den_inv (x : K) (hx : x ≠ 0) : Associated (num A x : A) (den A x⁻¹)

{A : Type u_4}
[CommRing A]
[IsDomain A]
[UniqueFactorizationMonoid A]
{K : Type u_5}
[Field K]
[Algebra A K]
[IsFractionRing A K]
(x : K)
(hx : x ≠ 0)

Associated (IsFractionRing.num A x) ↑(IsFractionRing.den A x⁻¹)


@[simp]
theorem normalClosure_closure_eq_normalClosure {s : Set G} :
    normalClosure ↑(closure s) = normalClosure s

Subgroup.normalClosure ↑(Subgroup.closure s) = Subgroup.normalClosure s


/-- The forgetful functor from the category of based functors `𝒳 ⥤ᵇ 𝒴` to the category of
functors of underlying categories, `𝒳.obj ⥤ 𝒴.obj`. -/
@[simps]
def forgetful (𝒳 : BasedCategory.{v₂, u₂} 𝒮) (𝒴 : BasedCategory.{v₃, u₃} 𝒮) :
    (𝒳 ⥤ᵇ 𝒴) ⥤ (𝒳.obj ⥤ 𝒴.obj)

{𝒮 : Type u₁}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
(𝒳 : CategoryTheory.BasedCategory 𝒮)
(𝒴 : CategoryTheory.BasedCategory 𝒮)

∀ {X Y : CategoryTheory.BasedFunctor 𝒳 𝒴} (α : X ⟶ Y), (CategoryTheory.BasedNatTrans.forgetful 𝒳 𝒴).map α = α.toNatTrans


theorem disjoint_self_iff_empty (s : Finset α) : Disjoint s s ↔ s = ∅


@[simp]
lemma _root_.IsometryEquiv.toDilationEquiv_apply (e : X ≃ᵢ Y) (x : X) :
    e.toDilationEquiv x = e x

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
(e : X ≃ᵢ Y)
(x : X)


@[simp] lemma mapEquiv_indep_iff {I : Set β} : (M.mapEquiv f).Indep I ↔ M.Indep (f.symm '' I)

{α : Type u_1}
{β : Type u_2}
{M : Matroid α}
{f : α ≃ β}
{I : Set β}

(M.mapEquiv f).Indep I ↔ M.Indep (⇑f.symm '' I)


theorem tsub_encard_le_encard_diff (s t : Set α) : s.encard - t.encard ≤ (s \ t).encard


/-- If `i : K →+* L` is `p`-radical, then for any perfect ring `M` of exponential charactistic `p`,
the map `(L →+* M) → (K →+* M)` induced by `i` is injective.
A special case of `IsPRadical.injective_comp_of_pNilradical_eq_bot`. -/
theorem injective_comp_of_perfect [IsPRadical i p] [PerfectRing M p] :
    Function.Injective fun f : L →+* M ↦ f.comp i

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


@[to_additive (attr := simp)]
lemma div_comp (f g : N →* G) (h : M →* N) : (f / g).comp h = f.comp h / g.comp h

{M : Type u_3}
{N : Type u_4}
{G : Type u_6}
[MulOneClass M]
[MulOneClass N]
[CommGroup G]
(f g : N →* G)
(h : M →* N)


lemma isLocallySurjective_iff_of_fac
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} {f₁ : F₁ ⟶ F₂} {f₂ : F₂ ⟶ F₃} {f₃ : F₁ ⟶ F₃} (fac : f₁ ≫ f₂ = f₃)
    [IsLocallySurjective J f₁] :
    IsLocallySurjective J f₃ ↔ IsLocallySurjective J f₂

(J : CategoryTheory.GrothendieckTopology C)

CategoryTheory.Presheaf.IsLocallySurjective J f₃ ↔ CategoryTheory.Presheaf.IsLocallySurjective J f₂


theorem Monic.natDegree_pos_of_not_isUnit (hu : ¬IsUnit p) : 0 < natDegree p

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


lemma associator_hom_app {B C D E : Cat} (F : B ⟶ C) (G : C ⟶ D) (H : D ⟶ E) (X : B) :
    (α_ F G H).hom.app X = eqToHom (by simp)

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

(CategoryTheory.Bicategory.associator F G H).hom.app X = CategoryTheory.eqToHom ⋯


@[simp]
theorem normalizer_eq_self_of_isCartanSubalgebra (H : LieSubalgebra R L) [H.IsCartanSubalgebra] :
    H.toLieSubmodule.normalizer = H.toLieSubmodule

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)
[H.IsCartanSubalgebra]


protected theorem eq_mul_of_ediv_eq_right {a b c : Int}
    (H1 : b ∣ a) (H2 : a / b = c) : a = b * c


theorem not_or_of_not : ¬a → ¬b → ¬(a ∨ b)

¬a → ¬b → ¬(a ∨ b)


theorem mul_assoc_rev (a b c : R) : a * (b * c) = a * b * c

{R : Type u_1}
[CommSemiring R]
(a b c : R)


@[simp] theorem atLeastTwo_true_right  : atLeastTwo a b true  = (a || b)


theorem chineseRemainderOfList_lt_prod (l : List ι)
    (co : l.Pairwise (Coprime on s)) (hs : ∀ i ∈ l, s i ≠ 0) :
    chineseRemainderOfList a s l co < (l.map s).prod

(co : List.Pairwise (Nat.Coprime on s) l)

↑(Nat.chineseRemainderOfList a s l co) < (List.map s l).prod


lemma _root_.Fintype.sum_mul_sum {κ : Type*} [Fintype ι] [Fintype κ] (f : ι → α) (g : κ → α) :
    (∑ i, f i) * ∑ j, g j = ∑ i, ∑ j, f i * g j

{ι : Type u_1}
{α : Type u_2}
[NonUnitalNonAssocSemiring α]
{κ : Type u_6}
[Fintype ι]
[Fintype κ]
(f : ι → α)
(g : κ → α)

(∑ i : ι, f i) * ∑ j : κ, g j = ∑ i : ι, ∑ j : κ, f i * g j


/-- If `B` is a nonempty exposed subset of `A`, then `B` is the intersection of `A` with some closed
halfspace. The converse is *not* true. It would require that the corresponding open halfspace
doesn't intersect `A`. -/
theorem eq_inter_halfspace' {A B : Set E} (hAB : IsExposed 𝕜 A B) (hB : B.Nonempty) :
    ∃ l : E →L[𝕜] 𝕜, ∃ a, B = { x ∈ A | a ≤ l x }

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace 𝕜]
[OrderedRing 𝕜]
[AddCommMonoid E]
[TopologicalSpace E]
[Module 𝕜 E]
{A B : Set E}
(hAB : IsExposed 𝕜 A B)
(hB : B.Nonempty)


theorem QuotientMap.continuous_lift_prod_right (hf : QuotientMap f) {g : Y × X → Z}
    (hg : Continuous fun p : Y × X₀ => g (p.1, f p.2)) : Continuous g

(hg : Continuous fun p => g (p.1, f p.2))


/-- Independence of functions `f` and `g` into arbitrary types is characterized by the relation
  `E[(φ ∘ f) * (ψ ∘ g)] = E[φ ∘ f] * E[ψ ∘ g]` for all measurable `φ` and `ψ` with values in `ℝ`
  satisfying appropriate integrability conditions. -/
theorem indepFun_iff_integral_comp_mul [IsFiniteMeasure μ] {β β' : Type*} {mβ : MeasurableSpace β}
    {mβ' : MeasurableSpace β'} {f : Ω → β} {g : Ω → β'} {hfm : Measurable f} {hgm : Measurable g} :
    IndepFun f g μ ↔ ∀ {φ : β → ℝ} {ψ : β' → ℝ}, Measurable φ → Measurable ψ →
      Integrable (φ ∘ f) μ → Integrable (ψ ∘ g) μ →
        integral μ (φ ∘ f * ψ ∘ g) = integral μ (φ ∘ f) * integral μ (ψ ∘ g)

{Ω : Type u_1}
{mΩ : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]
{β : Type u_2}
{β' : Type u_3}
{mβ : MeasurableSpace β}
{mβ' : MeasurableSpace β'}
{f : Ω → β}
{g : Ω → β'}
{hfm : Measurable f}
{hgm : Measurable g}

ProbabilityTheory.IndepFun f g μ ↔
  ∀ {φ : β → ℝ} {ψ : β' → ℝ},
    Measurable φ →
      Measurable ψ →
        MeasureTheory.Integrable (φ ∘ f) μ →
          MeasureTheory.Integrable (ψ ∘ g) μ →
            MeasureTheory.integral μ (φ ∘ f * ψ ∘ g) =
              MeasureTheory.integral μ (φ ∘ f) * MeasureTheory.integral μ (ψ ∘ g)


theorem lift_zero : q.lift (0 : ℍ[R,c₁,c₂]) = 0

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[Ring A]
[Algebra R A]
{c₁ c₂ : R}
(q : QuaternionAlgebra.Basis A c₁ c₂)


@[simp]
theorem sub_self_re : a - a.re = a.im

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(a : ℍ[R,c₁,c₂])


theorem NodupKeys.sublist {l₁ l₂ : List (Sigma β)} (h : l₁ <+ l₂) : NodupKeys l₂ → NodupKeys l₁

{α : Type u}
{β : α → Type v}
{l₁ l₂ : List (Sigma β)}
(h : l₁.Sublist l₂)


@[simp]
lemma bitwise_zero_left (m : Nat) : bitwise f 0 m = if f false true then m else 0

Nat.bitwise f 0 m = if f false true = true then m else 0


theorem span_singleton_mul_left_unit {a : α} (h2 : IsUnit a) (x : α) :
    span ({a * x} : Set α) = span {x}

{α : Type u}
[Semiring α]
{a : α}
(h2 : IsUnit a)
(x : α)


(E : Type u_1)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]


theorem fin_val_iff {n} {f : α → Fin n} : (Primrec fun a => (f a).1) ↔ Primrec f

{α : Type u_1}
[Primcodable α]
{n : ℕ}
{f : α → Fin n}


theorem Continuous.iterate {f : X → X} (h : Continuous f) (n : ℕ) : Continuous f^[n]

{X : Type u_1}
[TopologicalSpace X]
{f : X → X}
(h : Continuous f)
(n : ℕ)


/-- If `𝔖 : Set (Set α)` is nonempty and directed and `𝓑` is a filter basis on `β × β`, then the
family `UniformOnFun.gen 𝔖 S V` for `S ∈ 𝔖` and `V ∈ 𝓑` is a filter basis on
`(α →ᵤ[𝔖] β) × (α →ᵤ[𝔖] β)`.
We will show in `has_basis_uniformity_of_basis` that, if `𝓑` is a basis for `𝓤 β`, then the
corresponding filter is the uniformity of `α →ᵤ[𝔖] β`. -/
protected theorem isBasis_gen (𝔖 : Set (Set α)) (h : 𝔖.Nonempty) (h' : DirectedOn (· ⊆ ·) 𝔖)
    (𝓑 : FilterBasis <| β × β) :
    IsBasis (fun SV : Set α × Set (β × β) => SV.1 ∈ 𝔖 ∧ SV.2 ∈ 𝓑) fun SV =>
      UniformOnFun.gen 𝔖 SV.1 SV.2

(h' : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖)

Filter.IsBasis (fun SV => SV.1 ∈ 𝔖 ∧ SV.2 ∈ 𝓑) fun SV => UniformOnFun.gen 𝔖 SV.1 SV.2


theorem exists_finset_nhd' {s : Set X} (ρ : PartitionOfUnity ι X s) (x₀ : X) :
    ∃ I : Finset ι, (∀ᶠ x in 𝓝[s] x₀, ∑ i ∈ I, ρ i x = 1) ∧
      ∀ᶠ x in 𝓝 x₀, support (ρ · x) ⊆ I

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
(ρ : PartitionOfUnity ι X s)
(x₀ : X)

∃ I, (∀ᶠ (x : X) in 𝓝[s] x₀, ∑ i ∈ I, (ρ i) x = 1) ∧ ∀ᶠ (x : X) in 𝓝 x₀, (Function.support fun x_1 => (ρ x_1) x) ⊆ ↑I


theorem measure_fundamentalDomain [Fintype ι] [DecidableEq ι] [MeasurableSpace E] (μ : Measure E)
    [BorelSpace E] [Measure.IsAddHaarMeasure μ] (b₀ : Basis ι ℝ E) :
    μ (fundamentalDomain b) = ENNReal.ofReal |b₀.det b| * μ (fundamentalDomain b₀)

{E : Type u_1}
{ι : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(b : Basis ι ℝ E)
[Fintype ι]
[DecidableEq ι]
[MeasurableSpace E]
(μ : MeasureTheory.Measure E)
[BorelSpace E]
[μ.IsAddHaarMeasure]
(b₀ : Basis ι ℝ E)

μ (Zspan.fundamentalDomain b) = ENNReal.ofReal |b₀.det ⇑b| * μ (Zspan.fundamentalDomain b₀)


theorem dvd_of_multiplicity_pos {a b : α} (h : (0 : PartENat) < multiplicity a b) : a ∣ b

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a b : α}
(h : 0 < multiplicity a b)


@[to_additive (attr := continuity)]
theorem continuous_multiset_prod {f : ι → X → M} (s : Multiset ι) :
    (∀ i ∈ s, Continuous (f i)) → Continuous fun a => (s.map fun i => f i a).prod

{ι : Type u_1}
{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[AddCommMonoid M]
[ContinuousAdd M]
{f : ι → X → M}
(s : Multiset ι)

(∀ i ∈ s, Continuous (f i)) → Continuous fun a => (Multiset.map (fun i => f i a) s).sum


theorem jacobiSymNat.even_odd₃ (a b c : ℕ) (r : ℤ) (ha : a % 2 = 0) (hb : b % 8 = 3)
    (hc : a / 2 = c) (hr : jacobiSymNat c b = r) : jacobiSymNat a b = -r

(hr : Mathlib.Meta.NormNum.jacobiSymNat c b = r)

Mathlib.Meta.NormNum.jacobiSymNat a b = -r


/-- The functor `LeftExtension L F ⥤ LeftExtension (G ⋙ L) (G ⋙ F)`
obtained by precomposition. -/
@[simps!]
def LeftExtension.precomp : LeftExtension L F ⥤ LeftExtension (G ⋙ L) (G ⋙ F)

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

((CategoryTheory.Functor.LeftExtension.precomp L F G).map φ).right = φ.right


@[norm_cast]
theorem coe_natCast (n : ℕ) : ↑(n : R) = (n : ℍ[R])


/-- **Equality case of the Rearrangement Inequality**: Pointwise multiplication of `f` and `g`,
which monovary together, is unchanged by a permutation if and only if `f` and `g ∘ σ` monovary
together. Stated by permuting the entries of `g`. -/
theorem MonovaryOn.sum_mul_comp_perm_eq_sum_mul_iff (hfg : MonovaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f i * g (σ i) = ∑ i ∈ s, f i * g i ↔ MonovaryOn f (g ∘ σ) s

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

∑ i ∈ s, f i * g (σ i) = ∑ i ∈ s, f i * g i ↔ MonovaryOn f (g ∘ ⇑σ) ↑s


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

∀ {X Y : NonemptyFinLinOrd} (a : ↑X →o ↑Y), NonemptyFinLinOrd.dual.map a = OrderHom.dual a


/-- If `s` is an infinite set of natural numbers and `k > 0`, then `s` contains two elements `m < n`
that are equal mod `k`. -/
theorem exists_lt_modEq_of_infinite {s : Set ℕ} (hs : s.Infinite) {k : ℕ} (hk : 0 < k) :
    ∃ m ∈ s, ∃ n ∈ s, m < n ∧ m ≡ n [MOD k]


@[simp] lemma ofNat_eq_ofNat {m n : ℕ} [m.AtLeastTwo] [n.AtLeastTwo] :
    (no_index (ofNat m) : R) = no_index (ofNat n) ↔ (ofNat m : ℕ) = ofNat n

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

OfNat.ofNat m = OfNat.ofNat n ↔ OfNat.ofNat m = OfNat.ofNat n


/-- The minimal polynomial of `0` is `X`. -/
@[simp]
theorem zero : minpoly A (0 : B) = X

(A : Type u_1)
(B : Type u_2)
[Field A]
[Ring B]
[Algebra A B]
[Nontrivial B]


theorem SuperpolynomialDecay.mul_param_pow (hf : SuperpolynomialDecay l k f) (n : ℕ) :
    SuperpolynomialDecay l k (f * k ^ n)

(hf : Asymptotics.SuperpolynomialDecay l k f)

Asymptotics.SuperpolynomialDecay l k (f * k ^ n)


@[to_additive (attr := simp)]
theorem map_eq_zero_iff_eq_one : f x = 0 ↔ x = 1

{F : Type u_2}
{α : Type u_3}
{β : Type u_4}
[FunLike F α β]
[Group α]
[OrderedAddCommMonoid β]
[GroupNormClass F α β]
(f : F)
{x : α}


@[simp]
theorem Fintype.card_ulift (α : Type*) [Fintype α] : Fintype.card (ULift α) = Fintype.card α

Fintype.card (ULift.{u_5, u_4} α) = Fintype.card α


theorem posMulMono_iff_mulPosMono : PosMulMono α ↔ MulPosMono α

{α : Type u_1}
[Mul α]
[IsSymmOp α α fun x x_1 => x * x_1]
[Zero α]
[Preorder α]


/-- A version of `Equiv.mulRight a⁻¹ b` that is defeq to `b / a`. -/
@[to_additive (attr := simps) " A version of `Equiv.addRight (-a) b` that is defeq to `b - a`. "]
protected def divRight (a : G) : G ≃ G


theorem mul_le_right {x y : Icc (0 : α) 1} : x * y ≤ y

{α : Type u_1}
[OrderedSemiring α]
{x y : ↑(Set.Icc 0 1)}


theorem eq_curry_iff (f : A ⨯ Y ⟶ X) (g : Y ⟶ A ⟹ X) : g = curry f ↔ uncurry g = f

g = CategoryTheory.CartesianClosed.curry f ↔ CategoryTheory.CartesianClosed.uncurry g = f


/-- The equivalence between a quaternion algebra over `R` and `R × R × R × R`. -/
@[simps]
def equivProd {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ R × R × R × R

{R : Type u_1}
(c₁ c₂ : R)
(a : R × R × R × R)

((QuaternionAlgebra.equivProd c₁ c₂).symm a).re = a.1


@[simp]
theorem toList_cons (a : Lists α) (l) : toList (cons a l) = a :: l.toList

{α : Type u_1}
(a : Lists α)
(l : Lists' α true)

(Lists'.cons a l).toList = a :: l.toList


theorem JoinedIn.ofLine {f : ℝ → X} (hf : ContinuousOn f I) (h₀ : f 0 = x) (h₁ : f 1 = y)
    (hF : f '' I ⊆ F) : JoinedIn F x y

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{F : Set X}
{f : ℝ → X}
(hf : ContinuousOn f I)
(h₀ : f 0 = x)
(h₁ : f 1 = y)
(hF : f '' I ⊆ F)


@[simp]
theorem mem_fundamentalDomain {m : E} :
    m ∈ fundamentalDomain b ↔ ∀ i, b.repr m i ∈ Set.Ico (0 : K) 1

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

m ∈ Zspan.fundamentalDomain b ↔ ∀ (i : ι), (b.repr m) i ∈ Set.Ico 0 1


@[to_additive]
theorem orderOf_dvd_iff_zpow_eq_one : (orderOf x : ℤ) ∣ i ↔ x ^ i = 1

{G : Type u_1}
[AddGroup G]
{x : G}
{i : ℤ}


/-- The number of connected components in `G` is the dimension of the nullspace its Laplacian. -/
theorem card_ConnectedComponent_eq_rank_ker_lapMatrix : Fintype.card G.ConnectedComponent =
    FiniteDimensional.finrank ℝ (LinearMap.ker (Matrix.toLin' (G.lapMatrix ℝ)))

{V : Type u_1}
[Fintype V]
[DecidableEq V]
(G : SimpleGraph V)
[DecidableRel G.Adj]

Fintype.card G.ConnectedComponent =
  FiniteDimensional.finrank ℝ ↥(LinearMap.ker (Matrix.toLin' (SimpleGraph.lapMatrix ℝ G)))


theorem seq_pure (f : Comp F G (α → β)) (x : α) : f <*> pure x = (fun g : α → β => g x) <$> f

{F : Type u → Type w}
{G : Type v → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
{α β : Type v}
(f : Functor.Comp F G (α → β))
(x : α)

(Seq.seq f fun x_1 => pure x) = (fun g => g x) <$> f


theorem sub_one_lt_of_lt {n m : Nat} (h : m < n) : n - 1 < n


@[simp]
protected theorem map_zero (f : α → β) : f <$> (0 : FreeAbelianGroup α) = 0


theorem mul_kstar_le (hb : b ≤ c) (ha : c * a ≤ c) : b * a∗ ≤ c

{α : Type u_1}
[KleeneAlgebra α]
{a b c : α}
(hb : b ≤ c)
(ha : c * a ≤ c)


@[to_additive]
theorem map_iSup_comap_of_surjective (S : ι → Subsemigroup N) :
    (⨆ i, (S i).comap f).map f = iSup S

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{ι : Type u_5}
{f : AddHom M N}
(hf : Function.Surjective ⇑f)
(S : ι → AddSubsemigroup N)

AddSubsemigroup.map f (⨆ i, AddSubsemigroup.comap f (S i)) = iSup S


/-- `X` is a noncompact topological space if it is not a compact space. -/
class NoncompactSpace : Prop where
  /-- In a noncompact space, `Set.univ` is not a compact set. -/
  noncompact_univ : ¬IsCompact (Set.univ : Set X)

{X : Type u_1}
[TopologicalSpace X]
[self : NoncompactSpace X]


theorem Nonempty.of_sUnion {s : Set (Set α)} (h : (⋃₀s).Nonempty) : s.Nonempty

{α : Type u_1}
{s : Set (Set α)}
(h : (⋃₀ s).Nonempty)


theorem emem_iff_mem_toList {x : α} {t} : Emem x t ↔ x ∈ toList t


/-- A subfield is closed under division. -/
protected theorem div_mem {x y : K} : x ∈ s → y ∈ s → x / y ∈ s

{K : Type u}
[DivisionRing K]
(s : Subfield K)
{x y : K}


theorem coe_inf [SemilatticeInf α] (a b : α) : ((a ⊓ b : α) : WithBot α) = (a : WithBot α) ⊓ b

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


theorem bounded_lt_Ioo [Preorder α] (a b : α) : Bounded (· < ·) (Ioo a b)

Set.Bounded (fun x x_1 => x < x_1) (Set.Ioo a b)


theorem of_inter_eq_of_symmDiff_eq_zero_positive (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : 0 ≤[u] s) (hsv : 0 ≤[v] s) (hs : s (u ∆ v) = 0) :
    s (w ∩ u) = s (w ∩ v)

(hsu : MeasureTheory.VectorMeasure.restrict 0 u ≤ MeasureTheory.VectorMeasure.restrict s u)

(hsv : MeasureTheory.VectorMeasure.restrict 0 v ≤ MeasureTheory.VectorMeasure.restrict s v)


theorem mul_quot {a b} : (⟨Quot.mk _ a⟩ * ⟨Quot.mk _ b⟩ : RingQuot r) = ⟨Quot.mk _ (a * b)⟩

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

{ toQuot := Quot.mk (RingQuot.Rel r) a } * { toQuot := Quot.mk (RingQuot.Rel r) b } =
  { toQuot := Quot.mk (RingQuot.Rel r) (a * b) }


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

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


theorem curry_eq (g : A ⨯ Y ⟶ X) : curry g = (exp.coev A).app Y ≫ (exp A).map g

CategoryTheory.CartesianClosed.curry g =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.exp.coev A).app Y) ((CategoryTheory.exp A).map g)


private lemma farFromTriangleFree_of_disjoint_triangles_aux {tris : Finset (Finset α)}
    (htris : tris ⊆ G.cliqueFinset 3)
    (pd : (tris : Set (Finset α)).Pairwise fun x y ↦ (x ∩ y : Set α).Subsingleton) (hHG : H ≤ G)
    (hH : H.CliqueFree 3) : tris.card ≤ G.edgeFinset.card - H.edgeFinset.card

(pd : (↑tris).Pairwise fun x y => (↑x ∩ ↑y).Subsingleton)


/-- Suppose `f : [a, b] → δ` is
continuous and injective. Then `f` is strictly monotone (increasing) if `f(a) ≤ f(b)`. -/
theorem ContinuousOn.strictMonoOn_of_injOn_Icc {a b : α} {f : α → δ}
    (hab : a ≤ b) (hfab : f a ≤ f b)
    (hf_c : ContinuousOn f (Icc a b)) (hf_i : InjOn f (Icc a b)) :
    StrictMonoOn f (Icc a b)

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[DenselyOrdered α]
{δ : Type u_1}
[LinearOrder δ]
[TopologicalSpace δ]
[OrderClosedTopology δ]
{a b : α}
{f : α → δ}
(hab : a ≤ b)
(hfab : f a ≤ f b)
(hf_c : ContinuousOn f (Set.Icc a b))
(hf_i : Set.InjOn f (Set.Icc a b))


/-- A mixin for power-associative multiplication. -/
class NatPowAssoc (M : Type*) [MulOneClass M] [Pow M ℕ] : Prop where
  /-- Multiplication is power-associative. -/
  protected npow_add : ∀ (k n : ℕ) (x : M), x ^ (k + n) = x ^ k * x ^ n
  /-- Exponent zero is one. -/
  protected npow_zero : ∀ (x : M), x ^ 0 = 1
  /-- Exponent one is identity. -/
  protected npow_one : ∀ (x : M), x ^ 1 = x

{M : Type u_2}
[MulOneClass M]
[Pow M ℕ]
[self : NatPowAssoc M]
(k n : ℕ)
(x : M)


@[to_additive (attr := simp)]
protected theorem Units.isUnit [Monoid M] (u : Mˣ) : IsUnit (u : M)

{M : Type u_1}
[AddMonoid M]
(u : AddUnits M)


theorem inner_le_Lp_mul_Lq_tsum_of_nonneg' (hpq : p.IsConjExponent q) (hf : ∀ i, 0 ≤ f i)
    (hg : ∀ i, 0 ≤ g i) (hf_sum : Summable fun i => f i ^ p) (hg_sum : Summable fun i => g i ^ q) :
    ∑' i, f i * g i ≤ (∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q)

{ι : Type u}
{f g : ι → ℝ}
{p q : ℝ}
(hpq : p.IsConjExponent q)
(hf : ∀ (i : ι), 0 ≤ f i)
(hg : ∀ (i : ι), 0 ≤ g i)
(hf_sum : Summable fun i => f i ^ p)
(hg_sum : Summable fun i => g i ^ q)


/-- The first projection in a product is a trivial fiber bundle. -/
theorem isHomeomorphicTrivialFiberBundle_fst :
    IsHomeomorphicTrivialFiberBundle F (Prod.fst : B × F → B)

{B : Type u_1}
(F : Type u_2)
[TopologicalSpace B]
[TopologicalSpace F]


theorem getLast_eq_getLastD (a l h) : @getLast α (a::l) h = getLastD l a

{α : Type u_1}
(a : α)
(l : List α)
(h : a :: l ≠ [])


/-- `Real.sinh` as an `OrderIso`. -/
@[simps! (config := .asFn)]
def sinhOrderIso : ℝ ≃o ℝ


@[reassoc]
theorem Obj.map_on_summand {Δ Δ' : SimplexCategoryᵒᵖ} (A : Splitting.IndexSet Δ) (θ : Δ ⟶ Δ')
    {Δ'' : SimplexCategory} {e : Δ'.unop ⟶ Δ''} {i : Δ'' ⟶ A.1.unop} [Epi e] [Mono i]
    (fac : e ≫ i = θ.unop ≫ A.e) :
    ((Γ₀.splitting K).cofan Δ).inj A ≫ (Γ₀.obj K).map θ =
      Γ₀.Obj.Termwise.mapMono K i ≫ ((Γ₀.splitting K).cofan Δ').inj (Splitting.IndexSet.mk e)

(A : SimplicialObject.Splitting.IndexSet Δ)

(θ : Δ ⟶ Δ')

((AlgebraicTopology.DoldKan.Γ₀.splitting K).cofan Δ).inj A ≫ (AlgebraicTopology.DoldKan.Γ₀.obj K).map θ =
  AlgebraicTopology.DoldKan.Γ₀.Obj.Termwise.mapMono K i ≫
    ((AlgebraicTopology.DoldKan.Γ₀.splitting K).cofan Δ').inj (SimplicialObject.Splitting.IndexSet.mk e)


@[simp, fun_prop]
theorem DifferentiableAt.pow (ha : DifferentiableAt 𝕜 a x) (n : ℕ) :
    DifferentiableAt 𝕜 (fun x => a x ^ n) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{𝔸 : Type u_6}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{a : E → 𝔸}
(ha : DifferentiableAt 𝕜 a x)
(n : ℕ)


theorem upperBounds_mono ⦃s t : Set α⦄ (hst : s ⊆ t) ⦃a b⦄ (hab : a ≤ b) :
    a ∈ upperBounds t → b ∈ upperBounds s

{α : Type u}
[Preorder α]
⦃s t : Set α⦄
(hst : s ⊆ t)
⦃a b : α⦄
(hab : a ≤ b)


/-- If the sign of the angle between three points is negative, the last two points are not equal.
-/
theorem right_ne_of_oangle_sign_eq_neg_one {p₁ p₂ p₃ : P} (h : (∡ p₁ p₂ p₃).sign = -1) : p₃ ≠ p₂

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


@[gcongr]
theorem inv_le_inv_of_le (ha : 0 < a) (h : a ≤ b) : b⁻¹ ≤ a⁻¹

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


/-- The composition of `C^∞` functions within domains at points is `C^∞`. -/
nonrec theorem SmoothWithinAt.comp {t : Set M'} {g : M' → M''} (x : M)
    (hg : SmoothWithinAt I' I'' g t (f x)) (hf : SmoothWithinAt I I' f s x) (st : MapsTo f s t) :
    SmoothWithinAt I I'' (g ∘ f) 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]
{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']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{f : M → M'}
{s : Set M}
{t : Set M'}
{g : M' → M''}
(x : M)
(hg : SmoothWithinAt I' I'' g t (f x))
(hf : SmoothWithinAt I I' f s x)
(st : Set.MapsTo f s t)


/-- The unbundled orthogonal projection is in the given subspace.
This lemma is only intended for use in setting up the bundled version
and should not be used once that is defined. -/
theorem orthogonalProjectionFn_mem (v : E) : orthogonalProjectionFn K v ∈ K

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


lemma _root_.Set.Finite.absorbs_biInter {ι : Type*} {I : Set ι} (hI : I.Finite) {s : ι → Set α} :
    Absorbs G₀ (⋂ i ∈ I, s i) t ↔ ∀ i ∈ I, Absorbs G₀ (s i) t

{G₀ : Type u_1}
{α : Type u_2}
[GroupWithZero G₀]
[Bornology G₀]
[MulAction G₀ α]
{t : Set α}
{ι : Type u_3}
{I : Set ι}
(hI : I.Finite)
{s : ι → Set α}


theorem measurable_limit_of_tendsto_metrizable_ae {ι} [Countable ι] [Nonempty ι] {μ : Measure α}
    {f : ι → α → β} {L : Filter ι} [L.IsCountablyGenerated] (hf : ∀ n, AEMeasurable (f n) μ)
    (h_ae_tendsto : ∀ᵐ x ∂μ, ∃ l : β, Tendsto (fun n => f n x) L (𝓝 l)) :
    ∃ f_lim : α → β, Measurable f_lim ∧ ∀ᵐ x ∂μ, Tendsto (fun n => f n x) L (𝓝 (f_lim x))

{f : ι → α → β}

(h_ae_tendsto : ∀ᵐ (x : α) ∂μ, ∃ l, Filter.Tendsto (fun n => f n x) L (𝓝 l))

∃ f_lim, Measurable f_lim ∧ ∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun n => f n x) L (𝓝 (f_lim x))


theorem isUnit_iff_bijective {f : CircleDeg1Lift} : IsUnit f ↔ Bijective f


theorem EventuallyLE.le_iff_eq [PartialOrder β] {l : Filter α} {f g : α → β} (h : f ≤ᶠ[l] g) :
    g ≤ᶠ[l] f ↔ g =ᶠ[l] f

{α : Type u}
{β : Type v}
[PartialOrder β]
{l : Filter α}
{f g : α → β}
(h : f ≤ᶠ[l] g)


@[simp]
theorem not_isMax [NoMaxOrder α] (a : α) : ¬IsMax a

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


@[to_additive]
theorem continuousOn_multiset_prod {f : ι → X → M} (s : Multiset ι) {t : Set X} :
    (∀ i ∈ s, ContinuousOn (f i) t) → ContinuousOn (fun a => (s.map fun i => f i a).prod) t

{ι : Type u_1}
{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[AddCommMonoid M]
[ContinuousAdd M]
{f : ι → X → M}
(s : Multiset ι)
{t : Set X}

(∀ i ∈ s, ContinuousOn (f i) t) → ContinuousOn (fun a => (Multiset.map (fun i => f i a) s).sum) t


@[to_additive]
theorem units_inv_right : Commute a u → Commute a ↑u⁻¹

{M : Type u_1}
[AddMonoid M]
{a : M}
{u : AddUnits M}


theorem le_iff' (f g : ι →₀ α) {s : Finset ι} (hf : f.support ⊆ s) : f ≤ g ↔ ∀ i ∈ s, f i ≤ g i

{ι : Type u_1}
{α : Type u_2}
[CanonicallyOrderedAddCommMonoid α]
(f g : ι →₀ α)
{s : Finset ι}
(hf : f.support ⊆ s)


theorem preimage_union (s t : Set β) : f.preimage (s ∪ t) = f.preimage s ∪ f.preimage t

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


/-- Conjugation is jointly continuous on `G × G` when both `mul` and `inv` are continuous. -/
@[to_additive
  "Conjugation is jointly continuous on `G × G` when both `add` and `neg` are continuous."]
theorem TopologicalGroup.continuous_conj_prod [ContinuousInv G] :
    Continuous fun g : G × G => g.fst * g.snd * g.fst⁻¹

{G : Type w}
[TopologicalSpace G]
[Inv G]
[Mul G]
[ContinuousMul G]
[ContinuousInv G]


/-- The inner product of two linear combinations of a set of orthonormal vectors, expressed as
a sum over the second `Finsupp`. -/
theorem Orthonormal.inner_finsupp_eq_sum_right {v : ι → E} (hv : Orthonormal 𝕜 v) (l₁ l₂ : ι →₀ 𝕜) :
    ⟪Finsupp.total ι E 𝕜 v l₁, Finsupp.total ι E 𝕜 v l₂⟫ = l₂.sum fun i y => conj (l₁ i) * y

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{v : ι → E}
(hv : Orthonormal 𝕜 v)
(l₁ l₂ : ι →₀ 𝕜)

⟪(Finsupp.total ι E 𝕜 v) l₁, (Finsupp.total ι E 𝕜 v) l₂⟫_𝕜 = l₂.sum fun i y => (starRingEnd 𝕜) (l₁ i) * y


theorem jacobson_eq_bot : jacobson I = ⊥ → I = ⊥


@[simp]
theorem Real.logDeriv_cos : logDeriv (Real.cos) = -Real.tan


/-- If a fundamental domain has volume 0, then `QuotientMeasureEqMeasurePreimage` holds. -/
@[to_additive]
theorem IsFundamentalDomain.quotientMeasureEqMeasurePreimage_of_zero
    {s : Set α} (fund_dom_s : IsFundamentalDomain G s ν)
    (vol_s : ν s = 0) :
    QuotientMeasureEqMeasurePreimage ν (0 : Measure (Quotient α_mod_G))

[MeasureTheory.SMulInvariantMeasure G α ν]

(fund_dom_s : MeasureTheory.IsFundamentalDomain G s ν)


@[simp]
theorem sub_coeff' {x y : HahnSeries Γ R} : (x - y).coeff = x.coeff - y.coeff

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddGroup R]
{x y : HahnSeries Γ R}


/-- In a noncompact locally compact group, a left-invariant measure which is positive
on open sets has infinite mass. -/
@[to_additive (attr := simp)
"In a noncompact locally compact additive group, a left-invariant measure which is positive on open
sets has infinite mass."]
theorem measure_univ_of_isMulLeftInvariant [WeaklyLocallyCompactSpace G] [NoncompactSpace G]
    (μ : Measure G) [IsOpenPosMeasure μ] [μ.IsMulLeftInvariant] : μ univ = ∞

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
[AddGroup G]
[TopologicalAddGroup G]
[WeaklyLocallyCompactSpace G]
[NoncompactSpace G]
(μ : MeasureTheory.Measure G)
[μ.IsOpenPosMeasure]
[μ.IsAddLeftInvariant]


protected theorem IsTransitive.powerset (h : x.IsTransitive) : (powerset x).IsTransitive


@[simp] theorem ι_mul_ι_add_swap_of_isOrtho {a b : M} (h : Q.IsOrtho a b) :
    ι Q a * ι Q b + ι Q b * ι Q a = 0

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
{a b : M}
(h : QuadraticMap.IsOrtho Q a b)

(CliffordAlgebra.ι Q) a * (CliffordAlgebra.ι Q) b + (CliffordAlgebra.ι Q) b * (CliffordAlgebra.ι Q) a = 0


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

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
{f g : EsakiaHom α β}
(h : ∀ (a : α), f a = g a)


@[simp]
theorem mem_maximalIdeal (x) : x ∈ maximalIdeal R ↔ x ∈ nonunits R

{R : Type u_1}
[CommSemiring R]
[LocalRing R]
(x : R)

x ∈ LocalRing.maximalIdeal R ↔ x ∈ nonunits R


@[to_additive]
theorem IsClosed.mul_left_of_isCompact (ht : IsClosed t) (hs : IsCompact s) : IsClosed (s * t)

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
{s t : Set G}
(ht : IsClosed t)
(hs : IsCompact s)


@[simp]
theorem pair_inj {x y x' y' : ZFSet} : pair x y = pair x' y' ↔ x = x' ∧ y = y'


@[to_additive]
theorem MulEquiv.map_finprod (g : M ≃* N) (f : α → M) : g (∏ᶠ i, f i) = ∏ᶠ i, g (f i)

{M : Type u_2}
{N : Type u_3}
{α : Sort u_4}
[AddCommMonoid M]
[AddCommMonoid N]
(g : M ≃+ N)
(f : α → M)

g (∑ᶠ (i : α), f i) = ∑ᶠ (i : α), g (f i)


theorem OpenEmbedding.quasiSober {f : α → β} (hf : OpenEmbedding f) [QuasiSober β] :
    QuasiSober α

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
(hf : OpenEmbedding f)
[QuasiSober β]


theorem middle_assoc' :
    (actLeft P Q ▷ T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (R.X ◁ actRight P Q) ≫ actLeft P Q

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

Bimod.TensorBimod.actLeft P Q ▷ T.X ≫ Bimod.TensorBimod.actRight P Q =
  (α_ R.X (Bimod.TensorBimod.X P Q) T.X).hom ≫ R.X ◁ Bimod.TensorBimod.actRight P Q ≫ Bimod.TensorBimod.actLeft P Q


@[simp]
theorem map_mul_of_coprime {f : ArithmeticFunction R} (hf : f.IsMultiplicative) {m n : ℕ}
    (h : m.Coprime n) : f (m * n) = f m * f n

{R : Type u_1}
[MonoidWithZero R]
{f : ArithmeticFunction R}
(hf : f.IsMultiplicative)
{m n : ℕ}
(h : m.Coprime n)


theorem get_succ (n : ℕ) (s : Stream' α) : get s (succ n) = get (tail s) n


/-- Any matrix can be reduced to diagonal form by elementary operations. Formulated here on `Type 0`
because we will make an induction using `Fin r`.
See `exists_list_transvec_mul_mul_list_transvec_eq_diagonal` for the general version (which follows
from this one and reindexing). -/
theorem exists_list_transvec_mul_mul_list_transvec_eq_diagonal_aux (n : Type) [Fintype n]
    [DecidableEq n] (M : Matrix n n 𝕜) :
    ∃ (L L' : List (TransvectionStruct n 𝕜)) (D : n → 𝕜),
      (L.map toMatrix).prod * M * (L'.map toMatrix).prod = diagonal D

{𝕜 : Type u_3}
[Field 𝕜]
(n : Type)
[Fintype n]
[DecidableEq n]
(M : Matrix n n 𝕜)

∃ L L' D,
  (List.map Matrix.TransvectionStruct.toMatrix L).prod * M * (List.map Matrix.TransvectionStruct.toMatrix L').prod =
    Matrix.diagonal D


theorem unsym_injective : Injective (unsym : αˢʸᵐ → α)


/-- **Ruzsa's triangle inequality**. Div-mul-div version. -/
@[to_additive "**Ruzsa's triangle inequality**. Sub-add-sub version."]
theorem ruzsa_triangle_inequality_div_mul_div (A B C : Finset α) :
    (A / C).card * B.card ≤ (A * B).card * (B / C).card

{α : Type u_1}
[CommGroup α]
[DecidableEq α]
(A B C : Finset α)


@[simp, norm_cast] lemma ofReal_intCast (n : ℤ) : ofReal' n = n


theorem hasLineDerivWithinAt_smul_iff {c : 𝕜} (hc : c ≠ 0) :
    HasLineDerivWithinAt 𝕜 f (c • f') s x (c • v) ↔ HasLineDerivWithinAt 𝕜 f f' s x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{s : Set E}
{x v : E}
{f' : F}
{c : 𝕜}
(hc : c ≠ 0)


theorem nonempty_boxes (h : π.IsPartition) : π.boxes.Nonempty

{ι : Type u_1}
{I : BoxIntegral.Box ι}
{π : BoxIntegral.Prepartition I}
(h : π.IsPartition)


@[simp]
protected theorem map_one : map (1 : M →ₗ[A] M) (1 : N →ₗ[R] N) = 1

{R : Type uR}
{A : Type uA}
{M : Type uM}
{N : Type uN}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]

TensorProduct.AlgebraTensorModule.map 1 1 = 1


@[simp] theorem dot_nil_right : dot xs ([] : IntList) = 0


theorem differentiableAt_tan_of_mem_Ioo {x : ℝ} (h : x ∈ Ioo (-(π / 2) : ℝ) (π / 2)) :
    DifferentiableAt ℝ tan x

(h : x ∈ Set.Ioo (-(Real.pi / 2)) (Real.pi / 2))


theorem SeminormFamily.finset_sup_comp (q : SeminormFamily 𝕜₂ F ι) (s : Finset ι)
    (f : E →ₛₗ[σ₁₂] F) : (s.sup q).comp f = s.sup (q.comp f)

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_5}
{F : Type u_6}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[NormedField 𝕜₂]
[AddCommGroup F]
[Module 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(q : SeminormFamily 𝕜₂ F ι)
(s : Finset ι)
(f : E →ₛₗ[σ₁₂] F)


@[to_additive]
theorem mul_mem_mul [Mul α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma * mb ∈ a * b

{α : Type u_1}
[Mul α]
(a b : Part α)
(ma mb : α)
(ha : ma ∈ a)
(hb : mb ∈ b)


theorem kreplace_self {a : α} {b : β a} {l : List (Sigma β)} (nd : NodupKeys l)
    (h : Sigma.mk a b ∈ l) : kreplace a b l = l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{b : β a}
{l : List (Sigma β)}
(nd : l.NodupKeys)
(h : ⟨a, b⟩ ∈ l)


theorem interior_iInter₂_subset (p : ι → Sort*) (s : ∀ i, p i → Set X) :
    interior (⋂ (i) (j), s i j) ⊆ ⋂ (i) (j), interior (s i j)

{X : Type u}
{ι : Sort w}
[TopologicalSpace X]
(p : ι → Sort u_3)
(s : (i : ι) → p i → Set X)

interior (⋂ i, ⋂ j, s i j) ⊆ ⋂ i, ⋂ j, interior (s i j)


@[to_additive]
theorem norm_le_norm_add_norm_div' (u v : E) : ‖u‖ ≤ ‖v‖ + ‖u / v‖

{E : Type u_6}
[SeminormedGroup E]
(u v : E)

‖u‖ ≤ ‖v‖ + ‖u / v‖


theorem cokernel_π_ext {M N : ModuleCat.{u} R} (f : M ⟶ N) {x y : N} (m : M) (w : x = y + f m) :
    cokernel.π f x = cokernel.π f y

{R : Type u}
[Ring R]
{M N : ModuleCat R}
(f : M ⟶ N)
{x y : ↑N}
(m : ↑M)
(w : x = y + f m)

(CategoryTheory.Limits.cokernel.π f) x = (CategoryTheory.Limits.cokernel.π f) y


@[simp]
theorem zeroIsoTerminal_hom [HasTerminal C] : zeroIsoTerminal.hom = (0 : 0 ⟶ ⊤_ C)


@[to_additive (attr := simp)]
theorem prod_eq_prod_fintype [Fintype ι] [∀ i, Zero (β i)] [∀ (i : ι) (x : β i), Decidable (x ≠ 0)]
    -- Porting note: `f` was a typeclass argument
    [CommMonoid γ] (v : Π₀ i, β i) {f : ∀ i, β i → γ} (hf : ∀ i, f i 0 = 1) :
    v.prod f = ∏ i, f i (DFinsupp.equivFunOnFintype v i)

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

v.sum f = ∑ i : ι, f i (DFinsupp.equivFunOnFintype v i)


/-- The stream of `IntFractPair`s of an integer stops after the first term.
-/
theorem stream_succ_of_int (a : ℤ) (n : ℕ) : IntFractPair.stream (a : K) (n + 1) = none

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
(a : ℤ)
(n : ℕ)

GenContFract.IntFractPair.stream (↑a) (n + 1) = none


theorem iInf_sigma {p : β → Type*} {f : Sigma p → α} : ⨅ x, f x = ⨅ (i) (j), f ⟨i, j⟩

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{p : β → Type u_9}
{f : Sigma p → α}


@[simp]
lemma one_lt_ofReal {r : ℝ} : 1 < ENNReal.ofReal r ↔ 1 < r


theorem lintegral_withDensity_eq_lintegral_mul₀ {μ : Measure α} {f : α → ℝ≥0∞}
    (hf : AEMeasurable f μ) {g : α → ℝ≥0∞} (hg : AEMeasurable g μ) :
    ∫⁻ a, g a ∂μ.withDensity f = ∫⁻ a, (f * g) a ∂μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : AEMeasurable f μ)
{g : α → ℝ≥0∞}
(hg : AEMeasurable g μ)

∫⁻ (a : α), g a ∂μ.withDensity f = ∫⁻ (a : α), (f * g) a ∂μ


/-- A function between topological spaces is an embedding if it is injective,
  and for all `s : Set X`, `s` is open iff it is the preimage of an open set. -/
@[mk_iff]
structure Embedding [TopologicalSpace X] [TopologicalSpace Y] (f : X → Y) extends
  Inducing f : Prop where
  /-- A topological embedding is injective. -/
  inj : Function.Injective f

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

Embedding f ↔ Inducing f ∧ Function.Injective f


protected theorem IsTopologicalBasis.isOpen {s : Set α} {b : Set (Set α)}
    (hb : IsTopologicalBasis b) (hs : s ∈ b) : IsOpen s

(hb : TopologicalSpace.IsTopologicalBasis b)


@[nontriviality]
lemma iCondIndepFun.of_subsingleton [Subsingleton ι] : iCondIndepFun m' hm' m f μ

{Ω : Type u_1}
{ι : Type u_2}
{m' mΩ : MeasurableSpace Ω}
[StandardBorelSpace Ω]
[Nonempty Ω]
{hm' : m' ≤ mΩ}
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]
{β : ι → Type u_5}
{m : (i : ι) → MeasurableSpace (β i)}
{f : (i : ι) → Ω → β i}
[Subsingleton ι]

ProbabilityTheory.iCondIndepFun m' hm' m f μ


/-- `Function.extend s f 1` as a bundled hom. -/
@[to_additive (attr := simps) Function.ExtendByZero.hom "`Function.extend s f 0` as a bundled hom."]
noncomputable def Function.ExtendByOne.hom [MulOneClass R] :
    (ι → R) →* η → R

{ι : Type u_1}
{η : Type v}
(R : Type w)
(s : ι → η)
[AddZeroClass R]
(f : ι → R)

∀ (a : η), (Function.ExtendByZero.hom R s) f a = Function.extend s f 0 a


theorem range_ite_subset' {p : Prop} [Decidable p] {f g : α → β} :
    range (if p then f else g) ⊆ range f ∪ range g

{α : Type u_1}
{β : Type u_2}
{p : Prop}
[Decidable p]
{f g : α → β}

Set.range (if p then f else g) ⊆ Set.range f ∪ Set.range g


theorem ContDiffWithinAt.congr_of_eventually_eq' (h : ContDiffWithinAt 𝕜 n f s x)
    (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : x ∈ s) : ContDiffWithinAt 𝕜 n f₁ s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f f₁ : E → F}
{x : E}
{n : ℕ∞}
(h : ContDiffWithinAt 𝕜 n f s x)
(h₁ : f₁ =ᶠ[𝓝[s] x] f)
(hx : x ∈ s)


theorem hasBasis_biInf_principal {s : β → Set α} {S : Set β} (h : DirectedOn (s ⁻¹'o (· ≥ ·)) S)
    (ne : S.Nonempty) : (⨅ i ∈ S, 𝓟 (s i)).HasBasis (fun i => i ∈ S) s

(h : DirectedOn (s ⁻¹'o fun x x_1 => x ≥ x_1) S)


theorem exists_add_lt_and_pos_of_lt (h : b < a) : ∃ c, b + c < a ∧ 0 < c

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(h : b < a)


theorem Icc_subset_Ioc_iff (h₁ : a₁ ≤ b₁) : Icc a₁ b₁ ⊆ Ioc a₂ b₂ ↔ a₂ < a₁ ∧ b₁ ≤ b₂

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

Finset.Icc a₁ b₁ ⊆ Finset.Ioc a₂ b₂ ↔ a₂ < a₁ ∧ b₁ ≤ b₂


/-- `b.toMatrix b'` and `b'.toMatrix b` are inverses. -/
theorem Basis.toMatrix_mul_toMatrix_flip [DecidableEq ι] [Fintype ι'] :
    b.toMatrix b' * b'.toMatrix b = 1

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_5}
{M : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(b' : Basis ι' R M)
[DecidableEq ι]
[Fintype ι']


theorem constr_range {f : ι → M'} :
    LinearMap.range (constr (M' := M') b S f) = span R (range f)

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(S : Type u_10)
[Semiring S]
[Module S M']
[SMulCommClass R S M']
{f : ι → M'}

LinearMap.range ((b.constr S) f) = Submodule.span R (Set.range f)


/-- `Subtype.impEmbedding` as an order embedding. -/
@[simps!]
def _root_.Subtype.orderEmbedding {p q : α → Prop} (h : ∀ a, p a → q a) :
    {x // p x} ↪o {x // q x}

{α : Type u_2}
[Preorder α]
{p q : α → Prop}
(h : ∀ (a : α), p a → q a)
(x : { x // p x })


/-- The support of a hamiltonian walk is the entire vertex set. -/
lemma IsHamiltonian.support_toFinset (hp : p.IsHamiltonian) : p.support.toFinset = Finset.univ

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{G : SimpleGraph α}
{a b : α}
{p : G.Walk a b}
(hp : p.IsHamiltonian)


@[simp]
lemma scaleRoots_mul (p : R[X]) (r s) :
    p.scaleRoots (r * s) = (p.scaleRoots r).scaleRoots s

{R : Type u_1}
[CommSemiring R]
(p : Polynomial R)
(r s : R)


theorem ChainClosure.succ_fixpoint_iff (hc : ChainClosure r c) :
    SuccChain r c = c ↔ c = maxChain r

{α : Type u_1}
{r : α → α → Prop}
{c : Set α}
(hc : ChainClosure r c)


@[simp]
theorem component_sumInv (x : AdicCompletion I (⨁ j, M j)) (j : ι) :
    component (AdicCompletion I R) ι _ j (sumInv I M x) =
      map I (component R ι _ j) x

(x : AdicCompletion I (DirectSum ι fun j => M j))

(DirectSum.component (AdicCompletion I R) ι (fun i => AdicCompletion I (M i)) j) ((AdicCompletion.sumInv I M) x) =
  (AdicCompletion.map I (DirectSum.component R ι M j)) x


/-- `F[S][T] = F[T][S]` -/
theorem adjoin_adjoin_comm (T : Set E) :
    (adjoin (adjoin F S) T).restrictScalars F = (adjoin (adjoin F T) S).restrictScalars F

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(S T : Set E)

IntermediateField.restrictScalars F (IntermediateField.adjoin (↥(IntermediateField.adjoin F S)) T) =
  IntermediateField.restrictScalars F (IntermediateField.adjoin (↥(IntermediateField.adjoin F T)) S)


@[to_additive (attr := simp)]
theorem swap_div [Div G] [Div H] (a b : G × H) : (a / b).swap = a.swap / b.swap

{G : Type u_3}
{H : Type u_4}
[Sub G]
[Sub H]
(a b : G × H)


theorem integral_nonpos {f : α → ℝ} (hf : f ≤ 0) : ∫ a, f a ∂μ ≤ 0

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


theorem ae_eq_univ_iff_measure_eq [IsFiniteMeasure μ] (hs : NullMeasurableSet s μ) :
    s =ᵐ[μ] univ ↔ μ s = μ univ

(hs : MeasureTheory.NullMeasurableSet s μ)


theorem isUnit_iff_singleton : IsUnit s ↔ ∃ a, s = {a}

{α : Type u_2}
[DecidableEq α]
[Group α]
{s : Finset α}


theorem Real.uniformContinuous_abs : UniformContinuous (abs : ℝ → ℝ)


/-- In an integral domain, a sum indexed by a nontrivial homomorphism from a finite group is zero.
-/
theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0

{R : Type u_1}
{G : Type u_2}
[CommRing R]
[IsDomain R]
[Group G]
[Fintype G]
(f : G →* R)
(hf : f ≠ 1)


theorem tendsto_atBot_of_add_bdd_below_right (C) (hC : ∀ x, C ≤ g x) :
    Tendsto (fun x => f x + g x) l atBot → Tendsto f l atBot

{α : Type u_3}
{β : Type u_4}
[OrderedCancelAddCommMonoid β]
{l : Filter α}
{f g : α → β}
(C : β)
(hC : ∀ (x : α), C ≤ g x)

Filter.Tendsto (fun x => f x + g x) l Filter.atBot → Filter.Tendsto f l Filter.atBot


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

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

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


lemma one_sub_inv_inv (ha₀ : 0 < a) (ha₁ : a < 1) : (1 - a)⁻¹.IsConjExponent a⁻¹


@[simp] lemma norm_ofAdd (x : E) : ‖ofAdd x‖ = ‖x‖


@[simp]
theorem frequently_comap : (∃ᶠ a in comap f l, p a) ↔ ∃ᶠ b in l, ∃ a, f a = b ∧ p a

{α : Type u}
{β : Type v}
{f : α → β}
{l : Filter β}
{p : α → Prop}

(∃ᶠ (a : α) in Filter.comap f l, p a) ↔ ∃ᶠ (b : β) in l, ∃ a, f a = b ∧ p a


@[simp]
theorem iInf_const_zero {α : Sort*} : ⨅ _ : α, (0 : ℝ≥0) = 0


theorem extract.go₁_zero_utf8Len (s : List Char) : go₁ s 0 0 ⟨utf8Len s⟩ = s

String.extract.go₁ s 0 0 { byteIdx := String.utf8Len s } = s


/-- The truncation of an `ℕ`-indexed cochain complex,
deleting the object at `0` and shifting everything else down.
-/
@[simps]
def truncate [HasZeroMorphisms V] : CochainComplex V ℕ ⥤ CochainComplex V ℕ

(CochainComplex.truncate.obj C).d i j = C.d (i + 1) (j + 1)


protected theorem nsmul_add (n : ℕ) : a ≡ b [PMOD p] → n • p + a ≡ b [PMOD p]

{α : Type u_1}
[AddCommGroup α]
{p a b : α}
(n : ℕ)


@[simp]
theorem nat_sub_iff : LiouvilleWith p (n - x) ↔ LiouvilleWith p x

LiouvilleWith p (↑n - x) ↔ LiouvilleWith p x


/-- Take the "unopposite" of a functor is functorial.
-/
@[simps]
def opInv : (Cᵒᵖ ⥤ Dᵒᵖ) ⥤ (C ⥤ D)ᵒᵖ

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

∀ {X Y : CategoryTheory.Functor Cᵒᵖ Dᵒᵖ} (α : X ⟶ Y),
  (CategoryTheory.Functor.opInv C D).map α =
    Quiver.Hom.op { app := fun X_1 => (α.app (Opposite.op X_1)).unop, naturality := ⋯ }


@[simp] lemma map_id [IsDirected ι (· ≤ ·)] :
    map (fun i ↦ RingHom.id _) (fun _ _ _ ↦ rfl) =
    RingHom.id (DirectLimit G fun _ _ h ↦ f _ _ h)

{ι : Type v}
[Preorder ι]
{G : ι → Type w}
[(i : ι) → CommRing (G i)]
{f : (i j : ι) → i ≤ j → G i →+* G j}
[Nonempty ι]
[IsDirected ι fun x x_1 => x ≤ x_1]

Ring.DirectLimit.map (fun i => RingHom.id (G i)) ⋯ = RingHom.id (Ring.DirectLimit G fun x x_1 h => ⇑(f x x_1 h))


@[simp]
theorem dist_pointReflection_fixed (x y : P) : dist (pointReflection 𝕜 x y) x = dist y x

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(x y : P)

dist ((AffineIsometryEquiv.pointReflection 𝕜 x) y) x = dist y x


theorem Continuous.map_borel_eq {X Y : Type*} [TopologicalSpace X] [PolishSpace X]
    [TopologicalSpace Y] [T0Space Y] [SecondCountableTopology Y] {f : X → Y} (hf : Continuous f)
    (hsurj : Surjective f) : MeasurableSpace.map f (borel X) = borel Y

{X : Type u_3}
{Y : Type u_4}
[TopologicalSpace X]
[PolishSpace X]
[TopologicalSpace Y]
[T0Space Y]
[SecondCountableTopology Y]
{f : X → Y}
(hf : Continuous f)
(hsurj : Function.Surjective f)


/-- We relate a finite product over primes in `s` to an infinite sum over `s`-factored numbers. -/
lemma summable_and_hasSum_factoredNumbers_prod_filter_prime_tsum
    (hsum : ∀ {p : ℕ}, p.Prime → Summable (fun n : ℕ ↦ ‖f (p ^ n)‖)) (s : Finset ℕ) :
    Summable (fun m : factoredNumbers s ↦ ‖f m‖) ∧
      HasSum (fun m : factoredNumbers s ↦ f m)
        (∏ p ∈ s.filter Nat.Prime, ∑' n : ℕ, f (p ^ n))

(hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n)

(hsum : ∀ {p : ℕ}, Nat.Prime p → Summable fun n => ‖f (p ^ n)‖)

(Summable fun m => ‖f ↑m‖) ∧ HasSum (fun m => f ↑m) (∏ p ∈ Finset.filter Nat.Prime s, ∑' (n : ℕ), f (p ^ n))


@[to_additive (attr := simp)]
theorem traverse_mul (x y : FreeMagma α) :
    traverse F (x * y) = (· * ·) <$> traverse F x <*> traverse F y

{α β : Type u}
{m : Type u → Type u}
[Applicative m]
(F : α → m β)
(x y : FreeAddMagma α)

traverse F (x + y) = Seq.seq ((fun x x_1 => x + x_1) <$> traverse F x) fun x => traverse F y


theorem span_iUnion {ι} (s : ι → Set M) : lieSpan R L (⋃ i, s i) = ⨆ i, lieSpan R L (s i)

(R : Type u)
(L : Type v)
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{ι : Sort u_1}
(s : ι → Set M)

LieSubmodule.lieSpan R L (⋃ i, s i) = ⨆ i, LieSubmodule.lieSpan R L (s i)


theorem mem_principalUnitGroup_iff (x : Kˣ) :
    x ∈ A.principalUnitGroup ↔ A.valuation ((x : K) - 1) < 1

{K : Type u}
[Field K]
(A : ValuationSubring K)
(x : Kˣ)

x ∈ A.principalUnitGroup ↔ A.valuation (↑x - 1) < 1


@[reassoc (attr := simp)]
theorem braiding_inv_naturality_right (X : C) {Y Z : C} (f : Y ⟶ Z) :
    X ◁ f ≫ (β_ Z X).inv = (β_ Y X).inv ≫ f ▷ X

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


protected theorem sub {S : Type*} [AddGroup S] [Mul S] (t : RingCon S)
    {a b c d : S} (h : t a b) (h' : t c d) : t (a - c) (b - d)

{S : Type u_3}
[AddGroup S]
[Mul S]
(t : RingCon S)
{a b c d : S}
(h : t a b)
(h' : t c d)


@[simp] theorem size_ofFn (f : Fin n → α) : (ofFn f).size = n

{n : Nat}
{α : Type u_1}
(f : Fin n → α)


/-- Continuous multilinear maps over the ring `R`, from `∀ i, M₁ i` to `M₂` where `M₁ i` and `M₂`
are modules over `R` with a topological structure. In applications, there will be compatibility
conditions between the algebraic and the topological structures, but this is not needed for the
definition. -/
structure ContinuousMultilinearMap (R : Type u) {ι : Type v} (M₁ : ι → Type w₁) (M₂ : Type w₂)
  [Semiring R] [∀ i, AddCommMonoid (M₁ i)] [AddCommMonoid M₂] [∀ i, Module R (M₁ i)] [Module R M₂]
  [∀ i, TopologicalSpace (M₁ i)] [TopologicalSpace M₂] extends MultilinearMap R M₁ M₂ where
  cont : Continuous toFun

(self : ContinuousMultilinearMap R M₁ M₂)


theorem ContDiffOn.arsinh (h : ContDiffOn ℝ n f s) : ContDiffOn ℝ n (fun x => arsinh (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
{n : ℕ∞}
(h : ContDiffOn ℝ n f s)

ContDiffOn ℝ n (fun x => Real.arsinh (f x)) s


theorem contMDiffWithinAt_inter (ht : t ∈ 𝓝 x) :
    ContMDiffWithinAt I I' n f (s ∩ t) x ↔ ContMDiffWithinAt I I' n f 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]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{s t : Set M}
{x : M}
{n : ℕ∞}
(ht : t ∈ 𝓝 x)


theorem differentiableWithinAt_iff_restrictScalars (hf : DifferentiableWithinAt 𝕜 f s x)
    (hs : UniqueDiffWithinAt 𝕜 s x) : DifferentiableWithinAt 𝕜' f s x ↔
      ∃ g' : E →L[𝕜'] F, g'.restrictScalars 𝕜 = fderivWithin 𝕜 f s x

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜' E]
[IsScalarTower 𝕜 𝕜' E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{f : E → F}
{s : Set E}
{x : E}
(hf : DifferentiableWithinAt 𝕜 f s x)
(hs : UniqueDiffWithinAt 𝕜 s x)

DifferentiableWithinAt 𝕜' f s x ↔ ∃ g', ContinuousLinearMap.restrictScalars 𝕜 g' = fderivWithin 𝕜 f s x


theorem inf_def {B : C} (m m' : Subobject B) : m ⊓ m' = (inf.obj m).obj m'

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{B : C}
(m m' : CategoryTheory.Subobject B)

m ⊓ m' = (CategoryTheory.Subobject.inf.obj m).obj m'


/-- A compositum of algebraic extensions is algebraic -/
theorem isAlgebraic_iSup {ι : Type*} {t : ι → IntermediateField K L}
    (h : ∀ i, Algebra.IsAlgebraic K (t i)) :
    Algebra.IsAlgebraic K (⨆ i, t i : IntermediateField K L)

(h : ∀ (i : ι), Algebra.IsAlgebraic K ↥(t i))


/-- Flip the arguments of a bifunctor. See also `Currying.lean`. -/
@[simps]
protected def flip (F : C ⥤ D ⥤ E) : D ⥤ C ⥤ E

(F : CategoryTheory.Functor C (CategoryTheory.Functor D E))


theorem union_def {s₁ s₂ : Set α} : s₁ ∪ s₂ = { a | a ∈ s₁ ∨ a ∈ s₂ }


theorem image₂_singleton_inter [DecidableEq β] (t₁ t₂ : Finset β) (hf : Injective (f a)) :
    image₂ f {a} (t₁ ∩ t₂) = image₂ f {a} t₁ ∩ image₂ f {a} t₂

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{a : α}
[DecidableEq β]
(t₁ t₂ : Finset β)
(hf : Function.Injective (f a))

Finset.image₂ f {a} (t₁ ∩ t₂) = Finset.image₂ f {a} t₁ ∩ Finset.image₂ f {a} t₂


theorem rpow_logb_of_neg (hx : x < 0) : b ^ logb b x = -x


protected theorem bijective : Function.Bijective e

{R : Type u_1}
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_S_M₂ : Module S M₂}
{σ : R →+* S}
{σ' : S →+* R}
{re₁ : RingHomInvPair σ σ'}
{re₂ : RingHomInvPair σ' σ}
(e : M ≃ₛₗ[σ] M₂)


theorem isSupClosedCompact_iff_wellFounded :
    IsSupClosedCompact α ↔ WellFounded ((· > ·) : α → α → Prop)

CompleteLattice.IsSupClosedCompact α ↔ WellFounded fun x x_1 => x > x_1


theorem integral_interval_sub_left (hab : IntervalIntegrable f μ a b)
    (hac : IntervalIntegrable f μ a c) :
    ((∫ x in a..b, f x ∂μ) - ∫ x in a..c, f x ∂μ) = ∫ x in c..b, f x ∂μ

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b c : ℝ}
{f : ℝ → E}
{μ : MeasureTheory.Measure ℝ}
(hab : IntervalIntegrable f μ a b)
(hac : IntervalIntegrable f μ a c)

∫ (x : ℝ) in a..b, f x ∂μ - ∫ (x : ℝ) in a..c, f x ∂μ = ∫ (x : ℝ) in c..b, f x ∂μ


@[simp]
theorem mem_Icc : x ∈ Icc a b ↔ a ≤ x ∧ x ≤ b


@[to_additive]
theorem mul_inv_eq_iff_eq_mul {a c : α} : a * ↑b⁻¹ = c ↔ a = c * b

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


@[to_additive]
theorem finprod_emb_domain' {f : α → β} (hf : Injective f) [DecidablePred (· ∈ Set.range f)]
    (g : α → M) :
    (∏ᶠ b : β, if h : b ∈ Set.range f then g (Classical.choose h) else 1) = ∏ᶠ a : α, g a

[DecidablePred fun x => x ∈ Set.range f]

(∑ᶠ (b : β), if h : b ∈ Set.range f then g (Classical.choose h) else 0) = ∑ᶠ (a : α), g a


theorem sumFinsuppAddEquivProdFinsupp_symm_inr {α β : Type*} (fg : (α →₀ M) × (β →₀ M)) (y : β) :
    (sumFinsuppAddEquivProdFinsupp.symm fg) (Sum.inr y) = fg.2 y

{M : Type u_5}
[AddMonoid M]
{α : Type u_13}
{β : Type u_14}
(fg : (α →₀ M) × (β →₀ M))
(y : β)

(Finsupp.sumFinsuppAddEquivProdFinsupp.symm fg) (Sum.inr y) = fg.2 y


theorem eLpNorm'_measure_zero_of_pos {f : α → F} (hq_pos : 0 < q) :
    eLpNorm' f q (0 : Measure α) = 0

{α : Type u_1}
{F : Type u_3}
{q : ℝ}
[NormedAddCommGroup F]
[MeasurableSpace α]
{f : α → F}
(hq_pos : 0 < q)


/-- The Law of Quadratic Reciprocity: if `p` and `q` are odd primes and `p % 4 = 1`,
then `(q / p) = (p / q)`. -/
theorem quadratic_reciprocity_one_mod_four (hp : p % 4 = 1) (hq : q ≠ 2) :
    legendreSym q p = legendreSym p q

{p q : ℕ}
[Fact (Nat.Prime p)]
[Fact (Nat.Prime q)]
(hp : p % 4 = 1)
(hq : q ≠ 2)


@[simp]
theorem posSemidef_submatrix_equiv {M : Matrix n n R} (e : m ≃ n) :
    (M.submatrix e e).PosSemidef ↔ M.PosSemidef

{m : Type u_1}
{n : Type u_2}
{R : Type u_3}
[Fintype m]
[Fintype n]
[CommRing R]
[PartialOrder R]
[StarRing R]
{M : Matrix n n R}
(e : m ≃ n)

(M.submatrix ⇑e ⇑e).PosSemidef ↔ M.PosSemidef


@[to_additive]
protected theorem Periodic.div [Add α] [Div β] (hf : Periodic f c) (hg : Periodic g c) :
    Periodic (f / g) c

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


@[to_additive]
theorem IsClosed.inv (hs : IsClosed s) : IsClosed s⁻¹

{G : Type w}
[TopologicalSpace G]
[InvolutiveNeg G]
[ContinuousNeg G]
{s : Set G}
(hs : IsClosed s)


theorem Nat.Coprime.cast {R : Type*} [CommRing R] {a b : ℕ} (h : Nat.Coprime a b) :
    IsCoprime (a : R) (b : R)

{R : Type u_1}
[CommRing R]
{a b : ℕ}
(h : a.Coprime b)


protected theorem finrank_eq_rank :
    finrank ℝ ({w : InfinitePlace K // w ≠ w₀} → ℝ) = Units.rank K

(K : Type u_1)
[Field K]
[NumberField K]

FiniteDimensional.finrank ℝ ({ w // w ≠ NumberField.Units.dirichletUnitTheorem.w₀ } → ℝ) = NumberField.Units.rank K


/-- The exponential map in `𝕂 = ℝ` or `𝕂 = ℂ` has strict derivative `exp 𝕂 x` at any point
`x`. -/
theorem hasStrictDerivAt_exp {x : 𝕂} : HasStrictDerivAt (exp 𝕂) (exp 𝕂 x) x

HasStrictDerivAt (NormedSpace.exp 𝕂) (NormedSpace.exp 𝕂 x) x


/-- A monoid homomorphism `f` induces an injective homomorphism on the quotient by `f`'s kernel. -/
@[to_additive "An `AddMonoid` homomorphism `f` induces an injective homomorphism on the quotient
by `f`'s kernel."]
theorem kerLift_injective (f : M →* P) : Injective (kerLift f)

{M : Type u_1}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass P]
(f : M →+ P)


@[simp] theorem of_smul [SMulZeroClass R V] (r : R) (x : HahnSeries Γ V) :
  (of R) (r • x) = r • (of R) x

{Γ : Type u_1}
{R : Type u_3}
{V : Type u_4}
[PartialOrder Γ]
[AddCommMonoid V]
[SMulZeroClass R V]
(r : R)
(x : HahnSeries Γ V)

(HahnModule.of R) (r • x) = r • (HahnModule.of R) x


/-- If `a` is the least upper bound of `s` and `b` is the least upper bound of `t`,
then `a ⊔ b` is the least upper bound of `s ∪ t`. -/
theorem IsLUB.union [SemilatticeSup γ] {a b : γ} {s t : Set γ} (hs : IsLUB s a) (ht : IsLUB t b) :
    IsLUB (s ∪ t) (a ⊔ b)

{γ : Type w}
[SemilatticeSup γ]
{a b : γ}
{s t : Set γ}
(hs : IsLUB s a)
(ht : IsLUB t b)


/-- Pointwise inversion of submonoids as an order isomorphism. -/
@[to_additive (attr := simps!) "Pointwise negation of additive submonoids as an order isomorphism"]
def invOrderIso : Submonoid G ≃o Submonoid G

∀ (a : AddSubmonoid G), ↑(AddSubmonoid.negOrderIso a) = -↑a


@[simp]
theorem _root_.AlgHom.comp_algebraMap_of_tower (f : A →ₐ[S] B) :
    (f : A →+* B).comp (algebraMap R A) = algebraMap R B

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

(↑f).comp (algebraMap R A) = algebraMap R B


@[simp]
theorem aleph_succ {o : Ordinal} : aleph (succ o) = succ (aleph o)

Cardinal.aleph (Order.succ o) = Order.succ (Cardinal.aleph o)


/-- `x ↦ x⁻¹` as an order-reversing equivalence. -/
@[to_additive (attr := simps!) "`x ↦ -x` as an order-reversing equivalence."]
def OrderIso.inv : α ≃o αᵒᵈ

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

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

∀ (a : α), (OrderIso.neg α) a = OrderDual.toDual (-a)


theorem lineDifferentiableWithinAt_smul_iff {c : 𝕜} (hc : c ≠ 0) :
    LineDifferentiableWithinAt 𝕜 f s x (c • v) ↔ LineDifferentiableWithinAt 𝕜 f s x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{s : Set E}
{x v : E}
{c : 𝕜}
(hc : c ≠ 0)


theorem mem_radical_of_pow_mem {I : Ideal R} {x : R} {m : ℕ} (hx : x ^ m ∈ radical I) :
    x ∈ radical I

{R : Type u}
[CommSemiring R]
{I : Ideal R}
{x : R}
{m : ℕ}
(hx : x ^ m ∈ I.radical)


theorem integralSum_inf_partition (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I)
    {π' : Prepartition I} (h : π'.IsPartition) :
    integralSum f vol (π.infPrepartition π') = integralSum f vol π

{ι : Type u}
{E : Type v}
{F : Type w}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{I : BoxIntegral.Box ι}
(f : (ι → ℝ) → E)
(vol : ι →ᵇᵃ[⊤] E →L[ℝ] F)
(π : BoxIntegral.TaggedPrepartition I)
{π' : BoxIntegral.Prepartition I}
(h : π'.IsPartition)

BoxIntegral.integralSum f vol (π.infPrepartition π') = BoxIntegral.integralSum f vol π


/--
This is a special case of `kerTotal_map` where `R = S`.
The kernel of the presentation `⊕ₓ B dx ↠ Ω_{B/R}` is spanned by the image of the
kernel of `⊕ₓ A dx ↠ Ω_{A/R}` and all `da` with `a : A`.
-/
theorem KaehlerDifferential.kerTotal_map' (h : Function.Surjective (algebraMap A B)) :
    (KaehlerDifferential.kerTotal R A ⊔
      Submodule.span A (Set.range fun x ↦ .single (algebraMap R A x) 1)).map finsupp_map =
      (KaehlerDifferential.kerTotal R B).restrictScalars _

(h : Function.Surjective ⇑(algebraMap A B))

Submodule.map (Finsupp.mapRange.linearMap (Algebra.linearMap A B) ∘ₗ Finsupp.lmapDomain A A ⇑(algebraMap A B))
    (KaehlerDifferential.kerTotal R A ⊔ Submodule.span A (Set.range fun x => Finsupp.single ((algebraMap R A) x) 1)) =
  Submodule.restrictScalars A (KaehlerDifferential.kerTotal R B)


theorem xy_modEq_of_modEq {a b c} (a1 : 1 < a) (b1 : 1 < b) (h : a ≡ b [MOD c]) :
    ∀ n, xn a1 n ≡ xn b1 n [MOD c] ∧ yn a1 n ≡ yn b1 n [MOD c]

Pell.xn a1 n ≡ Pell.xn b1 n [MOD c] ∧ Pell.yn a1 n ≡ Pell.yn b1 n [MOD c]


@[simp]
theorem lift_continuum : lift.{v} 𝔠 = 𝔠

Cardinal.lift.{v, u_1} Cardinal.continuum = Cardinal.continuum


@[to_additive (attr := simp, norm_cast)]
theorem coe_inv (x : H) : (x⁻¹).1 = x.1⁻¹

{G : Type u_1}
[Group G]
{S : Type u_6}
{H : S}
[SetLike S G]
[SubgroupClass S G]
(x : ↥H)

↑x⁻¹ = (↑x)⁻¹


theorem inl_mono : Monotone (inl : α → α ⊕ β)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]


@[simp]
theorem rightUnitor_hom (X : C) : (ρ_ X).hom = Limits.prod.fst

(CategoryTheory.MonoidalCategory.rightUnitor X).hom = CategoryTheory.Limits.prod.fst


/-- If `M` is finite free over a PID `R`, then any submodule `N` is free
and we can find a basis for `M` and `N` such that the inclusion map is a diagonal matrix
in Smith normal form.

See `Submodule.smithNormalFormOfLE` for a version of this theorem that returns
a `Basis.SmithNormalForm`.

This is a strengthening of `Submodule.basisOfPidOfLE`.
-/
theorem Submodule.exists_smith_normal_form_of_le [Finite ι] (b : Basis ι R M) (N O : Submodule R M)
    (N_le_O : N ≤ O) :
    ∃ (n o : ℕ) (hno : n ≤ o) (bO : Basis (Fin o) R O) (bN : Basis (Fin n) R N) (a : Fin n → R),
      ∀ i, (bN i : M) = a i • bO (Fin.castLE hno i)

{ι : Type u_1}
{R : Type u_2}
[CommRing R]
[IsDomain R]
[IsPrincipalIdealRing R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[Finite ι]
(b : Basis ι R M)
(N O : Submodule R M)
(N_le_O : N ≤ O)

∃ n o, ∃ (hno : n ≤ o), ∃ bO bN a, ∀ (i : Fin n), ↑(bN i) = a i • ↑(bO (Fin.castLE hno i))


@[to_additive]
theorem multiset_noncommProd_mem (K : Subgroup G) (g : Multiset G) (comm) :
    (∀ a ∈ g, a ∈ K) → g.noncommProd comm ∈ K

{G : Type u_1}
[Group G]
(K : Subgroup G)
(g : Multiset G)
(comm : {x | x ∈ g}.Pairwise Commute)


protected theorem contDiffAt : ContDiffAt ℝ n f x

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


theorem congr_app {X Y : SheafedSpace C} {α β : X ⟶ Y} (h : α = β) (U) :
    α.c.app U = β.c.app U ≫ X.presheaf.map (eqToHom (by subst h; rfl))

{X Y : AlgebraicGeometry.SheafedSpace C}

(U : (TopologicalSpace.Opens ↑↑Y.toPresheafedSpace)ᵒᵖ)

α.c.app U = β.c.app U ≫ X.presheaf.map (CategoryTheory.eqToHom ⋯)


@[simp]
theorem toLinearEquiv_symm (e : A₁ ≃ₐ[R] A₂) : e.toLinearEquiv.symm = e.symm.toLinearEquiv

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)


theorem writtenInExtChartAt_chartAt_symm_comp [ChartedSpace H H'] (x : M') {y}
    (hy : y ∈ letI := ChartedSpace.comp H H' M'; (extChartAt I x).target) :
    ( letI := ChartedSpace.comp H H' M'
      writtenInExtChartAt I I (chartAt H' x x) (chartAt H' x).symm y) = y

{𝕜 : Type u_1}
{E : Type u_2}
{H : Type u_4}
{M' : Type u_6}
{H' : Type u_7}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
[TopologicalSpace H']
[TopologicalSpace M']
[ChartedSpace H' M']
[ChartedSpace H H']
(x : M')
{y : E}
(hy : y ∈ (extChartAt I x).target)

writtenInExtChartAt I I (↑(chartAt H' x) x) (↑(chartAt H' x).symm) y = y


theorem gcd_eq_left_iff [NormalizedGCDMonoid α] (a b : α) (h : normalize a = a) :
    gcd a b = a ↔ a ∣ b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
(a b : α)
(h : normalize a = a)


@[simp]
theorem coe_toEmbedding (f : r ≃r s) : (f.toEmbedding : α → β) = f

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ≃r s)


theorem piecewise_eqOn_compl (f g : α → β) : EqOn (s.piecewise f g) g sᶜ

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


@[deprecated get_map (since := "2023-01-05")]
theorem nthLe_map (f : α → β) {l n} (H1 H2) : nthLe (map f l) n H1 = f (nthLe l n H2)

{α : Type u}
{β : Type v}
(f : α → β)
{l : List α}
{n : ℕ}
(H1 : n < (List.map f l).length)
(H2 : n < l.length)

(List.map f l).nthLe n H1 = f (l.nthLe n H2)


@[simp]
theorem restrictRootsOfUnity_coe_apply [MonoidHomClass F R S] (σ : F) (ζ : rootsOfUnity k R) :
    (restrictRootsOfUnity σ k ζ : Sˣ) = σ (ζ : Rˣ)

{R : Type u_4}
{S : Type u_5}
{F : Type u_6}
{k : ℕ+}
[CommMonoid R]
[CommMonoid S]
[FunLike F R S]
[MonoidHomClass F R S]
(σ : F)
(ζ : ↥(rootsOfUnity k R))

↑↑((restrictRootsOfUnity σ k) ζ) = σ ↑↑ζ


theorem IsStrongLimit.isLimit {c} (H : IsStrongLimit c) : IsLimit c

{c : Cardinal.{u_2}}
(H : c.IsStrongLimit)


@[simp]
theorem add_pow [LinearOrder R] [AddMonoid R] [CovariantClass R R (· + ·) (· ≤ ·)]
    [CovariantClass R R (Function.swap (· + ·)) (· ≤ ·)] (x y : Tropical R) (n : ℕ) :
    (x + y) ^ n = x ^ n + y ^ n

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

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


/-- Functor composition induces a functor on cosimplicial objects. -/
@[simps!]
def whiskering (D : Type*) [Category D] : (C ⥤ D) ⥤ CosimplicialObject C ⥤ CosimplicialObject D

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(D : Type u_1)
[CategoryTheory.Category.{u_2, u_1} D]
(H : C ⥤ D)
(F : SimplexCategory ⥤ C)

∀ {X Y : SimplexCategory} (f : X ⟶ Y),
  (((CategoryTheory.CosimplicialObject.whiskering C D).obj H).obj F).map f = H.map (F.map f)


@[to_additive (attr := simp)]
lemma smul_assoc {M N} [SMul M N] [SMul N α] [SMul M α] [IsScalarTower M N α] (x : M) (y : N)
    (z : α) : (x • y) • z = x • y • z

{α : Type u_7}
{M : Type u_11}
{N : Type u_12}
[VAdd M N]
[VAdd N α]
[VAdd M α]
[VAddAssocClass M N α]
(x : M)
(y : N)
(z : α)


theorem isCaratheodory_iff {s : Set α} :
    MeasurableSet[OuterMeasure.caratheodory m] s ↔ ∀ t, m t = m (t ∩ s) + m (t \ s)

{α : Type u}
(m : MeasureTheory.OuterMeasure α)
{s : Set α}

MeasurableSet s ↔ ∀ (t : Set α), m t = m (t ∩ s) + m (t \ s)


theorem ContDiff.differentiable_iteratedDeriv {n : ℕ∞} (m : ℕ) (h : ContDiff 𝕜 n f)
    (hmn : (m : ℕ∞) < n) : Differentiable 𝕜 (iteratedDeriv m f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{n : ℕ∞}
(m : ℕ)
(h : ContDiff 𝕜 n f)
(hmn : ↑m < n)


/-- A multiplicative equivalence of groups preserves division. -/
@[to_additive "An additive equivalence of additive groups preserves subtractions."]
protected theorem map_div [Group G] [DivisionMonoid H] (h : G ≃* H) (x y : G) :
    h (x / y) = h x / h y

{G : Type u_10}
{H : Type u_11}
[AddGroup G]
[SubtractionMonoid H]
(h : G ≃+ H)
(x y : G)


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

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


lemma exists_eq_graphOn_image_fst [Nonempty β] {s : Set (α × β)} :
    (∃ f : α → β, s = graphOn f (Prod.fst '' s)) ↔ InjOn Prod.fst s

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

(∃ f, s = Set.graphOn f (Prod.fst '' s)) ↔ Set.InjOn Prod.fst s


theorem nextPowerOfTwo_dec {n power : Nat} (h₁ : power > 0) (h₂ : power < n) : n - power * 2 < n - power


@[simp] lemma inv_op_smul_finset_distrib₀ (a : α) (s : Finset α) : (op a • s)⁻¹ = a⁻¹ • s⁻¹

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


lemma smul_fin3 (P : Fin 3 → R) (u : R) : u • P = ![u ^ 2 * P x, u ^ 3 * P y, u * P z]

{R : Type u}
[CommRing R]
(P : Fin 3 → R)
(u : R)


@[simp] theorem base_restrict_iff (hX : X ⊆ M.E := by aesop_mat) :
    (M ↾ X).Base I ↔ M.Basis I X

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
(hX : X ⊆ M.E := by aesop_mat)


/-- Since a hom gives a loop, any homomorphism from the vertex group at the root
    extends to a functor on the whole groupoid. -/
@[simps]
def functorOfMonoidHom {X} [Monoid X] (f : End (root' T) →* X) :
    G ⥤ CategoryTheory.SingleObj X

(T : WideSubquiver (Quiver.Symmetrify (IsFreeGroupoid.Generators G)))

[Quiver.Arborescence (WideSubquiver.toType (Quiver.Symmetrify (IsFreeGroupoid.Generators G)) T)]

(f : CategoryTheory.End (IsFreeGroupoid.SpanningTree.root' T) →* X)

∀ {X_1 Y : G} (p : X_1 ⟶ Y),
  (IsFreeGroupoid.SpanningTree.functorOfMonoidHom T f).map p = f (IsFreeGroupoid.SpanningTree.loopOfHom T p)


theorem IsMinOn.add (hf : IsMinOn f s a) (hg : IsMinOn g s a) : IsMinOn (fun x => f x + g x) s a

{α : Type u}
{β : Type v}
[OrderedAddCommMonoid β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsMinOn f s a)
(hg : IsMinOn g s a)


theorem coeff_mk (x : ℕ → R) : (mk p x).coeff = x


@[simp]
theorem powEquiv_symm_apply {n : ℕ} (hn : p.Coprime n) (g : G) :
    (hG.powEquiv hn).symm g = g ^ (orderOf g).gcdB n

{p : ℕ}
{G : Type u_1}
[Group G]
(hG : IsPGroup p G)
{n : ℕ}
(hn : p.Coprime n)
(g : G)


@[to_additive]
theorem ciSup_mul_ciSup_le [CovariantClass α α (· * ·) (· ≤ ·)]
    [CovariantClass α α (Function.swap (· * ·)) (· ≤ ·)] {a : α} {g : ι → α} {h : ι' → α}
    (H : ∀ i j, g i * h j ≤ a) : iSup g * iSup h ≤ a

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

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


theorem interedges_biUnion (s : Finset ι) (t : Finset κ) (f : ι → Finset α) (g : κ → Finset α) :
    G.interedges (s.biUnion f) (t.biUnion g) =
      (s ×ˢ t).biUnion fun ab ↦ G.interedges (f ab.1) (g ab.2)

{ι : Type u_2}
{κ : Type u_3}
{α : Type u_4}
(G : SimpleGraph α)
[DecidableRel G.Adj]
[DecidableEq α]
(s : Finset ι)
(t : Finset κ)
(f : ι → Finset α)
(g : κ → Finset α)

G.interedges (s.biUnion f) (t.biUnion g) = (s ×ˢ t).biUnion fun ab => G.interedges (f ab.1) (g ab.2)


theorem IsOpen.uniqueMDiffWithinAt (hs : IsOpen s) (xs : x ∈ s) : UniqueMDiffWithinAt I 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]
{x : M}
{s : Set M}
(hs : IsOpen s)
(xs : x ∈ s)


/-- The `1`-cocycle given by the differential on a cochain complex. -/
@[simps!]
def diff : Cocycle K K 1

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(K : CochainComplex C ℤ)

↑(CochainComplex.HomComplex.Cocycle.diff K) = CochainComplex.HomComplex.Cochain.diff K


/-- If `IsCyclotomicExtension {1} A B`, then the image of `A` in `B` equals `B`. -/
theorem singleton_one [h : IsCyclotomicExtension {1} A B] : (⊥ : Subalgebra A B) = ⊤

(A : Type u)
(B : Type v)
[CommRing A]
[CommRing B]
[Algebra A B]
[h : IsCyclotomicExtension {1} A B]


theorem not_succ_isLimit (o) : ¬IsLimit (succ o)


/-- A group of order `p ^ 2` is not cyclic if and only if its exponent is `p`. -/
@[to_additive]
lemma not_isCyclic_iff_exponent_eq_prime [Group α] {p : ℕ} (hp : p.Prime)
    (hα : Nat.card α = p ^ 2) : ¬ IsCyclic α ↔ Monoid.exponent α = p

{α : Type u}
[Group α]
{p : ℕ}
(hp : Nat.Prime p)
(hα : Nat.card α = p ^ 2)


/-- A total complex shape symmetry contains the data and properties which allow the
identification of the two total complex functors
`HomologicalComplex₂ C c₁ c₂ ⥤ HomologicalComplex C c₁₂`
and `HomologicalComplex₂ C c₂ c₁ ⥤ HomologicalComplex C c₁₂` via the flip. -/
class TotalComplexShapeSymmetry [TotalComplexShape c₁ c₂ c₁₂] [TotalComplexShape c₂ c₁ c₁₂] where
  symm (i₁ : I₁) (i₂ : I₂) : ComplexShape.π c₂ c₁ c₁₂ ⟨i₂, i₁⟩ = ComplexShape.π c₁ c₂ c₁₂ ⟨i₁, i₂⟩
  /-- the signs involved in the symmetry isomorphism of the total complex -/
  σ (i₁ : I₁) (i₂ : I₂) : ℤˣ
  σ_ε₁ {i₁ i₁' : I₁} (h₁ : c₁.Rel i₁ i₁') (i₂ : I₂) :
    σ i₁ i₂ * ComplexShape.ε₁ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ = ComplexShape.ε₂ c₂ c₁ c₁₂ ⟨i₂, i₁⟩ * σ i₁' i₂
  σ_ε₂ (i₁ : I₁) {i₂ i₂' : I₂} (h₂ : c₂.Rel i₂ i₂') :
    σ i₁ i₂ * ComplexShape.ε₂ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ = ComplexShape.ε₁ c₂ c₁ c₁₂ ⟨i₂, i₁⟩ * σ i₁ i₂'

[self : TotalComplexShapeSymmetry c₁ c₂ c₁₂]

TotalComplexShapeSymmetry.σ c₁ c₂ c₁₂ i₁ i₂ * c₁.ε₁ c₂ c₁₂ (i₁, i₂) =
  c₂.ε₂ c₁ c₁₂ (i₂, i₁) * TotalComplexShapeSymmetry.σ c₁ c₂ c₁₂ i₁' i₂


theorem filter_union (s₁ s₂ : Finset α) : (s₁ ∪ s₂).filter p = s₁.filter p ∪ s₂.filter p

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
[DecidableEq α]
(s₁ s₂ : Finset α)

Finset.filter p (s₁ ∪ s₂) = Finset.filter p s₁ ∪ Finset.filter p s₂


@[to_additive (attr := simp)]
theorem MulHom.coe_mk [Mul M] [Mul N] (f : M → N) (hmul) : (MulHom.mk f hmul : M → N) = f

(hmul : ∀ (x y : M), f (x + y) = f x + f y)


lemma Construction.wIso_eq_isoOfHom {X Y : C} (f : X ⟶ Y) (hf : W f) :
    Construction.wIso f hf = isoOfHom W.Q W f hf

{C : Type u_1}
[CategoryTheory.Category.{u_4, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(f : X ⟶ Y)
(hf : W f)

CategoryTheory.Localization.Construction.wIso f hf = CategoryTheory.Localization.isoOfHom W.Q W f hf


theorem IsCoprime.prod_left_iff : IsCoprime (∏ i ∈ t, s i) x ↔ ∀ i ∈ t, IsCoprime (s i) x

{R : Type u}
{I : Type v}
[CommSemiring R]
{x : R}
{s : I → R}
{t : Finset I}


lemma neg_pow (a : R) (n : ℕ) : (-a) ^ n = (-1) ^ n * a ^ n

{R : Type x}
[Monoid R]
[HasDistribNeg R]
(a : R)
(n : ℕ)


theorem one_apply (a : A) : (1 : A →+[M] A) a = a

{M : Type u_1}
[Monoid M]
{A : Type u_4}
[AddMonoid A]
[DistribMulAction M A]
(a : A)


/-- If there exists a morphism `a → b` in a free groupoid, then there also exists a zigzag
from `a` to `b` in the generating quiver. -/
theorem path_nonempty_of_hom {G} [Groupoid.{u, u} G] [IsFreeGroupoid G] {a b : G} :
    Nonempty (a ⟶ b) → Nonempty (Path (symgen a) (symgen b))

{G : Type u}
[CategoryTheory.Groupoid G]
[IsFreeGroupoid G]
{a b : G}

Nonempty (a ⟶ b) → Nonempty (Quiver.Path (IsFreeGroupoid.symgen a) (IsFreeGroupoid.symgen b))


theorem ofNat_zero_le (n : Nat) : 0 ≤ (↑n : Int)


theorem inter_eq_of_inter_eq_of_eqOn {e' : PartialEquiv α β} (h : e.IsImage s t)
    (h' : e'.IsImage s t) (hs : e.source ∩ s = e'.source ∩ s) (heq : EqOn e e' (e.source ∩ s)) :
    e.target ∩ t = e'.target ∩ t

(heq : Set.EqOn (↑e) (↑e') (e.source ∩ s))


@[simp, nolint simpNF]
theorem leftDual_ρ [LeftRigidCategory V] (h : H) : (ᘁX).ρ h = ᘁX.ρ (h⁻¹ : H)

(X : Action V ((CategoryTheory.forget₂ Grp MonCat).obj H))


protected theorem mul {β} [MonoidWithZero β] {f g : α →ₛ β} (hf : f.FinMeasSupp μ)
    (hg : g.FinMeasSupp μ) : (f * g).FinMeasSupp μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{β : Type u_5}
[MonoidWithZero β]
{f g : MeasureTheory.SimpleFunc α β}
(hf : f.FinMeasSupp μ)
(hg : g.FinMeasSupp μ)


theorem NormedAddGroupHom.ker_completion {f : NormedAddGroupHom G H} {C : ℝ}
    (h : f.SurjectiveOnWith f.range C) :
    (f.completion.ker : Set <| Completion G) = closure (toCompl.comp <| incl f.ker).range

{G : Type u_1}
[SeminormedAddCommGroup G]
{H : Type u_2}
[SeminormedAddCommGroup H]
{f : NormedAddGroupHom G H}
{C : ℝ}
(h : f.SurjectiveOnWith f.range C)

↑f.completion.ker = closure ↑(NormedAddCommGroup.toCompl.comp (NormedAddGroupHom.incl f.ker)).range


theorem range_eq_top_of_epi [Epi f] : LinearMap.range f = ⊤

{R : Type u}
[Ring R]
{X Y : ModuleCat R}
(f : X ⟶ Y)
[CategoryTheory.Epi f]


@[simp]
theorem prod_inf_prod {S T : NonUnitalStarSubalgebra R A} {S₁ T₁ : NonUnitalStarSubalgebra R B} :
    S.prod S₁ ⊓ T.prod T₁ = (S ⊓ T).prod (S₁ ⊓ T₁)

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


theorem coe_one : ((1 : (𝓞 K)ˣ) : K) = (1 : K)


protected theorem contMDiff (h : M ≃ₘ^n⟮I, I'⟯ M') : ContMDiff I I' n h

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
{n : ℕ∞}
(h : M ≃ₘ^n⟮I, I'⟯ M')


@[to_additive]
lemma IsPretransitive.of_compHom {M N α : Type*} [Monoid M] [Monoid N] [MulAction N α]
    (f : M →* N) [h : letI := compHom α f; IsPretransitive M α] : IsPretransitive N α

{M : Type u_11}
{N : Type u_12}
{α : Type u_13}
[AddMonoid M]
[AddMonoid N]
[AddAction N α]
(f : M →+ N)
[h : AddAction.IsPretransitive M α]


@[to_additive nnnorm_le_pi_nnnorm]
lemma nnnorm_le_pi_nnnorm' (i : ι) : ‖f i‖₊ ≤ ‖f‖₊

{ι : Type u_1}
{π : ι → Type u_4}
[Fintype ι]
[(i : ι) → SeminormedAddGroup (π i)]
(f : (i : ι) → π i)
(i : ι)

‖f i‖₊ ≤ ‖f‖₊


theorem M.dest'_eq_dest' {α : TypeVec n} {x : P.last.M} {a₁ : P.A}
    {f₁ : P.last.B a₁ → P.last.M} (h₁ : PFunctor.M.dest x = ⟨a₁, f₁⟩) {a₂ : P.A}
    {f₂ : P.last.B a₂ → P.last.M} (h₂ : PFunctor.M.dest x = ⟨a₂, f₂⟩) (f' : M.Path P x ⟹ α) :
    M.dest' P h₁ f' = M.dest' P h₂ f'

{n : ℕ}
(P : MvPFunctor.{u} (n + 1))
{α : TypeVec.{u} n}
{x : P.last.M}
{a₁ : P.A}
{f₁ : P.last.B a₁ → P.last.M}
(h₁ : x.dest = ⟨a₁, f₁⟩)
{a₂ : P.A}
{f₂ : P.last.B a₂ → P.last.M}
(h₂ : x.dest = ⟨a₂, f₂⟩)
(f' : MvPFunctor.M.Path P x ⟹ α)

MvPFunctor.M.dest' P h₁ f' = MvPFunctor.M.dest' P h₂ f'