lemma _root_.MeasurableEmbedding.gaussianReal_comap_apply (hv : v ≠ 0)
    {f : ℝ → ℝ} (hf : MeasurableEmbedding f)
    {f' : ℝ → ℝ} (h_deriv : ∀ x, HasDerivAt f (f' x) x) {s : Set ℝ} (hs : MeasurableSet s) :
    (gaussianReal μ v).comap f s
      = ENNReal.ofReal (∫ x in s, |f' x| * gaussianPDFReal μ v (f x))

(h_deriv : ∀ (x : ℝ), HasDerivAt f (f' x) x)

(MeasureTheory.Measure.comap f (ProbabilityTheory.gaussianReal μ v)) s =
  ENNReal.ofReal (∫ (x : ℝ) in s, |f' x| * ProbabilityTheory.gaussianPDFReal μ v (f x))


theorem algebraMap_eq (r : R) : algebraMap R ℍ[R,c₁,c₂] r = ⟨r, 0, 0, 0⟩

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

(algebraMap R ℍ[R,c₁,c₂]) r = { re := r, imI := 0, imJ := 0, imK := 0 }


@[inherit_doc True.intro] theorem trivial : True


@[simp]
theorem lcm_one_left (i : ℤ) : lcm 1 i = natAbs i


/-- Iff version of extensionality rule for congruence relations. -/
@[to_additive "Iff version of extensionality rule for additive congruence relations."]
protected theorem ext_iff {c d : Con M} : c = d ↔ (∀ x y, c x y ↔ d x y)


@[to_additive]
theorem closure_union (s t : Set M) : closure (s ∪ t) = closure s ⊔ closure t

Subsemigroup.closure (s ∪ t) = Subsemigroup.closure s ⊔ Subsemigroup.closure t


theorem abs_sub_abs_le_abs_sub (a b : α) : |a| - |b| ≤ |a - b|

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


@[to_additive]
lemma isOfFinOrder_iff_zpow_eq_one {G} [Group G] {x : G} :
    IsOfFinOrder x ↔ ∃ (n : ℤ), n ≠ 0 ∧ x ^ n = 1


@[reassoc]
lemma totalShift₁Iso_hom_naturality [L.HasTotal (up ℤ)] :
    total.map ((shiftFunctor₁ C x).map f) (up ℤ) ≫ (L.totalShift₁Iso x).hom =
      (K.totalShift₁Iso x).hom ≫ (total.map f (up ℤ))⟦x⟧'

{K L : HomologicalComplex₂ C (ComplexShape.up ℤ) (ComplexShape.up ℤ)}

HomologicalComplex₂.total.map ((HomologicalComplex₂.shiftFunctor₁ C x).map f) (ComplexShape.up ℤ) ≫
    (L.totalShift₁Iso x).hom =
  (K.totalShift₁Iso x).hom ≫
    (CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) x).map
      (HomologicalComplex₂.total.map f (ComplexShape.up ℤ))


/-- A finitely generated torsion module over a PID is an internal direct sum of its
`p i ^ e i`-torsion submodules for some primes `p i` and numbers `e i`. -/
theorem Submodule.isInternal_prime_power_torsion_of_pid [Module.Finite R M]
    (hM : Module.IsTorsion R M) :
    DirectSum.IsInternal fun p : (factors (⊤ : Submodule R M).annihilator).toFinset =>
      torsionBy R M
        (IsPrincipal.generator (p : Ideal R) ^
          (factors (⊤ : Submodule R M).annihilator).count ↑p)

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

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


theorem iff_comp_neg :
    IntervalIntegrable f volume a b ↔ IntervalIntegrable (fun x => f (-x)) volume (-a) (-b)

{E : Type u_3}
[NormedAddCommGroup E]
{f : ℝ → E}
{a b : ℝ}

IntervalIntegrable f MeasureTheory.volume a b ↔ IntervalIntegrable (fun x => f (-x)) MeasureTheory.volume (-a) (-b)


/-- Diagonal embedding of `α` into `α × α` as an `OrderHom`. -/
@[simps!]
def diag : α →o α × α


theorem edist_pi_const_le (a b : α) : (edist (fun _ : β => a) fun _ => b) ≤ edist a b

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[Fintype β]
(a b : α)

(edist (fun x => a) fun x => b) ≤ edist a b


theorem copy_eq (G' : Subgraph G) (V'' : Set V) (hV : V'' = G'.verts)
    (adj' : V → V → Prop) (hadj : adj' = G'.Adj) : G'.copy V'' hV adj' hadj = G'

{V : Type u}
{G : SimpleGraph V}
(G' : G.Subgraph)
(V'' : Set V)
(hV : V'' = G'.verts)
(adj' : V → V → Prop)
(hadj : adj' = G'.Adj)


theorem sub_half (a : R) : a - a / 2 = a / 2

{R : Type u_1}
[DivisionRing R]
[CharZero R]
(a : R)


@[simp]
theorem isSubgraph_eq_le : (IsSubgraph : SimpleGraph V → SimpleGraph V → Prop) = (· ≤ ·)

SimpleGraph.IsSubgraph = fun x x_1 => x ≤ x_1


@[simp]
theorem pointwise_smul_le_pointwise_smul_iff {a : α} {S T : AddSubgroup A} :
    a • S ≤ a • T ↔ S ≤ T

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[Group α]
[DistribMulAction α A]
{a : α}
{S T : AddSubgroup A}


@[to_additive indicator_compl']
theorem mulIndicator_compl (s : Set α) (f : α → G) :
    mulIndicator sᶜ f = f * (mulIndicator s f)⁻¹

{α : Type u_1}
{G : Type u_6}
[AddGroup G]
(s : Set α)
(f : α → G)


theorem blsub_type {α : Type u} (r : α → α → Prop) [IsWellOrder α r]
    (f : ∀ a < type r, Ordinal.{max u v}) :
    blsub.{_, v} (type r) f = lsub.{_, v} fun a => f (typein r a) (typein_lt_type _ _)

(f : (a : Ordinal.{u}) → a < Ordinal.type r → Ordinal.{max u v})

(Ordinal.type r).blsub f = Ordinal.lsub fun a => f (Ordinal.typein r a) ⋯


theorem source_inter_preimage_target_inter (s : Set β) :
    e.source ∩ e ⁻¹' (e.target ∩ s) = e.source ∩ e ⁻¹' s

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)
(s : Set β)

e.source ∩ ↑e ⁻¹' (e.target ∩ s) = e.source ∩ ↑e ⁻¹' s


@[simp]
protected theorem ker : LinearMap.ker (e : M →ₛₗ[σ₁₂] M₂) = ⊥

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


theorem add_le_of_le {a b c : Cardinal} (hc : ℵ₀ ≤ c) (h1 : a ≤ c) (h2 : b ≤ c) : a + b ≤ c

{a b c : Cardinal.{u_1}}
(hc : ℵ₀ ≤ c)
(h1 : a ≤ c)
(h2 : b ≤ c)


/-- The cosine of an angle in a right-angled triangle as a ratio of sides, version subtracting
vectors. -/
theorem cos_oangle_sub_right_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    Real.Angle.cos (o.oangle y (y - x)) = ‖y‖ / ‖y - x‖

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

(o.oangle y (y - x)).cos = ‖y‖ / ‖y - x‖


theorem hasMFDerivAt_const (c : M') (x : M) :
    HasMFDerivAt I I' (fun _ : M => c) 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']
(c : M')
(x : M)


lemma IsBounded.image_eval {s : Set (∀ i, π i)} (hs : IsBounded s) (i : ι) :
    IsBounded (eval i '' s)

{ι : Type u_3}
{π : ι → Type u_4}
[(i : ι) → Bornology (π i)]
{s : Set ((i : ι) → π i)}
(hs : Bornology.IsBounded s)
(i : ι)

Bornology.IsBounded (Function.eval i '' s)


@[simp, mfld_simps]
theorem coe_symm_mk (f : α → β) (g s t ml mr il ir) :
    ((PartialEquiv.mk f g s t ml mr il ir).symm : β → α) = g

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(g : β → α)
(s : Set α)
(t : Set β)
(ml : ∀ ⦃x : α⦄, x ∈ s → f x ∈ t)
(mr : ∀ ⦃x : β⦄, x ∈ t → g x ∈ s)
(il : ∀ ⦃x : α⦄, x ∈ s → g (f x) = x)
(ir : ∀ ⦃x : β⦄, x ∈ t → f (g x) = x)

↑{ toFun := f, invFun := g, source := s, target := t, map_source' := ml, map_target' := mr, left_inv' := il,
        right_inv' := ir }.symm =
  g


lemma dist_anti_left_pi : AntitoneOn (dist · y) (Iic y)

AntitoneOn (fun x => dist x y) (Set.Iic y)


theorem range_le_iff_comap {f : M →[L] N} {p : L.Substructure N} : range f ≤ p ↔ comap f p = ⊤

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

f.range ≤ p ↔ FirstOrder.Language.Substructure.comap f p = ⊤


theorem CondIndepSets.iUnion {s : ι → Set (Set Ω)} {s' : Set (Set Ω)}
    (hyp : ∀ n, CondIndepSets m' hm' (s n) s' μ) :
    CondIndepSets m' hm' (⋃ n, s n) s' μ

(hyp : ∀ (n : ι), ProbabilityTheory.CondIndepSets m' hm' (s n) s' μ)

ProbabilityTheory.CondIndepSets m' hm' (⋃ n, s n) s' μ


/-- Two measures are equal if they are equal on the π-system generating the σ-algebra,
  and they are both finite on an increasing spanning sequence of sets in the π-system.
  This lemma is formulated using `sUnion`. -/
theorem ext_of_generateFrom_of_cover_subset {S T : Set (Set α)} (h_gen : ‹_› = generateFrom S)
    (h_inter : IsPiSystem S) (h_sub : T ⊆ S) (hc : T.Countable) (hU : ⋃₀ T = univ)
    (htop : ∀ s ∈ T, μ s ≠ ∞) (h_eq : ∀ s ∈ S, μ s = ν s) : μ = ν

(h_gen : m0 = MeasurableSpace.generateFrom S)


theorem nodupKeys_of_nodupKeys_cons {s : Sigma β} {l : List (Sigma β)} (h : NodupKeys (s :: l)) :
    NodupKeys l

{α : Type u}
{β : α → Type v}
{s : Sigma β}
{l : List (Sigma β)}
(h : (s :: l).NodupKeys)


theorem isIntegrallyClosed_dvd_iff {s : S} (hs : IsIntegral R s) (p : R[X]) :
    Polynomial.aeval s p = 0 ↔ minpoly R s ∣ p

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[IsDomain R]
[Algebra R S]
[IsDomain S]
[NoZeroSMulDivisors R S]
[IsIntegrallyClosed R]
{s : S}
(hs : IsIntegral R s)
(p : R[X])

(Polynomial.aeval s) p = 0 ↔ minpoly R s ∣ p


theorem Ioo_union_both (h : a ≤ b) : Ioo a b ∪ {a, b} = Icc a b

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


theorem forall_infs_iff {p : α → Prop} : (∀ c ∈ s ⊼ t, p c) ↔ ∀ a ∈ s, ∀ b ∈ t, p (a ⊓ b)

{α : Type u_2}
[DecidableEq α]
[SemilatticeInf α]
{s t : Finset α}
{p : α → Prop}


theorem ContinuousWithinAt.star (hf : ContinuousWithinAt f s x) :
    ContinuousWithinAt (fun x => star (f x)) s x

{α : Type u_1}
{R : Type u_2}
[TopologicalSpace R]
[Star R]
[ContinuousStar R]
[TopologicalSpace α]
{f : α → R}
{s : Set α}
{x : α}
(hf : ContinuousWithinAt f s x)


theorem Smooth.comp_smoothOn {f : M → M'} {g : M' → M''} {s : Set M} (hg : Smooth I' I'' g)
    (hf : SmoothOn I I' f s) : SmoothOn I I'' (g ∘ f) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{f : M → M'}
{g : M' → M''}
{s : Set M}
(hg : Smooth I' I'' g)
(hf : SmoothOn I I' f s)


@[simp]
theorem projKerOfRightInverse_comp_inv [TopologicalAddGroup M] (f₁ : M →SL[σ₁₂] M₂)
    (f₂ : M₂ →SL[σ₂₁] M) (h : Function.RightInverse f₂ f₁) (y : M₂) :
    f₁.projKerOfRightInverse f₂ h (f₂ y) = 0

{R : Type u_1}
[Ring R]
{R₂ : Type u_2}
[Ring R₂]
{M : Type u_4}
[TopologicalSpace M]
[AddCommGroup M]
{M₂ : Type u_5}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[TopologicalAddGroup M]
(f₁ : M →SL[σ₁₂] M₂)
(f₂ : M₂ →SL[σ₂₁] M)
(h : Function.RightInverse ⇑f₂ ⇑f₁)
(y : M₂)

(f₁.projKerOfRightInverse f₂ h) (f₂ y) = 0


theorem eLpNorm_eq_zero_iff {f : α → E} (hf : AEStronglyMeasurable f μ) (h0 : p ≠ 0) :
    eLpNorm f p μ = 0 ↔ f =ᵐ[μ] 0

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.eLpNorm f p μ = 0 ↔ f =ᵐ[μ] 0


@[simp]
theorem toFinset_nil : toFinset (@nil α) = ∅


theorem PolyCnstr.denote_combine {ctx : Context} {c₁ c₂ : PolyCnstr} (h₁ : c₁.denote ctx) (h₂ : c₂.denote ctx) : (c₁.combine c₂).denote ctx

(h₁ : Nat.Linear.PolyCnstr.denote ctx c₁)

(h₂ : Nat.Linear.PolyCnstr.denote ctx c₂)

Nat.Linear.PolyCnstr.denote ctx (c₁.combine c₂)


@[simp]
theorem valMinAbs_eq_zero {n : ℕ} (x : ZMod n) : x.valMinAbs = 0 ↔ x = 0


theorem dist_map_zero_lt_of_semiconjBy {f g₁ g₂ : CircleDeg1Lift} (h : SemiconjBy f g₁ g₂) :
    dist (g₁ 0) (g₂ 0) < 2


theorem finite_support (A : ι → S) (x : DirectSum ι fun i => A i) :
    (Function.support fun i => (x i : M)).Finite

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

(Function.support fun i => ↑(x i)).Finite


/-- A `GroupFilterBasis` on a group is a `FilterBasis` satisfying some additional axioms.
  Example : if `G` is a topological group then the neighbourhoods of the identity are a
  `GroupFilterBasis`. Conversely given a `GroupFilterBasis` one can define a topology
  compatible with the group structure on `G`. -/
class GroupFilterBasis (G : Type u) [Group G] extends FilterBasis G where
  one' : ∀ {U}, U ∈ sets → (1 : G) ∈ U
  mul' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V * V ⊆ U
  inv' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x⁻¹) ⁻¹' U
  conj' : ∀ x₀, ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x₀ * x * x₀⁻¹) ⁻¹' U

{G : Type u}
[Group G]
[self : GroupFilterBasis G]
(x₀ : G)
{U : Set G}

U ∈ GroupFilterBasis.toFilterBasis.sets → ∃ V ∈ GroupFilterBasis.toFilterBasis.sets, V ⊆ (fun x => x₀ * x * x₀⁻¹) ⁻¹' U


theorem carry_succ (i : Nat) (x y : BitVec w) (c : Bool) :
    carry (i+1) x y c = atLeastTwo (x.getLsb i) (y.getLsb i) (carry i x y c)

{w : Nat}
(i : Nat)
(x y : BitVec w)
(c : Bool)

BitVec.carry (i + 1) x y c = (x.getLsb i).atLeastTwo (y.getLsb i) (BitVec.carry i x y c)


/-- The inverse of a bijective `MulSemiringActionHom` is a `MulSemiringActionHom`. -/
@[simps]
def inverse {S₁ : Type*} [Semiring S₁] [MulSemiringAction M S₁]
    (f : R →+*[M] S₁) (g : S₁ → R)
    (h₁ : Function.LeftInverse g f) (h₂ : Function.RightInverse g f) :
    S₁ →+*[M] R

{M : Type u_1}
[Monoid M]
{R : Type u_10}
[Semiring R]
[MulSemiringAction M R]
{S₁ : Type u_15}
[Semiring S₁]
[MulSemiringAction M S₁]
(f : R →+*[M] S₁)
(g : S₁ → R)
(h₁ : Function.LeftInverse g ⇑f)
(h₂ : Function.RightInverse g ⇑f)


theorem Balanced.sub (hs : Balanced 𝕜 s) (ht : Balanced 𝕜 t) : Balanced 𝕜 (s - t)

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s t : Set E}
(hs : Balanced 𝕜 s)
(ht : Balanced 𝕜 t)


@[simp]
theorem card [Fintype G] : Fintype.card (ConjAct G) = Fintype.card G


@[simp]
theorem guard_eq_some' {p : Prop} [Decidable p] (u) : _root_.guard p = some u ↔ p


@[gcongr]
theorem Ico_subset_Ico_right (h : b₁ ≤ b₂) : Ico a b₁ ⊆ Ico a b₂

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


protected theorem IsAsymm.isAntisymm (r) [IsAsymm α r] : IsAntisymm α r

{α : Type u}
(r : α → α → Prop)
[IsAsymm α r]


@[simp]
theorem inner_conj_symm (x y : E) : ⟪y, x⟫† = ⟪x, y⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x y : E)


protected theorem dvd_mul_right (a b : Int) : a ∣ a * b


/-- If two vectors are on the same ray then both scaled by the same action are also on the same
ray. -/
theorem smul {S : Type*} [Monoid S] [DistribMulAction S M] [SMulCommClass R S M]
    (h : SameRay R x y) (s : S) : SameRay R (s • x) (s • y)

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{x y : M}
{S : Type u_6}
[Monoid S]
[DistribMulAction S M]
[SMulCommClass R S M]
(h : SameRay R x y)
(s : S)


@[simp]
theorem map_map_right : ((map f).map g).right = g.right

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X Y : T}
{f : X ⟶ Y}
{U V : CategoryTheory.Under Y}
{g : U ⟶ V}

((CategoryTheory.Under.map f).map g).right = g.right


@[simp]
theorem range_arg : Set.range arg = Set.Ioc (-π) π


/-- The functor which sends `S : SnakeInput C` to `S.L₂'` which is
`S.L₀.X₃ ⟶ S.L₃.X₁ ⟶ S.L₃.X₂`. -/
@[simps]
noncomputable def functorL₂' : SnakeInput C ⥤ ShortComplex C

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]

∀ {X Y : CategoryTheory.ShortComplex.SnakeInput C} (f : X ⟶ Y),
  (CategoryTheory.ShortComplex.SnakeInput.functorL₂'.map f).τ₁ = f.f₀.τ₃


@[simp]
theorem cardDistinctFactors_apply_prime_pow {p k : ℕ} (hp : p.Prime) (hk : k ≠ 0) :
    ω (p ^ k) = 1

{p k : ℕ}
(hp : Nat.Prime p)
(hk : k ≠ 0)

ArithmeticFunction.cardDistinctFactors (p ^ k) = 1


theorem IsLocalization.epi {R : Type*} [CommRing R] (M : Submonoid R) (S : Type _) [CommRing S]
    [Algebra R S] [IsLocalization M S] : Epi (CommRingCat.ofHom <| algebraMap R S)

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
(S : Type u_1)
[CommRing S]
[Algebra R S]
[IsLocalization M S]

CategoryTheory.Epi (CommRingCat.ofHom (algebraMap R S))


theorem ramificationIdx_eq_factors_count (hp0 : map f p ≠ ⊥) (hP : P.IsPrime) (hP0 : P ≠ ⊥) :
    ramificationIdx f p P = (factors (map f p)).count P

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
{f : R →+* S}
{p : Ideal R}
{P : Ideal S}
[IsDedekindDomain S]
(hp0 : Ideal.map f p ≠ ⊥)
(hP : P.IsPrime)
(hP0 : P ≠ ⊥)

Ideal.ramificationIdx f p P = Multiset.count P (UniqueFactorizationMonoid.factors (Ideal.map f p))


lemma iSup_basicOpen_eq_top_iff' {s : Set R} :
    (⨆ i ∈ s, PrimeSpectrum.basicOpen i) = ⊤ ↔ Ideal.span s = ⊤

{R : Type u}
[CommSemiring R]
{s : Set R}

⨆ i ∈ s, PrimeSpectrum.basicOpen i = ⊤ ↔ Ideal.span s = ⊤


theorem contDiff_cos {n} : ContDiff ℝ n cos


theorem isOpen_extChartAt_preimage (x : M) {s : Set E} (hs : IsOpen s) :
    IsOpen ((chartAt H x).source ∩ extChartAt I x ⁻¹' s)

{𝕜 : 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)
{s : Set E}
(hs : IsOpen s)

IsOpen ((chartAt H x).source ∩ ↑(extChartAt I x) ⁻¹' s)


@[simp]
theorem degree_minpoly [Nontrivial A] (pb : PowerBasis A S) :
    degree (minpoly A pb.gen) = pb.dim

{S : Type u_2}
[Ring S]
{A : Type u_4}
[CommRing A]
[Algebra A S]
[Nontrivial A]
(pb : PowerBasis A S)


theorem eLpNorm_mono_nnnorm_ae {f : α → F} {g : α → G} (h : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ ‖g x‖₊) :
    eLpNorm f p μ ≤ eLpNorm g p μ

{α : Type u_1}
{F : Type u_3}
{G : Type u_4}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
[NormedAddCommGroup G]
{f : α → F}
{g : α → G}
(h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ ‖g x‖₊)

MeasureTheory.eLpNorm f p μ ≤ MeasureTheory.eLpNorm g p μ


@[simp]
theorem IsIrreducible.genericPoint_closure_eq [QuasiSober α] {S : Set α} (hS : IsIrreducible S) :
    closure ({hS.genericPoint} : Set α) = closure S

{α : Type u_1}
[TopologicalSpace α]
[QuasiSober α]
{S : Set α}
(hS : IsIrreducible S)


theorem nodup_of_le {s t : Multiset α} (h : s ≤ t) : Nodup t → Nodup s

{α : Type u_1}
{s t : Multiset α}
(h : s ≤ t)


lemma evaluation_coevaluation'' :
    η_ X Y ▷ X ⊗≫ X ◁ ε_ X Y = ⊗𝟙

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


@[simp, norm_cast]
theorem cast_finsupp_prod [Field R] [CharZero R] (g : α → M → ℚ) :
    (↑(f.prod g) : R) = f.prod fun a b => ↑(g a b)

{α : Type u_1}
{M : Type u_5}
{R : Type u_11}
[Zero M]
(f : α →₀ M)
[Field R]
[CharZero R]
(g : α → M → ℚ)

↑(f.prod g) = f.prod fun a b => ↑(g a b)


/-- Let `α` have minimal polynomial `f` over `R` and `I` be an ideal of `R`,
then `R[α] / (I) = (R[x] / (f)) / pS = (R/p)[x] / (f mod p)`. -/
@[simps!]
noncomputable def quotientEquivQuotientMinpolyMap (pb : PowerBasis R S) (I : Ideal R) :
    (S ⧸ I.map (algebraMap R S)) ≃ₐ[R]
      Polynomial (R ⧸ I) ⧸
        Ideal.span ({(minpoly R pb.gen).map (Ideal.Quotient.mk I)} : Set (Polynomial (R ⧸ I)))

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(pb : PowerBasis R S)
(I : Ideal R)

∀ (a : S ⧸ Ideal.map (algebraMap R S) I),
  (pb.quotientEquivQuotientMinpolyMap I) a =
    (AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot I (minpoly R pb.gen))
      ((Ideal.quotientMap (Ideal.map (AdjoinRoot.of (minpoly R pb.gen)) I)
          ↑(↑(AdjoinRoot.equiv' (minpoly R pb.gen) pb ⋯ ⋯)).symm ⋯)
        a)


@[simp]
theorem mk_bracket (x y : L) : mk ⁅x, y⁆ = ⁅(mk x : L ⧸ I), (mk y : L ⧸ I)⁆

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{I : LieIdeal R L}
(x y : L)

LieSubmodule.Quotient.mk ⁅x, y⁆ = ⁅LieSubmodule.Quotient.mk x, LieSubmodule.Quotient.mk y⁆


lemma Algebra.map_intNormAux [IsIntegrallyClosed A] [Algebra.IsSeparable K L] (x : B) :
    algebraMap A K (Algebra.intNormAux A K L B x) = Algebra.norm K (algebraMap B L x)

{A : Type u_1}
{K : Type u_2}
{L : Type u_3}
{B : Type u_4}
[CommRing A]
[CommRing B]
[Algebra A B]
[Field K]
[Field L]
[Algebra A K]
[IsFractionRing A K]
[Algebra B L]
[Algebra K L]
[Algebra A L]
[IsScalarTower A B L]
[IsScalarTower A K L]
[IsIntegralClosure B A L]
[FiniteDimensional K L]
[IsIntegrallyClosed A]
[Algebra.IsSeparable K L]
(x : B)

(algebraMap A K) ((Algebra.intNormAux A K L B) x) = (Algebra.norm K) ((algebraMap B L) x)


/-- A cocone for a functor `F : J ⥤ HomologicalComplex C c` which is given in degree `n` by
the colimit of `F ⋙ eval C c n`. -/
@[simps]
noncomputable def coconeOfHasColimitEval : Cocone F

[∀ (n : ι), CategoryTheory.Limits.HasColimit (F ⋙ HomologicalComplex.eval C c n)]

((HomologicalComplex.coconeOfHasColimitEval F).ι.app j).f n =
  CategoryTheory.Limits.colimit.ι (F ⋙ HomologicalComplex.eval C c n) j


theorem IsCycle.swap_mul {α : Type*} [DecidableEq α] {f : Perm α} (hf : IsCycle f) {x : α}
    (hx : f x ≠ x) (hffx : f (f x) ≠ x) : IsCycle (swap x (f x) * f)

{α : Type u_4}
[DecidableEq α]
{f : Equiv.Perm α}
(hf : f.IsCycle)
{x : α}
(hx : f x ≠ x)
(hffx : f (f x) ≠ x)


@[simp]
theorem inf_ae_iff : μ.FiniteAtFilter (f ⊓ ae μ) ↔ μ.FiniteAtFilter f

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : Filter α}

μ.FiniteAtFilter (f ⊓ MeasureTheory.ae μ) ↔ μ.FiniteAtFilter f


/-- If `s` has a least element, then it is bounded below. -/
theorem IsLeast.bddBelow (h : IsLeast s a) : BddBelow s

{α : Type u}
[Preorder α]
{s : Set α}
{a : α}
(h : IsLeast s a)


theorem continuous_condexpIndL1 : Continuous fun x : G => condexpIndL1 hm μ s x

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

Continuous fun x => MeasureTheory.condexpIndL1 hm μ s x


/--
Equivalent precoherent categories give equivalent coherent toposes.
-/
@[simps!]
def sheafCongrPrecoherent : haveI := e.precoherent
    Sheaf (coherentTopology C) A ≌ Sheaf (coherentTopology D) A

(X : CategoryTheory.Sheaf (CategoryTheory.coherentTopology C) A)

∀ (X_1 : Cᵒᵖ),
  ((e.sheafCongrPrecoherent A).unitIso.inv.app X).val.app X_1 = X.val.map (e.unitIso.hom.app (Opposite.unop X_1)).op


theorem logEmbeddingQuot_injective :
    Function.Injective (logEmbeddingQuot K)

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


@[reassoc (attr := simp)]
theorem map_π {F G : J ⥤ C} (c : Cone F) {d : Cone G} (hd : IsLimit d) (α : F ⟶ G) (j : J) :
    hd.map c α ≫ d.π.app j = c.π.app j ≫ α.app j

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F G : J ⥤ C}
(c : CategoryTheory.Limits.Cone F)
{d : CategoryTheory.Limits.Cone G}
(hd : CategoryTheory.Limits.IsLimit d)
(α : F ⟶ G)
(j : J)

CategoryTheory.Limits.IsLimit.map c hd α ≫ d.π.app j = c.π.app j ≫ α.app j


/-- An iso `α ≃* β` can equivalently be viewed as an iso `αᵐᵒᵖ ≃* βᵐᵒᵖ`. -/
@[to_additive (attr := simps)
  "An iso `α ≃+ β` can equivalently be viewed as an iso `αᵃᵒᵖ ≃+ βᵃᵒᵖ`."]
def MulEquiv.op {α β} [Mul α] [Mul β] : α ≃* β ≃ (αᵐᵒᵖ ≃* βᵐᵒᵖ)

{α : Type u_2}
{β : Type u_3}
[Mul α]
[Mul β]
(f : αᵐᵒᵖ ≃* βᵐᵒᵖ)

∀ (a : α), (MulEquiv.op.symm f) a = (MulOpposite.unop ∘ ⇑f ∘ MulOpposite.op) a


/-- A homotopy between two morphisms of short complexes `S₁ ⟶ S₂` consists of various
maps and conditions which will be sufficient to show that they induce the same morphism
in homology. -/
@[ext]
structure Homotopy where
  /-- a morphism `S₁.X₁ ⟶ S₂.X₁` -/
  h₀ : S₁.X₁ ⟶ S₂.X₁
  h₀_f : h₀ ≫ S₂.f = 0 := by aesop_cat
  /-- a morphism `S₁.X₂ ⟶ S₂.X₁` -/
  h₁ : S₁.X₂ ⟶ S₂.X₁
  /-- a morphism `S₁.X₃ ⟶ S₂.X₂` -/
  h₂ : S₁.X₃ ⟶ S₂.X₂
  /-- a morphism `S₁.X₃ ⟶ S₂.X₃` -/
  h₃ : S₁.X₃ ⟶ S₂.X₃
  g_h₃ : S₁.g ≫ h₃ = 0 := by aesop_cat
  comm₁ : φ₁.τ₁ = S₁.f ≫ h₁ + h₀ + φ₂.τ₁ := by aesop_cat
  comm₂ : φ₁.τ₂ = S₁.g ≫ h₂ + h₁ ≫ S₂.f + φ₂.τ₂ := by aesop_cat
  comm₃ : φ₁.τ₃ = h₃ + h₂ ≫ S₂.g + φ₂.τ₃ := by aesop_cat

{φ₁ φ₂ : S₁ ⟶ S₂}

(self : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)

φ₁.τ₃ = self.h₃ + CategoryTheory.CategoryStruct.comp self.h₂ S₂.g + φ₂.τ₃


lemma closure_biUnion_closure_eq_closure_biUnion (M : Matroid α) (Xs : ι → Set α) (A : Set ι) :
    M.closure (⋃ i ∈ A, M.closure (Xs i)) = M.closure (⋃ i ∈ A, Xs i)

{ι : Type u_1}
{α : Type u_2}
(M : Matroid α)
(Xs : ι → Set α)
(A : Set ι)


theorem obj_map_id {X Y : C} (f : op X ⟶ op Y) :
    (yoneda.obj X).map f (𝟙 X) = (yoneda.map f.unop).app (op Y) (𝟙 Y)

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

(CategoryTheory.yoneda.obj X).map f (CategoryTheory.CategoryStruct.id X) =
  (CategoryTheory.yoneda.map f.unop).app (Opposite.op Y) (CategoryTheory.CategoryStruct.id Y)


theorem nat_casesOn₁ {f : ℕ → α} (a : α) (hf : Primrec f) :
    Primrec (fun (n : ℕ) => (n.casesOn a f : α))

{α : Type u_1}
[Primcodable α]
{f : ℕ → α}
(a : α)
(hf : Primrec f)


@[simp, reassoc]
theorem ι_glueMorphisms {Y : Scheme} (f : ∀ x, 𝒰.obj x ⟶ Y)
    (hf : ∀ x y, pullback.fst (𝒰.map x) (𝒰.map y) ≫ f x = pullback.snd _ _ ≫ f y)
    (x : 𝒰.J) : 𝒰.map x ≫ 𝒰.glueMorphisms f hf = f x

(hf :
  ∀ (x y : 𝒰.J),
    CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y) ≫ f x =
      CategoryTheory.Limits.pullback.snd (𝒰.map x) (𝒰.map y) ≫ f y)


theorem setToFun_add (hT : DominatedFinMeasAdditive μ T C) (hf : Integrable f μ)
    (hg : Integrable g μ) : setToFun μ T hT (f + g) = setToFun μ T hT f + setToFun μ T hT g

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

MeasureTheory.setToFun μ T hT (f + g) = MeasureTheory.setToFun μ T hT f + MeasureTheory.setToFun μ T hT g


/-- (Impl)
Construct the limiting coalgebra from the map `λ : L ⟶ TL` given by `lambda`. We are required to
show it satisfies the two coalgebra laws, which follow from the coalgebra laws for the image of `D`
and our `commuting` lemma.
-/
@[simps]
def conePoint : Coalgebra T

{D : CategoryTheory.Functor J T.Coalgebra}

(c : CategoryTheory.Limits.Cone (D.comp T.forget))

[CategoryTheory.Limits.PreservesLimit (D.comp T.forget) T.toFunctor]

[CategoryTheory.Limits.PreservesLimit ((D.comp T.forget).comp T.toFunctor) T.toFunctor]

(CategoryTheory.Comonad.ForgetCreatesLimits'.conePoint c t).a = CategoryTheory.Comonad.ForgetCreatesLimits'.lambda c t


/-- `AddGroupSeminormClass F α` states that `F` is a type of `β`-valued seminorms on the additive
group `α`.

You should extend this class when you extend `AddGroupSeminorm`. -/
class AddGroupSeminormClass (F α β : Type*) [AddGroup α] [OrderedAddCommMonoid β] [FunLike F α β]
  extends SubadditiveHomClass F α β : Prop where
  /-- The image of zero is zero. -/
  map_zero (f : F) : f 0 = 0
  /-- The map is invariant under negation of its argument. -/
  map_neg_eq_map (f : F) (a : α) : f (-a) = f a

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[AddGroup α]
[OrderedAddCommMonoid β]
[FunLike F α β]
[self : AddGroupSeminormClass F α β]
(f : F)
(a : α)


protected theorem continuous : Continuous f

{E : Type u_1}
{X : Type u_2}
[TopologicalSpace E]
[TopologicalSpace X]
{f : E → X}
(hf : IsCoveringMap f)


@[simp]
theorem contSupp_cons₁ (fs k) :
    contSupp (Cont'.cons₁ fs k) =
      trStmts₁
          (move₂ (fun _ => false) main aux <|
            move₂ (fun s => s = Γ'.consₗ) stack main <|
              move₂ (fun _ => false) aux stack <| trNormal fs (Cont'.cons₂ k)) ∪
        codeSupp fs (Cont'.cons₂ k)

(fs : Turing.ToPartrec.Code)
(k : Turing.PartrecToTM2.Cont')

Turing.PartrecToTM2.contSupp (Turing.PartrecToTM2.Cont'.cons₁ fs k) =
  Turing.PartrecToTM2.trStmts₁
      (Turing.PartrecToTM2.move₂ (fun x => false) Turing.PartrecToTM2.K'.main Turing.PartrecToTM2.K'.aux
        (Turing.PartrecToTM2.move₂ (fun s => decide (s = Turing.PartrecToTM2.Γ'.consₗ)) Turing.PartrecToTM2.K'.stack
          Turing.PartrecToTM2.K'.main
          (Turing.PartrecToTM2.move₂ (fun x => false) Turing.PartrecToTM2.K'.aux Turing.PartrecToTM2.K'.stack
            (Turing.PartrecToTM2.trNormal fs k.cons₂)))) ∪
    Turing.PartrecToTM2.codeSupp fs k.cons₂


theorem bot_eq_top_of_finrank_adjoin_eq_one (h : ∀ x : E, finrank F F⟮x⟯ = 1) :
    (⊥ : IntermediateField F E) = ⊤

(h : ∀ (x : E), FiniteDimensional.finrank F ↥F⟮x⟯ = 1)


lemma tendsto_cobounded : Filter.Tendsto f (cobounded α) (cobounded β)

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)

Filter.Tendsto (⇑f) (Bornology.cobounded α) (Bornology.cobounded β)


theorem tendsto_floor_right_pure (n : ℤ) : Tendsto (floor : α → ℤ) (𝓝[≥] n) (pure n)

{α : Type u_1}
[LinearOrderedRing α]
[FloorRing α]
[TopologicalSpace α]
[OrderClosedTopology α]
(n : ℤ)

Filter.Tendsto Int.floor (𝓝[≥] ↑n) (pure n)


lemma equation_some (X Y : R) : W.Equation ![X, Y, 1] ↔ W.toAffine.Equation X Y

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Projective R)
(X Y : R)


theorem reduceOption_mem_iff {l : List (Option α)} {x : α} : x ∈ l.reduceOption ↔ some x ∈ l

{α : Type u_1}
{l : List (Option α)}
{x : α}


/-- The nonempty closed intervals in an order.

We define intervals by the pair of endpoints `fst`, `snd`. To convert intervals to the set of
elements between these endpoints, use the coercion `NonemptyInterval α → Set α`. -/
@[ext (flat := false)]
structure NonemptyInterval (α : Type*) [LE α] extends Prod α α where
  /-- The starting point of an interval is smaller than the endpoint. -/
  fst_le_snd : fst ≤ snd

{α : Type u_7}
[LE α]
(self : NonemptyInterval α)


theorem MDifferentiableOn.continuousOn (h : MDifferentiableOn I I' f s) : ContinuousOn f s

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


/-- The opposite cone of the image of a cocone is the image of the opposite cone. -/
-- Porting note: removed @[simps (config := { rhsMd := semireducible })] and replaced with
@[simps!]
def mapCoconeOp {t : Cocone F} : (mapCocone G t).op ≅ mapCone G.op t.op

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
{F : J ⥤ C}
(G : C ⥤ D)
{t : CategoryTheory.Limits.Cocone F}

(CategoryTheory.Functor.mapCoconeOp G).inv.hom = 𝟙 (Opposite.op (G.obj t.pt))


@[to_additive (attr := simp high)]
theorem singleton_smul_singleton : ({a} : Set α) • ({b} : Set β) = {a • b}

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{a : α}
{b : β}


/-- The exponential map in `𝕂 = ℝ` or `𝕂 = ℂ` has strict derivative `1` at zero. -/
theorem hasStrictDerivAt_exp_zero : HasStrictDerivAt (exp 𝕂) (1 : 𝕂) 0

HasStrictDerivAt (NormedSpace.exp 𝕂) 1 0


@[to_additive]
theorem IsOpen.div_left (ht : IsOpen t) : IsOpen (s / t)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{s t : Set G}
(ht : IsOpen t)


lemma rTensor.inverse_of_rightInverse_apply
    {h : P → N} (hgh : Function.RightInverse h g) (y : N ⊗[R] Q) :
    (rTensor.inverse_of_rightInverse Q hfg hgh) ((rTensor Q g) y) =
      Submodule.Quotient.mk (p := LinearMap.range (rTensor Q f)) y

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[AddCommGroup P]
[Module R M]
[Module R N]
[Module R P]
{f : M →ₗ[R] N}
{g : N →ₗ[R] P}
(Q : Type u_5)
[AddCommGroup Q]
[Module R Q]
(hfg : Function.Exact ⇑f ⇑g)
{h : P → N}
(hgh : Function.RightInverse h ⇑g)
(y : TensorProduct R N Q)

(rTensor.inverse_of_rightInverse Q hfg hgh) ((LinearMap.rTensor Q g) y) = Submodule.Quotient.mk y


theorem sum_const [AddCommMonoid α] (n : ℕ) (x : α) : ∑ _i : Fin n, x = n • x

{α : Type u_1}
[AddCommMonoid α]
(n : ℕ)
(x : α)


/-- The embedding from a multiset into `α × ℕ` where the second coordinate enumerates repeats.
If you are looking for the function `m → α`, that would be plain `(↑)`. -/
@[simps]
def Multiset.coeEmbedding (m : Multiset α) : m ↪ α × ℕ

{α : Type u_1}
[DecidableEq α]
(m : Multiset α)
(x : m.ToType)


theorem inf_def [Inf α] [Inf β] (p q : α × β) : p ⊓ q = (p.fst ⊓ q.fst, p.snd ⊓ q.snd)

(α : Type u)
(β : Type v)
[Inf α]
[Inf β]
(p q : α × β)


theorem totient_dvd_of_dvd {a b : ℕ} (h : a ∣ b) : φ a ∣ φ b


/-- A helper function used in defining the Čech adjunction. -/
@[simps]
def equivalenceRightToLeft (X : SimplicialObject.Augmented C) (F : Arrow C)
    (G : X ⟶ F.augmentedCechNerve) : Augmented.toArrow.obj X ⟶ F

[∀ (n : ℕ) (f : CategoryTheory.Arrow C), CategoryTheory.Limits.HasWidePullback f.right (fun x => f.left) fun x => f.hom]

(X : CategoryTheory.SimplicialObject.Augmented C)

(CategoryTheory.SimplicialObject.equivalenceRightToLeft X F G).right = G.right


@[simp]
theorem lift'_top (h : Set α → Set β) : (⊤ : Filter α).lift' h = 𝓟 (h univ)

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


@[reassoc]
theorem associativity_app (m₁ m₂ m₃ : M) (X : C) :
    (F.obj m₃).map ((F.μ m₁ m₂).app X) ≫
        (F.μ (m₁ ⊗ m₂) m₃).app X ≫ (F.map (α_ m₁ m₂ m₃).hom).app X =
      (F.μ m₂ m₃).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (m₂ ⊗ m₃)).app X

(F : CategoryTheory.MonoidalFunctor M (CategoryTheory.Functor C C))

CategoryTheory.CategoryStruct.comp ((F.obj m₃).map ((F.μ m₁ m₂).app X))
    (CategoryTheory.CategoryStruct.comp ((F.μ (CategoryTheory.MonoidalCategory.tensorObj m₁ m₂) m₃).app X)
      ((F.map (CategoryTheory.MonoidalCategory.associator m₁ m₂ m₃).hom).app X)) =
  CategoryTheory.CategoryStruct.comp ((F.μ m₂ m₃).app ((F.obj m₁).obj X))
    ((F.μ m₁ (CategoryTheory.MonoidalCategory.tensorObj m₂ m₃)).app X)


theorem pred_lt_castPred {a : Fin (n + 1)} (h₁ : a ≠ 0) (h₂ : a ≠ last n) :
    pred a h₁ < castPred a h₂

{n : ℕ}
{a : Fin (n + 1)}
(h₁ : a ≠ 0)
(h₂ : a ≠ Fin.last n)


@[simp] theorem countP_true {l : List α} : (l.countP fun _ => true) = l.length

List.countP (fun x => true) l = l.length


theorem setToL1S_congr_left (T T' : Set α → E →L[ℝ] F)
    (h : ∀ s, MeasurableSet s → μ s < ∞ → T s = T' s) (f : α →₁ₛ[μ] E) :
    setToL1S T f = setToL1S T' f

(h : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → T s = T' s)

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

MeasureTheory.L1.SimpleFunc.setToL1S T f = MeasureTheory.L1.SimpleFunc.setToL1S T' f


theorem smul_apply (r : R) (v : VectorMeasure α M) (i : Set α) : (r • v) i = r • v i

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
{R : Type u_4}
[Semiring R]
[DistribMulAction R M]
[ContinuousConstSMul R M]
(r : R)
(v : MeasureTheory.VectorMeasure α M)
(i : Set α)


protected theorem HasMFDerivAt.mfderiv (h : HasMFDerivAt I I' f x f') : mfderiv I I' f x = f'

{f' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)}


theorem natAbs_add_le (a b : Int) : natAbs (a + b) ≤ natAbs a + natAbs b


/-- The sum of a subgroup of the units of a field is 1 if the subgroup is trivial and 1 otherwise -/
@[simp]
theorem sum_subgroup_units [Ring K] [NoZeroDivisors K]
    {G : Subgroup Kˣ} [Fintype G] [Decidable (G = ⊥)] :
    ∑ x : G, (x.val : K) = if G = ⊥ then 1 else 0

{K : Type u_1}
[Ring K]
[NoZeroDivisors K]
{G : Subgroup Kˣ}
[Fintype ↥G]
[Decidable (G = ⊥)]


theorem associator_monoidal (X₁ X₂ X₃ Y₁ Y₂ Y₃ : C) :
    tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫
        (tensor_μ C (X₁, X₂) (Y₁, Y₂) ▷ (X₃ ⊗ Y₃)) ≫ (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (X₃ ⊗ Y₃)).hom =
      ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫
        tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ ((X₁ ⊗ Y₁) ◁ tensor_μ C (X₂, X₃) (Y₂, Y₃))

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

CategoryTheory.tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫
    CategoryTheory.tensor_μ C (X₁, X₂) (Y₁, Y₂) ▷ (X₃ ⊗ Y₃) ≫ (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (X₃ ⊗ Y₃)).hom =
  ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫
    CategoryTheory.tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (X₁ ⊗ Y₁) ◁ CategoryTheory.tensor_μ C (X₂, X₃) (Y₂, Y₃)


/-- This is not an instance due to complaints by the `fails_quickly` linter. At any rate, we only
really care about the `TopologicalRing` instance below. -/
theorem topologicalSemiring [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M]
    [TopologicalSemiring R] [ContinuousAdd M] [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] :
    TopologicalSemiring (tsze R M)

{R : Type u_3}
{M : Type u_4}
[TopologicalSpace R]
[TopologicalSpace M]
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Module Rᵐᵒᵖ M]
[TopologicalSemiring R]
[ContinuousAdd M]
[ContinuousSMul R M]
[ContinuousSMul Rᵐᵒᵖ M]


theorem ne_nil_of_take_ne_nil {as : List α} {i : Nat} (h: as.take i ≠ []) : as ≠ []

{α : Type u_1}
{as : List α}
{i : Nat}
(h : List.take i as ≠ [])


@[simp] lemma card_box_succ (n : ℕ) :
    (box (n + 1) : Finset (α × β)).card =
      (Icc (-n.succ : α) n.succ).card * (Icc (-n.succ : β) n.succ).card -
        (Icc (-n : α) n).card * (Icc (-n : β) n).card

{α : Type u_1}
{β : Type u_2}
[OrderedRing α]
[OrderedRing β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
[DecidableEq α]
[DecidableEq β]
[DecidableRel fun x x_1 => x ≤ x_1]
(n : ℕ)

(Finset.box (n + 1)).card =
  (Finset.Icc (-↑n.succ) ↑n.succ).card * (Finset.Icc (-↑n.succ) ↑n.succ).card -
    (Finset.Icc (-↑n) ↑n).card * (Finset.Icc (-↑n) ↑n).card


/-- A function `f : β → α` with upper topology in the codomain is continuous
if and only if the preimage of every interval `Set.Iic a` is a closed set. -/
lemma continuous_iff_Iic [TopologicalSpace β] {f : β → α} :
    Continuous f ↔ ∀ a, IsClosed (f ⁻¹' (Iic a))

{α : Type u_2}
{β : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsUpper α]
[TopologicalSpace β]
{f : β → α}

Continuous f ↔ ∀ (a : α), IsClosed (f ⁻¹' Set.Iic a)


theorem countable_biInf_principal_eq_seq_iInf {B : Set (Set α)} (Bcbl : B.Countable) :
    ∃ x : ℕ → Set α, ⨅ t ∈ B, 𝓟 t = ⨅ i, 𝓟 (x i)

{α : Type u_1}
{B : Set (Set α)}
(Bcbl : B.Countable)


theorem submodule_eq_span_le_iff_stable_ge (n₀ : ℕ) :
    F.submodule = Submodule.span _ (⋃ i ≤ n₀, single R i '' (F.N i : Set M)) ↔
      ∀ n ≥ n₀, I • F.N n = F.N (n + 1)

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
(F : I.Filtration M)
(n₀ : ℕ)

F.submodule = Submodule.span (↥(reesAlgebra I)) (⋃ i, ⋃ (_ : i ≤ n₀), ⇑(PolynomialModule.single R i) '' ↑(F.N i)) ↔
  ∀ n ≥ n₀, I • F.N n = F.N (n + 1)


@[mono, gcongr]
theorem mono'' {m₁ m₂ : OuterMeasure α} {s₁ s₂ : Set α} (hm : m₁ ≤ m₂) (hs : s₁ ⊆ s₂) :
    m₁ s₁ ≤ m₂ s₂

{α : Type u_1}
{m₁ m₂ : MeasureTheory.OuterMeasure α}
{s₁ s₂ : Set α}
(hm : m₁ ≤ m₂)
(hs : s₁ ⊆ s₂)

m₁ s₁ ≤ m₂ s₂


/-- The separable degree of a polynomial is equal to
the number of distinct roots of it over any algebraically closed field. -/
theorem natSepDegree_eq_of_isAlgClosed [IsAlgClosed E] :
    f.natSepDegree = (f.aroots E).toFinset.card

{F : Type u}
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(f : F[X])
[IsAlgClosed E]


/-- Only assumes left strict covariance. -/
@[to_additive "Only assumes left strict covariance"]
theorem Left.mul_lt_mul [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c d : α} (h₁ : a < b) (h₂ : c < d) :
    a * c < b * d

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

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


@[simp] theorem coe_lift_symm_apply (F : A[ε] →ₐ[R] B) :
    (lift.symm F).val = (F.comp (inlAlgHom _ _ _), F ε)

{R : Type u_1}
{B : Type u_3}
{A : Type u_4}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(F : A[ε] →ₐ[R] B)

↑(DualNumber.lift.symm F) = (F.comp (TrivSqZeroExt.inlAlgHom R A A), F ε)


@[simp] theorem up_compare [Ord α] (a b : α) : compare (up a) (up b) = compare a b

compare { down := a } { down := b } = compare a b


lemma hasDerivAt_jacobiTheta₂_fst (z : ℂ) {τ : ℂ} (hτ : 0 < im τ) :
    HasDerivAt (jacobiTheta₂ · τ) (jacobiTheta₂' z τ) z

HasDerivAt (fun x => jacobiTheta₂ x τ) (jacobiTheta₂' z τ) z


theorem card_support_eq_one' {f : α →₀ M} :
    card f.support = 1 ↔ ∃ a, ∃ b ≠ 0, f = single a b

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α →₀ M}

f.support.card = 1 ↔ ∃ a b, b ≠ 0 ∧ f = Finsupp.single a b


theorem convex_halfspace_le {f : E → β} (h : IsLinearMap 𝕜 f) (r : β) : Convex 𝕜 { w | f w ≤ r }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[OrderedAddCommMonoid β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{f : E → β}
(h : IsLinearMap 𝕜 f)
(r : β)


theorem commutes_symm' {m : ℕ} (hm : n ≤ m) (x : TruncatedWittVector p m (ZMod p)) :
    (zmodEquivTrunc p n).symm (truncate hm x) =
      ZMod.castHom (pow_dvd_pow p hm) _ ((zmodEquivTrunc p m).symm x)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)
{m : ℕ}
(hm : n ≤ m)
(x : TruncatedWittVector p m (ZMod p))

(TruncatedWittVector.zmodEquivTrunc p n).symm ((TruncatedWittVector.truncate hm) x) =
  (ZMod.castHom ⋯ (ZMod (p ^ n))) ((TruncatedWittVector.zmodEquivTrunc p m).symm x)


theorem nonneg_of_mul_nonneg_left [MulPosStrictMono α]
    (h : 0 ≤ a * b) (hb : 0 < b) : 0 ≤ a

{α : Type u}
[Semiring α]
[LinearOrder α]
{a b : α}
[MulPosStrictMono α]
(h : 0 ≤ a * b)
(hb : 0 < b)


@[to_additive (attr := simp) coe_prodMap]
theorem coe_prodMap : ⇑(prodMap f g) = Prod.map f g

{M : Type u_5}
{N : Type u_6}
[AddZeroClass M]
[AddZeroClass N]
{M' : Type u_8}
{N' : Type u_9}
[AddZeroClass M']
[AddZeroClass N']
(f : M →+ M')
(g : N →+ N')


/-- A `NormedLinearOrderedAddGroup` is an additive group that is both a `NormedAddCommGroup`
and a `LinearOrderedAddCommGroup`. This class is necessary to avoid diamonds caused by both
classes carrying their own group structure. -/
class NormedLinearOrderedAddGroup (α : Type*) extends LinearOrderedAddCommGroup α, Norm α,
  MetricSpace α where
  /-- The distance function is induced by the norm. -/
  dist_eq : ∀ x y, dist x y = ‖x - y‖ := by aesop

{α : Type u_2}
[self : NormedLinearOrderedAddGroup α]
(x y : α)


@[to_additive three'_nsmul]
lemma pow_three' (a : M) : a ^ 3 = a * a * a


theorem Periodic.const_sub [AddCommGroup α] (h : Periodic f c) (a : α) :
    Periodic (fun x => f (a - x)) c

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddCommGroup α]
(h : Function.Periodic f c)
(a : α)

Function.Periodic (fun x => f (a - x)) c


/-- If the second of three points is weakly between the other two, and not equal to the first,
the angle at the first point (reversed) is zero. -/
theorem _root_.Wbtw.angle₃₁₂_eq_zero_of_ne {p₁ p₂ p₃ : P} (h : Wbtw ℝ p₁ p₂ p₃) (hp₂p₁ : p₂ ≠ p₁) :
    ∠ p₃ p₁ p₂ = 0

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


@[simp, norm_cast]
theorem coe_lt_coe [LT α] {p : α → Prop} {x y : Subtype p} : (x : α) < y ↔ x < y

{α : Type u_2}
[LT α]
{p : α → Prop}
{x y : Subtype p}


theorem span_singleton_eq_top_iff (x : M) : (R ∙ x) = ⊤ ↔ ∀ v, ∃ r : R, r • x = v

(R : Type u_1)
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(x : M)

Submodule.span R {x} = ⊤ ↔ ∀ (v : M), ∃ r, r • x = v


/-- Construct a cocone for the empty diagram given an object. -/
@[simps]
def asEmptyCocone (X : C) : Cocone (Functor.empty.{0} C)

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

(CategoryTheory.Limits.asEmptyCocone X).pt = X


theorem coe_lieSpan_submodule_eq_iff {p : Submodule R M} :
    (lieSpan R L (p : Set M) : Submodule R M) = p ↔ ∃ N : LieSubmodule R L M, ↑N = p

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

↑(LieSubmodule.lieSpan R L ↑p) = p ↔ ∃ N, ↑N = p


/-- The cartesian product of two functors. -/
@[simps]
def prod (F : A ⥤ B) (G : C ⥤ D) : A × C ⥤ B × D

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

(F.prod G).obj X = (F.obj X.1, G.obj X.2)


/-- If a category has wide pushouts on a higher universe level it also has wide pushouts
on a lower universe level. -/
theorem hasWidePushouts_shrink [HasWidePushouts.{max w w'} C] : HasWidePushouts.{w} C


theorem isVonNBounded_iff' {s : Set E} :
    Bornology.IsVonNBounded 𝕜 s ↔ ∃ r : ℝ, ∀ x ∈ s, ‖x‖ ≤ r

(𝕜 : Type u_1)
{E : Type u_3}
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}

Bornology.IsVonNBounded 𝕜 s ↔ ∃ r, ∀ x ∈ s, ‖x‖ ≤ r


theorem convexBodyLTFactor_ne_zero : convexBodyLTFactor K ≠ 0

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

NumberField.mixedEmbedding.convexBodyLTFactor K ≠ 0


lemma sphere_prod (x : α × β) (r : ℝ) :
    sphere x r = sphere x.1 r ×ˢ closedBall x.2 r ∪ closedBall x.1 r ×ˢ sphere x.2 r

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
(x : α × β)
(r : ℝ)

Metric.sphere x r = Metric.sphere x.1 r ×ˢ Metric.closedBall x.2 r ∪ Metric.closedBall x.1 r ×ˢ Metric.sphere x.2 r


@[simp, norm_cast]
theorem cast_inj [LinearOrderedSemiring α] {m n : Num} : (m : α) = n ↔ m = n

{α : Type u_1}
[LinearOrderedSemiring α]
{m n : Num}


@[simp]
theorem balanced_univ : Balanced 𝕜 (univ : Set E)

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SMul 𝕜 E]


@[simp]
theorem erase_single_ne {i j : ι} (x : β i) (h : i ≠ j) : (single i x).erase j = single i x

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
{i j : ι}
(x : β i)
(h : i ≠ j)

DFinsupp.erase j (DFinsupp.single i x) = DFinsupp.single i x


@[to_additive]
theorem G.mk_eq (x y : Σ j, F.obj j)
    (h : ∃ (k : J) (f : x.1 ⟶ k) (g : y.1 ⟶ k), F.map f x.2 = F.map g y.2) :
    G.mk.{v, u} F x = G.mk F y

(h : ∃ k f g, (F.map f) x.snd = (F.map g) y.snd)

AddGrp.FilteredColimits.G.mk F x = AddGrp.FilteredColimits.G.mk F y


theorem ωSup_total {c : Chain α} {x : α} (h : ∀ i, c i ≤ x ∨ x ≤ c i) : ωSup c ≤ x ∨ x ≤ ωSup c

{α : Type u}
[OmegaCompletePartialOrder α]
{c : OmegaCompletePartialOrder.Chain α}
{x : α}
(h : ∀ (i : ℕ), c i ≤ x ∨ x ≤ c i)

OmegaCompletePartialOrder.ωSup c ≤ x ∨ x ≤ OmegaCompletePartialOrder.ωSup c


theorem ext_get? : ∀ {l₁ l₂ : List α}, (∀ n, l₁.get? n = l₂.get? n) → l₁ = l₂

(∀ (n : Nat), l₁.get? n = l₂.get? n) → l₁ = l₂


@[to_additive]
theorem IsCompact.closedBall_one_mul (hs : IsCompact s) (hδ : 0 ≤ δ) :
    closedBall 1 δ * s = cthickening δ s

{E : Type u_1}
[SeminormedAddCommGroup E]
{δ : ℝ}
{s : Set E}
(hs : IsCompact s)
(hδ : 0 ≤ δ)

Metric.closedBall 0 δ + s = Metric.cthickening δ s


theorem ghostMap.bijective_of_invertible : Function.Bijective (ghostMap : 𝕎 R → ℕ → R)

(p : ℕ)
(R : Type u_1)
[hp : Fact (Nat.Prime p)]
[CommRing R]
[Invertible ↑p]


@[simp]
theorem contractLeft_algebraMap (r : R) : d⌋algebraMap R (CliffordAlgebra Q) r = 0

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(d : Module.Dual R M)
(r : R)

(CliffordAlgebra.contractLeft d) ((algebraMap R (CliffordAlgebra Q)) r) = 0


@[simp] lemma chainBot_neg : chainBot (-α) β = chainTop α β

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[NoZeroSMulDivisors ℤ R]
[NoZeroSMulDivisors R M]
[IsNoetherian R M]
(α : L → R)
(β : LieModule.Weight R L M)

LieModule.chainBot (-α) β = LieModule.chainTop α β


/-- Being in the shadow of `𝒜` means we have a superset in `𝒜`. -/
lemma exists_subset_of_mem_shadow (hs : t ∈ ∂ 𝒜) : ∃ s ∈ 𝒜, t ⊆ s

{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{t : Finset α}
(hs : t ∈ 𝒜.shadow)

∃ s ∈ 𝒜, t ⊆ s


@[aesop safe apply (rule_sets := [SetLike])]
theorem Algebra.self_mem_elementalAlgebra (x : A) : x ∈ Algebra.elementalAlgebra R x

(R : Type u_1)
[CommRing R]
{A : Type u}
[TopologicalSpace A]
[Ring A]
[Algebra R A]
[TopologicalRing A]
(x : A)


@[simp] theorem endPos_eq (cs : List Char) : endPos ⟨cs⟩ = ⟨utf8Len cs⟩

{ data := cs }.endPos = { byteIdx := String.utf8Len cs }


lemma measure_stieltjesOfMeasurableRat_Iic (hf : Measurable f) (a : α) (x : ℝ) :
    (stieltjesOfMeasurableRat f hf a).measure (Iic x)
      = ENNReal.ofReal (stieltjesOfMeasurableRat f hf a x)

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℚ → ℝ}
(hf : Measurable f)
(a : α)
(x : ℝ)

(ProbabilityTheory.stieltjesOfMeasurableRat f hf a).measure (Set.Iic x) =
  ENNReal.ofReal (↑(ProbabilityTheory.stieltjesOfMeasurableRat f hf a) x)


@[simp]
theorem singleton_iff {r : α → α → Prop} (a b : α) : List.Lex r [a] [b] ↔ r a b

{α : Type u}
{r : α → α → Prop}
(a b : α)


@[simp] theorem ediv_one : ∀ a : Int, a / 1 = a


theorem recF_eq' {α : TypeVec n} {β : Type u} (g : F (α.append1 β) → β) (x : q.P.W α) :
    recF g x = g (abs (appendFun id (recF g) <$$> q.P.wDest' x))

{n : ℕ}
{F : TypeVec.{u} (n + 1) → Type u}
[q : MvQPF F]
{α : TypeVec.{u} n}
{β : Type u}
(g : F (α ::: β) → β)
(x : (MvQPF.P F).W α)

MvQPF.recF g x = g (MvQPF.abs (MvFunctor.map (TypeVec.id ::: MvQPF.recF g) ((MvQPF.P F).wDest' x)))


theorem fourierCoeff_liftIco_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
    fourierCoeff (AddCircle.liftIco T a f) n =
    fourierCoeffOn (lt_add_of_pos_right a hT.out) f n

fourierCoeff (AddCircle.liftIco T a f) n = fourierCoeffOn ⋯ f n


theorem Ico_ofDual (a b : αᵒᵈ) : Ico (ofDual a) (ofDual b) = (Ioc b a).map ofDual.toEmbedding

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrder α]
(a b : αᵒᵈ)

Finset.Ico (OrderDual.ofDual a) (OrderDual.ofDual b) = Finset.map OrderDual.ofDual.toEmbedding (Finset.Ioc b a)


@[simp]
theorem op_add {X Y : C} (f g : X ⟶ Y) : (f + g).op = f.op + g.op

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X Y : C}
(f g : X ⟶ Y)


/-- If the right cosets of `s` by elements of `t` are disjoint (but not necessarily distinct!), then
the size of `s` divides the size of `s * t`. -/
@[to_additive "If the right cosets of `s` by elements of `t` are disjoint (but not necessarily
distinct!), then the size of `s` divides the size of `s + t`."]
theorem card_dvd_card_mul_left {s t : Finset α} :
    ((fun b => s.image fun a => a * b) '' (t : Set α)).PairwiseDisjoint id →
      s.card ∣ (s * t).card

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

((fun b => Finset.image (fun a => a * b) s) '' ↑t).PairwiseDisjoint id → s.card ∣ (s * t).card


@[simp]
theorem integral_zero : ∫ _ : α, (0 : G) ∂μ = 0

(α : Type u_1)
(G : Type u_5)
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}


theorem pos_iff {w : InfinitePlace K} {x : K} : 0 < w x ↔ x ≠ 0

{K : Type u_2}
[Field K]
{w : NumberField.InfinitePlace K}
{x : K}


protected theorem tsub_eq_iff_eq_add_of_le (hb : AddLECancellable b) (h : b ≤ a) :
    a - b = c ↔ a = c + b

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


theorem lowerSemicontinuousOn_sum {f : ι → α → γ} {a : Finset ι}
    (ha : ∀ i ∈ a, LowerSemicontinuousOn (f i) s) :
    LowerSemicontinuousOn (fun z => ∑ i ∈ a, f i z) s

{f : ι → α → γ}


theorem exists_enc_dec [Finite Γ] : ∃ (n : ℕ) (enc : Γ → Vector Bool n) (dec : Vector Bool n → Γ),
    enc default = Vector.replicate n false ∧ ∀ a, dec (enc a) = a

∃ n enc dec, enc default = Mathlib.Vector.replicate n false ∧ ∀ (a : Γ), dec (enc a) = a


/-- Linear isometry between continuous linear maps from `G` to `G'`
and continuous `1`-multilinear maps from `G` to `G'`. -/
@[simps apply symm_apply]
def ofSubsingletonₗᵢ [Subsingleton ι] (i : ι) :
    (G →L[𝕜] G') ≃ₗᵢ[𝕜] ContinuousMultilinearMap 𝕜 (fun _ : ι ↦ G) G'

(𝕜 : Type u)
{ι : Type v}
(G : Type wG)
{G' : Type wG'}
[Fintype ι]
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup G]
[NormedSpace 𝕜 G]
[SeminormedAddCommGroup G']
[NormedSpace 𝕜 G']
[Subsingleton ι]
(i : ι)

∀ (a : ContinuousMultilinearMap 𝕜 (fun x => G) G'),
  (ContinuousMultilinearMap.ofSubsingletonₗᵢ 𝕜 G i).symm a = (ContinuousMultilinearMap.ofSubsingleton 𝕜 G G' i).invFun a


theorem min_eq_left_of_lt {a b : α} (h : a < b) : min a b = a

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


@[reassoc (attr := simp)]
theorem coev_ev : (coev A).app (A ⟶[C] B) ≫ (ihom A).map ((ev A).app B) = 𝟙 (A ⟶[C] B)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
(A B : C)
[CategoryTheory.Closed A]

CategoryTheory.CategoryStruct.comp ((CategoryTheory.ihom.coev A).app ((CategoryTheory.ihom A).obj B))
    ((CategoryTheory.ihom A).map ((CategoryTheory.ihom.ev A).app B)) =
  CategoryTheory.CategoryStruct.id ((CategoryTheory.ihom A).obj B)


nonrec theorem IsLocalMax.congr {f g : α → β} {a : α} (h : IsLocalMax f a) (heq : f =ᶠ[𝓝 a] g) :
    IsLocalMax g a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f g : α → β}
{a : α}
(h : IsLocalMax f a)
(heq : f =ᶠ[𝓝 a] g)


@[simp]
theorem weightedHomogeneousComponent_C_mul (n : M) (r : R) :
    weightedHomogeneousComponent w n (C r * φ) = C r * weightedHomogeneousComponent w n φ

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
{σ : Type u_3}
[AddCommMonoid M]
{w : σ → M}
(φ : MvPolynomial σ R)
(n : M)
(r : R)

(MvPolynomial.weightedHomogeneousComponent w n) (MvPolynomial.C r * φ) =
  MvPolynomial.C r * (MvPolynomial.weightedHomogeneousComponent w n) φ


/-- The inclusion of locally-constant functions into continuous functions as an algebra map. -/
@[simps]
def toContinuousMapAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y]
    [TopologicalSemiring Y] : LocallyConstant X Y →ₐ[R] C(X, Y)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(R : Type u_3)
[CommSemiring R]
[Semiring Y]
[Algebra R Y]
[TopologicalSemiring Y]
(f : LocallyConstant X Y)

(LocallyConstant.toContinuousMapAlgHom R) f = ↑f


@[simp]
theorem toRingEquiv_eq_coe (f : α ≃+*o β) : f.toRingEquiv = f

{α : Type u_2}
{β : Type u_3}
[Mul α]
[Add α]
[LE α]
[Mul β]
[Add β]
[LE β]
(f : α ≃+*o β)


/-- If n is odd, then the Dihedral group of order $2n$ has $n(n+3)$ pairs (represented as
$n + n + n + n*n$) of commuting elements. -/
@[simps]
def OddCommuteEquiv (hn : Odd n) : { p : DihedralGroup n × DihedralGroup n // Commute p.1 p.2 } ≃
    ZMod n ⊕ ZMod n ⊕ ZMod n ⊕ ZMod n × ZMod n

∀ (x : { p // Commute p.1 p.2 }),
  (DihedralGroup.OddCommuteEquiv hn) x =
    match x with
    | ⟨(DihedralGroup.sr i, DihedralGroup.r a), property⟩ => Sum.inl i
    | ⟨(DihedralGroup.r a, DihedralGroup.sr j), property⟩ => Sum.inr (Sum.inl j)
    | ⟨(DihedralGroup.sr i, DihedralGroup.sr j), property⟩ => Sum.inr (Sum.inr (Sum.inl (i + j)))
    | ⟨(DihedralGroup.r i, DihedralGroup.r j), property⟩ => Sum.inr (Sum.inr (Sum.inr (i, j)))


theorem restrict_union₀ (h : AEDisjoint μ s t) (ht : NullMeasurableSet t μ) :
    μ.restrict (s ∪ t) = μ.restrict s + μ.restrict t

(ht : MeasureTheory.NullMeasurableSet t μ)


@[to_additive]
theorem mul_left_cancel'' [ContravariantClass α α (· * ·) (· ≤ ·)] {a b c : α} (h : a * b = a * c) :
    b = c

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


theorem card_roots_X_pow_sub_C {n : ℕ} (hn : 0 < n) (a : R) :
    Multiset.card (roots ((X : R[X]) ^ n - C a)) ≤ n

{R : Type u}
[CommRing R]
[IsDomain R]
{n : ℕ}
(hn : 0 < n)
(a : R)

Multiset.card (Polynomial.X ^ n - Polynomial.C a).roots ≤ n


theorem biInf_mono {p q : ι → Prop} (hpq : ∀ i, p i → q i) :
    ⨅ (i) (_ : q i), f i ≤ ⨅ (i) (_ : p i), f i

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
{f : ι → α}
{p q : ι → Prop}
(hpq : ∀ (i : ι), p i → q i)

⨅ i, ⨅ (_ : q i), f i ≤ ⨅ i, ⨅ (_ : p i), f i


/--
The even Hurwitz completed zeta is differentiable away from `s = 0` and `s = 1` (and also at
`s = 0` if `a ≠ 0`)
-/
lemma differentiableAt_completedHurwitzZetaEven
    (a : UnitAddCircle) {s : ℂ} (hs : s ≠ 0 ∨ a ≠ 0) (hs' : s ≠ 1) :
    DifferentiableAt ℂ (completedHurwitzZetaEven a) s

DifferentiableAt ℂ (HurwitzZeta.completedHurwitzZetaEven a) s


/-- The higher `Tor'` groups for `X` and `Y` are zero if `X` is projective. -/
lemma isZero_Tor'_succ_of_projective (X Y : C) [Projective X] (n : ℕ) :
    IsZero (((Tor' C (n + 1)).obj X).obj Y)

CategoryTheory.Limits.IsZero (((CategoryTheory.Tor' C (n + 1)).obj X).obj Y)


theorem _root_.RelIso.ordinal_type_eq {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] (h : r ≃r s) : type r = type s

{α β : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
[IsWellOrder β s]
(h : r ≃r s)


@[simp]
theorem add_toOuterMeasure {_m : MeasurableSpace α} (μ₁ μ₂ : Measure α) :
    (μ₁ + μ₂).toOuterMeasure = μ₁.toOuterMeasure + μ₂.toOuterMeasure

{α : Type u_1}
{_m : MeasurableSpace α}
(μ₁ μ₂ : MeasureTheory.Measure α)


theorem isConnected_Iic : IsConnected (Iic a)

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[DenselyOrdered α]
{a : α}


theorem pullbackIsoProdSubtype_inv_snd_apply (f : X ⟶ Z) (g : Y ⟶ Z)
    (x : { p : X × Y // f p.1 = g p.2 }) :
    pullback.snd f g ((pullbackIsoProdSubtype f g).inv x) = (x : X × Y).snd

{X Y Z : TopCat}
(f : X ⟶ Z)
(g : Y ⟶ Z)
(x : { p // f p.1 = g p.2 })

(CategoryTheory.Limits.pullback.snd f g) ((TopCat.pullbackIsoProdSubtype f g).inv x) = (↑x).2


@[simp]
theorem homothety_zero (c : P1) : homothety c (0 : k) = const k P1 c

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

AffineMap.homothety c 0 = AffineMap.const k P1 c


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

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

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


/-- A morphism is `QuasiSeparated` if diagonal map is quasi-compact. -/
@[mk_iff]
class QuasiSeparated (f : X ⟶ Y) : Prop where
  /-- A morphism is `QuasiSeparated` if diagonal map is quasi-compact. -/
  diagonalQuasiCompact : QuasiCompact (pullback.diagonal f) := by infer_instance

[self : AlgebraicGeometry.QuasiSeparated f]


@[simp]
theorem fromBlocks_submatrix_sum_swap_right (A : Matrix n l α) (B : Matrix n m α) (C : Matrix o l α)
    (D : Matrix o m α) (f : p → n ⊕ o) :
    (fromBlocks A B C D).submatrix f Sum.swap = (fromBlocks B A D C).submatrix f id

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{p : Type u_5}
{α : Type u_12}
(A : Matrix n l α)
(B : Matrix n m α)
(C : Matrix o l α)
(D : Matrix o m α)
(f : p → n ⊕ o)

(Matrix.fromBlocks A B C D).submatrix f Sum.swap = (Matrix.fromBlocks B A D C).submatrix f id


theorem comp_hom_eq_id (α : X ≅ Y) {f : Y ⟶ X} : f ≫ α.hom = 𝟙 Y ↔ f = α.inv

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

CategoryTheory.CategoryStruct.comp f α.hom = CategoryTheory.CategoryStruct.id Y ↔ f = α.inv


lemma Pairwise.comp_of_injective (hr : Pairwise r) {f : β → α} (hf : Injective f) :
    Pairwise (r on f)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
(hr : Pairwise r)
{f : β → α}
(hf : Function.Injective f)


@[simp high]
protected lemma LinearMapClass.map_smul {R M M₂ : outParam Type*} [Semiring R] [AddCommMonoid M]
    [AddCommMonoid M₂] [Module R M] [Module R M₂]
    {F : Type*} [FunLike F M M₂] [LinearMapClass F R M M₂] (f : F) (r : R) (x : M) :
    f (r • x) = r • f x

{R : outParam (Type u_17)}
{M : outParam (Type u_18)}
{M₂ : outParam (Type u_19)}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
{F : Type u_20}
[FunLike F M M₂]
[LinearMapClass F R M M₂]
(f : F)
(r : R)
(x : M)


/-- For any positive `k : ℕ` there exists an arbitrarily large prime `p` such that
`p ≡ 1 [MOD k]`. -/
theorem exists_prime_gt_modEq_one {k : ℕ} (n : ℕ) (hk0 : k ≠ 0) :
    ∃ p : ℕ, Nat.Prime p ∧ n < p ∧ p ≡ 1 [MOD k]

∃ p, Nat.Prime p ∧ n < p ∧ p ≡ 1 [MOD k]


@[simp]
theorem Continuous.connectedComponentsLift_apply_coe (h : Continuous f) (x : α) :
    h.connectedComponentsLift x = f x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[TotallyDisconnectedSpace β]
{f : α → β}
(h : Continuous f)
(x : α)

h.connectedComponentsLift (ConnectedComponents.mk x) = f x


@[simp]
theorem augment_X_zero (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0) (w : f ≫ C.d 0 1 = 0) :
    (augment C f w).X 0 = X


@[simp]
theorem subset_empty_iff {s : Set α} : s ⊆ ∅ ↔ s = ∅

s ⊆ ∅ ↔ s = ∅


@[simp]
protected theorem run_seq {α β : Type v} (f : Comp F G (α → β)) (x : Comp F G α) :
    (f <*> x).run = (· <*> ·) <$> f.run <*> x.run

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

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


theorem centralizer_toSubmonoid (s : Set R) :
    (centralizer s).toSubmonoid = Submonoid.centralizer s

(Subring.centralizer s).toSubmonoid = Submonoid.centralizer s


theorem get_set_eq_if {v : Vector α n} {i j : Fin n} (a : α) :
    (v.set i a).get j = if i = j then a else v.get j

{n : ℕ}
{α : Type u_1}
{v : Mathlib.Vector α n}
{i j : Fin n}
(a : α)


nonrec theorem SmoothOn.mdifferentiableOn (hf : SmoothOn I I' f s) : MDifferentiableOn I I' f s

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


theorem refl_mem_uniformity {x : α} {s : Set (α × α)} (h : s ∈ 𝓤 α) : (x, x) ∈ s

{α : Type ua}
[UniformSpace α]
{x : α}
{s : Set (α × α)}
(h : s ∈ 𝓤 α)


@[simp]
theorem fromEdgeSet_edgeSet : fromEdgeSet G.edgeSet = G


theorem einfsep_eq_iInf : s.einfsep = ⨅ d : s.offDiag, (uncurry edist) (d : α × α)

s.einfsep = ⨅ d, Function.uncurry edist ↑d


@[simp, mfld_simps]
theorem target_eq : I.target = range (I : H → E)

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


theorem ContDiffOn.inner (hf : ContDiffOn ℝ n f s) (hg : ContDiffOn ℝ n g s) :
    ContDiffOn ℝ n (fun x => ⟪f x, g x⟫) s

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f g : G → E}
{s : Set G}
{n : ℕ∞}
(hf : ContDiffOn ℝ n f s)
(hg : ContDiffOn ℝ n g s)

ContDiffOn ℝ n (fun x => ⟪f x, g x⟫_𝕜) s


@[to_additive]
theorem surj (f : LocalizationMap S N) (z : N) : ∃ x : M × S, z * f.toMap x.2 = f.toMap x.1

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


/-- `HasStrictFDerivAt.implicitFunction` sends `(z, y)` to a point in `f ⁻¹' z`. -/
theorem map_implicitFunction_eq (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :
    ∀ᶠ p : F × ker f' in 𝓝 (f a, 0), f (hf.implicitFunction f f' hf' p.1 p.2) = p.1

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[FiniteDimensional 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{a : E}
(hf : HasStrictFDerivAt f f' a)
(hf' : LinearMap.range f' = ⊤)

∀ᶠ (p : F × ↥(LinearMap.ker f')) in 𝓝 (f a, 0), f (HasStrictFDerivAt.implicitFunction f f' hf hf' p.1 p.2) = p.1


lemma autEquivRootsOfUnity_smul (σ : L ≃ₐ[K] L) :
    autEquivRootsOfUnity hζ hn H L σ • α = σ α

(H : Irreducible (Polynomial.X ^ n - Polynomial.C a))

[Polynomial.IsSplittingField K L (Polynomial.X ^ n - Polynomial.C a)]

(autEquivRootsOfUnity hζ hn H L) σ • α = σ α


/-- Corners are preserved under `2`-Freiman homomorphisms. --/
lemma IsCornerFree.of_image (hf : IsAddFreimanHom 2 s t f) (hf' : s.InjOn f)
    (hAs : (A : Set (G × G)) ⊆ s ×ˢ s) (hA : IsCornerFree (Prod.map f f '' A)) : IsCornerFree A

{G : Type u_1}
{H : Type u_2}
[AddCommMonoid G]
[AddCommMonoid H]
{A : Set (G × G)}
{s : Set G}
{t : Set H}
{f : G → H}
(hf : IsAddFreimanHom 2 s t f)
(hf' : Set.InjOn f s)
(hAs : A ⊆ s ×ˢ s)
(hA : IsCornerFree (Prod.map f f '' A))


@[to_additive]
theorem le_pi_iff {I : Set η} {H : ∀ i, Subgroup (f i)} {J : Subgroup (∀ i, f i)} :
    J ≤ pi I H ↔ ∀ i : η, i ∈ I → map (Pi.evalMonoidHom f i) J ≤ H i

{η : Type u_7}
{f : η → Type u_8}
[(i : η) → Group (f i)]
{I : Set η}
{H : (i : η) → Subgroup (f i)}
{J : Subgroup ((i : η) → f i)}

J ≤ Subgroup.pi I H ↔ ∀ i ∈ I, Subgroup.map (Pi.evalMonoidHom f i) J ≤ H i


@[simp]
theorem range_quotient_lift [s : Setoid ι] (hf) :
    range (Quotient.lift f hf : Quotient s → α) = range f

{α : Type u_1}
{ι : Sort u_4}
{f : ι → α}
[s : Setoid ι]
(hf : ∀ (a b : ι), a ≈ b → f a = f b)

Set.range (Quotient.lift f hf) = Set.range f


lemma neg_smul (P : Fin 3 → R) (u : R) : W'.neg (u • P) = u • W'.neg P

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
(P : Fin 3 → R)
(u : R)


/-- The characterization of weak convergence of probability measures by the usual (defining)
condition that the integrals of every continuous bounded function converge to the integral of the
function against the limit measure. -/
theorem tendsto_iff_forall_integral_tendsto {γ : Type*} {F : Filter γ}
    {μs : γ → ProbabilityMeasure Ω} {μ : ProbabilityMeasure Ω} :
    Tendsto μs F (𝓝 μ) ↔
      ∀ f : Ω →ᵇ ℝ,
        Tendsto (fun i => ∫ ω, f ω ∂(μs i : Measure Ω)) F (𝓝 (∫ ω, f ω ∂(μ : Measure Ω)))

{μs : γ → MeasureTheory.ProbabilityMeasure Ω}

{μ : MeasureTheory.ProbabilityMeasure Ω}

Filter.Tendsto μs F (𝓝 μ) ↔ ∀ (f : Ω →ᵇ ℝ), Filter.Tendsto (fun i => ∫ (ω : Ω), f ω ∂↑(μs i)) F (𝓝 (∫ (ω : Ω), f ω ∂↑μ))


theorem eventually_ge_atTop [Preorder α] (a : α) : ∀ᶠ x in atTop, a ≤ x


@[simp]
theorem edist_eq [DilationClass F α β] (f : F) (x y : α) :
    edist (f x) (f y) = ratio f * edist x y

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)
(x y : α)

edist (f x) (f y) = ↑(Dilation.ratio f) * edist x y


lemma IsUpperSet.sdiff (hs : IsUpperSet s) (ht : ∀ b ∈ s, ∀ c ∈ t, b ≤ c → b ∈ t) :
    IsUpperSet (s \ t)

{α : Type u_1}
[LE α]
{s t : Set α}
(hs : IsUpperSet s)
(ht : ∀ b ∈ s, ∀ c ∈ t, b ≤ c → b ∈ t)


@[reassoc (attr := simp)]
theorem braiding_inv_naturality {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y') :
    (f ⊗ g) ≫ (β_ Y' Y).inv = (β_ X' X).inv ≫ (g ⊗ f)

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


theorem Finite.exists_lt_map_eq_of_forall_mem [LinearOrder α] [Infinite α] {t : Set β} {f : α → β}
    (hf : ∀ a, f a ∈ t) (ht : t.Finite) : ∃ a b, a < b ∧ f a = f b

{α : Type u}
{β : Type v}
[LinearOrder α]
[Infinite α]
{t : Set β}
{f : α → β}
(hf : ∀ (a : α), f a ∈ t)
(ht : t.Finite)


theorem adjoin_root_eq_top (p : K[X]) [Fact (Irreducible p)] : K⟮AdjoinRoot.root p⟯ = ⊤

{K : Type u}
[Field K]
(p : K[X])
[Fact (Irreducible p)]


theorem card_points_eq_card_lines [Fintype P] [Fintype L] : Fintype.card P = Fintype.card L

(P : Type u_1)
(L : Type u_2)
[Membership P L]
[Configuration.ProjectivePlane P L]
[Fintype P]
[Fintype L]


/-- In a proper pseudometric space, all spheres are compact. -/
theorem isCompact_sphere {α : Type*} [PseudoMetricSpace α] [ProperSpace α] (x : α) (r : ℝ) :
    IsCompact (sphere x r)

{α : Type u_3}
[PseudoMetricSpace α]
[ProperSpace α]
(x : α)
(r : ℝ)


@[ext]
protected theorem ext {e e' : X ≃ᵈ Y} (h : ∀ x, e x = e' x) : e = e'

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
{e e' : X ≃ᵈ Y}
(h : ∀ (x : X), e x = e' x)


@[simp]
theorem mk_add_mk (a₁ a₂ a₃ a₄ b₁ b₂ b₃ b₄ : R) :
    (mk a₁ a₂ a₃ a₄ : ℍ[R,c₁,c₂]) + mk b₁ b₂ b₃ b₄ = mk (a₁ + b₁) (a₂ + b₂) (a₃ + b₃) (a₄ + b₄)

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(a₁ a₂ a₃ a₄ b₁ b₂ b₃ b₄ : R)

{ re := a₁, imI := a₂, imJ := a₃, imK := a₄ } + { re := b₁, imI := b₂, imJ := b₃, imK := b₄ } =
  { re := a₁ + b₁, imI := a₂ + b₂, imJ := a₃ + b₃, imK := a₄ + b₄ }


@[simp]
theorem countP_nsmul (s) (n : ℕ) : countP p (n • s) = n * countP p s

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
(s : Multiset α)
(n : ℕ)

Multiset.countP p (n • s) = n * Multiset.countP p s


theorem _root_.NumberField.is_primitive_element_of_infinitePlace_lt {x : 𝓞 K}
    {w : InfinitePlace K} (h₁ : x ≠ 0) (h₂ : ∀ ⦃w'⦄, w' ≠ w → w' x < 1)
    (h₃ : IsReal w ∨ |(w.embedding x).re| < 1) : ℚ⟮(x : K)⟯ = ⊤

(h₂ : ∀ ⦃w' : NumberField.InfinitePlace K⦄, w' ≠ w → w' ↑x < 1)

(h₃ : w.IsReal ∨ |(w.embedding ↑x).re| < 1)


lemma ltByCases_not_lt (h : ¬ x < y) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P}
    (p : ¬ y < x → x = y := fun h' => (le_antisymm (le_of_not_gt h') (le_of_not_gt h))) :
    ltByCases x y h₁ h₂ h₃ = if h' : y < x then h₃ h' else h₂ (p h')

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
(h : ¬x < y)
{h₁ : x < y → P}
{h₂ : x = y → P}
{h₃ : y < x → P}
(p : ¬y < x → x = y := ⋯)

ltByCases x y h₁ h₂ h₃ = if h' : y < x then h₃ h' else h₂ ⋯


@[fun_prop]
nonrec theorem HasFDerivWithinAt.star (h : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (fun x => star (f x)) (((starL' 𝕜 : F ≃L[𝕜] F) : F →L[𝕜] F) ∘L f') s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[StarRing 𝕜]
[TrivialStar 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[StarAddMonoid F]
[NormedSpace 𝕜 F]
[StarModule 𝕜 F]
[ContinuousStar F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{s : Set E}
(h : HasFDerivWithinAt f f' s x)

HasFDerivWithinAt (fun x => star (f x)) ((↑(starL' 𝕜)).comp f') s x


theorem MonotoneOn.map_max (hf : MonotoneOn f s) (ha : a ∈ s) (hb : b ∈ s) : f (max a b) =
    max (f a) (f b)

{α : Type u}
{β : Type v}
[LinearOrder α]
[LinearOrder β]
{f : α → β}
{s : Set α}
{a b : α}
(hf : MonotoneOn f s)
(ha : a ∈ s)
(hb : b ∈ s)


theorem Matrix.toLinearMap₂_compl₁₂ (M : Matrix n m R) (P : Matrix n n' R) (Q : Matrix m m' R) :
    (Matrix.toLinearMap₂ b₁ b₂ M).compl₁₂ (toLin b₁' b₁ P) (toLin b₂' b₂ Q) =
      Matrix.toLinearMap₂ b₁' b₂' (Pᵀ * M * Q)

{R : Type u_1}
{M₁ : Type u_7}
{M₂ : Type u_8}
{M₁' : Type u_9}
{M₂' : Type u_10}
{n : Type u_12}
{m : Type u_13}
{n' : Type u_14}
{m' : Type u_15}
[CommSemiring R]
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
[DecidableEq n]
[Fintype n]
[DecidableEq m]
[Fintype m]
(b₁ : Basis n R M₁)
(b₂ : Basis m R M₂)
[AddCommMonoid M₁']
[Module R M₁']
[AddCommMonoid M₂']
[Module R M₂']
(b₁' : Basis n' R M₁')
(b₂' : Basis m' R M₂')
[Fintype n']
[Fintype m']
[DecidableEq n']
[DecidableEq m']
(M : Matrix n m R)
(P : Matrix n n' R)
(Q : Matrix m m' R)

((Matrix.toLinearMap₂ b₁ b₂) M).compl₁₂ ((Matrix.toLin b₁' b₁) P) ((Matrix.toLin b₂' b₂) Q) =
  (Matrix.toLinearMap₂ b₁' b₂') (Pᵀ * M * Q)


/--
This structure encodes the data required for a family of morphisms to be effective epimorphic.
-/
structure EffectiveEpiFamilyStruct {B : C} {α : Type*}
    (X : α → C) (π : (a : α) → (X a ⟶ B)) where
  /--
  For every `W` with a family of morphisms `e a : Y a ⟶ W` that coequalizes every pair of morphisms
  `g₁ : Z ⟶ Y a₁`, `g₂ : Z ⟶ Y a₂` which the family `π` coequalizes, `desc e h` is a morphism
  `X ⟶ W`...
  -/
  desc : ∀ {W} (e : (a : α) → (X a ⟶ W)),
          (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
      g₁ ≫ π _ = g₂ ≫ π _ → g₁ ≫ e _ = g₂ ≫ e _) → (B ⟶ W)
  /-- ...factorizing the components of `e` through the components of `π`... -/
  fac : ∀ {W} (e : (a : α) → (X a ⟶ W))
          (h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
            g₁ ≫ π _ = g₂ ≫ π _ → g₁ ≫ e _ = g₂ ≫ e _)
          (a : α), π a ≫ desc e h = e a
  /-- ...and as such, unique. -/
  uniq : ∀ {W} (e : (a : α) → (X a ⟶ W))
          (h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
            g₁ ≫ π _ = g₂ ≫ π _ → g₁ ≫ e _ = g₂ ≫ e _)
          (m : B ⟶ W), (∀ (a : α), π a ≫ m = e a) → m = desc e h

(self : CategoryTheory.EffectiveEpiFamilyStruct X π)

(h :
  ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
    CategoryTheory.CategoryStruct.comp g₁ (π a₁) = CategoryTheory.CategoryStruct.comp g₂ (π a₂) →
      CategoryTheory.CategoryStruct.comp g₁ (e a₁) = CategoryTheory.CategoryStruct.comp g₂ (e a₂))

CategoryTheory.CategoryStruct.comp (π a) (self.desc e ⋯) = e a


@[simp]
theorem limitFunctorial_map {F G : J ⥤ C} (α : F ⟶ G) :
    map (fun F : J ⥤ C => limit F) α = Limits.lim.map α

CategoryTheory.map (fun F => CategoryTheory.Limits.limit F) α = CategoryTheory.Limits.lim.map α


/-- In the unit group of an integral domain, a unit is its own inverse iff the unit is one or
  one's additive inverse. -/
theorem inv_eq_self_iff [Ring R] [NoZeroDivisors R] (u : Rˣ) : u⁻¹ = u ↔ u = 1 ∨ u = -1

{R : Type x}
[Ring R]
[NoZeroDivisors R]
(u : Rˣ)


/-- An affinely independent set of points can be extended to such a
set that spans the whole space. -/
theorem exists_subset_affineIndependent_affineSpan_eq_top {s : Set P}
    (h : AffineIndependent k (fun p => p : s → P)) :
    ∃ t : Set P, s ⊆ t ∧ AffineIndependent k (fun p => p : t → P) ∧ affineSpan k t = ⊤

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : Set P}
(h : AffineIndependent k fun p => ↑p)

∃ t, s ⊆ t ∧ (AffineIndependent k fun p => ↑p) ∧ affineSpan k t = ⊤


theorem cycleFactorsFinset_eq_singleton_iff {f g : Perm α} :
    f.cycleFactorsFinset = {g} ↔ f.IsCycle ∧ f = g

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


theorem IsCompact.inter [T2Space X] {s t : Set X} (hs : IsCompact s) (ht : IsCompact t) :
    IsCompact (s ∩ t)

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
{s t : Set X}
(hs : IsCompact s)
(ht : IsCompact t)


protected theorem div' {m : ℕ} (cpm : Coprime p m) {b : ℕ} (dvd : m ∣ b) :
    padicValNat p (b / m) = padicValNat p b

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{m : ℕ}
(cpm : p.Coprime m)
{b : ℕ}
(dvd : m ∣ b)


protected theorem continuousOn (hf : IsLocalHomeomorphOn f s) : ContinuousOn f s

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set X}
(hf : IsLocalHomeomorphOn f s)


@[simp] theorem UInt8.toUInt32_toNat (x : UInt8) : x.toUInt32.toNat = x.toNat


theorem IsLocalExtr.elim {p : Prop} :
    IsLocalExtr f a → (IsLocalMin f a → p) → (IsLocalMax f a → p) → p

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{a : α}
{p : Prop}


theorem extendFrom_extends [T2Space Y] {f : X → Y} {A : Set X} (hf : ContinuousOn f A) :
    ∀ x ∈ A, extendFrom A f x = f x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T2Space Y]
{f : X → Y}
{A : Set X}
(hf : ContinuousOn f A)
(x : X)


protected theorem ext_iff {f g : lp E p} : f = g ↔ (f : ∀ i, E i) = g

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{f g : ↥(lp E p)}


/-- A `PSigma`-type is equivalent to the corresponding `Sigma`-type. -/
@[simps apply symm_apply]
def psigmaEquivSigma {α} (β : α → Type*) : (Σ' i, β i) ≃ Σ i, β i

{α : Type u_2}
(β : α → Type u_1)
(a : (i : α) ×' β i)

(Equiv.psigmaEquivSigma β) a = ⟨a.fst, a.snd⟩


@[simp] theorem cons_or_cons (x y : BitVec w) (a b : Bool) :
    (cons a x) ||| (cons b y) = cons (a || b) (x ||| y)

BitVec.cons a x ||| BitVec.cons b y = BitVec.cons (a || b) (x ||| y)


theorem LocallyIntegrableOn.mono (hf : LocallyIntegrableOn f s μ) {g : X → F}
    (hg : AEStronglyMeasurable g μ) (h : ∀ᵐ x ∂μ, ‖g x‖ ≤ ‖f x‖) :
    LocallyIntegrableOn g s μ

(hf : MeasureTheory.LocallyIntegrableOn f s μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)


@[to_additive]
theorem prod_set_coe (s : Set α) [Fintype s] : (∏ i : s, f i) = ∏ i ∈ s.toFinset, f i

{α : Type u_3}
{β : Type u_4}
{f : α → β}
[CommMonoid β]
(s : Set α)
[Fintype ↑s]


@[simps!]
instance : MonoidalCategoryStruct (Dial C)

(CategoryTheory.MonoidalCategory.rightUnitor X).hom.F =
  CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.snd
    (CategoryTheory.Limits.terminal.from ((X.src ⨯ ⊤_ C) ⨯ X.tgt))


/-- We can upgrade `e.inverse` to a monoidal functor from `D` with the transported structure to `C`.
-/
@[simps!]
def fromTransported (e : C ≌ D) : MonoidalFunctor (Transported e) C

(X Y : CategoryTheory.Monoidal.Transported e)

(CategoryTheory.Monoidal.fromTransported e).μ X Y = e.unitIso.hom.app (e.inverse.obj X ⊗ e.inverse.obj Y)


@[csimp] private theorem fastLegendreSym.eq : legendreSym = fastLegendreSym


/-- **Cauchy integral formula**: if `f : ℂ → E` is complex differentiable on a closed disc of radius
`R`, then for any `w` in its interior we have $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$. -/
theorem _root_.DifferentiableOn.circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f : ℂ → E}
    (hd : DifferentiableOn ℂ f (closedBall c R)) (hw : w ∈ ball c R) :
    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w

(hd : DifferentiableOn ℂ f (Metric.closedBall c R))

(∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * Complex.I) • f w


theorem map_eq_of_subset {f : α ↪ α} (hs : s.map f ⊆ s) : s.map f = s

{α : Type u_1}
{s : Finset α}
{f : α ↪ α}
(hs : Finset.map f s ⊆ s)


@[simp, norm_cast]
lemma _root_.EquivLike.coe_coe {F} [EquivLike F α β] (e : F) :
    ((e : α ≃ β) : α → β) = e

{α : Sort u}
{β : Sort v}
{F : Sort u_1}
[EquivLike F α β]
(e : F)


/-- **Newton's identities** give a recurrence relation for the kth elementary symmetric polynomial
in terms of lower degree elementary symmetric polynomials and power sums. -/
theorem mul_esymm_eq_sum (k : ℕ) : k * esymm σ R k =
    (-1) ^ (k + 1) * ∑ a ∈ (antidiagonal k).filter (fun a ↦ a.fst < k),
    (-1) ^ a.fst * esymm σ R a.fst * psum σ R a.snd

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

↑k * MvPolynomial.esymm σ R k =
  (-1) ^ (k + 1) *
    ∑ a ∈ Finset.filter (fun a => a.1 < k) (Finset.antidiagonal k),
      (-1) ^ a.1 * MvPolynomial.esymm σ R a.1 * MvPolynomial.psum σ R a.2


theorem IsCoprime.of_mul_add_left_right (h : IsCoprime x (x * z + y)) : IsCoprime x y

{R : Type u}
[CommSemiring R]
{x y z : R}
(h : IsCoprime x (x * z + y))


/-- The triangle `Z₁₂ ⟶ Z₁₃ ⟶ Z₂₃ ⟶ Z₁₂⟦1⟧` given by an octahedron. -/
@[simps!]
def triangle : Triangle C

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

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

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

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

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

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

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

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

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

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

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

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


theorem indicator_ae_eq_of_ae_eq_set (hst : s =ᵐ[μ] t) : s.indicator f =ᵐ[μ] t.indicator f

{α : Type u_2}
{β : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s t : Set α}
{f : α → β}
[Zero β]
(hst : s =ᵐ[μ] t)


theorem gcd_greatest_associated {α : Type*} [CancelCommMonoidWithZero α] [GCDMonoid α] {a b d : α}
    (hda : d ∣ a) (hdb : d ∣ b) (hd : ∀ e : α, e ∣ a → e ∣ b → e ∣ d) :
    Associated d (GCDMonoid.gcd a b)

{α : Type u_2}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
{a b d : α}
(hda : d ∣ a)
(hdb : d ∣ b)
(hd : ∀ (e : α), e ∣ a → e ∣ b → e ∣ d)


/-- The preimage of a basic open in `Spec Γ(X)` under the unit is the basic
open in `X` defined by the same element (they are equal as sets). -/
theorem toΓSpec_preimage_basicOpen_eq (r : Γ.obj (op X)) :
    X.toΓSpecFun ⁻¹' (basicOpen r).1 = (X.toRingedSpace.basicOpen r).1

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

X.toΓSpecFun ⁻¹' (PrimeSpectrum.basicOpen r).carrier = (X.toRingedSpace.basicOpen r).carrier


protected theorem isTotal : ∀ (_ : r ↪r s) [IsTotal β s], IsTotal α r

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}

r ↪r s → ∀ [inst : IsTotal β s], IsTotal α r


/-- A multiple of the difference of two points added to the first point lies in their affine
span. -/
theorem smul_vsub_vadd_mem_affineSpan_pair (r : k) (p₁ p₂ : P) :
    r • (p₂ -ᵥ p₁) +ᵥ p₁ ∈ line[k, p₁, p₂]

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(r : k)
(p₁ p₂ : P)

r • (p₂ -ᵥ p₁) +ᵥ p₁ ∈ affineSpan k {p₁, p₂}


theorem log_mul_ofReal (r : ℝ) (hr : 0 < r) (x : ℂ) (hx : x ≠ 0) :
    log (x * r) = Real.log r + log x

Complex.log (x * ↑r) = ↑(Real.log r) + Complex.log x


/-- The cardinality of the finset `primesBelow n` equals the counting function
`primeCounting'` at `n`. -/
lemma primesBelow_card_eq_primeCounting' (n : ℕ) : n.primesBelow.card = primeCounting' n


@[fun_prop]
protected theorem HasStrictFDerivAt.fst (h : HasStrictFDerivAt f₂ f₂' x) :
    HasStrictFDerivAt (fun x => (f₂ x).1) ((fst 𝕜 F G).comp f₂') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{f₂ : E → F × G}
{f₂' : E →L[𝕜] F × G}
(h : HasStrictFDerivAt f₂ f₂' x)

HasStrictFDerivAt (fun x => (f₂ x).1) ((ContinuousLinearMap.fst 𝕜 F G).comp f₂') x


protected theorem id (μ : Measure α) : MeasurePreserving id μ μ

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


theorem EventuallyEq.preimage {l : Filter α} {f g : α → β} (h : f =ᶠ[l] g) (s : Set β) :
    f ⁻¹' s =ᶠ[l] g ⁻¹' s

{α : Type u}
{β : Type v}
{l : Filter α}
{f g : α → β}
(h : f =ᶠ[l] g)
(s : Set β)


/-- Counterpart to `List.prod_take_succ` when we have an inverse operation -/
@[to_additive (attr := simp)
  "Counterpart to `List.sum_take_succ` when we have a negation operation"]
theorem prod_drop_succ :
    ∀ (L : List G) (i : ℕ) (p), (L.drop (i + 1)).prod = (L.get ⟨i, p⟩)⁻¹ * (L.drop i).prod

{G : Type u_7}
[Group G]
(L : List G)
(i : ℕ)
(p : i < L.length)

(List.drop (i + 1) L).prod = (L.get ⟨i, p⟩)⁻¹ * (List.drop i L).prod


theorem isSt_refl_real (r : ℝ) : IsSt r r


theorem mul_rmatch_iff (P Q : RegularExpression α) (x : List α) :
    (P * Q).rmatch x ↔ ∃ t u : List α, x = t ++ u ∧ P.rmatch t ∧ Q.rmatch u

{α : Type u_1}
[dec : DecidableEq α]
(P Q : RegularExpression α)
(x : List α)

(P * Q).rmatch x = true ↔ ∃ t u, x = t ++ u ∧ P.rmatch t = true ∧ Q.rmatch u = true


theorem limit_ext_iff (x y : limit F) : x = y ↔ ∀ j, limit.π F j x = limit.π F j y

{J : Type v}
[CategoryTheory.Category.{w, v} J]
(F : J ⥤ Type u)
[CategoryTheory.Limits.HasLimit F]
(x y : CategoryTheory.Limits.limit F)

x = y ↔ ∀ (j : J), CategoryTheory.Limits.limit.π F j x = CategoryTheory.Limits.limit.π F j y


/-- The `Bicone` used in order to obtain the existence of
the biproduct of a functor `J ⥤ Karoubi C` when the category `C` is additive. -/
@[simps]
def bicone [HasFiniteBiproducts C] {J : Type} [Finite J] (F : J → Karoubi C) : Bicone F

(F : J → CategoryTheory.Idempotents.Karoubi C)

(CategoryTheory.Idempotents.Karoubi.Biproducts.bicone F).pt.p = CategoryTheory.Limits.biproduct.map fun j => (F j).p


theorem condexp_of_sigmaFinite (hm : m ≤ m0) [hμm : SigmaFinite (μ.trim hm)] :
    μ[f|m] =
      if Integrable f μ then
        if StronglyMeasurable[m] f then f
        else aestronglyMeasurable'_condexpL1.mk (condexpL1 hm μ f)
      else 0

[hμm : MeasureTheory.SigmaFinite (μ.trim hm)]

μ[f|m] =
  if MeasureTheory.Integrable f μ then
    if MeasureTheory.StronglyMeasurable f then f
    else MeasureTheory.AEStronglyMeasurable'.mk ↑↑(MeasureTheory.condexpL1 hm μ f) ⋯
  else 0


theorem base_restrict_iff' : (M ↾ X).Base I ↔ M.Basis' I X

{α : Type u_1}
{M : Matroid α}
{I X : Set α}


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


/-- A family `𝓕 : ι → β → α` is uniformly equicontinuous iff the function `swap 𝓕 : β → ι → α` is
uniformly continuous *when `ι → α` is equipped with the uniform structure of uniform convergence*.
This is very useful for developping the equicontinuity API, but it should not be used directly
for other purposes. -/
theorem uniformEquicontinuous_iff_uniformContinuous {F : ι → β → α} :
    UniformEquicontinuous F ↔ UniformContinuous (ofFun ∘ Function.swap F : β → ι →ᵤ α)

{ι : Type u_1}
{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
{F : ι → β → α}

UniformEquicontinuous F ↔ UniformContinuous (⇑UniformFun.ofFun ∘ Function.swap F)


theorem Multiset.toFinset_map [DecidableEq α] [DecidableEq β] (f : α → β) (m : Multiset α) :
    (m.map f).toFinset = m.toFinset.image f

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[DecidableEq β]
(f : α → β)
(m : Multiset α)

(Multiset.map f m).toFinset = Finset.image f m.toFinset


theorem eq_pow_order_mul_iterate_dslope (hp : HasFPowerSeriesAt f p z₀) :
    ∀ᶠ z in 𝓝 z₀, f z = (z - z₀) ^ p.order • (swap dslope z₀)^[p.order] f z

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

∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ p.order • (Function.swap dslope z₀)^[p.order] f z


theorem eq_top_of_unit_mem (x y : α) (hx : x ∈ I) (h : y * x = 1) : I = ⊤

{α : Type u}
[Semiring α]
(I : Ideal α)
(x y : α)
(hx : x ∈ I)
(h : y * x = 1)


/-- Reindexing by an equivalence and its inverse yields the original simplex. -/
@[simp]
theorem reindex_reindex_symm {m n : ℕ} (s : Simplex k P m) (e : Fin (m + 1) ≃ Fin (n + 1)) :
    (s.reindex e).reindex e.symm = s

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{m n : ℕ}
(s : Affine.Simplex k P m)
(e : Fin (m + 1) ≃ Fin (n + 1))


/-- Variant of `e.map_source` and `map_source'`, stated for images of subsets of `source`. -/
lemma map_source'' : e '' e.source ⊆ e.target

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)


protected theorem Decomposition.inductionOn {p : M → Prop} (h_zero : p 0)
    (h_homogeneous : ∀ {i} (m : ℳ i), p (m : M)) (h_add : ∀ m m' : M, p m → p m' → p (m + m')) :
    ∀ m, p m

(h_homogeneous : ∀ {i : ι} (m : ↥(ℳ i)), p ↑m)

(h_add : ∀ (m m' : M), p m → p m' → p (m + m'))


/-- Translating a function by right-multiplication does not change its integral with respect to a
right-invariant measure. -/
@[to_additive
      "Translating a function by right-addition does not change its integral with respect to a
      right-invariant measure."] -- Porting note: was `@[simp]`
theorem integral_mul_right_eq_self [IsMulRightInvariant μ] (f : G → E) (g : G) :
    (∫ x, f (x * g) ∂μ) = ∫ x, f x ∂μ

{G : Type u_4}
{E : Type u_5}
[MeasurableSpace G]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure G}
[AddGroup G]
[MeasurableAdd G]
[μ.IsAddRightInvariant]
(f : G → E)
(g : G)

∫ (x : G), f (x + g) ∂μ = ∫ (x : G), f x ∂μ


/-- A strictly concave function on an open segment is strictly lower-bounded by the min of its
endpoints. -/
theorem StrictConcaveOn.lt_on_open_segment' (hf : StrictConcaveOn 𝕜 s f) {x y : E} (hx : x ∈ s)
    (hy : y ∈ s) (hxy : x ≠ y) {a b : 𝕜} (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) :
    min (f x) (f y) < f (a • x + b • y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrderedAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : StrictConcaveOn 𝕜 s f)
{x y : E}
(hx : x ∈ s)
(hy : y ∈ s)
(hxy : x ≠ y)
{a b : 𝕜}
(ha : 0 < a)
(hb : 0 < b)
(hab : a + b = 1)


/-- A scheme `X` is integral if its is nonempty,
and `𝒪ₓ(U)` is an integral domain for each `U ≠ ∅`. -/
class IsIntegral : Prop where
  nonempty : Nonempty X := by infer_instance
  component_integral : ∀ (U : X.Opens) [Nonempty U], IsDomain Γ(X, U) := by infer_instance

{X : AlgebraicGeometry.Scheme}
[self : AlgebraicGeometry.IsIntegral X]
(U : X.Opens)
[Nonempty ↑↑(↑U).toPresheafedSpace]

IsDomain ↑(X.presheaf.obj (Opposite.op U))


@[simp]
theorem compl_inter_self (s : Set α) : sᶜ ∩ s = ∅


@[simp]
theorem normalizeObj_unitor (n : NormalMonoidalObject C) : normalizeObj (𝟙_ (F C)) n = n

(n : CategoryTheory.FreeMonoidalCategory.NormalMonoidalObject C)

(𝟙_ (CategoryTheory.FreeMonoidalCategory C)).normalizeObj n = n


@[simp, norm_cast] lemma cast_id {n : ℤ} : Int.cast n = n


theorem absolutelyContinuous_ennreal_iff (c : ComplexMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    c ≪ᵥ μ ↔ ComplexMeasure.re c ≪ᵥ μ ∧ ComplexMeasure.im c ≪ᵥ μ

(μ : MeasureTheory.VectorMeasure α ℝ≥0∞)

c ≪ᵥ μ ↔ MeasureTheory.ComplexMeasure.re c ≪ᵥ μ ∧ MeasureTheory.ComplexMeasure.im c ≪ᵥ μ


/-- If `e : C ≌ D` is an equivalence of categories, then `functoriality F e.functor` induces an
equivalence between cones over `F` and cones over `F ⋙ e.functor`.
-/
@[simps]
def functorialityEquivalence (e : C ≌ D) : Cone F ≌ Cone (F ⋙ e.functor)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(F : J ⥤ C)
(e : C ≌ D)

(CategoryTheory.Limits.Cones.functorialityEquivalence F e).counitIso =
  CategoryTheory.NatIso.ofComponents (fun c => CategoryTheory.Limits.Cones.ext (e.counitIso.app c.pt) ⋯) ⋯


/-- The functor `Arrow (Arrow C) ⥤ Square C` which sends
a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square
with `f` on the top side and `g` on the bottom side. -/
@[simps!]
def fromArrowArrowFunctor' : Arrow (Arrow C) ⥤ Square C

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

∀ {X Y : CategoryTheory.Arrow (CategoryTheory.Arrow C)} (φ : X ⟶ Y),
  (CategoryTheory.Square.fromArrowArrowFunctor'.map φ).τ₂ = φ.left.right


@[simp]
theorem eqToHom_left {X : T} {U V : Over X} (e : U = V) :
    (eqToHom e).left = eqToHom (e ▸ rfl : U.left = V.left)

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X : T}
{U V : CategoryTheory.Over X}
(e : U = V)

(CategoryTheory.eqToHom e).left = CategoryTheory.eqToHom ⋯


/-- Multiplying a map by a scalar `c` multiplies its determinant by `c ^ dim M`. -/
@[simp]
theorem det_smul {𝕜 : Type*} [Field 𝕜] {M : Type*} [AddCommGroup M] [Module 𝕜 M] (c : 𝕜)
    (f : M →ₗ[𝕜] M) :
    LinearMap.det (c • f) = c ^ FiniteDimensional.finrank 𝕜 M * LinearMap.det f

{𝕜 : Type u_7}
[Field 𝕜]
{M : Type u_8}
[AddCommGroup M]
[Module 𝕜 M]
(c : 𝕜)
(f : M →ₗ[𝕜] M)


/-- If there is `f`, an order-preserving embedding of `ℕ` into `ℕ` such that
any element of `l` found at index `ix` can be found at index `f ix` in `l'`,
then `Sublist l l'`.
-/
theorem sublist_of_orderEmbedding_get?_eq {l l' : List α} (f : ℕ ↪o ℕ)
    (hf : ∀ ix : ℕ, l.get? ix = l'.get? (f ix)) : l <+ l'

(hf : ∀ (ix : ℕ), l.get? ix = l'.get? (f ix))


theorem contDiffOn_congr (h₁ : ∀ x ∈ s, f₁ x = f x) : ContDiffOn 𝕜 n f₁ s ↔ ContDiffOn 𝕜 n f s

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


theorem inv_add_inv (ha : a ≠ 0) (hb : b ≠ 0) : a⁻¹ + b⁻¹ = (a + b) / (a * b)

{α : Type u_1}
[Semifield α]
{a b : α}
(ha : a ≠ 0)
(hb : b ≠ 0)


lemma even_mul_succ_self (n : ℕ) : Even (n * (n + 1))


theorem norm_injOn_ray_left (hx : x ≠ 0) : { y | SameRay ℝ x y }.InjOn norm

{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{x : F}
(hx : x ≠ 0)


@[continuity]
theorem continuous_pow (n : ℕ) : Continuous fun a : ℝ≥0∞ => a ^ n


/-- If `s : Set X` belongs to `𝓝 x ⊓ l` for all `x` from a compact set `K`,
then it belongs to `(𝓝ˢ K) ⊓ l`,
i.e., there exist an open `U ⊇ K` and `T ∈ l` such that `U ∩ T ⊆ s`. -/
theorem IsCompact.mem_nhdsSet_inf_of_forall {K : Set X} {l : Filter X} {s : Set X}
    (hK : IsCompact K) (hs : ∀ x ∈ K, s ∈ 𝓝 x ⊓ l) : s ∈ (𝓝ˢ K) ⊓ l

{X : Type u}
[TopologicalSpace X]
{K : Set X}
{l : Filter X}
{s : Set X}
(hK : IsCompact K)
(hs : ∀ x ∈ K, s ∈ 𝓝 x ⊓ l)

s ∈ 𝓝ˢ K ⊓ l


theorem rel_flip {s t} : Rel (flip r) s t ↔ Rel r t s

{α : Type u_1}
{β : Type v}
{r : α → β → Prop}
{s : Multiset β}
{t : Multiset α}

Multiset.Rel (flip r) s t ↔ Multiset.Rel r t s


theorem lookupAll_eq_nil {a : α} :
    ∀ {l : List (Sigma β)}, lookupAll a l = [] ↔ ∀ b : β a, Sigma.mk a b ∉ l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{l : List (Sigma β)}

List.lookupAll a l = [] ↔ ∀ (b : β a), ⟨a, b⟩ ∉ l


@[mono]
theorem coeSubmodule_strictMono (h : M ≤ nonZeroDivisors R) :
    StrictMono (coeSubmodule S : Ideal R → Submodule R S)

{R : Type u_1}
[CommRing R]
{M : Submonoid R}
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsLocalization M S]
(h : M ≤ nonZeroDivisors R)


@[simp]
theorem ofLex_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    (ofLex (no_index (OfNat.ofNat n : Lex α))) = OfNat.ofNat n

{α : Type u_1}
[NatCast α]
(n : ℕ)
[n.AtLeastTwo]


/-- The explicit left homology data of a short complex of abelian group that is
given by a kernel and a quotient given by the `AddMonoidHom` API. -/
@[simps]
def abLeftHomologyData : S.LeftHomologyData

S.abLeftHomologyData.π = QuotientAddGroup.mk' S.abToCycles.range


theorem gcd_dvd_right (a b : R) : gcd a b ∣ b

{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(a b : R)


@[simp]
theorem map_div₀ : f (a / b) = f a / f b

{G₀ : Type u_3}
{G₀' : Type u_5}
{F : Type u_6}
[GroupWithZero G₀]
[GroupWithZero G₀']
[FunLike F G₀ G₀']
[MonoidWithZeroHomClass F G₀ G₀']
(f : F)
(a b : G₀)


theorem adj_getVert_succ {u v} (w : G.Walk u v) {i : ℕ} (hi : i < w.length) :
    G.Adj (w.getVert i) (w.getVert (i + 1))

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(w : G.Walk u v)
{i : ℕ}
(hi : i < w.length)


theorem Coloring.valid {v w : V} (h : G.Adj v w) : C v ≠ C w

{V : Type u}
{G : SimpleGraph V}
{α : Type u_1}
(C : G.Coloring α)
{v w : V}
(h : G.Adj v w)


/-- `∧` distributes over `∨` (on the left). -/
theorem and_or_left : a ∧ (b ∨ c) ↔ (a ∧ b) ∨ (a ∧ c)


protected theorem pow_div {x m n : Nat} (h : n ≤ m) (hx : 0 < x) : x ^ m / x ^ n = x ^ (m - n)


lemma compatible {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] [T2Space Y]
    {f : X → Y} (hf : Continuous f) : letI _ := t2Setoid X
    ∀ (a b : X), a ≈ b → f a = f b

{X : Type u_3}
{Y : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[T2Space Y]
{f : X → Y}
(hf : Continuous f)
(a b : X)


protected lemma pow_le_pow_iff_left {n : ℕ} (hn : n ≠ 0) : a ^ n ≤ b ^ n ↔ a ≤ b


theorem hom_ext {Y : Scheme} (f₁ f₂ : X ⟶ Y) (h : ∀ x, 𝒰.map x ≫ f₁ = 𝒰.map x ≫ f₂) : f₁ = f₂

(h : ∀ (x : 𝒰.J), 𝒰.map x ≫ f₁ = 𝒰.map x ≫ f₂)


/-- `x * y` is equivalent to `y * x`. -/
theorem mul_comm_equiv (x y : PGame) : x * y ≈ y * x


theorem and_lt_two_pow (x : Nat) {y n : Nat} (right : y < 2^n) : (x &&& y) < 2^n

(x : Nat)
{y n : Nat}
(right : y < 2 ^ n)


theorem iff_ideal_total : ValuationRing R ↔ IsTotal (Ideal R) (· ≤ ·)

{R : Type u_1}
[CommRing R]
[IsDomain R]

ValuationRing R ↔ IsTotal (Ideal R) fun x x_1 => x ≤ x_1


@[simp high, norm_cast]
theorem of_to_nat : ∀ n : PosNum, ((n : ℕ) : Num) = Num.pos n


theorem infix_of_mem_join : ∀ {L : List (List α)}, l ∈ L → l <:+: join L

{α : Type u_1}
{l : List α}
{L : List (List α)}


theorem closedEmbedding_inl : ClosedEmbedding (inl : X → X ⊕ Y)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]


theorem smul_sup (a : M) (S T : Ideal R) : a • (S ⊔ T) = a • S ⊔ a • T

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


theorem semiconj_of_isLUB [PartialOrder α] [Group G] (f₁ f₂ : G →* α ≃o α) {h : α → α}
    (H : ∀ x, IsLUB (range fun g' => (f₁ g')⁻¹ (f₂ g' x)) (h x)) (g : G) :
    Function.Semiconj h (f₂ g) (f₁ g)

(H : ∀ (x : α), IsLUB (Set.range fun g' => (f₁ g')⁻¹ ((f₂ g') x)) (h x))


protected theorem measurableSet_u {p : α × Set α} (hp : p ∈ h.index) :
    MeasurableSet (h.covering p)

{α : Type u_1}
[MetricSpace α]
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{v : VitaliFamily μ}
{f : α → Set (Set α)}
{s : Set α}
(h : v.FineSubfamilyOn f s)
{p : α × Set α}
(hp : p ∈ h.index)


lemma cfcₙ_comp_star (hf : ContinuousOn f (star '' (σₙ R a)) := by cfc_cont_tac)
    (hf0 : f 0 = 0 := by cfc_zero_tac) (ha : p a := by cfc_tac) :
    cfcₙ (f <| star ·) a = cfcₙ f (star a)

(hf : ContinuousOn f (star '' σₙ R a) := by cfc_cont_tac)

cfcₙ (fun x => f (star x)) a = cfcₙ f (star a)


@[simp]
theorem toGL_mul (A B : unitaryGroup n α) : toGL (A * B) = toGL A * toGL B

{n : Type u}
[DecidableEq n]
[Fintype n]
{α : Type v}
[CommRing α]
[StarRing α]
(A B : ↥(Matrix.unitaryGroup n α))

Matrix.UnitaryGroup.toGL (A * B) = Matrix.UnitaryGroup.toGL A * Matrix.UnitaryGroup.toGL B


/-- `G.sheafPushforwardCocontinuous A J K : Sheaf J A ⥤ Sheaf K A` is induced
by the right Kan extension functor `G.op.ran` on presheaves. -/
@[simps! hom inv]
def Functor.sheafPushforwardCocontinuousCompSheafToPresheafIso :
    G.sheafPushforwardCocontinuous A J K ⋙ sheafToPresheaf K A ≅
      sheafToPresheaf J A ⋙ G.op.ran

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[∀ (F : Cᵒᵖ ⥤ A), G.op.HasPointwiseRightKanExtension F]

(G.sheafPushforwardCocontinuousCompSheafToPresheafIso A J K).inv =
  𝟙 (G.sheafPushforwardCocontinuous A J K ⋙ CategoryTheory.sheafToPresheaf K A)


theorem zero_of_nonpos (h : x ≤ 0) : smoothTransition x = 0


/-- The pigeonhole principle for finitely many pigeons of different weights, strict inequality
version: there is a pigeonhole with the total weight of pigeons in it greater than `b` provided that
the total number of pigeonholes times `b` is less than the total weight of all pigeons. -/
theorem exists_lt_sum_fiber_of_nsmul_lt_sum (hb : card β • b < ∑ x, w x) :
    ∃ y, b < ∑ x ∈ univ.filter fun x => f x = y, w x

(hb : Fintype.card β • b < ∑ x : α, w x)

∃ y, b < ∑ x ∈ Finset.filter (fun x => f x = y) Finset.univ, w x


@[simp] theorem coe_toOrderHom : ⇑f.toOrderHom = f


lemma isIso₂_of_shortExact_of_isIso₁₃' [Balanced C] {S₁ S₂ : ShortComplex C} (φ : S₁ ⟶ S₂)
    (h₁ : S₁.ShortExact) (h₂ : S₂.ShortExact) (_ : IsIso φ.τ₁) (_ : IsIso φ.τ₃) : IsIso φ.τ₂

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Balanced C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(φ : S₁ ⟶ S₂)
(h₁ : S₁.ShortExact)
(h₂ : S₂.ShortExact)

CategoryTheory.IsIso φ.τ₁ → CategoryTheory.IsIso φ.τ₃ → CategoryTheory.IsIso φ.τ₂


@[simp, norm_cast, nolint simpNF]
theorem coe_max (x y : ℚ≥0) : ((max x y : ℚ≥0) : ℚ) = max (x : ℚ) (y : ℚ)


@[to_additive]
theorem nnnorm_multiset_prod_le (m : Multiset E) : ‖m.prod‖₊ ≤ (m.map fun x => ‖x‖₊).sum

{E : Type u_6}
[SeminormedAddCommGroup E]
(m : Multiset E)

‖m.sum‖₊ ≤ (Multiset.map (fun x => ‖x‖₊) m).sum


theorem IsClosed.isLindelof [LindelofSpace X] (h : IsClosed s) : IsLindelof s

{X : Type u}
[TopologicalSpace X]
{s : Set X}
[LindelofSpace X]
(h : IsClosed s)


theorem exists_ne_top {p : ℝ≥0∞ → Prop} : (∃ a ≠ ∞, p a) ↔ ∃ r : ℝ≥0, p r


theorem coLindelof_le_cofinite : coLindelof X ≤ cofinite


protected theorem noZeroSMulDivisors [NoZeroDivisors R] (b : Basis ι R M) :
    NoZeroSMulDivisors R M

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[NoZeroDivisors R]
(b : Basis ι R M)