/-- The product of an antitone function and a strictly antitone function is strictly antitone. -/
@[to_additive add_strictAnti "The sum of an antitone function and a strictly antitone function is
strictly antitone."]
theorem Antitone.mul_strictAnti' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {f g : β → α} (hf : Antitone f)
    (hg : StrictAnti g) :
    StrictAnti fun x => f x * g x

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

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


@[ext]
theorem ext (h : ∀ x, s x = t x) : s = t

[TopologicalSpace (Bundle.TotalSpace F V)]


@[simp]
theorem expMapCircle_apply (t : ℝ) : ↑(expMapCircle t) = Complex.exp (t * Complex.I)

↑(expMapCircle t) = cexp (↑t * Complex.I)


theorem ite_inter_closure_compl_eq_of_inter_frontier_eq {s s' t : Set α}
    (ht : s ∩ frontier t = s' ∩ frontier t) : t.ite s s' ∩ closure tᶜ = s' ∩ closure tᶜ

{α : Type u_1}
[TopologicalSpace α]
{s s' t : Set α}
(ht : s ∩ frontier t = s' ∩ frontier t)


theorem zeroLocus_vanishingIdeal_eq_closure (t : Set (PrimeSpectrum R)) :
    zeroLocus (vanishingIdeal t : Set R) = closure t

{R : Type u}
[CommSemiring R]
(t : Set (PrimeSpectrum R))

PrimeSpectrum.zeroLocus ↑(PrimeSpectrum.vanishingIdeal t) = closure t


theorem Normal.of_map_subtype {K : Subgroup G} {L : Subgroup K}
    (n : (Subgroup.map K.subtype L).Normal) : L.Normal

{G : Type u_1}
[Group G]
{K : Subgroup G}
{L : Subgroup ↥K}
(n : (Subgroup.map K.subtype L).Normal)


protected theorem Continuous.inner {α : Type*} [TopologicalSpace α] {f g : α → Completion E}
    (hf : Continuous f) (hg : Continuous g) : Continuous (fun x : α => inner (f x) (g x) : α → 𝕜)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{α : Type u_4}
[TopologicalSpace α]
{f g : α → UniformSpace.Completion E}
(hf : Continuous f)
(hg : Continuous g)


@[simp]
theorem mod_mod (a b : Ordinal) : a % b % b = a % b


theorem mem_singleton_mul {x y : P} {I : FractionalIdeal S P} :
    y ∈ spanSingleton S x * I ↔ ∃ y' ∈ I, y = x * y'

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
{x y : P}
{I : FractionalIdeal S P}

y ∈ FractionalIdeal.spanSingleton S x * I ↔ ∃ y' ∈ I, y = x * y'


theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other' ha ∈ z) :
    Mem.other' hb = a

{α : Type u_1}
[DecidableEq α]
{a : α}
{z : Sym2 α}
(ha : a ∈ z)
(hb : Sym2.Mem.other' ha ∈ z)


/-- The equivalence between `C` and its monoidal opposite's monoidal opposite. -/
@[simps!] def MonoidalOpposite.mopMopEquivalence : Cᴹᵒᵖᴹᵒᵖ ≌ C

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

((CategoryTheory.MonoidalOpposite.mopMopEquivalence C).inverse.obj X).unmop.unmop = X


theorem covariant_lt_iff_contravariant_le [LinearOrder N] :
    Covariant M N μ (· < ·) ↔ Contravariant M N μ (· ≤ ·)

(M : Type u_1)
(N : Type u_2)
(μ : M → N → N)
[LinearOrder N]

(Covariant M N μ fun x x_1 => x < x_1) ↔ Contravariant M N μ fun x x_1 => x ≤ x_1


theorem Submonoid.fg_iff_add_fg (P : Submonoid M) : P.FG ↔ P.toAddSubmonoid.FG

{M : Type u_1}
[Monoid M]
(P : Submonoid M)


@[to_additive]
protected theorem Specializes.zpow {G : Type*} [DivInvMonoid G] [TopologicalSpace G]
    [ContinuousMul G] [ContinuousInv G] {x y : G} (h : x ⤳ y) : ∀ m : ℤ, (x ^ m) ⤳ (y ^ m)

{G : Type u_1}
[DivInvMonoid G]
[TopologicalSpace G]
[ContinuousMul G]
[ContinuousInv G]
{x y : G}
(h : x ⤳ y)
(m : ℤ)


/-- In a `T1Space`, the `derivedSet` of the closure of a set is equal to the derived set of the
set itself.

Note: this doesn't hold in a space with the indiscrete topology. For example, if `X` is a type with
two elements, `x` and `y`, and `A := {x}`, then `closure A = Set.univ` and `derivedSet A = {y}`,
but `derivedSet Set.univ = Set.univ`. -/
lemma derivedSet_closure [T1Space X] (A : Set X) : derivedSet (closure A) = derivedSet A

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
(A : Set X)


@[simp]
theorem skewAdjointMatricesLieSubalgebraEquivTranspose_apply {m : Type w} [DecidableEq m]
    [Fintype m] (e : Matrix n n R ≃ₐ[R] Matrix m m R) (h : ∀ A, (e A)ᵀ = e Aᵀ)
    (A : skewAdjointMatricesLieSubalgebra J) :
    (skewAdjointMatricesLieSubalgebraEquivTranspose J e h A : Matrix m m R) = e A

(h : ∀ (A : Matrix n n R), (e A).transpose = e A.transpose)

(A : ↥(skewAdjointMatricesLieSubalgebra J))

↑((skewAdjointMatricesLieSubalgebraEquivTranspose J e h) A) = e ↑A


@[simp]
lemma comp_hom {a b : ℕ} (α : Ext X Y a) (β : Ext Y Z b) {c : ℕ} (h : a + b = c) :
    (α.comp β h).hom = α.hom.comp β.hom (by omega)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[CategoryTheory.HasExt C]
{X Y Z : C}
[HasDerivedCategory C]
{a b : ℕ}
(α : CategoryTheory.Abelian.Ext X Y a)
(β : CategoryTheory.Abelian.Ext Y Z b)
{c : ℕ}
(h : a + b = c)


/-- An element of `MonoidAlgebra R M` is in the subalgebra generated by its support. -/
theorem mem_adjoin_support (f : MonoidAlgebra R M) : f ∈ adjoin R (of R M '' f.support)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[Monoid M]
(f : MonoidAlgebra R M)

f ∈ Algebra.adjoin R (⇑(MonoidAlgebra.of R M) '' ↑f.support)


/-- To show a function `f : α → ℕ` is primitive recursive, it is enough to show that the function
  is bounded by a primitive recursive function and that its graph is primitive recursive -/
theorem of_graph {f : α → ℕ} (h₁ : PrimrecBounded f)
    (h₂ : PrimrecRel fun a b => f a = b) : Primrec f

{α : Type u_1}
[Primcodable α]
{f : α → ℕ}
(h₁ : Primrec.PrimrecBounded f)
(h₂ : PrimrecRel fun a b => f a = b)


theorem iInf_le_liminf {f : Filter β} {u : β → α} : ⨅ n, u n ≤ liminf u f

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : Filter β}
{u : β → α}


theorem PosMulMono.toPosMulReflectLT [PosMulMono α] : PosMulReflectLT α

{α : Type u_1}
[Mul α]
[Zero α]
[LinearOrder α]
[PosMulMono α]


@[to_additive]
theorem sec_spec {f : LocalizationMap S N} (z : N) :
    z * f.toMap (f.sec z).2 = f.toMap (f.sec z).1

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{f : S.LocalizationMap N}
(z : N)

z + f.toMap ↑(f.sec z).2 = f.toMap (f.sec z).1


theorem natAbs_eq : ∀ (a : Int), a = natAbs a ∨ a = -↑(natAbs a)


theorem HasFDerivAt.arsinh (hf : HasFDerivAt f f' a) :
    HasFDerivAt (fun x => arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') a

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{a : E}
{f' : E →L[ℝ] ℝ}
(hf : HasFDerivAt f f' a)

HasFDerivAt (fun x => Real.arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') a


theorem eventually_nhds_iff {p : α → Prop} :
    (∀ᶠ y in 𝓝 x, p y) ↔ ∃ ε > 0, ∀ ⦃y⦄, dist y x < ε → p y

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{p : α → Prop}

(∀ᶠ (y : α) in 𝓝 x, p y) ↔ ∃ ε > 0, ∀ ⦃y : α⦄, dist y x < ε → p y


@[simp] theorem getMsb_zero : (0#w).getMsb i = false


/-- For a complete normed ring `R`, the embedding of the units `Rˣ` into `R` is a smooth map between
manifolds. -/
lemma contMDiff_val {m : ℕ∞} : ContMDiff 𝓘(𝕜, R) 𝓘(𝕜, R) m (val : Rˣ → R)

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedAlgebra 𝕜 R]
{m : ℕ∞}


theorem Antitone.le_map_iInf₂ [CompleteLattice β] {f : α → β} (hf : Antitone f) (s : ∀ i, κ i → α) :
    ⨆ (i) (j), f (s i j) ≤ f (⨅ (i) (j), s i j)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
{κ : ι → Sort u_7}
[CompleteLattice α]
[CompleteLattice β]
{f : α → β}
(hf : Antitone f)
(s : (i : ι) → κ i → α)

⨆ i, ⨆ j, f (s i j) ≤ f (⨅ i, ⨅ j, s i j)


theorem Antiperiodic.mul_const_inv [DivisionSemiring α] [Neg β] (h : Antiperiodic f c) {a : α}
    (ha : a ≠ 0) : Antiperiodic (fun x => f (x * a⁻¹)) (c * a)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[DivisionSemiring α]
[Neg β]
(h : Function.Antiperiodic f c)
{a : α}
(ha : a ≠ 0)

Function.Antiperiodic (fun x => f (x * a⁻¹)) (c * a)


theorem contained_proj (o : Ordinal) : contained (π C (ord I · < o)) o

{I : Type u}
[LinearOrder I]
[IsWellOrder I fun x x_1 => x < x_1]
(C : Set (I → Bool))
(o : Ordinal.{u})

Profinite.NobelingProof.contained (Profinite.NobelingProof.π C fun x => Profinite.NobelingProof.ord I x < o) o


theorem unop_op (P : MorphismProperty C) : P.op.unop = P

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(P : CategoryTheory.MorphismProperty C)


theorem iUnion_Ico_zsmul : ⋃ n : ℤ, Ico (n • p) ((n + 1) • p) = univ

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[Archimedean α]
{p : α}
(hp : 0 < p)

⋃ n, Set.Ico (n • p) ((n + 1) • p) = Set.univ


theorem iUnion_unpair_prod {α β} {s : ℕ → Set α} {t : ℕ → Set β} :
    ⋃ n : ℕ, s n.unpair.fst ×ˢ t n.unpair.snd = (⋃ n, s n) ×ˢ ⋃ n, t n

{α : Type u_1}
{β : Type u_2}
{s : ℕ → Set α}
{t : ℕ → Set β}

⋃ n, s (Nat.unpair n).1 ×ˢ t (Nat.unpair n).2 = (⋃ n, s n) ×ˢ ⋃ n, t n


@[gcongr] lemma smul_le_smul_of_nonneg_left [PosSMulMono α β] (hb : b₁ ≤ b₂) (ha : 0 ≤ a) :
    a • b₁ ≤ a • b₂

{α : Type u_1}
{β : Type u_2}
{a : α}
{b₁ b₂ : β}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero α]
[PosSMulMono α β]
(hb : b₁ ≤ b₂)
(ha : 0 ≤ a)

a • b₁ ≤ a • b₂


theorem domRestrict₁₂_apply (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (p : Submodule R M) (q : Submodule S N)
    (x : p) (y : q) : f.domRestrict₁₂ p q x y = f x y

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
{R₂ : Type u_3}
[Semiring R₂]
{S₂ : Type u_4}
[Semiring S₂]
{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module S N]
[Module R₂ P]
[Module S₂ P]
[SMulCommClass S₂ R₂ P]
{ρ₁₂ : R →+* R₂}
{σ₁₂ : S →+* S₂}
(f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P)
(p : Submodule R M)
(q : Submodule S N)
(x : ↥p)
(y : ↥q)


/-- The postcomposition of a derivation by a morphism of presheaves of modules. -/
@[simps! d_apply]
def postcomp (f : M ⟶ N) : N.Derivation φ

{M N : PresheafOfModules (R ⋙ CategoryTheory.forget₂ CommRingCat RingCat)}

∀ {X : Dᵒᵖ} (a : ↑(R.obj X)), (d.postcomp f).d a = (PresheafOfModules.Hom.app f X) (d.d a)


/-- Corresponds to `norm_zero`. -/
@[simp]
theorem hammingNorm_zero : hammingNorm (0 : ∀ i, β i) = 0

{ι : Type u_2}
{β : ι → Type u_3}
[Fintype ι]
[(i : ι) → DecidableEq (β i)]
[(i : ι) → Zero (β i)]


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

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
(T : CategoryTheory.Monad C)
[T.Additive]
(F G : T.Algebra)
(α β : F ⟶ G)


lemma map_symm (e : β ≃ᵐ α) : μ.map e.symm = μ.comap e

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
(e : β ≃ᵐ α)

MeasureTheory.Measure.map (⇑e.symm) μ = MeasureTheory.Measure.comap (⇑e) μ


theorem finRange_succ_eq_map (n : ℕ) : finRange n.succ = 0 :: (finRange n).map Fin.succ

List.finRange n.succ = 0 :: List.map Fin.succ (List.finRange n)


theorem leadingCoeff_add_of_degree_lt' (h : degree q < degree p) :
    leadingCoeff (p + q) = leadingCoeff p

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


/-- Inducts on a well-founded `<` relation. -/
theorem induction {C : α → Prop} : ∀ a, (∀ x, (∀ y, y < x → C y) → C x) → C a

{α : Type u}
[LT α]
[WellFoundedLT α]
{C : α → Prop}
(a : α)

(∀ (x : α), (∀ (y : α), y < x → C y) → C x) → C a


@[simp, reassoc]
theorem t'_snd_fst_snd (i j k : 𝒰.J) :
    t' 𝒰 f g i j k ≫ pullback.snd _ _ ≫ pullback.fst _ _ ≫ pullback.snd _ _ =
      pullback.fst _ _ ≫ pullback.fst _ _ ≫ pullback.snd _ _

[∀ (i : 𝒰.J), CategoryTheory.Limits.HasPullback (𝒰.map i ≫ f) g]

AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g i j k ≫
    CategoryTheory.Limits.pullback.snd (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g j k)
        (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g j i) ≫
      CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map j ≫ f) g ≫ 𝒰.map j) (𝒰.map i) ≫
        CategoryTheory.Limits.pullback.snd (𝒰.map j ≫ f) g =
  CategoryTheory.Limits.pullback.fst (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i j)
      (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i k) ≫
    CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map j) ≫
      CategoryTheory.Limits.pullback.snd (𝒰.map i ≫ f) g


@[simp] theorem Bool.not_beq_true  (b : Bool) : (!(b == true)) = (b == false)


theorem ContDiffWithinAt.contDiffOn' {m : ℕ} (hm : (m : ℕ∞) ≤ n)
    (h : ContDiffWithinAt 𝕜 n f s x) :
    ∃ u, IsOpen u ∧ x ∈ u ∧ ContDiffOn 𝕜 m f (insert x s ∩ u)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
{m : ℕ}
(hm : ↑m ≤ n)
(h : ContDiffWithinAt 𝕜 n f s x)

∃ u, IsOpen u ∧ x ∈ u ∧ ContDiffOn 𝕜 (↑m) f (insert x s ∩ u)


/-- Precompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transPartialHomeomorph (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : PartialHomeomorph X Z

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(e : X ≃ₜ Y)
(f' : PartialHomeomorph Y Z)

(e.transPartialHomeomorph f').target = f'.target


@[norm_cast, simp]
theorem coe_eq_castSucc {a : Fin n} : (a : Fin (n + 1)) = castSucc a


lemma star_lt_iff {x y : R} : star x < y ↔ x < star y

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{x y : R}


@[to_additive (attr := simp)]
theorem mk_mul_mk (x y : M) (hx : x ∈ S) (hy : y ∈ S) :
    (⟨x, hx⟩ : S) * ⟨y, hy⟩ = ⟨x * y, S.mul_mem hx hy⟩

{M : Type u_1}
[MulOneClass M]
(S : Submonoid M)
(x y : M)
(hx : x ∈ S)
(hy : y ∈ S)


theorem mem_fintsupport_iff (i : ι) : i ∈ ρ.fintsupport x₀ ↔ x₀ ∈ tsupport (ρ i)

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

i ∈ ρ.fintsupport x₀ ↔ x₀ ∈ tsupport ⇑(ρ i)


theorem continuousLinearMap_apply (p : TotalSpace (F₁ →SL[σ] F₂) fun x => E₁ x →SL[σ] E₂ x) :
    (continuousLinearMap σ e₁ e₂) p =
      ⟨p.1, .comp (e₂.continuousLinearMapAt 𝕜₂ p.1) (p.2.comp (e₁.symmL 𝕜₁ p.1))⟩

(σ : 𝕜₁ →+* 𝕜₂)

[TopologicalSpace (Bundle.TotalSpace F₁ E₁)]

[TopologicalSpace (Bundle.TotalSpace F₂ E₂)]

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

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

(p : Bundle.TotalSpace (F₁ →SL[σ] F₂) fun x => E₁ x →SL[σ] E₂ x)

↑(Pretrivialization.continuousLinearMap σ e₁ e₂) p =
  (p.proj, (Trivialization.continuousLinearMapAt 𝕜₂ e₂ p.proj).comp (p.snd.comp (Trivialization.symmL 𝕜₁ e₁ p.proj)))


theorem omegaLimit_def : ω f ϕ s = ⋂ u ∈ f, closure (image2 ϕ u s)

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
(s : Set α)

omegaLimit f ϕ s = ⋂ u ∈ f, closure (Set.image2 ϕ u s)


@[simp]
theorem image_const_add_Ioc : (fun x => a + x) '' Ioc b c = Ioc (a + b) (a + c)

{M : Type u_1}
[OrderedCancelAddCommMonoid M]
[ExistsAddOfLE M]
(a b c : M)

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


@[simp]
theorem tan_add_pi (θ : Angle) : tan (θ + π) = tan θ


theorem UpperSemicontinuousWithinAt.mono (h : UpperSemicontinuousWithinAt f s x) (hst : t ⊆ s) :
    UpperSemicontinuousWithinAt f t x

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{f : α → β}
{x : α}
{s t : Set α}
(h : UpperSemicontinuousWithinAt f s x)
(hst : t ⊆ s)


theorem size_append (as bs : Array α) : (as ++ bs).size = as.size + bs.size


/-- The composition `l ∘ f` where `l : F → E` and `f : 𝕜 → F`, has a derivative equal to the
Fréchet derivative of `l` applied to the derivative of `f`. -/
theorem HasFDerivAt.comp_hasDerivAt (hl : HasFDerivAt l l' (f x)) (hf : HasDerivAt f f' x) :
    HasDerivAt (l ∘ f) (l' f') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → F}
{f' : F}
(x : 𝕜)
{l : F → E}
{l' : F →L[𝕜] E}
(hl : HasFDerivAt l l' (f x))
(hf : HasDerivAt f f' x)


@[simp]
theorem mem_map {S : NonUnitalStarSubalgebra R A} {f : F} {y : B} :
    y ∈ map f S ↔ ∃ x ∈ S, f x = y

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
{S : NonUnitalStarSubalgebra R A}
{f : F}
{y : B}

y ∈ NonUnitalStarSubalgebra.map f S ↔ ∃ x ∈ S, f x = y


/-- A structure groupoid is a set of partial homeomorphisms of a topological space stable under
composition and inverse. They appear in the definition of the smoothness class of a manifold. -/
structure StructureGroupoid (H : Type u) [TopologicalSpace H] where
  /-- Members of the structure groupoid are partial homeomorphisms. -/
  members : Set (PartialHomeomorph H H)
  /-- Structure groupoids are stable under composition. -/
  trans' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ∈ members → e ≫ₕ e' ∈ members
  /-- Structure groupoids are stable under inverse. -/
  symm' : ∀ e : PartialHomeomorph H H, e ∈ members → e.symm ∈ members
  /-- The identity morphism lies in the structure groupoid. -/
  id_mem' : PartialHomeomorph.refl H ∈ members
  /-- Let `e` be a partial homeomorphism. If for every `x ∈ e.source`, the restriction of e to some
  open set around `x` lies in the groupoid, then `e` lies in the groupoid. -/
  locality' : ∀ e : PartialHomeomorph H H,
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ members) → e ∈ members
  /-- Membership in a structure groupoid respects the equivalence of partial homeomorphisms. -/
  mem_of_eqOnSource' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ≈ e → e' ∈ members

{H : Type u}
[TopologicalSpace H]
(self : StructureGroupoid H)
(e e' : PartialHomeomorph H H)

e ∈ self.members → e' ≈ e → e' ∈ self.members


theorem eq_sign_of_surjective_hom {s : Perm α →* ℤˣ} (hs : Surjective s) : s = sign

{α : Type u}
[DecidableEq α]
[Fintype α]
{s : Equiv.Perm α →* ℤˣ}
(hs : Function.Surjective ⇑s)


theorem subset_preimage_univ {s : Set α} : s ⊆ f ⁻¹' univ

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


@[simp]
theorem single_le_iff {f : Π₀ i, α i} {i : ι} {a : α i} : single i a ≤ f ↔ a ≤ f i

[(i : ι) → CanonicallyOrderedAddCommMonoid (α i)]


theorem span_eq_top_of_surjective {s : Set P₁} (hf : Function.Surjective f)
    (h : affineSpan k s = ⊤) : affineSpan k (f '' s) = ⊤

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(f : P₁ →ᵃ[k] P₂)
{s : Set P₁}
(hf : Function.Surjective ⇑f)
(h : affineSpan k s = ⊤)


theorem cos_eq_zero_iff {θ : Angle} : cos θ = 0 ↔ θ = (π / 2 : ℝ) ∨ θ = (-π / 2 : ℝ)


@[simp]
theorem diag_col_mul_row [Mul α] [AddCommMonoid α] [Unique ι] (a b : n → α) :
    diag (col ι a * row ι b) = a * b

{n : Type u_3}
{α : Type v}
{ι : Type u_6}
[Mul α]
[AddCommMonoid α]
[Unique ι]
(a b : n → α)

(Matrix.col ι a * Matrix.row ι b).diag = a * b


/-- An integral domain is a DVR iff it's a PID with a unique non-zero prime ideal. -/
theorem iff_pid_with_one_nonzero_prime (R : Type u) [CommRing R] [IsDomain R] :
    DiscreteValuationRing R ↔ IsPrincipalIdealRing R ∧ ∃! P : Ideal R, P ≠ ⊥ ∧ IsPrime P

DiscreteValuationRing R ↔ IsPrincipalIdealRing R ∧ ∃! P, P ≠ ⊥ ∧ P.IsPrime


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

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


theorem stoppedValue_ae_eq_restrict_eq (h : Martingale f ℱ μ) (hτ : IsStoppingTime ℱ τ)
    (hτ_le : ∀ x, τ x ≤ n) [SigmaFinite (μ.trim (hτ.measurableSpace_le_of_le hτ_le))] (i : ι) :
    stoppedValue f τ =ᵐ[μ.restrict {x | τ x = i}] μ[f n|hτ.measurableSpace]

MeasureTheory.stoppedValue f τ =ᵐ[μ.restrict {x | τ x = i}] μ[f n|hτ.measurableSpace]


/-- Like `Submodule.map_pow` -/
theorem submodule_map_pow_reverse (p : Submodule R (CliffordAlgebra Q)) (n : ℕ) :
    (p ^ n).map (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q) =
      p.map (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q) ^ n

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(p : Submodule R (CliffordAlgebra Q))
(n : ℕ)

Submodule.map CliffordAlgebra.reverse (p ^ n) = Submodule.map CliffordAlgebra.reverse p ^ n


private
lemma exists_eval_ne_zero_of_coeff_finSuccEquiv_ne_zero_aux
    {N : ℕ} {F : MvPolynomial (Fin (Nat.succ N)) R} {n : ℕ} (hF : IsHomogeneous F n)
    (hFn : ((finSuccEquiv R N) F).coeff n ≠ 0) :
    ∃ r, eval r F ≠ 0

(hFn : ((MvPolynomial.finSuccEquiv R N) F).coeff n ≠ 0)


theorem choose_zero_right [NatPowAssoc R] (r : R) : choose r 0 = 1

{R : Type u_1}
[NonAssocRing R]
[Pow R ℕ]
[BinomialRing R]
[NatPowAssoc R]
(r : R)


/-- A lax braided functor between braided monoidal categories is a lax monoidal functor
which preserves the braiding.
-/
structure LaxBraidedFunctor extends LaxMonoidalFunctor C D where
  braided : ∀ X Y : C, μ X Y ≫ map (β_ X Y).hom = (β_ (obj X) (obj Y)).hom ≫ μ Y X := by aesop_cat

(self : CategoryTheory.LaxBraidedFunctor C D)

self.μ X Y ≫ self.map (β_ X Y).hom = (β_ (self.obj X) (self.obj Y)).hom ≫ self.μ Y X


theorem TotalSpace.eta (z : TotalSpace F E) : TotalSpace.mk z.proj z.2 = z

{B : Type u_1}
{F : Type u_2}
{E : B → Type u_3}
(z : Bundle.TotalSpace F E)


theorem prod_mk {p : Multiset α} : (p.map Associates.mk).prod = Associates.mk p.prod

{α : Type u_1}
[CommMonoid α]
{p : Multiset α}

(Multiset.map Associates.mk p).prod = Associates.mk p.prod


@[simp]
theorem symm_apply_apply (e : A ≃⋆ₐ[R] B) : ∀ x, e.symm (e x) = x

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[Add A]
[Add B]
[Mul A]
[Mul B]
[SMul R A]
[SMul R B]
[Star A]
[Star B]
(e : A ≃⋆ₐ[R] B)
(x : A)


theorem product_inter [DecidableEq α] [DecidableEq β] : s ×ˢ (t ∩ t') = s ×ˢ t ∩ s ×ˢ t'

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


theorem mul_toAddSubmonoid (M N : Submodule R A) :
    (M * N).toAddSubmonoid = M.toAddSubmonoid * N.toAddSubmonoid

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(M N : Submodule R A)


theorem abs_le : |a| ≤ b ↔ -b ≤ a ∧ a ≤ b

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b : α}


@[to_additive (attr := measurability)]
theorem AEMeasurable.const_smul' (hg : AEMeasurable g μ) (c : M) :
    AEMeasurable (fun x => c • g x) μ

{M : Type u_2}
{β : Type u_3}
{α : Type u_4}
[MeasurableSpace M]
[MeasurableSpace β]
[SMul M β]
{m : MeasurableSpace α}
{g : α → β}
[MeasurableSMul M β]
{μ : MeasureTheory.Measure α}
(hg : AEMeasurable g μ)
(c : M)


lemma cfc_const_one : cfc (fun _ : R ↦ 1) a = 1

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


protected theorem add_lt_add_of_le_of_lt : a ≠ ∞ → a ≤ b → c < d → a + c < b + d


theorem uniformContinuousOn_iff_restrict [UniformSpace α] [UniformSpace β] {f : α → β} {s : Set α} :
    UniformContinuousOn f s ↔ UniformContinuous (s.restrict f)

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[UniformSpace β]
{f : α → β}
{s : Set α}


@[simp]
theorem fst_sdiff [SDiff α] [SDiff β] (a b : α × β) : (a \ b).1 = a.1 \ b.1

{α : Type u_2}
{β : Type u_3}
[SDiff α]
[SDiff β]
(a b : α × β)


theorem closure_le_normalClosure {s : Set G} : closure s ≤ normalClosure s

Subgroup.closure s ≤ Subgroup.normalClosure s


theorem succ_eq_iff_covBy : succ a = b ↔ a ⋖ b

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


/-- If a function is locally integrable on a compact set, then it is integrable on that set. -/
theorem LocallyIntegrableOn.integrableOn_isCompact (hf : LocallyIntegrableOn f s μ)
    (hs : IsCompact s) : IntegrableOn f s μ

(hf : MeasureTheory.LocallyIntegrableOn f s μ)


theorem coe_injective : Function.Injective ((↑) : X → OnePoint X)


theorem cardinal_mk_eq_cardinal_mk_field_pow_rank (K V : Type u) [Ring K] [StrongRankCondition K]
    [AddCommGroup V] [Module K V] [Module.Free K V] [Module.Finite K V] :
    #V = #K ^ Module.rank K V


/-- The units of the monoid of non-zero divisors of `M₀` are equivalent to the units of `M₀`. -/
@[simps]
def unitsNonZeroDivisorsEquiv : M₀⁰ˣ ≃* M₀ˣ

{M₀ : Type u_1}
[MonoidWithZero M₀]
(u : M₀ˣ)

↑↑(unitsNonZeroDivisorsEquiv.symm u)⁻¹ = ↑u⁻¹


@[simp]
theorem fderiv_neg : fderiv 𝕜 (fun y => -f y) x = -fderiv 𝕜 f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}


theorem isBasis_affine_open (X : Scheme) : Opens.IsBasis X.affineOpens


@[to_additive (attr := norm_cast, simp)]
theorem coe_div [Div β] [ContinuousDiv β] (f g : C(α, β)) : ⇑(f / g) = f / g

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[Sub β]
[ContinuousSub β]
(f g : C(α, β))


/-- If two functions are equal in the relevant interval, their interval integrals are also equal. -/
theorem integral_congr {a b : ℝ} (h : EqOn f g [[a, b]]) :
    ∫ x in a..b, f x ∂μ = ∫ x in a..b, g x ∂μ

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f g : ℝ → E}
{μ : MeasureTheory.Measure ℝ}
{a b : ℝ}
(h : Set.EqOn f g [[a, b]])

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


@[to_additive]
theorem tprod_le_tprod (h : ∀ i, f i ≤ g i) (hf : Multipliable f) (hg : Multipliable g) :
    ∏' i, f i ≤ ∏' i, g i

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


theorem erase_attach_map (s : Multiset α) (f : α → β) (x : {x // x ∈ s}) :
    (s.attach.erase x).map (fun j : {x // x ∈ s} ↦ f j) = (s.erase x).map f

{α : Type u_1}
{β : Type v}
[DecidableEq α]
(s : Multiset α)
(f : α → β)
(x : { x // x ∈ s })

Multiset.map (fun j => f ↑j) (s.attach.erase x) = Multiset.map f (s.erase ↑x)


theorem eval_typesGlue {S hs α} (f) : eval.{u} S α (typesGlue S hs α f) = f

{S : CategoryTheory.Functor Type uᵒᵖ (Type u)}

{hs : CategoryTheory.Presieve.IsSheaf CategoryTheory.typesGrothendieckTopology S}

(f : α → S.obj (Opposite.op PUnit.{u + 1}))

CategoryTheory.eval S α (CategoryTheory.typesGlue S hs α f) = f


theorem mul_not_equiv_zero {f g : CauSeq _ abv} (hf : ¬f ≈ 0) (hg : ¬g ≈ 0) : ¬f * g ≈ 0

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
{f g : CauSeq β abv}
(hf : ¬f ≈ 0)
(hg : ¬g ≈ 0)


theorem _root_.Function.LeftInverse.filter_map {f : α → β} {g : β → α} (hfg : LeftInverse g f) :
    LeftInverse (map g) (map f)

{α : Type u}
{β : Type v}
{f : α → β}
{g : β → α}
(hfg : Function.LeftInverse g f)

Function.LeftInverse (Filter.map g) (Filter.map f)


theorem add_eq_gt (a : Nat) {b c : Nat} (h : b > c) : (a + b = c) = False


@[to_additive le_prod_iff]
theorem le_prod_iff {s : Submonoid M} {t : Submonoid N} {u : Submonoid (M × N)} :
    u ≤ s.prod t ↔ u.map (fst M N) ≤ s ∧ u.map (snd M N) ≤ t

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{s : AddSubmonoid M}
{t : AddSubmonoid N}
{u : AddSubmonoid (M × N)}

u ≤ s.prod t ↔ AddSubmonoid.map (AddMonoidHom.fst M N) u ≤ s ∧ AddSubmonoid.map (AddMonoidHom.snd M N) u ≤ t


@[simp]
theorem reindexLinearEquiv_symm (eₘ : m ≃ m') (eₙ : n ≃ n') :
    (reindexLinearEquiv R A eₘ eₙ).symm = reindexLinearEquiv R A eₘ.symm eₙ.symm

{m : Type u_2}
{n : Type u_3}
{m' : Type u_6}
{n' : Type u_7}
(R : Type u_11)
(A : Type u_12)
[Semiring R]
[AddCommMonoid A]
[Module R A]
(eₘ : m ≃ m')
(eₙ : n ≃ n')

(Matrix.reindexLinearEquiv R A eₘ eₙ).symm = Matrix.reindexLinearEquiv R A eₘ.symm eₙ.symm


/-- The functor `HomologicalComplex C c ⥤ ShortComplex C` which sends a homological
complex `K` to the short complex `K.X (c.prev i) ⟶ K.X i ⟶ K.X (c.next i)`. -/
@[simps!]
noncomputable def shortComplexFunctor (i : ι)

∀ {X Y : HomologicalComplex C c} (f : X ⟶ Y), ((HomologicalComplex.shortComplexFunctor C c i).map f).τ₂ = f.f i


@[to_additive]
theorem Tendsto.mul_mul [MulHomClass F α β] (m : F) {f₁ g₁ : Filter α} {f₂ g₂ : Filter β} :
    Tendsto m f₁ f₂ → Tendsto m g₁ g₂ → Tendsto m (f₁ * g₁) (f₂ * g₂)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[MulOneClass α]
[MulOneClass β]
[FunLike F α β]
[MulHomClass F α β]
(m : F)
{f₁ g₁ : Filter α}
{f₂ g₂ : Filter β}

Filter.Tendsto (⇑m) f₁ f₂ → Filter.Tendsto (⇑m) g₁ g₂ → Filter.Tendsto (⇑m) (f₁ * g₁) (f₂ * g₂)


theorem IsOpenMap.restrict {f : X → Y} (hf : IsOpenMap f) {s : Set X} (hs : IsOpen s) :
    IsOpenMap (s.restrict f)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : IsOpenMap f)
{s : Set X}
(hs : IsOpen s)


@[simp]
theorem lift₂_mk
    (f :
    { f : α → α → β → β → γ //
      ∀ a₁ a₂ b₁ b₂, f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ })
    (a₁ a₂ : α) (b₁ b₂ : β) : lift₂ f s(a₁, a₂) s(b₁, b₂) = (f : α → α → β → β → γ) a₁ a₂ b₁ b₂

(f : { f // ∀ (a₁ a₂ : α) (b₁ b₂ : β), f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ })

Sym2.lift₂ f s(a₁, a₂) s(b₁, b₂) = ↑f a₁ a₂ b₁ b₂


@[simp]
lemma card_inter_add_card_sdiff (s t : Finset α) :
    (s ∩ t).card + (s \ t).card = s.card

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


theorem superpolynomialDecay_iff_superpolynomialDecay_abs :
    SuperpolynomialDecay l k f ↔ SuperpolynomialDecay l (fun a => |k a|) fun a => |f a|

{α : Type u_1}
{β : Type u_2}
(l : Filter α)
(k f : α → β)
[TopologicalSpace β]
[LinearOrderedCommRing β]
[OrderTopology β]

Asymptotics.SuperpolynomialDecay l k f ↔ Asymptotics.SuperpolynomialDecay l (fun a => |k a|) fun a => |f a|


@[to_additive]
theorem coinduced_continuous {α β : Type*} [t : TopologicalSpace α] [Group β] (f : α → β) :
    Continuous[t, (coinduced f).toTopologicalSpace] f

{α : Type u_1}
{β : Type u_2}
[t : TopologicalSpace α]
[AddGroup β]
(f : α → β)


/-- If `F` preserves pullbacks, then it preserves monomorphisms. -/
theorem preserves_mono_of_preservesLimit {X Y : C} (f : X ⟶ Y) [PreservesLimit (cospan f f) F]
    [Mono f] : Mono (F.map f)

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan f f) F]


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

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


@[simp]
theorem sup_adj (x y : SimpleGraph V) (v w : V) : (x ⊔ y).Adj v w ↔ x.Adj v w ∨ y.Adj v w

{V : Type u}
(x y : SimpleGraph V)
(v w : V)


theorem has_fpower_series_dslope_fslope (hp : HasFPowerSeriesAt f p z₀) :
    HasFPowerSeriesAt (dslope f z₀) p.fslope z₀

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{p : FormalMultilinearSeries 𝕜 𝕜 E}
{f : 𝕜 → E}
{z₀ : 𝕜}
(hp : HasFPowerSeriesAt f p z₀)


@[simp] theorem getMsb_append {v : BitVec n} {w : BitVec m} :
    getMsb (v ++ w) i = bif n ≤ i then getMsb w (i - n) else getMsb v i

{n m i : Nat}
{v : BitVec n}
{w : BitVec m}

(v ++ w).getMsb i = bif decide (n ≤ i) then w.getMsb (i - n) else v.getMsb i


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

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


theorem lintegral_indicator_const_le (s : Set α) (c : ℝ≥0∞) :
    ∫⁻ a, s.indicator (fun _ => c) a ∂μ ≤ c * μ s

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s : Set α)
(c : ℝ≥0∞)

∫⁻ (a : α), s.indicator (fun x => c) a ∂μ ≤ c * μ s


@[to_additive (attr := simp)]
theorem smul_ae (c : G) : c • ae μ = ae μ

[MeasureTheory.VAddInvariantMeasure G α μ]

c +ᵥ MeasureTheory.ae μ = MeasureTheory.ae μ


theorem ae_eq_set_pi {I : Set ι} {s t : ∀ i, Set (α i)} (h : ∀ i ∈ I, s i =ᵐ[μ i] t i) :
    Set.pi I s =ᵐ[Measure.pi μ] Set.pi I t

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

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

I.pi s =ᵐ[MeasureTheory.Measure.pi μ] I.pi t


theorem locally_lipschitz_exp {r : ℝ} (hr_nonneg : 0 ≤ r) (hr_le : r ≤ 1) (x y : ℂ)
    (hyx : ‖y - x‖ < r) : ‖exp y - exp x‖ ≤ (1 + r) * ‖exp x‖ * ‖y - x‖

‖Complex.exp y - Complex.exp x‖ ≤ (1 + r) * ‖Complex.exp x‖ * ‖y - x‖


@[norm_cast]
theorem coe_sum {α} {s : Finset α} {f : α → ℝ≥0} : ↑(∑ a ∈ s, f a) = ∑ a ∈ s, (f a : ℝ)

{α : Type u_1}
{s : Finset α}
{f : α → ℝ≥0}


@[simp]
theorem projIcc_left : projIcc a b h a = ⟨a, left_mem_Icc.2 h⟩

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


/-- Angles are translation invariant -/
@[simp]
theorem angle_vadd_const (v₁ v₂ v₃ : V) (p : P) : ∠ (v₁ +ᵥ p) (v₂ +ᵥ p) (v₃ +ᵥ p) = ∠ v₁ v₂ v₃

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(v₁ v₂ v₃ : V)
(p : P)

EuclideanGeometry.angle (v₁ +ᵥ p) (v₂ +ᵥ p) (v₃ +ᵥ p) = EuclideanGeometry.angle v₁ v₂ v₃


theorem stoppedProcess_eq_of_le {u : ι → Ω → β} {τ : Ω → ι} {i : ι} {ω : Ω} (h : i ≤ τ ω) :
    stoppedProcess u τ i ω = u i ω

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[LinearOrder ι]
{u : ι → Ω → β}
{τ : Ω → ι}
{i : ι}
{ω : Ω}
(h : i ≤ τ ω)

MeasureTheory.stoppedProcess u τ i ω = u i ω


/-- Multiplicative equivalence between multiplicative endomorphisms of a `MulOneClass` `M`
and additive endomorphisms of `Additive M`. -/
@[simps!] def monoidEndToAdditive (M : Type*) [MulOneClass M] :
    Monoid.End M ≃* AddMonoid.End (Additive M)

(M : Type u_3)
[MulOneClass M]
(f : M →* M)
(a : Additive M)

((monoidEndToAdditive M) f) a = Additive.ofMul (f (Additive.toMul a))


@[simp]  -- Porting note: norm_cast
theorem refl_toLinearMap [Module R M] : (LinearEquiv.refl R M : M →ₗ[R] M) = LinearMap.id

{R : Type u_1}
{M : Type u_8}
[Semiring R]
[AddCommMonoid M]
[Module R M]


@[simp]
theorem optionSubtype_symm_apply_apply_coe [DecidableEq β] (x : β) (e : α ≃ { y : β // y ≠ x })
    (a : α) : ((optionSubtype x).symm e : Option α ≃ β) a = e a

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
(x : β)
(e : α ≃ { y // y ≠ x })
(a : α)

↑((Equiv.optionSubtype x).symm e) (some a) = ↑(e a)


@[simp]
theorem cgf_const [IsProbabilityMeasure μ] (c : ℝ) : cgf (fun _ => c) μ t = t * c

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

ProbabilityTheory.cgf (fun x => c) μ t = t * c


@[simp, reassoc]
theorem colimitUncurryIsoColimitCompColim_ι_hom {j} {k} :
    colimit.ι _ (j, k) ≫ (colimitUncurryIsoColimitCompColim F).hom =
      (colimit.ι _ k ≫ colimit.ι (F ⋙ colim) j : _ ⟶ (colimit (F ⋙ colim)))

[CategoryTheory.Limits.HasColimit (F ⋙ CategoryTheory.Limits.colim)]

CategoryTheory.Limits.colimit.ι (CategoryTheory.uncurry.obj F) (j, k) ≫
    (CategoryTheory.Limits.colimitUncurryIsoColimitCompColim F).hom =
  CategoryTheory.Limits.colimit.ι (F.obj j) k ≫ CategoryTheory.Limits.colimit.ι (F ⋙ CategoryTheory.Limits.colim) j


@[simp] theorem find?_replicate_of_neg (h : ¬ p a) : find? p (replicate n a) = none

∀ {α : Type u_1} {p : α → Bool} {n : Nat} {a : α}, ¬p a = true → List.find? p (List.replicate n a) = none


theorem div_le {a b c : Ordinal} (b0 : b ≠ 0) : a / b ≤ c ↔ a < b * succ c


/-- If a function is supported on a finite-measure set and belongs to `ℒ^p`, then it belongs to
`ℒ^q` for any `q ≤ p`. -/
theorem Memℒp.memℒp_of_exponent_le_of_measure_support_ne_top
    {p q : ℝ≥0∞} {f : α → E} (hfq : Memℒp f q μ) {s : Set α} (hf : ∀ x, x ∉ s → f x = 0)
    (hs : μ s ≠ ∞) (hpq : p ≤ q) : Memℒp f p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{p q : ℝ≥0∞}
{f : α → E}
(hfq : MeasureTheory.Memℒp f q μ)
{s : Set α}
(hf : ∀ x ∉ s, f x = 0)
(hs : μ s ≠ ⊤)
(hpq : p ≤ q)


@[reassoc]
lemma Γevaluation_naturality (x : X) :
    Y.Γevaluation (f.val.base x) ≫ residueFieldMap f x =
      f.val.c.app (op ⊤) ≫ X.Γevaluation x

{X Y : AlgebraicGeometry.LocallyRingedSpace}

Y.Γevaluation (f.val.base x) ≫ AlgebraicGeometry.LocallyRingedSpace.residueFieldMap f x =
  f.val.c.app (Opposite.op ⊤) ≫ X.Γevaluation x


theorem toBlock_diagonal_disjoint (d : m → α) {p q : m → Prop} (hpq : Disjoint p q) :
    Matrix.toBlock (diagonal d) p q = 0

{m : Type u_2}
{α : Type u_12}
[DecidableEq m]
[Zero α]
(d : m → α)
{p q : m → Prop}
(hpq : Disjoint p q)


@[simp]
theorem leadingCoeff_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) :
    P.toPoly.leadingCoeff = P.c

{R : Type u_1}
{P : Cubic R}
[Semiring R]
(ha : P.a = 0)
(hb : P.b = 0)
(hc : P.c ≠ 0)


theorem mfderivWithin_const (hxs : UniqueMDiffWithinAt I s x) :
    mfderivWithin I I' (fun _ : M => c) s x = (0 : TangentSpace I x →L[𝕜] TangentSpace I' c)

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


@[simp]
theorem prod_subset_compl_diagonal_iff_disjoint : s ×ˢ t ⊆ (diagonal α)ᶜ ↔ Disjoint s t

s ×ˢ t ⊆ (Set.diagonal α)ᶜ ↔ Disjoint s t


lemma toENatAux_eq_top {a : Cardinal} (ha : ℵ₀ ≤ a) : toENatAux a = ⊤

{a : Cardinal.{u_1}}
(ha : Cardinal.aleph0 ≤ a)


@[to_additive]
theorem coe_comp_orderHom (f : β →*o γ) (g : α →*o β) :
    (f.comp g : α →o γ) = (f : β →o γ).comp g

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


theorem lintegral_congr_ae {f g : α → ℝ≥0∞} (h : f =ᵐ[μ] g) : ∫⁻ a, f a ∂μ = ∫⁻ a, g a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → ℝ≥0∞}
(h : f =ᵐ[μ] g)


@[to_additive]
theorem Multipliable.sigma' {γ : β → Type*} {f : (Σb : β, γ b) → α} (ha : Multipliable f)
    (hf : ∀ b, Multipliable fun c ↦ f ⟨b, c⟩) : Multipliable fun b ↦ ∏' c, f ⟨b, c⟩

(hf : ∀ (b : β), Multipliable fun c => f ⟨b, c⟩)

Multipliable fun b => ∏' (c : γ b), f ⟨b, c⟩


/-- The `atBot` filter for an open interval `Iic a` comes from the `atBot` filter in the ambient
order. -/
@[simp]
theorem map_val_Iic_atBot [SemilatticeInf α] (a : α) : map ((↑) : Iic a → α) atBot = atBot

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

Filter.map Subtype.val Filter.atBot = Filter.atBot


/-- `MulOpposite.op` as a homeomorphism. -/
@[to_additive (attr := simps!) "`AddOpposite.op` as a homeomorphism."]
def opHomeomorph : M ≃ₜ Mᵐᵒᵖ

∀ (a : Mᵐᵒᵖ), MulOpposite.opHomeomorph.symm a = MulOpposite.unop a


theorem arcsin_neg_one : arcsin (-1) = -(π / 2)


theorem coe_sum [Zero M] [AddCommMonoid N] (f : α →₀ M) (g : α → M → β →₀ N) :
    ⇑(f.sum g) = f.sum fun a₁ b => ⇑(g a₁ b)

{α : Type u_1}
{β : Type u_7}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[AddCommMonoid N]
(f : α →₀ M)
(g : α → M → β →₀ N)


@[simp]
theorem run_mk (f : σ → m (α × σ)) (st : σ) : StateT.run (StateT.mk f) st = f st

{σ : Type u}
{m : Type u → Type v}
{α : Type u}
(f : σ → m (α × σ))
(st : σ)


theorem reflexive_oneOneReducible {α} [Primcodable α] : Reflexive (@OneOneReducible α α _ _)


theorem sum_range_measure_preimage_singleton (f : α →ₛ β) (μ : Measure α) :
    (∑ y ∈ f.range, μ (f ⁻¹' {y})) = μ univ

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
(f : MeasureTheory.SimpleFunc α β)
(μ : MeasureTheory.Measure α)

∑ y ∈ f.range, μ (↑f ⁻¹' {y}) = μ Set.univ


@[simp]
theorem mem_range (x : L₂) : x ∈ f.range ↔ ∃ y : L, f y = x

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


@[simp]
theorem filter_true (l : List α) :
    filter (fun _ => true) l = l


@[simp] lemma infs_self : s ⊼ s = s ↔ InfClosed (s : Set α)

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


protected theorem lt_add_left_iff_pos : n < k + n ↔ 0 < k


/-- If for each `x : α`, exactly one of `g • x`, `g : G`, belongs to a measurable set `s`, then `s`
is a fundamental domain for the action of `G` on `α`. -/
@[to_additive "If for each `x : α`, exactly one of `g +ᵥ x`, `g : G`, belongs to a measurable set
`s`, then `s` is a fundamental domain for the additive action of `G` on `α`."]
theorem mk' (h_meas : NullMeasurableSet s μ) (h_exists : ∀ x : α, ∃! g : G, g • x ∈ s) :
    IsFundamentalDomain G s μ

(h_meas : MeasureTheory.NullMeasurableSet s μ)

(h_exists : ∀ (x : α), ∃! g, g +ᵥ x ∈ s)

MeasureTheory.IsAddFundamentalDomain G s μ


protected theorem sum_repr_symm (b : OrthonormalBasis ι 𝕜 E) (v : EuclideanSpace 𝕜 ι) :
    ∑ i, v i • b i = b.repr.symm v

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
(b : OrthonormalBasis ι 𝕜 E)
(v : EuclideanSpace 𝕜 ι)


@[to_additive (attr := fun_prop) ContinuousAt.norm]
theorem ContinuousAt.norm' {a : α} (h : ContinuousAt f a) : ContinuousAt (fun x => ‖f x‖) a

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
[TopologicalSpace α]
{f : α → E}
{a : α}
(h : ContinuousAt f a)


theorem dotProduct_eq_zero_iff {v : n → R} : (∀ w, dotProduct v w = 0) ↔ v = 0

{n : Type u_2}
{R : Type u_4}
[Semiring R]
[Fintype n]
{v : n → R}

(∀ (w : n → R), Matrix.dotProduct v w = 0) ↔ v = 0


theorem sups_sups_sups_comm : s ⊻ t ⊻ (u ⊻ v) = s ⊻ u ⊻ (t ⊻ v)

{α : Type u_2}
[SemilatticeSup α]
(s t u v : Set α)


@[simp, norm_cast]
theorem natCast_imJ (n : ℕ) : (n : ℍ[R,c₁,c₂]).imJ = 0

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(n : ℕ)


/-- When `p` is false, the red-red case is impossible so the tree is balanced. -/
protected theorem RedRed.of_false (h : ¬p) : RedRed p t n → ∃ c, Balanced t c n

∀ {α : Type u_1} {t : Batteries.RBNode α} {n : Nat}, ¬p → Batteries.RBNode.RedRed p t n → ∃ c, t.Balanced c n


private theorem T_def : T = ‖F.eval a‖ / ‖F.derivative.eval a‖ ^ 2

{p : ℕ}
[Fact (Nat.Prime p)]
{F : Polynomial ℤ_[p]}
{a : ℤ_[p]}

T_gen p F a = ‖Polynomial.eval a F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2


@[reassoc]
lemma InjectiveResolution.isoRightDerivedObj_hom_naturality
    {X Y : C} (f : X ⟶ Y) (I : InjectiveResolution X) (J : InjectiveResolution Y)
    (φ : I.cocomplex ⟶ J.cocomplex) (comm : I.ι.f 0 ≫ φ.f 0 = f ≫ J.ι.f 0)
    (F : C ⥤ D) [F.Additive] (n : ℕ) :
    (F.rightDerived n).map f ≫ (J.isoRightDerivedObj F n).hom =
      (I.isoRightDerivedObj F n).hom ≫
        (F.mapHomologicalComplex _ ⋙ HomologicalComplex.homologyFunctor _ _ n).map φ

(I : CategoryTheory.InjectiveResolution X)

(J : CategoryTheory.InjectiveResolution Y)

(comm : CategoryTheory.CategoryStruct.comp (I.ι.f 0) (φ.f 0) = CategoryTheory.CategoryStruct.comp f (J.ι.f 0))

CategoryTheory.CategoryStruct.comp ((F.rightDerived n).map f) (J.isoRightDerivedObj F n).hom =
  CategoryTheory.CategoryStruct.comp (I.isoRightDerivedObj F n).hom
    (((F.mapHomologicalComplex (ComplexShape.up ℕ)).comp
          (HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) n)).map
      φ)


@[simp]
theorem congr_apply (f : A ≃ₐ[S] B) (g : C ≃ₐ[R] D) (x) :
    congr f g x = (map (f : A →ₐ[S] B) (g : C →ₐ[R] D)) x

{R : Type uR}
{S : Type uS}
{A : Type uA}
{B : Type uB}
{C : Type uC}
{D : Type uD}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Semiring A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
[Semiring B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
[Semiring C]
[Algebra R C]
[Semiring D]
[Algebra R D]
(f : A ≃ₐ[S] B)
(g : C ≃ₐ[R] D)
(x : A ⊗[R] C)

(Algebra.TensorProduct.congr f g) x = (Algebra.TensorProduct.map ↑f ↑g) x


theorem Summable.tsum_mul_right (a) (hf : Summable f) : ∑' i, f i * a = (∑' i, f i) * a

{ι : Type u_1}
{α : Type u_4}
[NonUnitalNonAssocSemiring α]
[TopologicalSpace α]
[TopologicalSemiring α]
{f : ι → α}
[T2Space α]
(a : α)
(hf : Summable f)


theorem smeval_X_mul : (X * p).smeval x = x * p.smeval x

(R : Type u_1)
[Semiring R]
(p : Polynomial R)
{S : Type u_2}
[NonAssocSemiring S]
[Module R S]
[SMulCommClass R S S]
[Pow S ℕ]
[NatPowAssoc S]
(x : S)

(Polynomial.X * p).smeval x = x * p.smeval x


@[to_additive (attr := simp)]
theorem prod_join {l : List (List M)} : l.join.prod = (l.map List.prod).prod

{M : Type u_4}
[AddMonoid M]
{l : List (List M)}


lemma reverse_bijective : Function.Bijective (reverse : Language α → _)


@[simp]
theorem orderIsoIccZeroCoe_symm_apply_coe (a : ℝ≥0) (b : Set.Iic a) :
    ((orderIsoIccZeroCoe a).symm b : ℝ) = b


@[refl]
theorem LiftRel.refl [IsRefl α r] [IsRefl β s] : ∀ x, LiftRel r s x x

{α : Type u_1}
{β : Type u_2}
(r : α → α → Prop)
(s : β → β → Prop)
[IsRefl α r]
[IsRefl β s]
(x : α ⊕ β)


protected theorem add_assoc : ∀ a b c : Int, a + b + c = a + (b + c)

Int.negSucc m + Int.negSucc n + ↑k = Int.negSucc m + (Int.negSucc n + ↑k)


@[simp] lemma ofNat_apply [AddCommMonoid M] (n : ℕ) [n.AtLeastTwo] (m : M) :
    (no_index (OfNat.ofNat n : AddMonoid.End M)) m = n • m

{M : Type uM}
[AddCommMonoid M]
(n : ℕ)
[n.AtLeastTwo]
(m : M)


theorem Eventually.exists_mem {p : α → Prop} {f : Filter α} (hp : ∀ᶠ x in f, p x) :
    ∃ v ∈ f, ∀ y ∈ v, p y

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


theorem bddAbove_range_approx (c : CU P) (x : X) : BddAbove (range fun n => c.approx n x)

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
(c : Urysohns.CU P)
(x : X)

BddAbove (Set.range fun n => Urysohns.CU.approx n c x)


@[simp]
theorem inr_smul [Zero R] [Zero S] [SMulWithZero S R] [SMul S M] (r : S) (m : M) :
    (inr (r • m) : tsze R M) = r • inr m

{S : Type u_2}
(R : Type u)
{M : Type v}
[Zero R]
[Zero S]
[SMulWithZero S R]
[SMul S M]
(r : S)
(m : M)

TrivSqZeroExt.inr (r •> m) = r •> TrivSqZeroExt.inr m


/-- The `0`-th Fourier coefficient of `Bₖ(x)`. -/
theorem bernoulliFourierCoeff_zero {k : ℕ} (hk : k ≠ 0) : bernoulliFourierCoeff k 0 = 0


/-- `nthRoots n` as a `Finset` is equal to the union of `primitiveRoots i R` for `i ∣ n`
if there is a primitive root of unity in `R`.
This holds for any `Nat`, not just `PNat`, see `nthRoots_one_eq_bUnion_primitive_roots`. -/
theorem nthRoots_one_eq_biUnion_primitiveRoots' {ζ : R} {n : ℕ+} (h : IsPrimitiveRoot ζ n) :
    nthRootsFinset n R = (Nat.divisors ↑n).biUnion fun i => primitiveRoots i R

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

Polynomial.nthRootsFinset (↑n) R = (↑n).divisors.biUnion fun i => primitiveRoots i R


@[simp]
theorem embDomain_zero {f : Γ ↪o Γ'} : embDomain f (0 : HahnSeries Γ R) = 0

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{Γ' : Type u_3}
[PartialOrder Γ']
{f : Γ ↪o Γ'}


@[aesop unsafe 15% (rule_sets := [Matroid])]
theorem Basis.subset_ground (hI : M.Basis I X) : X ⊆ M.E

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


lemma IsTheta.isBigO (h : f =Θ[l] g) : f =O[l] g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{f : α → E}
{g : α → F}
{l : Filter α}
(h : f =Θ[l] g)


nonrec theorem mutuallySingular_singularPart (s : SignedMeasure α) (μ : Measure α) :
    singularPart s μ ⟂ᵥ μ.toENNRealVectorMeasure

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

s.singularPart μ ⟂ᵥ μ.toENNRealVectorMeasure


@[trans]
theorem Subset.trans {a b c : Set α} (ab : a ⊆ b) (bc : b ⊆ c) : a ⊆ c

{α : Type u}
{a b c : Set α}
(ab : a ⊆ b)
(bc : b ⊆ c)


theorem union_left_comm (s t u : Finset α) : s ∪ (t ∪ u) = t ∪ (s ∪ u)

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


theorem const_lintegral_restrict (c : ℝ≥0∞) (s : Set α) :
    (const α c).lintegral (μ.restrict s) = c * μ s

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(c : ℝ≥0∞)
(s : Set α)

(MeasureTheory.SimpleFunc.const α c).lintegral (μ.restrict s) = c * μ s


@[simp]
theorem preimage_univ {f : α → β} [Fintype α] [Fintype β] (hf) : preimage univ f hf = univ

{α : Type u}
{β : Type v}
{f : α → β}
[Fintype α]
[Fintype β]
(hf : Set.InjOn f (f ⁻¹' ↑Finset.univ))


@[to_additive (attr := simp)]
theorem dist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : dist (c • f) (c • g) = dist f g

[MeasureTheory.VAddInvariantMeasure M α μ]


/-- The natural isomorphism (in `Karoubi (ChainComplex C ℕ)`) between the chain complex
of nondegenerate simplices of a split simplicial object and the normalized Moore complex
defined as a formal direct factor of the alternating face map complex. -/
@[simps!]
noncomputable def toKaroubiNondegComplexFunctorIsoN₁ :
    nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ) ≅ forget C ⋙ DoldKan.N₁

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(X : SimplicialObject.Split C)
(n : ℕ)

(SimplicialObject.Split.toKaroubiNondegComplexFunctorIsoN₁.hom.app X).f.f n =
  (X.s.cofan (Opposite.op [n])).inj (SimplicialObject.Splitting.IndexSet.id (Opposite.op [n])) ≫
    AlgebraicTopology.DoldKan.PInfty.f n


lemma symm {γ₁ γ₂ : OneCochain G U} {α : ZeroCochain G U} (h : OneCohomologyRelation γ₁ γ₂ α) :
    OneCohomologyRelation γ₂ γ₁ α⁻¹

{γ₁ γ₂ : CategoryTheory.PresheafOfGroups.OneCochain G U}

{α : CategoryTheory.PresheafOfGroups.ZeroCochain G U}

(h : CategoryTheory.PresheafOfGroups.OneCohomologyRelation γ₁ γ₂ α)

CategoryTheory.PresheafOfGroups.OneCohomologyRelation γ₂ γ₁ α⁻¹


theorem derivative_smul {S : Type*} [Monoid S] [DistribMulAction S R] [IsScalarTower S R R] (s : S)
    (p : R[X]) : derivative (s • p) = s • derivative p

{R : Type u}
[Semiring R]
{S : Type u_1}
[Monoid S]
[DistribMulAction S R]
[IsScalarTower S R R]
(s : S)
(p : R[X])

Polynomial.derivative (s • p) = s • Polynomial.derivative p


theorem le_sub_one_of_lt {a b : Int} (H : a < b) : a ≤ b - 1


theorem two_zsmul_eq_zero_iff {θ : Angle} : (2 : ℤ) • θ = 0 ↔ θ = 0 ∨ θ = π

2 • θ = 0 ↔ θ = 0 ∨ θ = ↑π


theorem gc_map_comap (f : M →[L] N) : GaloisConnection (map f) (comap f)

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(f : L.Hom M N)

GaloisConnection (FirstOrder.Language.Substructure.map f) (FirstOrder.Language.Substructure.comap f)


@[reassoc]
theorem comp_δ_eq_zero {Y : C} {n : ℕ} {q : ℕ} {φ : Y ⟶ X _[n + 1]} (v : HigherFacesVanish q φ)
    (j : Fin (n + 2)) (hj₁ : j ≠ 0) (hj₂ : n + 2 ≤ (j : ℕ) + q) : φ ≫ X.δ j = 0

(v : AlgebraicTopology.DoldKan.HigherFacesVanish q φ)


/-- `A : Matrix V V α` is qualified as an "adjacency matrix" if
    (1) every entry of `A` is `0` or `1`,
    (2) `A` is symmetric,
    (3) every diagonal entry of `A` is `0`. -/
structure IsAdjMatrix [Zero α] [One α] (A : Matrix V V α) : Prop where
  zero_or_one : ∀ i j, A i j = 0 ∨ A i j = 1 := by aesop
  symm : A.IsSymm := by aesop
  apply_diag : ∀ i, A i i = 0 := by aesop

{V : Type u_1}
{α : Type u_2}
[Zero α]
[One α]
{A : Matrix V V α}
(self : A.IsAdjMatrix)


/-- Multiplication by a nonzero element `a` on the left
as a `DilationEquiv` of a normed division ring. -/
@[simps!]
def DilationEquiv.mulLeft (a : α) (ha : a ≠ 0) : α ≃ᵈ α

{α : Type u_1}
[NormedDivisionRing α]
(a : α)
(ha : a ≠ 0)
(x : α)

(DilationEquiv.mulLeft a ha).symm x = a⁻¹ * x


@[to_additive]
theorem universalMulHom_apply {r : R} {s : S} :
    universalMulHom f fS hf (r /ₒ s) = ((fS s)⁻¹ : Units T) * f r

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{T : Type u_2}
[Monoid T]
(f : R →* T)
(fS : ↥S →* Tˣ)
(hf : ∀ (s : ↥S), f ↑s = ↑(fS s))
{r : R}
{s : ↥S}

(OreLocalization.universalMulHom f fS hf) (r /ₒ s) = ↑(fS s)⁻¹ * f r


theorem le_comap_map (hφ : Function.Injective φ.obj) (S : Subgroupoid C) :
    S ≤ comap φ (map φ hφ S)

{C : Type u}
[CategoryTheory.Groupoid C]
{D : Type u_1}
[CategoryTheory.Groupoid D]
(φ : CategoryTheory.Functor C D)
(hφ : Function.Injective φ.obj)
(S : CategoryTheory.Subgroupoid C)

S ≤ CategoryTheory.Subgroupoid.comap φ (CategoryTheory.Subgroupoid.map φ hφ S)


@[reassoc (attr := simp)]
lemma inr_desc (hP : IsPushout f g inl inr) {W : C} (h : X ⟶ W) (k : Y ⟶ W)
    (w : f ≫ h = g ≫ k) : inr ≫ hP.desc h k w = k

(hP : CategoryTheory.IsPushout f g inl inr)


theorem isStrongLimit_aleph0 : IsStrongLimit ℵ₀


theorem lift'_mono (hf : f₁ ≤ f₂) (hh : h₁ ≤ h₂) : f₁.lift' h₁ ≤ f₂.lift' h₂

{α : Type u_1}
{β : Type u_2}
{f₁ f₂ : Filter α}
{h₁ h₂ : Set α → Set β}
(hf : f₁ ≤ f₂)
(hh : h₁ ≤ h₂)


lemma rnDeriv_withDensity_left {μ ν : Measure α} [SigmaFinite μ] [SigmaFinite ν]
    (hfν : AEMeasurable f ν) (hf_ne_top : ∀ᵐ x ∂μ, f x ≠ ∞) :
    (μ.withDensity f).rnDeriv ν =ᵐ[ν] fun x ↦ f x * μ.rnDeriv ν x

{α : Type u_1}
{m : MeasurableSpace α}
{f : α → ℝ≥0∞}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]
(hfν : AEMeasurable f ν)
(hf_ne_top : ∀ᵐ (x : α) ∂μ, f x ≠ ⊤)

(μ.withDensity f).rnDeriv ν =ᵐ[ν] fun x => f x * μ.rnDeriv ν x


protected theorem union {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
    e.IsImage (s ∪ s') (t ∪ t')

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e : PartialHomeomorph X Y}
{s : Set X}
{t : Set Y}
{s' : Set X}
{t' : Set Y}
(h : e.IsImage s t)
(h' : e.IsImage s' t')


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

(hf : Module.Flat R ↥M ∨ Module.Flat R ↥N)


theorem has_injective_coseparator [HasLimits C] [EnoughInjectives C] (G : C) (hG : IsSeparator G) :
    ∃ G : C, Injective G ∧ IsCoseparator G

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[CategoryTheory.Limits.HasLimits C]
[CategoryTheory.EnoughInjectives C]
(G : C)
(hG : CategoryTheory.IsSeparator G)

∃ G, CategoryTheory.Injective G ∧ CategoryTheory.IsCoseparator G


/-- Analytic functions on products are analytic in the first coordinate -/
theorem AnalyticOn.curry_left {f : E × F → G} {s : Set (E × F)} {y : F} (fa : AnalyticOn 𝕜 f s) :
    AnalyticOn 𝕜 (fun x ↦ f (x, y)) {x | (x, y) ∈ s}

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
{G : Type u_5}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E × F → G}
{s : Set (E × F)}
{y : F}
(fa : AnalyticOn 𝕜 f s)

AnalyticOn 𝕜 (fun x => f (x, y)) {x | (x, y) ∈ s}


lemma lintegral_condKernel (hf : Measurable f) :
    ∫⁻ b, ∫⁻ ω, f (b, ω) ∂(ρ.condKernel b) ∂ρ.fst = ∫⁻ x, f x ∂ρ

{β : Type u_2}
{Ω : Type u_3}
{mβ : MeasurableSpace β}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{ρ : MeasureTheory.Measure (β × Ω)}
[MeasureTheory.IsFiniteMeasure ρ]
{f : β × Ω → ℝ≥0∞}
(hf : Measurable f)

∫⁻ (b : β), ∫⁻ (ω : Ω), f (b, ω) ∂ρ.condKernel b ∂ρ.fst = ∫⁻ (x : β × Ω), f x ∂ρ


theorem isRat_add {α} [Ring α] {f : α → α → α} {a b : α} {na nb nc : ℤ} {da db dc k : ℕ} :
    f = HAdd.hAdd → IsRat a na da → IsRat b nb db →
    Int.add (Int.mul na db) (Int.mul nb da) = Int.mul k nc →
    Nat.mul da db = Nat.mul k dc →
    IsRat (f a b) nc dc

{α : Type u_1}
[Ring α]
{f : α → α → α}
{a b : α}
{na nb nc : ℤ}
{da db dc k : ℕ}

f = HAdd.hAdd →
  Mathlib.Meta.NormNum.IsRat a na da →
    Mathlib.Meta.NormNum.IsRat b nb db →
      (na.mul ↑db).add (nb.mul ↑da) = (↑k).mul nc → da.mul db = k.mul dc → Mathlib.Meta.NormNum.IsRat (f a b) nc dc


theorem tsub_eq_tsub_min (a b : α) : a - b = a - min a b


@[simp]
lemma desc_d (b : B) : D.desc (CommRingCat.KaehlerDifferential.d b) = D.d b

{A B : CommRingCat}
{f : A ⟶ B}
{M : ModuleCat ↑B}
(D : M.Derivation f)
(b : ↑B)


@[to_additive]
theorem BddAbove.mul [OrderedCommMonoid α] {A B : Set α} (hA : BddAbove A) (hB : BddAbove B) :
    BddAbove (A * B)

{α : Type u_1}
[OrderedCommMonoid α]
{A B : Set α}
(hA : BddAbove A)
(hB : BddAbove B)


@[to_additive Fintype.sum_prod_type_right]
theorem Fintype.prod_prod_type_right [CommMonoid γ] {f : α₁ × α₂ → γ} :
    ∏ x, f x = ∏ y, ∏ x, f (x, y)

{γ : Type u_3}
{α₁ : Type u_4}
{α₂ : Type u_5}
[Fintype α₁]
[Fintype α₂]
[AddCommMonoid γ]
{f : α₁ × α₂ → γ}

∑ x : α₁ × α₂, f x = ∑ y : α₂, ∑ x : α₁, f (x, y)


theorem Sylow.pointwise_smul_def {α : Type*} [Group α] [MulDistribMulAction α G] {g : α}
    {P : Sylow p G} : ↑(g • P) = g • (P : Subgroup G)

{p : ℕ}
{G : Type u_1}
[Group G]
{α : Type u_2}
[Group α]
[MulDistribMulAction α G]
{g : α}
{P : Sylow p G}


@[to_additive] lemma max_div_min_eq_mabs' (a b : α) : max a b / min a b = |a / b|ₘ

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


/-- **Law of cosines** (cosine rule), angle-at-point form. -/
theorem dist_sq_eq_dist_sq_add_dist_sq_sub_two_mul_dist_mul_dist_mul_cos_angle (p1 p2 p3 : P) :
    dist p1 p3 * dist p1 p3 = dist p1 p2 * dist p1 p2 + dist p3 p2 * dist p3 p2 -
      2 * dist p1 p2 * dist p3 p2 * Real.cos (∠ p1 p2 p3)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(p1 p2 p3 : P)

dist p1 p3 * dist p1 p3 =
  dist p1 p2 * dist p1 p2 + dist p3 p2 * dist p3 p2 -
    2 * dist p1 p2 * dist p3 p2 * Real.cos (EuclideanGeometry.angle p1 p2 p3)


private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{P : Finpartition Finset.univ}
{hP : P.IsEquipartition}
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε : ℝ}
{U : Finset α}
{hU : U ∈ P.parts}
{V : Finset α}
(hV : V ∈ P.parts)
(hUV : U ≠ V)
(hunif : ¬G.IsUniform ε U V)
(hPε : 100 ≤ 4 ^ P.parts.card * ε ^ 5)
(hε₁ : ε ≤ 1)

(1 - ε / 10) * ↑(G.nonuniformWitness ε U V).card ≤ ↑((SzemerediRegularity.star hP G ε hU V).biUnion id).card


/-- The absolute value satisfies the triangle inequality. -/
@[to_additive "The absolute value satisfies the triangle inequality."]
lemma mabs_mul_le (a b : α) : |a * b|ₘ ≤ |a|ₘ * |b|ₘ


theorem pow_dvd_of_mul_eq_pow [GCDMonoid α] {a b c d₁ d₂ : α} (ha : a ≠ 0) (hab : IsUnit (gcd a b))
    {k : ℕ} (h : a * b = c ^ k) (hc : c = d₁ * d₂) (hd₁ : d₁ ∣ a) : d₁ ^ k ≠ 0 ∧ d₁ ^ k ∣ a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
{a b c d₁ d₂ : α}
(ha : a ≠ 0)
(hab : IsUnit (gcd a b))
{k : ℕ}
(h : a * b = c ^ k)
(hc : c = d₁ * d₂)
(hd₁ : d₁ ∣ a)


theorem lintegral_nnnorm_condexpL2_indicator_le_real (hs : MeasurableSet s) (hμs : μ s ≠ ∞)
    (ht : MeasurableSet[m] t) (hμt : μ t ≠ ∞) :
    ∫⁻ a in t, ‖(condexpL2 ℝ ℝ hm (indicatorConstLp 2 hs hμs 1) : α → ℝ) a‖₊ ∂μ ≤ μ (s ∩ t)

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

∫⁻ (a : α) in t, ↑‖↑↑↑((MeasureTheory.condexpL2 ℝ ℝ hm) (MeasureTheory.indicatorConstLp 2 hs hμs 1)) a‖₊ ∂μ ≤ μ (s ∩ t)


@[to_additive]
theorem div_subset_div_right : s₁ ⊆ s₂ → s₁ / t ⊆ s₂ / t

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


@[simp]
theorem pullback_id : S.pullback (𝟙 _) = S

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

CategoryTheory.Sieve.pullback (CategoryTheory.CategoryStruct.id X) S = S


@[simp]
theorem pi_top (s : Set ι) : (pi s fun i : ι => (⊤ : Submodule R (φ i))) = ⊤

{R : Type u}
{ι : Type x}
[Semiring R]
{φ : ι → Type u_1}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(s : Set ι)


@[simp]
theorem lookup_erase (a) (s : AList β) : lookup a (erase a s) = none

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
(s : AList β)


theorem uniq (G₁ G₂ : W.Localization ⥤ D) (h : W.Q ⋙ G₁ = W.Q ⋙ G₂) : G₁ = G₂

(G₁ G₂ : CategoryTheory.Functor W.Localization D)


/-- Specialization of `LinearEquiv.isUnit_det` -/
theorem LinearEquiv.isUnit_det' {A : Type*} [CommRing A] [Module A M] (f : M ≃ₗ[A] M) :
    IsUnit (LinearMap.det (f : M →ₗ[A] M))

{M : Type u_2}
[AddCommGroup M]
{A : Type u_5}
[CommRing A]
[Module A M]
(f : M ≃ₗ[A] M)


theorem range_toLp [NormedField 𝕜] [NormedSpace 𝕜 E] :
    (LinearMap.range (toLp p μ 𝕜 : C(α, E) →L[𝕜] Lp E p μ)).toAddSubgroup =
      MeasureTheory.Lp.boundedContinuousFunction E p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
(p : ℝ≥0∞)
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[TopologicalSpace α]
[BorelSpace α]
[SecondCountableTopologyEither α E]
[CompactSpace α]
[MeasureTheory.IsFiniteMeasure μ]
{𝕜 : Type u_5}
[Fact (1 ≤ p)]
[NormedField 𝕜]
[NormedSpace 𝕜 E]

(LinearMap.range (ContinuousMap.toLp p μ 𝕜)).toAddSubgroup = MeasureTheory.Lp.boundedContinuousFunction E p μ


theorem Injective.iterate (Hinj : Injective f) (n : ℕ) : Injective f^[n]

{α : Type u}
{f : α → α}
(Hinj : Function.Injective f)
(n : ℕ)


@[to_additive]
theorem Subgroup.le_topologicalClosure (s : Subgroup G) : s ≤ s.topologicalClosure

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


@[to_additive]
protected theorem integrableOn_iff (hs : IsFundamentalDomain G s μ) (ht : IsFundamentalDomain G t μ)
    {f : α → E} (hf : ∀ (g : G) (x), f (g • x) = f x) : IntegrableOn f s μ ↔ IntegrableOn f t μ

[MeasureTheory.SMulInvariantMeasure G α μ]

(hs : MeasureTheory.IsFundamentalDomain G s μ)

(ht : MeasureTheory.IsFundamentalDomain G t μ)

(hf : ∀ (g : G) (x : α), f (g • x) = f x)

MeasureTheory.IntegrableOn f s μ ↔ MeasureTheory.IntegrableOn f t μ


/-- If `F` is initial,
the category of cones on `F ⋙ G` is equivalent to the category of cones on `G`,
for any `G : D ⥤ E`.
-/
@[simps]
def conesEquiv : Cone (F ⋙ G) ≌ Cone G

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
[F.Initial]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
(G : CategoryTheory.Functor D E)

(CategoryTheory.Functor.Initial.conesEquiv F G).functor = CategoryTheory.Functor.Initial.extendCone


@[to_additive (attr := simp)]
theorem zero_apply (x : E) : (0 : GroupSeminorm E) x = 0


/-- The functor `Karoubi (HomologicalComplex C c) ⥤ HomologicalComplex (Karoubi C) c`,
on objects. -/
@[simps]
def obj (P : Karoubi (HomologicalComplex C c)) : HomologicalComplex (Karoubi C) c

(P : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C c))

((CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Functor.obj P).X n).p = P.p.f n


/-- The `HasSeparableContraction.contraction` is indeed a separable contraction. -/
theorem HasSeparableContraction.isSeparableContraction :
    IsSeparableContraction q f hf.contraction

(hf : Polynomial.HasSeparableContraction q f)

Polynomial.IsSeparableContraction q f hf.contraction


@[simp] lemma evalEquiv_apply (m : M) : evalEquiv R M m = Dual.eval R M m

(R : Type u_1)
(M : Type u_2)
[CommRing R]
[AddCommGroup M]
[Module R M]
[Module.IsReflexive R M]
(m : M)

(Module.evalEquiv R M) m = (Module.Dual.eval R M) m


@[simp]
theorem dual_Icc : Icc (toDual a) (toDual b) = ofDual ⁻¹' Icc b a

Set.Icc (OrderDual.toDual a) (OrderDual.toDual b) = ⇑OrderDual.ofDual ⁻¹' Set.Icc b a


/-- The L-series of `f` is holomorphic on its open half-plane of absolute convergence. -/
lemma LSeries_analyticOn (f : ℕ → ℂ) :
    AnalyticOn ℂ (LSeries f) {s | abscissaOfAbsConv f < s.re}

AnalyticOn ℂ (LSeries f) {s | LSeries.abscissaOfAbsConv f < ↑s.re}


@[to_additive]
theorem of_image_filter [DecidableEq H]
    (f : G →ₙ* H) {A B : Finset G} {aG bG : G} {aH bH : H} (hae : f aG = aH) (hbe : f bG = bH)
    (huH : UniqueMul (A.image f) (B.image f) aH bH)
    (huG : UniqueMul (A.filter (f · = aH)) (B.filter (f · = bH)) aG bG) :
    UniqueMul A B aG bG

(huH : UniqueMul (Finset.image (⇑f) A) (Finset.image (⇑f) B) aH bH)

(huG : UniqueMul (Finset.filter (fun x => f x = aH) A) (Finset.filter (fun x => f x = bH) B) aG bG)


lemma eq_one_of_neq_zero (i : Fin 2) (hi : i ≠ 0) : i = 1


@[simp]
theorem indicatorConstLp_empty :
    indicatorConstLp p MeasurableSet.empty (by simp : μ ∅ ≠ ∞) c = 0

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{c : E}

MeasureTheory.indicatorConstLp p ⋯ ⋯ c = 0


@[simp]
theorem iSupLift_mk {i : ι} (x : K i) (hx : (x : A) ∈ T) :
    iSupLift K dir f hf T hT ⟨x, hx⟩ = f i x

{dir : Directed (fun x x_1 => x ≤ x_1) K}

{hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (NonUnitalSubalgebra.inclusion h)}

(NonUnitalSubalgebra.iSupLift K dir f hf T hT) ⟨↑x, hx⟩ = (f i) x


theorem infs_sups_subset_right : (t ⊻ u) ⊼ s ⊆ t ⊼ s ⊻ u ⊼ s

{α : Type u_2}
[DistribLattice α]
(s t u : Set α)


/--
Another variant of the opposite of functor, turning a functor `Cᵒᵖ ⥤ D` into a functor `C ⥤ Dᵒᵖ`.
In informal mathematics no distinction is made.
-/
@[simps]
protected def rightOp (F : Cᵒᵖ ⥤ D) : C ⥤ Dᵒᵖ

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

∀ {X Y : C} (f : X ⟶ Y), F.rightOp.map f = (F.map f.op).op


@[simp, norm_cast] lemma coe_update : (f.update i b : ∀ i : ι, β i) = Function.update f i b

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
(i : ι)
(f : Π₀ (i : ι), β i)
(b : β i)

⇑(DFinsupp.update i f b) = Function.update (⇑f) i b


lemma sup_univ_eq_ciSup [Fintype ι] (f : ι → α) : univ.sup f = ⨆ i, f i

{ι : Type u_1}
{α : Type u_2}
[ConditionallyCompleteLinearOrderBot α]
[Fintype ι]
(f : ι → α)


@[simp]
theorem not_infIrred : ¬InfIrred a ↔ IsMax a ∨ ∃ b c, b ⊓ c = a ∧ a < b ∧ a < c

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


theorem toBCF_injective : Function.Injective (toBCF : C₀(α, β) → α →ᵇ β)

(α : Type u)
(β : Type v)
[TopologicalSpace α]
[PseudoMetricSpace β]
[Zero β]


@[local simp] theorem negSucc_mul_ofNat' (m n : Nat) : -[m+1] * ↑n = negOfNat (succ m * n)

Int.negSucc m * ↑n = Int.negOfNat (m.succ * n)


@[to_additive (attr := simp)]
theorem mulETransformLeft_one : mulETransformLeft 1 x = x

{α : Type u_1}
[DecidableEq α]
[Group α]
(x : Finset α × Finset α)


theorem modByMonic_eq_of_dvd_sub (hq : q.Monic) {p₁ p₂ : R[X]} (h : q ∣ p₁ - p₂) :
    p₁ %ₘ q = p₂ %ₘ q

{R : Type u}
[CommRing R]
{q : R[X]}
(hq : q.Monic)
{p₁ p₂ : R[X]}
(h : q ∣ p₁ - p₂)


/-- Construct a bounded continuous function from a continuous function vanishing at infinity. -/
@[simps!]
def toBCF (f : C₀(α, β)) : α →ᵇ β

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
[Zero β]
(f : α →C₀ β)
(a : α)


/-- Given a natural transformation `τ : F ⟶ G` between functors `C ⥤ D` which preserve
the homology of a short complex `S`, and a homology data for `S`,
this is the homology map data for the morphism `S.mapNatTrans τ`
obtained by evaluating `τ`. -/
@[simps]
def HomologyMapData.natTransApp (h : HomologyData S) (τ : F ⟶ G) :
    HomologyMapData (S.mapNatTrans τ) (h.map F) (h.map G)

(CategoryTheory.ShortComplex.HomologyMapData.natTransApp h τ).right =
  CategoryTheory.ShortComplex.RightHomologyMapData.natTransApp h.right τ


@[simp]
theorem cancel_iso_hom_left {X Y Z : C} (f : X ≅ Y) (g g' : Y ⟶ Z) :
    f.hom ≫ g = f.hom ≫ g' ↔ g = g'

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

CategoryTheory.CategoryStruct.comp f.hom g = CategoryTheory.CategoryStruct.comp f.hom g' ↔ g = g'


theorem iInter_comp {f : ι → ι₂} (hf : Surjective f) (g : ι₂ → Set α) : ⋂ x, g (f x) = ⋂ y, g y

{α : Type u_1}
{ι : Sort u_4}
{ι₂ : Sort u_6}
{f : ι → ι₂}
(hf : Function.Surjective f)
(g : ι₂ → Set α)


theorem expSeries_apply_zero (n : ℕ) :
    (expSeries 𝕂 𝔸 n fun _ => (0 : 𝔸)) = Pi.single (f := fun _ => 𝔸) 0 1 n

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[Field 𝕂]
[Ring 𝔸]
[Algebra 𝕂 𝔸]
[TopologicalSpace 𝔸]
[TopologicalRing 𝔸]
(n : ℕ)

((NormedSpace.expSeries 𝕂 𝔸 n) fun x => 0) = Pi.single 0 1 n


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

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

(CategoryTheory.cosimplicialSimplicialEquiv C).unitIso.hom.app X = (Opposite.unop X).opUnopIso.hom.op


/-- A `Filtration` on a measurable space `Ω` with σ-algebra `m` is a monotone
sequence of sub-σ-algebras of `m`. -/
structure Filtration {Ω : Type*} (ι : Type*) [Preorder ι] (m : MeasurableSpace Ω) where
  seq : ι → MeasurableSpace Ω
  mono' : Monotone seq
  le' : ∀ i : ι, seq i ≤ m

{Ω : Type u_1}
{ι : Type u_2}
[Preorder ι]
{m : MeasurableSpace Ω}
(self : MeasureTheory.Filtration ι m)
(i : ι)


theorem sin_nonneg_of_nonneg_of_le_pi {x : ℝ} (h0x : 0 ≤ x) (hxp : x ≤ π) : 0 ≤ sin x

{x : ℝ}
(h0x : 0 ≤ x)
(hxp : x ≤ Real.pi)


theorem mk_mem_graph (f : α →₀ M) {a : α} (ha : a ∈ f.support) : (a, f a) ∈ f.graph

{α : Type u_1}
{M : Type u_5}
[Zero M]
(f : α →₀ M)
{a : α}
(ha : a ∈ f.support)


theorem Symmetric.comap (h : Symmetric r) (f : α → β) : Symmetric (r on f)

{α : Type u_1}
{β : Type u_2}
{r : β → β → Prop}
(h : Symmetric r)
(f : α → β)


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


/-- A positive cone in an `AddCommGroup` induces a linear order if
for every `a`, either `a` or `-a` is non-negative. -/
-- Porting note(#5171): @[nolint has_nonempty_instance]
structure TotalPositiveCone (α : Type*) [AddCommGroup α] extends PositiveCone α where
  /-- For any `a` the proposition `nonneg a` is decidable -/
  nonnegDecidable : DecidablePred nonneg
  /-- Either `a` or `-a` is `nonneg` -/
  nonneg_total : ∀ a : α, nonneg a ∨ nonneg (-a)

(self : AddCommGroup.TotalPositiveCone α)


theorem lcm_assoc (i j k : ℤ) : lcm (lcm i j) k = lcm i (lcm j k)


theorem eval₂_reflect_eq_zero_iff (i : R →+* S) (x : S) [Invertible x] (N : ℕ) (f : R[X])
    (hf : f.natDegree ≤ N) : eval₂ i (⅟ x) (reflect N f) = 0 ↔ eval₂ i x f = 0

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[CommSemiring S]
(i : R →+* S)
(x : S)
[Invertible x]
(N : ℕ)
(f : Polynomial R)
(hf : f.natDegree ≤ N)

Polynomial.eval₂ i (⅟x) (Polynomial.reflect N f) = 0 ↔ Polynomial.eval₂ i x f = 0


lemma ordConnected_inter_Icc_iff (hx : x ∈ s) (hy : y ∈ s) :
    OrdConnected (s ∩ Icc x y) ↔ Ioo x y ⊆ s

{α : Type u_1}
[PartialOrder α]
{s : Set α}
{x y : α}
(hx : x ∈ s)
(hy : y ∈ s)

(s ∩ Set.Icc x y).OrdConnected ↔ Set.Ioo x y ⊆ s


/-- A seminorm on an additive group `G` is a function `f : G → ℝ` that preserves zero, is
subadditive and such that `f (-x) = f x` for all `x`. -/
structure AddGroupSeminorm (G : Type*) [AddGroup G] where
  -- Porting note: can't extend `ZeroHom G ℝ` because otherwise `to_additive` won't work since
  -- we aren't using old structures
  /-- The bare function of an `AddGroupSeminorm`. -/
  protected toFun : G → ℝ
  /-- The image of zero is zero. -/
  protected map_zero' : toFun 0 = 0
  /-- The seminorm is subadditive. -/
  protected add_le' : ∀ r s, toFun (r + s) ≤ toFun r + toFun s
  /-- The seminorm is invariant under negation. -/
  protected neg' : ∀ r, toFun (-r) = toFun r

{G : Type u_7}
[AddGroup G]
(self : AddGroupSeminorm G)


lemma completedHurwitzZetaEven_neg (a : UnitAddCircle) (s : ℂ) :
    completedHurwitzZetaEven (-a) s = completedHurwitzZetaEven a s

HurwitzZeta.completedHurwitzZetaEven (-a) s = HurwitzZeta.completedHurwitzZetaEven a s


protected theorem isClosed_iff (hS : RestrictGenTopology S) :
    IsClosed t ↔ ∀ s ∈ S, IsClosed ((↑) ⁻¹' t : Set s)

{X : Type u_1}
[TopologicalSpace X]
{S : Set (Set X)}
{t : Set X}
(hS : RestrictGenTopology S)

IsClosed t ↔ ∀ s ∈ S, IsClosed (Subtype.val ⁻¹' t)


@[to_additive]
theorem Inducing.multipliable_iff_tprod_comp_mem_range [CommMonoid γ] [TopologicalSpace γ]
    [T2Space γ] {G} [FunLike G α γ] [MonoidHomClass G α γ] {g : G} (hg : Inducing g) (f : β → α) :
    Multipliable f ↔ Multipliable (g ∘ f) ∧ ∏' i, g (f i) ∈ Set.range g

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommMonoid α]
[TopologicalSpace α]
[CommMonoid γ]
[TopologicalSpace γ]
[T2Space γ]
{G : Type u_5}
[FunLike G α γ]
[MonoidHomClass G α γ]
{g : G}
(hg : Inducing ⇑g)
(f : β → α)

Multipliable f ↔ Multipliable (⇑g ∘ f) ∧ ∏' (i : β), g (f i) ∈ Set.range ⇑g


theorem not_rel_of_subsingleton (r) [IsIrrefl α r] [Subsingleton α] (x y) : ¬r x y

{α : Type u}
(r : α → α → Prop)
[IsIrrefl α r]
[Subsingleton α]
(x y : α)


@[simp]
theorem coe_toLinearIsometryEquiv (li : E₁ →ₗᵢ[R₁] F) (h : finrank R₁ E₁ = finrank R₁ F) :
    (li.toLinearIsometryEquiv h : E₁ → F) = li

(h : FiniteDimensional.finrank R₁ E₁ = FiniteDimensional.finrank R₁ F)


theorem mutuallySingular_singularPart (μ ν : Measure α) : μ.singularPart ν ⟂ₘ ν

{α : Type u_1}
{m : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)


theorem d_eq_unop_d (n : ℕ) :
    objD X n =
      (AlternatingFaceMapComplex.objD ((cosimplicialSimplicialEquiv C).functor.obj (op X))
          n).unop

(X : CategoryTheory.CosimplicialObject C)

AlgebraicTopology.AlternatingCofaceMapComplex.objD X n =
  (AlgebraicTopology.AlternatingFaceMapComplex.objD
      ((CategoryTheory.cosimplicialSimplicialEquiv C).functor.obj (Opposite.op X)) n).unop


theorem fundamentalDomain_ae_parallelepiped [Fintype ι] [MeasurableSpace E] (μ : Measure E)
    [BorelSpace E] [Measure.IsAddHaarMeasure μ] :
    fundamentalDomain b =ᵐ[μ] parallelepiped b

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

Zspan.fundamentalDomain b =ᵐ[μ] parallelepiped ⇑b


@[to_additive]
theorem subgroupOf_normalizer_eq {H N : Subgroup G} (h : H.normalizer ≤ N) :
    H.normalizer.subgroupOf N = (H.subgroupOf N).normalizer

{G : Type u_1}
[AddGroup G]
{H N : AddSubgroup G}
(h : H.normalizer ≤ N)

H.normalizer.addSubgroupOf N = (H.addSubgroupOf N).normalizer


theorem IntegrableOn.indicator (h : IntegrableOn f s μ) (ht : MeasurableSet t) :
    IntegrableOn (indicator t f) s μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{s t : Set α}
{μ : MeasureTheory.Measure α}
(h : MeasureTheory.IntegrableOn f s μ)
(ht : MeasurableSet t)

MeasureTheory.IntegrableOn (t.indicator f) s μ


theorem utf8GetAux_add_right_cancel (s : List Char) (i p n : Nat) :
    utf8GetAux s ⟨i + n⟩ ⟨p + n⟩ = utf8GetAux s ⟨i⟩ ⟨p⟩

String.utf8GetAux s { byteIdx := i + n } { byteIdx := p + n } = String.utf8GetAux s { byteIdx := i } { byteIdx := p }


@[to_additive (attr := simp)]
lemma minOrder_eq_top : minOrder α = ⊤ ↔ IsTorsionFree α

Monoid.minOrder α = ⊤ ↔ Monoid.IsTorsionFree α


theorem extChartAt_source (x : M) : (extChartAt I x).source = (chartAt H x).source

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


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

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


theorem isTrichotomous_lex [∀ i, IsTrichotomous (β i) s] (wf : WellFounded r) :
    IsTrichotomous (∀ i, β i) (Pi.Lex r @s)

{ι : Type u_1}
{β : ι → Type u_2}
(r : ι → ι → Prop)
(s : {i : ι} → β i → β i → Prop)
[∀ (i : ι), IsTrichotomous (β i) s]
(wf : WellFounded r)

IsTrichotomous ((i : ι) → β i) (Pi.Lex r s)


/-- `toΓSpecFun` is continuous. -/
theorem toΓSpec_continuous : Continuous X.toΓSpecFun


@[simp]
theorem coe_forget_to_lat (X : BddLat) : ↥((forget₂ BddLat Lat).obj X) = ↥X

↑((CategoryTheory.forget₂ BddLat Lat).obj X) = ↑X.toLat


theorem nnnorm_integral_le (f : α →₁[μ] E) : ‖integral f‖₊ ≤ ‖f‖₊

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedSpace ℝ E]
[CompleteSpace E]
(f : ↥(MeasureTheory.Lp E 1 μ))


theorem ker_diagonal_toLin' [DecidableEq m] (w : m → K) :
    ker (toLin' (diagonal w)) =
      ⨆ i ∈ { i | w i = 0 }, LinearMap.range (LinearMap.stdBasis K (fun _ => K) i)

{m : Type u_1}
[Fintype m]
{K : Type u}
[Semifield K]
[DecidableEq m]
(w : m → K)

LinearMap.ker (Matrix.toLin' (Matrix.diagonal w)) =
  ⨆ i ∈ {i | w i = 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)


@[to_additive (attr := simp, norm_cast)]
theorem coe_inj {a b : α} : (a : WithOne α) = b ↔ a = b


theorem sub_mem_sup {R' M' : Type*} [Ring R'] [AddCommGroup M'] [Module R' M']
    {S T : Submodule R' M'} {s t : M'} (hs : s ∈ S) (ht : t ∈ T) : s - t ∈ S ⊔ T

{R' : Type u_4}
{M' : Type u_5}
[Ring R']
[AddCommGroup M']
[Module R' M']
{S T : Submodule R' M'}
{s t : M'}
(hs : s ∈ S)
(ht : t ∈ T)


theorem diff_iInter (s : Set β) (t : ι → Set β) : (s \ ⋂ i, t i) = ⋃ i, s \ t i

{β : Type u_2}
{ι : Sort u_4}
(s : Set β)
(t : ι → Set β)


@[to_additive]
theorem upperClosure_mul : ↑(upperClosure s) * t = upperClosure (s * t)

{α : Type u_1}
[OrderedCommGroup α]
(s t : Set α)

↑(upperClosure s) * t = ↑(upperClosure (s * t))


@[simp]
theorem up_inj {x y : α} : up x = up y ↔ x = y


theorem id_left (op : α → α → α) : Semiconj₂ id op op


/-- Any vertex adjacent to a vertex of `C` and not lying in `K` must lie in `C`.
-/
theorem mem_of_adj : ∀ {C : G.ComponentCompl K} (c d : V), c ∈ C → d ∉ K → G.Adj c d → d ∈ C

{V : Type u}
{G : SimpleGraph V}
{K : Set V}
{C : G.ComponentCompl K}
(c d : V)


theorem isCoatom_ker_of_surjective [IsSimpleModule R N] {f : M →ₗ[R] N}
    (hf : Function.Surjective f) : IsCoatom (LinearMap.ker f)

{R : Type u_2}
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
{N : Type u_5}
[AddCommGroup N]
[Module R N]
[IsSimpleModule R N]
{f : M →ₗ[R] N}
(hf : Function.Surjective ⇑f)


theorem nat_omega_rec (f : α → β → σ) {m : α → β → ℕ}
    {l : α → β → List β} {g : α → β × List σ → Option σ}
    (hm : Primrec₂ m) (hl : Primrec₂ l) (hg : Primrec₂ g)
    (Ord : ∀ a b, ∀ b' ∈ l a b, m a b' < m a b)
    (H : ∀ a b, g a (b, (l a b).map (f a)) = some (f a b)) : Primrec₂ f

(f : α → β → σ)

{m : α → β → ℕ}

(Ord : ∀ (a : α) (b b' : β), b' ∈ l a b → m a b' < m a b)

(H : ∀ (a : α) (b : β), g a (b, List.map (f a) (l a b)) = some (f a b))


theorem t_mul_of (a : A) :
    t * (of (a : G) : HNNExtension G A B φ) = of (φ a : G) * t

{G : Type u_1}
[Group G]
{A B : Subgroup G}
{φ : ↥A ≃* ↥B}
(a : ↥A)

HNNExtension.t * HNNExtension.of ↑a = HNNExtension.of ↑(φ a) * HNNExtension.t


@[simp]
theorem singleMapHomologicalComplex_inv_app_self (j : ι) (X : W₁) :
    ((singleMapHomologicalComplex F c j).inv.app X).f j =
      (singleObjXSelf c j (F.obj X)).hom ≫ F.map (singleObjXSelf c j X).inv

((HomologicalComplex.singleMapHomologicalComplex F c j).inv.app X).f j =
  (HomologicalComplex.singleObjXSelf c j (F.obj X)).hom ≫ F.map (HomologicalComplex.singleObjXSelf c j X).inv


@[to_additive (attr := simp)]
theorem subgroupOf_inj {H₁ H₂ K : Subgroup G} :
    H₁.subgroupOf K = H₂.subgroupOf K ↔ H₁ ⊓ K = H₂ ⊓ K

{G : Type u_1}
[Group G]
{H₁ H₂ K : Subgroup G}


/-- If `a % b = c` then `b` divides `a - c`. -/
theorem dvd_sub_of_emod_eq {a b c : Int} (h : a % b = c) : b ∣ a - c


/-- General fencing theorem for continuous functions with an estimate on the derivative.
Let `f` and `B` be continuous functions on `[a, b]` such that

* `f a ≤ B a`;
* `B` has derivative `B'` everywhere on `ℝ`;
* `f` has right derivative `f'` at every point of `[a, b)`;
* we have `f' x < B' x` whenever `f x = B x`.

Then `f x ≤ B x` everywhere on `[a, b]`. -/
theorem image_le_of_deriv_right_lt_deriv_boundary {f f' : ℝ → ℝ} {a b : ℝ}
    (hf : ContinuousOn f (Icc a b)) (hf' : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x)
    {B B' : ℝ → ℝ} (ha : f a ≤ B a) (hB : ∀ x, HasDerivAt B (B' x) x)
    (bound : ∀ x ∈ Ico a b, f x = B x → f' x < B' x) : ∀ ⦃x⦄, x ∈ Icc a b → f x ≤ B x

(hf' : ∀ x ∈ Set.Ico a b, HasDerivWithinAt f (f' x) (Set.Ici x) x)

(bound : ∀ x ∈ Set.Ico a b, f x = B x → f' x < B' x)


theorem meas_ge_le_mul_pow_eLpNorm (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞)
    (hf : AEStronglyMeasurable f μ) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    μ { x | ε ≤ ‖f x‖₊ } ≤ ε⁻¹ ^ p.toReal * eLpNorm f p μ ^ p.toReal

(hf : MeasureTheory.AEStronglyMeasurable f μ)

μ {x | ε ≤ ↑‖f x‖₊} ≤ ε⁻¹ ^ p.toReal * MeasureTheory.eLpNorm f p μ ^ p.toReal


/-- Any injective endomorphism of an Artinian module is surjective. -/
theorem surjective_of_injective_endomorphism (f : M →ₗ[R] M) (s : Injective f) : Surjective f

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
[IsArtinian R M]
(f : M →ₗ[R] M)
(s : Function.Injective ⇑f)


/-- `arsinh` is the right inverse of `sinh`. -/
@[simp]
theorem sinh_arsinh (x : ℝ) : sinh (arsinh x) = x


theorem rightHom_surjective : Function.Surjective (rightHom : N ⋊[φ] G → G)

{N : Type u_1}
{G : Type u_2}
[Group N]
[Group G]
{φ : G →* MulAut N}


/-- If `f : α → β` semiconjugates `ga : α → α` to `gb : β → β`,
`ga'` is a right inverse of `ga`, and `gb'` is a left inverse of `gb`,
then `f` semiconjugates `ga'` to `gb'` as well. -/
theorem inverses_right (h : Semiconj f ga gb) (ha : RightInverse ga' ga) (hb : LeftInverse gb' gb) :
    Semiconj f ga' gb'

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


theorem inr_fst' {b : BinaryBicone X Y} (h : b.IsBilimit) :
    IsPushout b.inr (0 : Y ⟶ 0) b.fst (0 : 0 ⟶ X)

{b : CategoryTheory.Limits.BinaryBicone X Y}

CategoryTheory.IsPushout b.inr 0 b.fst 0


/-- We verify that the biproduct we've just defined is isomorphic to the `ModuleCat R` structure
on the dependent function type.
-/
@[simps! hom_apply]
noncomputable def biproductIsoPi [Finite J] (f : J → ModuleCat.{v} R) :
    ((⨁ f) : ModuleCat.{v} R) ≅ ModuleCat.of R (∀ j, f j)

(x : ↑(CategoryTheory.Limits.biproduct.bicone f).toCone.pt)

(ModuleCat.biproductIsoPi f).hom x j = (CategoryTheory.Limits.biproduct.π f j) x


@[reassoc (attr := simp)]
theorem pullbackRightPullbackFstIso_inv_fst :
    (pullbackRightPullbackFstIso f g f').inv ≫ pullback.fst _ _ = pullback.fst _ _

[CategoryTheory.Limits.HasPullback f' (CategoryTheory.Limits.pullback.fst f g)]

[CategoryTheory.Limits.HasPullback (f' ≫ f) g]

(CategoryTheory.Limits.pullbackRightPullbackFstIso f g f').inv ≫
    CategoryTheory.Limits.pullback.fst f' (CategoryTheory.Limits.pullback.fst f g) =
  CategoryTheory.Limits.pullback.fst (f' ≫ f) g


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

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

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


theorem div_coe (m k : ℕ+) :
    (div m k : ℕ) = ite ((m : ℕ) % (k : ℕ) = 0) ((m : ℕ) / (k : ℕ)).pred ((m : ℕ) / (k : ℕ))

m.div k = if ↑m % ↑k = 0 then (↑m / ↑k).pred else ↑m / ↑k


lemma LSeriesSummable.smul {f : ℕ → ℂ} (c : ℂ) {s : ℂ} (hf : LSeriesSummable f s) :
    LSeriesSummable (c • f) s


theorem homothety_mul (c : P1) (r₁ r₂ : k) :
    homothety c (r₁ * r₂) = (homothety c r₁).comp (homothety c r₂)

{k : Type u_2}
{V1 : Type u_3}
{P1 : Type u_4}
[CommRing k]
[AddCommGroup V1]
[AffineSpace V1 P1]
[Module k V1]
(c : P1)
(r₁ r₂ : k)

AffineMap.homothety c (r₁ * r₂) = (AffineMap.homothety c r₁).comp (AffineMap.homothety c r₂)


@[ext]
theorem ext {e e' : P₁ ≃ᵃ[k] P₂} (h : ∀ x, e x = e' x) : 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₂}
(h : ∀ (x : P₁), e x = e' x)


theorem sin_add_sin : sin x + sin y = 2 * sin ((x + y) / 2) * cos ((x - y) / 2)

Complex.sin x + Complex.sin y = 2 * Complex.sin ((x + y) / 2) * Complex.cos ((x - y) / 2)


theorem lt_of_mul_self_lt_mul_self (hb : 0 ≤ b) : a * a < b * b → a < b

{R : Type u_3}
[LinearOrderedSemiring R]
{a b : R}
(hb : 0 ≤ b)


@[simp, norm_cast]
theorem ofReal_zpow (r : ℝ) (n : ℤ) : ((r ^ n : ℝ) : ℂ) = (r : ℂ) ^ n


theorem IsAdjointPair.smul (c : R) (h : IsAdjointPair B B' f g) :
    IsAdjointPair B B' (c • f) (c • g)

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
{M₂ : Type u_7}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup M₁]
[Module R M₁]
[AddCommGroup M₂]
[Module R M₂]
{B : M →ₗ[R] M →ₗ[R] M₂}
{B' : M₁ →ₗ[R] M₁ →ₗ[R] M₂}
{f : M →ₗ[R] M₁}
{g : M₁ →ₗ[R] M}
(c : R)
(h : B.IsAdjointPair B' f g)


lemma mem_pair {a b c : α} : a ∈ [b, c] ↔ a = b ∨ a = c


@[simp]
lemma opcyclesMap_add : opcyclesMap (φ + φ') = opcyclesMap φ + opcyclesMap φ'

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

CategoryTheory.ShortComplex.opcyclesMap (φ + φ') =
  CategoryTheory.ShortComplex.opcyclesMap φ + CategoryTheory.ShortComplex.opcyclesMap φ'


lemma pred_max (a b : α) : pred (max a b) = max (pred a) (pred b)

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

Order.pred (max a b) = max (Order.pred a) (Order.pred b)


theorem affineSpan_pair_parallel_iff_vectorSpan_eq {p₁ p₂ p₃ p₄ : P} :
    line[k, p₁, p₂] ∥ line[k, p₃, p₄] ↔
      vectorSpan k ({p₁, p₂} : Set P) = vectorSpan k ({p₃, p₄} : Set P)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ p₃ p₄ : P}

affineSpan k {p₁, p₂} ∥ affineSpan k {p₃, p₄} ↔ vectorSpan k {p₁, p₂} = vectorSpan k {p₃, p₄}


lemma ratio_toDilation (e : X ≃ᵈ Y) : ratio e.toDilation = ratio e

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

Dilation.ratio e.toDilation = Dilation.ratio e


/-- A universal property of the complex numbers, providing a unique `ℂ →ₐ[ℝ] A` for every element
of `A` which squares to `-1`.

This can be used to embed the complex numbers in the `Quaternion`s.

This isomorphism is named to match the very similar `Zsqrtd.lift`. -/
@[simps (config := { simpRhs := true })]
def lift : { I' : A // I' * I' = -1 } ≃ (ℂ →ₐ[ℝ] A)

{A : Type u_1}
[Ring A]
[Algebra ℝ A]
(I' : { I' // I' * I' = -1 })


/-- `a` is in the UV-compressed family iff it's in the original and its compression is in the
original, or it's not in the original but it's the compression of something in the original. -/
theorem mem_compression :
    a ∈ 𝓒 u v s ↔ a ∈ s ∧ compress u v a ∈ s ∨ a ∉ s ∧ ∃ b ∈ s, compress u v b = a

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
[DecidableRel Disjoint]
[DecidableRel fun x x_1 => x ≤ x_1]
{s : Finset α}
{u v a : α}
[DecidableEq α]

a ∈ UV.compression u v s ↔ a ∈ s ∧ UV.compress u v a ∈ s ∨ a ∉ s ∧ ∃ b ∈ s, UV.compress u v b = a


/-- If two ring homomorphisms are equal on a set, then they are equal on its subring closure. -/
theorem eqOn_set_closure {f g : R →+* S} {s : Set R} (h : Set.EqOn f g s) :
    Set.EqOn f g (closure s)

{R : Type u}
[Ring R]
{S : Type v}
[Semiring S]
{f g : R →+* S}
{s : Set R}
(h : Set.EqOn (⇑f) (⇑g) s)


theorem diam_smul₀ (c : 𝕜) (x : Set E) : diam (c • x) = ‖c‖ * diam x

{𝕜 : Type u_1}
{E : Type u_2}
[NormedDivisionRing 𝕜]
[SeminormedAddCommGroup E]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
(c : 𝕜)
(x : Set E)

Metric.diam (c • x) = ‖c‖ * Metric.diam x


@[simp]
theorem Pi.basisFun_det : (Pi.basisFun R ι).det = Matrix.detRowAlternating

{R : Type u_1}
[CommRing R]
{ι : Type u_4}
[DecidableEq ι]
[Fintype ι]


/-- A finite group of prime order is simple. -/
@[to_additive "A finite group of prime order is simple."]
theorem isSimpleGroup_of_prime_card {α : Type u} [Group α] [Fintype α] {p : ℕ} [hp : Fact p.Prime]
    (h : Fintype.card α = p) : IsSimpleGroup α

{α : Type u}
[AddGroup α]
[Fintype α]
{p : ℕ}
[hp : Fact (Nat.Prime p)]
(h : Fintype.card α = p)


theorem t_smul_eq_unitsSMul (w : NormalWord d) :
    (t : HNNExtension G A B φ) • w = unitsSMul φ 1 w

{d : HNNExtension.NormalWord.TransversalPair G A B}

HNNExtension.t • w = HNNExtension.NormalWord.unitsSMul φ 1 w


@[simp]
theorem norm_eq (h : f 0 = 0) : ‖f‖ = ‖f.contLinear‖

{𝕜 : Type u_1}
{V : Type u_3}
{W : Type u_4}
[NormedAddCommGroup V]
[NormedAddCommGroup W]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 V]
[NormedSpace 𝕜 W]
(f : V →ᴬ[𝕜] W)
(h : f 0 = 0)


theorem mk_compl_eq_mk_compl_finite_lift {α : Type u} {β : Type v} [Finite α] {s : Set α}
    {t : Set β} (h1 : (lift.{max v w, u} #α) = (lift.{max u w, v} #β))
    (h2 : lift.{max v w, u} #s = lift.{max u w, v} #t) :
    lift.{max v w} #(sᶜ : Set α) = lift.{max u w} #(tᶜ : Set β)

(h1 : Cardinal.lift.{max v w, u} #α = Cardinal.lift.{max u w, v} #β)

(h2 : Cardinal.lift.{max v w, u} #↑s = Cardinal.lift.{max u w, v} #↑t)

Cardinal.lift.{max v w, u} #↑sᶜ = Cardinal.lift.{max u w, v} #↑tᶜ


@[to_additive]
theorem ThreeGPFree.mulRothNumber_eq (hs : ThreeGPFree (s : Set α)) :
    mulRothNumber s = s.card

{α : Type u_2}
[DecidableEq α]
[Monoid α]
{s : Finset α}
(hs : ThreeGPFree ↑s)


/-- Assert that an element of a semiring is equal to the coercion of some natural number. -/
structure IsNat {α : Type u} [AddMonoidWithOne α] (a : α) (n : ℕ) : Prop where
  /-- The element is equal to the coercion of the natural number. -/
  out : a = n

{α : Type u}
[AddMonoidWithOne α]
{a : α}
{n : ℕ}
(self : Mathlib.Meta.NormNum.IsNat a n)


@[simp]
theorem Surjective.of_comp_iff' (hf : Bijective f) (g : γ → α) :
    Surjective (f ∘ g) ↔ Surjective g

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{f : α → β}
(hf : Function.Bijective f)
(g : γ → α)

Function.Surjective (f ∘ g) ↔ Function.Surjective g


theorem germ_to_top (x : PrimeSpectrum.Top R) (f : R) :
    (structureSheaf R).presheaf.germ (⟨x, trivial⟩ : (⊤ : Opens (PrimeSpectrum.Top R)))
        (toOpen R ⊤ f) =
      toStalk R x f

(x : ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

((AlgebraicGeometry.Spec.structureSheaf R).presheaf.germ ⟨x, trivial⟩)
    ((AlgebraicGeometry.StructureSheaf.toOpen R ⊤) f) =
  (AlgebraicGeometry.StructureSheaf.toStalk R x) f


@[simp]
theorem bddBelow_empty [Nonempty α] : BddBelow (∅ : Set α)


theorem disjoint_map_map {f : α → γ} {g : β → γ} {s : Multiset α} {t : Multiset β} :
    Disjoint (s.map f) (t.map g) ↔ ∀ a ∈ s, ∀ b ∈ t, f a ≠ g b

{α : Type u_1}
{β : Type v}
{γ : Type u_2}
{f : α → γ}
{g : β → γ}
{s : Multiset α}
{t : Multiset β}

(Multiset.map f s).Disjoint (Multiset.map g t) ↔ ∀ a ∈ s, ∀ b ∈ t, f a ≠ g b


theorem left_U_subset (c : CU P) : c.left.U ⊆ c.U

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
(c : Urysohns.CU P)


@[reassoc (attr := simp)]
lemma homologyι_comp_asIsoHomologyι_inv (hg : S.g = 0) [S.HasHomology] :
    S.homologyι ≫ (S.asIsoHomologyι hg).inv  = 𝟙 _

CategoryTheory.CategoryStruct.comp S.homologyι (S.asIsoHomologyι hg).inv = CategoryTheory.CategoryStruct.id S.homology


/-- `BipointedToPointed_fst` is inverse to `PointedToBipointed`. -/
@[simps!]
def pointedToBipointedCompBipointedToPointedFst :
    pointedToBipointed ⋙ bipointedToPointedFst ≅ 𝟭 _

(X : Pointed)
(a : ((𝟭 Pointed).obj X).X)

(pointedToBipointedCompBipointedToPointedFst.inv.app X).toFun a = a


@[to_additive]
private lemma devosMulRel_of_le_of_le (mul : (x.1 * x.2).card ≤ (y.1 * y.2).card)
    (hadd : y.1.card + y.2.card ≤ x.1.card + x.2.card) (hone : x.1.card < y.1.card) :
    DevosMulRel x y


theorem coe_comp_inf_hom (f : LatticeHom β γ) (g : LatticeHom α β) :
    (f.comp g : InfHom α γ) = (f : InfHom β γ).comp g

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

{ toFun := ⇑(f.comp g), map_inf' := ⋯ } = { toFun := ⇑f, map_inf' := ⋯ }.comp { toFun := ⇑g, map_inf' := ⋯ }


theorem upperCrossingTime_le_lowerCrossingTime :
    upperCrossingTime a b f N n ω ≤ lowerCrossingTime a b f N n ω

{Ω : Type u_1}
{ι : Type u_2}
[ConditionallyCompleteLinearOrderBot ι]
{a b : ℝ}
{f : ι → Ω → ℝ}
{N : ι}
{n : ℕ}
{ω : Ω}

MeasureTheory.upperCrossingTime a b f N n ω ≤ MeasureTheory.lowerCrossingTime a b f N n ω


@[to_additive (attr := simp)]
theorem coe_mulLeft (a : G) : ⇑(Equiv.mulLeft a) = (a * ·)


protected theorem MonoidHom.map_isConj (f : α →* β) {a b : α} : IsConj a b → IsConj (f a) (f b)

{α : Type u}
{β : Type v}
[Monoid α]
[Monoid β]
(f : α →* β)
{a b : α}


@[to_additive] lemma inv_mabs_le (a : α) : |a|ₘ⁻¹ ≤ a

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


theorem isOpen_image_iff_of_subset_source {s : Set X} (hs : s ⊆ e.source) :
    IsOpen (e '' s) ↔ IsOpen s

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{s : Set X}
(hs : s ⊆ e.source)


@[simp]
theorem diam_image (s : Set E) : Metric.diam (e '' s) = Metric.diam s

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


/-- The top affine subspace is linearly equivalent to the affine space.

This is the affine version of `Submodule.topEquiv`. -/
@[simps! linear apply symm_apply_coe]
def topEquiv : (⊤ : AffineSubspace k P) ≃ᵃ[k] P

(k : Type u_1)
(V : Type u_2)
(P : Type u_3)
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
(self : { x // x ∈ Set.univ })

(AffineSubspace.topEquiv k V P) self = ↑self


@[reassoc]
theorem t'_comp_eq_pullbackSymmetry (i j k : D.J) :
    D.t' j k i ≫ D.t' k i j =
      (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
(D : CategoryTheory.GlueData C)
(i j k : D.J)

CategoryTheory.CategoryStruct.comp (D.t' j k i) (D.t' k i j) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullbackSymmetry (D.f j k) (D.f j i)).hom
    (CategoryTheory.CategoryStruct.comp (D.t' j i k) (CategoryTheory.Limits.pullbackSymmetry (D.f i k) (D.f i j)).hom)


theorem tendsto_atTop_ciSup (h_mono : Monotone f) (hbdd : BddAbove <| range f) :
    Tendsto f atTop (𝓝 (⨆ i, f i))

{α : Type u_1}
{ι : Type u_3}
[Preorder ι]
[TopologicalSpace α]
[ConditionallyCompleteLattice α]
[SupConvergenceClass α]
{f : ι → α}
(h_mono : Monotone f)
(hbdd : BddAbove (Set.range f))

Filter.Tendsto f Filter.atTop (𝓝 (⨆ i, f i))


protected theorem Antivary.antivaryOn (h : Antivary f g) (s : Set ι) : AntivaryOn f g s

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


/-- A bicone morphism between two bicones for the same diagram is a morphism of the bicone points
which commutes with the cone and cocone legs. -/
structure BiconeMorphism {F : J → C} (A B : Bicone F) where
  /-- A morphism between the two vertex objects of the bicones -/
  hom : A.pt ⟶ B.pt
  /-- The triangle consisting of the two natural transformations and `hom` commutes -/
  wπ : ∀ j : J, hom ≫ B.π j = A.π j := by aesop_cat
  /-- The triangle consisting of the two natural transformations and `hom` commutes -/
  wι : ∀ j : J, A.ι j ≫ hom = B.ι j := by aesop_cat

(self : CategoryTheory.Limits.BiconeMorphism A B)


/-- Cancel right multiplication in the modulus.

For cancelling right multiplication on both sides of the `≡`, see `nat.modeq.mul_right_cancel'`. -/
lemma of_mul_right (m : ℕ) : a ≡ b [MOD n * m] → a ≡ b [MOD n]


@[simp]
theorem coe_pointwise_smul [Semiring β] (f : α → β) (g : α →₀ β) : ⇑(f • g) = f • ⇑g

{α : Type u₁}
{β : Type u₂}
[Semiring β]
(f : α → β)
(g : α →₀ β)


theorem csSup_lower_bounds_eq_csInf {s : Set α} (h : BddBelow s) (hs : s.Nonempty) :
    sSup (lowerBounds s) = sInf s

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


@[to_additive]
theorem _root_.Commute.list_prod_right (l : List M) (y : M) (h : ∀ x ∈ l, Commute y x) :
    Commute y l.prod

{M : Type u_4}
[AddMonoid M]
(l : List M)
(y : M)
(h : ∀ x ∈ l, AddCommute y x)


theorem hasStrictFDerivAt_finset_prod [DecidableEq ι] [Fintype ι] {x : ι → 𝔸'} :
    HasStrictFDerivAt (𝕜 := 𝕜) (∏ i ∈ u, · i) (∑ i ∈ u, (∏ j ∈ u.erase i, x j) • proj i) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{ι : Type u_6}
{𝔸' : Type u_8}
[NormedCommRing 𝔸']
[NormedAlgebra 𝕜 𝔸']
{u : Finset ι}
[DecidableEq ι]
[Fintype ι]
{x : ι → 𝔸'}

HasStrictFDerivAt (fun x => ∏ i ∈ u, x i) (∑ i ∈ u, (∏ j ∈ u.erase i, x j) • ContinuousLinearMap.proj i) x


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

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


/-- The new distance is uniformly continuous. -/
protected theorem uniformContinuous_dist :
    UniformContinuous fun p : Completion α × Completion α ↦ dist p.1 p.2


theorem isNat_natSub : {a b : ℕ} → {a' b' c : ℕ} →
    IsNat a a' → IsNat b b' → Nat.sub a' b' = c → IsNat (a - b) c

Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → a'.sub b' = c → Mathlib.Meta.NormNum.IsNat (a - b) c


/-- If `f (g y) = y` for `y` in some neighborhood of `a`, `g` is continuous at `a`, and `f` has an
invertible derivative `f'` at `g a` in the strict sense, then `g` has the derivative `f'⁻¹` at `a`
in the strict sense.

This is one of the easy parts of the inverse function theorem: it assumes that we already have an
inverse function. -/
theorem HasStrictDerivAt.of_local_left_inverse {f g : 𝕜 → 𝕜} {f' a : 𝕜} (hg : ContinuousAt g a)
    (hf : HasStrictDerivAt f f' (g a)) (hf' : f' ≠ 0) (hfg : ∀ᶠ y in 𝓝 a, f (g y) = y) :
    HasStrictDerivAt g f'⁻¹ a

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{f g : 𝕜 → 𝕜}
{f' a : 𝕜}
(hg : ContinuousAt g a)
(hf : HasStrictDerivAt f f' (g a))
(hf' : f' ≠ 0)
(hfg : ∀ᶠ (y : 𝕜) in 𝓝 a, f (g y) = y)


@[simp]
theorem symm_trans_apply (e₁ : M₂ ≃SL[σ₂₁] M₁) (e₂ : M₃ ≃SL[σ₃₂] M₂) (c : M₁) :
    (e₂.trans e₁).symm c = e₂.symm (e₁.symm c)

{R₁ : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{σ₂₃ : R₂ →+* R₃}
{σ₃₂ : R₃ →+* R₂}
[RingHomInvPair σ₂₃ σ₃₂]
[RingHomInvPair σ₃₂ σ₂₃]
{σ₁₃ : R₁ →+* R₃}
{σ₃₁ : R₃ →+* R₁}
[RingHomInvPair σ₁₃ σ₃₁]
[RingHomInvPair σ₃₁ σ₁₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomCompTriple σ₃₂ σ₂₁ σ₃₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
[Module R₁ M₁]
[Module R₂ M₂]
[Module R₃ M₃]
(e₁ : M₂ ≃SL[σ₂₁] M₁)
(e₂ : M₃ ≃SL[σ₃₂] M₂)
(c : M₁)


@[simp, norm_cast] lemma ratCast_im (q : ℚ) : (q : ℍ[R]).im = 0

{R : Type u_1}
[LinearOrderedField R]
(q : ℚ)