theorem exists_rat_btwn_of_lt :
    ∀ {a b : EReal}, a < b → ∃ x : ℚ, a < (x : ℝ) ∧ ((x : ℝ) : EReal) < b


theorem Succ.rec_linear {p : α → Prop} (hsucc : ∀ a, p a ↔ p (succ a)) (a b : α) : p a ↔ p b

(hsucc : ∀ (a : α), p a ↔ p (Order.succ a))


theorem exists_glb_Ioi (i : γ) : ∃ j, IsGLB (Ioi i) j


/-- The stability axiom in 'arrow' form: If `S` covers `f` then `S` covers `g ≫ f` for any `g`. -/
theorem arrow_stable (f : Y ⟶ X) (S : Sieve X) (h : J.Covers S f) {Z : C} (g : Z ⟶ Y) :
    J.Covers S (g ≫ f)

(J : CategoryTheory.GrothendieckTopology C)

J.Covers S (CategoryTheory.CategoryStruct.comp g f)


@[simp]
theorem zero_rpow_of_pos {y : ℝ} (h : 0 < y) : (0 : ℝ≥0∞) ^ y = 0


/-- `determinant` of `Matrix.kroneckerMapBilinear`.

This is primarily used with `R = ℕ` to prove `Matrix.det_kronecker`. -/
theorem det_kroneckerMapBilinear [CommSemiring R] [Fintype m] [Fintype n] [DecidableEq m]
    [DecidableEq n] [CommRing α] [CommRing β] [CommRing γ] [Module R α] [Module R β] [Module R γ]
    (f : α →ₗ[R] β →ₗ[R] γ) (h_comm : ∀ a b a' b', f (a * b) (a' * b') = f a a' * f b b')
    (A : Matrix m m α) (B : Matrix n n β) :
    det (kroneckerMapBilinear f A B) =
      det (A.map fun a => f a 1) ^ Fintype.card n * det (B.map fun b => f 1 b) ^ Fintype.card m

(((Matrix.kroneckerMapBilinear f) A) B).det =
  (A.map fun a => (f a) 1).det ^ Fintype.card n * (B.map fun b => (f 1) b).det ^ Fintype.card m


theorem of_restrict_scalars_finitePresentation [Algebra A B] [IsScalarTower R A B]
    [FinitePresentation.{w₁, w₃} R B] [FiniteType R A] :
    FinitePresentation.{w₂, w₃} A B

(R : Type w₁)
(A : Type w₂)
(B : Type w₃)
[CommRing R]
[CommRing A]
[Algebra R A]
[CommRing B]
[Algebra R B]
[Algebra A B]
[IsScalarTower R A B]
[Algebra.FinitePresentation R B]
[Algebra.FiniteType R A]


/-- `pointsWithCircumcenter`, applied to a `pointIndex` value,
equals `points` applied to that value. -/
@[simp]
theorem pointsWithCircumcenter_point {n : ℕ} (s : Simplex ℝ P n) (i : Fin (n + 1)) :
    s.pointsWithCircumcenter (pointIndex i) = s.points i

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{n : ℕ}
(s : Affine.Simplex ℝ P n)
(i : Fin (n + 1))

s.pointsWithCircumcenter (Affine.Simplex.PointsWithCircumcenterIndex.pointIndex i) = s.points i


@[to_additive]
lemma prod_le_prod_of_rel_le (h : s.Rel (· ≤ ·) t) : s.prod ≤ t.prod

(h : Multiset.Rel (fun x x_1 => x ≤ x_1) s t)


@[to_additive]
theorem eventually_mul_right_iff (μ : Measure G) [IsMulRightInvariant μ] (t : G) {p : G → Prop} :
    (∀ᵐ x ∂μ, p (x * t)) ↔ ∀ᵐ x ∂μ, p x

{G : Type u_2}
[MeasurableSpace G]
[Group G]
[MeasurableMul G]
(μ : MeasureTheory.Measure G)
[μ.IsMulRightInvariant]
(t : G)
{p : G → Prop}

(∀ᵐ (x : G) ∂μ, p (x * t)) ↔ ∀ᵐ (x : G) ∂μ, p x


theorem floor_div_ofNat (a : α) (n : ℕ) [n.AtLeastTwo] :
    ⌊a / (no_index (OfNat.ofNat n))⌋₊ = ⌊a⌋₊ / OfNat.ofNat n

{α : Type u_2}
[LinearOrderedSemifield α]
[FloorSemiring α]
(a : α)
(n : ℕ)
[n.AtLeastTwo]

⌊a / OfNat.ofNat n⌋₊ = ⌊a⌋₊ / OfNat.ofNat n


@[to_additive]
theorem mulIndicator_rel_mulIndicator {r : M → M → Prop} (h1 : r 1 1) (ha : a ∈ s → r (f a) (g a)) :
    r (mulIndicator s f a) (mulIndicator s g a)

{α : Type u_1}
{M : Type u_4}
[Zero M]
{s : Set α}
{f g : α → M}
{a : α}
{r : M → M → Prop}
(h1 : r 0 0)
(ha : a ∈ s → r (f a) (g a))


@[simp, norm_cast] lemma coe_eq_zero : (r : ℝ) = 0 ↔ r = 0


protected theorem neg_neg : IsRelPrime (-x) (-y)

{R : Type u_1}
[CommRing R]
{x y : R}
(h : IsRelPrime x y)


/-- The squared distance between points on a line (expressed as a
multiple of a fixed vector added to a point) and another point,
expressed as a quadratic. -/
theorem dist_smul_vadd_sq (r : ℝ) (v : V) (p₁ p₂ : P) :
    dist (r • v +ᵥ p₁) p₂ * dist (r • v +ᵥ p₁) p₂ =
      ⟪v, v⟫ * r * r + 2 * ⟪v, p₁ -ᵥ p₂⟫ * r + ⟪p₁ -ᵥ p₂, p₁ -ᵥ p₂⟫

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

dist (r • v +ᵥ p₁) p₂ * dist (r • v +ᵥ p₁) p₂ = ⟪v, v⟫_ℝ * r * r + 2 * ⟪v, p₁ -ᵥ p₂⟫_ℝ * r + ⟪p₁ -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ


@[to_additive]
theorem partialProd_succ' (f : Fin (n + 1) → α) (j : Fin (n + 1)) :
    partialProd f j.succ = f 0 * partialProd (Fin.tail f) j

{α : Type u_1}
[AddMonoid α]
{n : ℕ}
(f : Fin (n + 1) → α)
(j : Fin (n + 1))

Fin.partialSum f j.succ = f 0 + Fin.partialSum (Fin.tail f) j


@[to_additive add_const]
theorem StrictMono.mul_const' (hf : StrictMono f) (c : α) : StrictMono fun x => f x * c

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


theorem rootsOfUnity.integer_power_of_ringEquiv (g : L ≃+* L) :
    ∃ m : ℤ, ∀ t : rootsOfUnity n L, g (t : Lˣ) = (t ^ m : Lˣ)

{L : Type u}
[CommRing L]
[IsDomain L]
(n : ℕ+)
(g : L ≃+* L)

∃ m, ∀ (t : ↥(rootsOfUnity n L)), g ↑↑t = ↑(↑t ^ m)


theorem Antiperiodic.sub_int_mul_eq [Ring α] [Ring β] (h : Antiperiodic f c) (n : ℤ) :
    f (x - n * c) = (n.negOnePow : ℤ) * f x

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


theorem IsQuotient.norm_lift {f : NormedAddGroupHom M N} (hquot : IsQuotient f) {ε : ℝ} (hε : 0 < ε)
    (n : N) : ∃ m : M, f m = n ∧ ‖m‖ < ‖n‖ + ε

{M : Type u_1}
{N : Type u_2}
[SeminormedAddCommGroup M]
[SeminormedAddCommGroup N]
{f : NormedAddGroupHom M N}
(hquot : f.IsQuotient)
{ε : ℝ}
(hε : 0 < ε)
(n : N)


theorem chromaticNumber_pathGraph (n : ℕ) (h : 2 ≤ n) :
    (pathGraph n).chromaticNumber = 2

(SimpleGraph.pathGraph n).chromaticNumber = 2


theorem toBialgHom_injective : Function.Injective (toBialgHom : (A ≃ₐc[R] B) → A →ₐc[R] B)

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


@[to_additive]
theorem mem_nhds_one (B : GroupFilterBasis G) {U : Set G} (hU : U ∈ B) :
    U ∈ @nhds G B.topology 1

{G : Type u}
[AddGroup G]
(B : AddGroupFilterBasis G)
{U : Set G}
(hU : U ∈ B)


theorem symm_eqOn_of_inter_eq_of_eqOn {e' : PartialHomeomorph X Y} (h : e.IsImage s t)
    (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
    EqOn e.symm e'.symm (e.target ∩ t)

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

Set.EqOn (↑e.symm) (↑e'.symm) (e.target ∩ t)


theorem coeff_monomial [DecidableEq σ] (m n : σ →₀ ℕ) (a : R) :
    coeff R m (monomial R n a) = if m = n then a else 0

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
[DecidableEq σ]
(m n : σ →₀ ℕ)
(a : R)

(MvPowerSeries.coeff R m) ((MvPowerSeries.monomial R n) a) = if m = n then a else 0


@[to_additive]
theorem SeminormedGroup.tendstoUniformlyOn_one {f : ι → κ → G} {s : Set κ} {l : Filter ι} :
    TendstoUniformlyOn f 1 l s ↔ ∀ ε > 0, ∀ᶠ i in l, ∀ x ∈ s, ‖f i x‖ < ε

{ι : Type u_4}
{κ : Type u_5}
{G : Type u_8}
[SeminormedAddGroup G]
{f : ι → κ → G}
{s : Set κ}
{l : Filter ι}

TendstoUniformlyOn f 0 l s ↔ ∀ ε > 0, ∀ᶠ (i : ι) in l, ∀ x ∈ s, ‖f i x‖ < ε


@[simp]
theorem isomorphisms.iff : (isomorphisms C) f ↔ IsIso f

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

CategoryTheory.MorphismProperty.isomorphisms C f ↔ CategoryTheory.IsIso f


@[reassoc (attr := simp)]
theorem π_comp_cokernelIsoOfEq_inv {f g : X ⟶ Y} [HasCokernel f] [HasCokernel g] (h : f = g) :
    cokernel.π _ ≫ (cokernelIsoOfEq h).inv = cokernel.π _

CategoryTheory.Limits.cokernel.π g ≫ (CategoryTheory.Limits.cokernelIsoOfEq h).inv = CategoryTheory.Limits.cokernel.π f


theorem TopologicalRing.of_addGroup_of_nhds_zero [TopologicalAddGroup R]
    (hmul : Tendsto (uncurry ((· * ·) : R → R → R)) (𝓝 0 ×ˢ 𝓝 0) <| 𝓝 0)
    (hmul_left : ∀ x₀ : R, Tendsto (fun x : R => x₀ * x) (𝓝 0) <| 𝓝 0)
    (hmul_right : ∀ x₀ : R, Tendsto (fun x : R => x * x₀) (𝓝 0) <| 𝓝 0) : TopologicalRing R

(hmul : Filter.Tendsto (Function.uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0))

(hmul_left : ∀ (x₀ : R), Filter.Tendsto (fun x => x₀ * x) (𝓝 0) (𝓝 0))

(hmul_right : ∀ (x₀ : R), Filter.Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0))


@[to_additive]
theorem zpowers_ne_bot : zpowers g ≠ ⊥ ↔ g ≠ 1


@[simp]
theorem finset_inf_factors {I : Type*} {A B : C} {s : Finset I} {P : I → Subobject B} (f : A ⟶ B) :
    (s.inf P).Factors f ↔ ∀ i ∈ s, (P i).Factors f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{I : Type u_1}
{A B : C}
{s : Finset I}
{P : I → CategoryTheory.Subobject B}
(f : A ⟶ B)


@[simp]
theorem image_Ici (e : α ≃o β) (a : α) : e '' Ici a = Ici (e a)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ≃o β)
(a : α)


theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt 𝕜 f x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
(hf : HasFPowerSeriesAt f p x)


/-- The forgetful functor from `Grothendieck F` to the source category. -/
@[simps!]
def forget : Grothendieck F ⥤ C

(F : CategoryTheory.Functor C CategoryTheory.Cat)

(CategoryTheory.Grothendieck.forget F).map f = f.base


@[to_additive (attr := simp)]
theorem range_one [Nonempty α] [One β] : (1 : α →ₛ β).range = {1}

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Nonempty α]
[Zero β]


/-- Closed balls defined using the distance or the edistance coincide -/
theorem Metric.emetric_closedBall {x : α} {ε : ℝ} (h : 0 ≤ ε) :
    EMetric.closedBall x (ENNReal.ofReal ε) = closedBall x ε

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{ε : ℝ}
(h : 0 ≤ ε)

EMetric.closedBall x (ENNReal.ofReal ε) = Metric.closedBall x ε


theorem coe_nat_inj (p q : Nat.Primes) : (p : ℕ) = (q : ℕ) ↔ p = q


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

(eα : α₁ ≃ α₂)

(eβ : β₁ ≃ β₂)

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

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


/-- **First moment method**. An integrable function is greater than its mean on a set of positive
measure. -/
theorem measure_average_le_pos (hμ : μ ≠ 0) (hf : Integrable f μ) :
    0 < μ {x | ⨍ a, f a ∂μ ≤ f x}

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
[MeasureTheory.IsFiniteMeasure μ]
(hμ : μ ≠ 0)
(hf : MeasureTheory.Integrable f μ)


theorem tendsto_pi_nhds {f : Y → ∀ i, π i} {g : ∀ i, π i} {u : Filter Y} :
    Tendsto f u (𝓝 g) ↔ ∀ x, Tendsto (fun i => f i x) u (𝓝 (g x))

{Y : Type v}
{ι : Type u_5}
{π : ι → Type u_6}
[T : (i : ι) → TopologicalSpace (π i)]
{f : Y → (i : ι) → π i}
{g : (i : ι) → π i}
{u : Filter Y}

Filter.Tendsto f u (𝓝 g) ↔ ∀ (x : ι), Filter.Tendsto (fun i => f i x) u (𝓝 (g x))


/-- To every `S : J.Cover X` and presheaf `P`, associate a `MulticospanIndex`. -/
@[simps]
def index {D : Type u₁} [Category.{v₁} D] (S : J.Cover X) (P : Cᵒᵖ ⥤ D) :
    Limits.MulticospanIndex D

{J : CategoryTheory.GrothendieckTopology C}


theorem drop_eq (s : String) (n : Nat) : s.drop n = ⟨s.1.drop n⟩

s.drop n = { data := List.drop n s.data }


protected theorem SupPrime.supIrred : SupPrime a → SupIrred a

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


@[simp]
theorem flip_y : (flip u).y = u.x


theorem count_sum [DecidableEq α] {m : Multiset β} {f : β → Multiset α} {a : α} :
    count a (map f m).sum = sum (m.map fun b => count a <| f b)

{α : Type u_1}
{β : Type v}
[DecidableEq α]
{m : Multiset β}
{f : β → Multiset α}
{a : α}

Multiset.count a (Multiset.map f m).sum = (Multiset.map (fun b => Multiset.count a (f b)) m).sum


@[simp]
theorem toEquiv_equiv_empty (f : M ≃ N) : (Equiv.empty f).toEquiv = f


@[simp]
theorem equiv_symm_add :
    (WithLp.equiv p V).symm (x' + y') = (WithLp.equiv p V).symm x' + (WithLp.equiv p V).symm y'

(p : ℝ≥0∞)
{V : Type uV}
[AddCommGroup V]
(x' y' : V)


theorem fixedPoint_lipschitz_in_map {g : α → α} (hg : ContractingWith K g) {C}
    (hfg : ∀ z, dist (f z) (g z) ≤ C) : dist (fixedPoint f hf) (fixedPoint g hg) ≤ C / (1 - K)

{α : Type u_1}
[MetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
[Nonempty α]
[CompleteSpace α]
{g : α → α}
(hg : ContractingWith K g)
{C : ℝ}
(hfg : ∀ (z : α), dist (f z) (g z) ≤ C)

dist (ContractingWith.fixedPoint f hf) (ContractingWith.fixedPoint g hg) ≤ C / (1 - ↑K)


theorem iInf_le_iInf_of_subset {f : β → α} {s t : Set β} : s ⊆ t → ⨅ x ∈ t, f x ≤ ⨅ x ∈ s, f x

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : β → α}
{s t : Set β}


theorem eventualRange_mapsTo (f : j ⟶ i) :
    (F.eventualRange j).MapsTo (F.map f) (F.eventualRange i)

{J : Type u}
[CategoryTheory.Category.{u_1, u} J]
(F : J ⥤ Type v)
{i j : J}
[CategoryTheory.IsCofilteredOrEmpty J]
(f : j ⟶ i)

Set.MapsTo (F.map f) (F.eventualRange j) (F.eventualRange i)


@[to_additive (attr := simp)]
lemma ofUnits_bot : (⊥ : Subgroup Mˣ).ofUnits = ⊥


theorem Reaches₀.tail' {σ} {f : σ → Option σ} {a b c : σ} (h : Reaches₀ f a b) (h₂ : c ∈ f b) :
    Reaches₁ f a c

{σ : Type u_1}
{f : σ → Option σ}
{a b c : σ}
(h : Turing.Reaches₀ f a b)
(h₂ : c ∈ f b)


theorem norm_integral_le_integral_norm_Ioc : ‖∫ x in a..b, f x ∂μ‖ ≤ ∫ x in Ι a b, ‖f x‖ ∂μ

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ℝ}
{f : ℝ → E}
{μ : MeasureTheory.Measure ℝ}

‖∫ (x : ℝ) in a..b, f x ∂μ‖ ≤ ∫ (x : ℝ) in Ι a b, ‖f x‖ ∂μ


@[simp]
theorem Submodule.toAddSubgroup_toIntSubmodule (S : Submodule ℤ M) :
    AddSubgroup.toIntSubmodule S.toAddSubgroup = S

{M : Type u_3}
[AddCommGroup M]
(S : Submodule ℤ M)


@[simp]
theorem one_fst : (1 : X q).1 = 1


@[simp] theorem nndist_ofMul (a b : X) : nndist (ofMul a) (ofMul b) = nndist a b

{X : Type u_1}
[PseudoMetricSpace X]
(a b : X)

nndist (Additive.ofMul a) (Additive.ofMul b) = nndist a b


lemma op_list_prod : ∀ l : List M, op l.prod = (l.map op).reverse.prod

MulOpposite.op l.prod = (List.map MulOpposite.op l).reverse.prod


@[to_additive (attr := simp)]
theorem clift_apply_mk (f : FreeMonoid (M ⊕ N) →* P) (hM₁ hN₁ hM hN w) :
    clift f hM₁ hN₁ hM hN (mk w) = f w

(hM₁ : f (FreeMonoid.of (Sum.inl 1)) = 1)

(hN₁ : f (FreeMonoid.of (Sum.inr 1)) = 1)

(hM : ∀ (x y : M), f (FreeMonoid.of (Sum.inl (x * y))) = f (FreeMonoid.of (Sum.inl x) * FreeMonoid.of (Sum.inl y)))

(hN : ∀ (x y : N), f (FreeMonoid.of (Sum.inr (x * y))) = f (FreeMonoid.of (Sum.inr x) * FreeMonoid.of (Sum.inr y)))

(Monoid.Coprod.clift f hM₁ hN₁ hM hN) (Monoid.Coprod.mk w) = f w


theorem valuation_surjective : Function.Surjective A.valuation

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


theorem map_ne_zero [Semiring S] [Nontrivial S] {f : R →+* S} (hp : p ≠ 0) : p.map f ≠ 0

{R : Type u}
{S : Type v}
[DivisionRing R]
{p : R[X]}
[Semiring S]
[Nontrivial S]
{f : R →+* S}
(hp : p ≠ 0)


theorem gcd_dvd_gcd_of_dvd_left {m k : Nat} (n : Nat) (H : m ∣ k) : gcd m n ∣ gcd k n


@[simp]
theorem finSuccEquiv_succ (m : Fin n) : (finSuccEquiv n) m.succ = some m


@[simp, norm_cast] theorem coe_lt_coe : (↑r : ℝ≥0∞) < ↑q ↔ r < q


@[simp]
theorem mapEquiv_apply (h : α ≃ β) (h' : α' ≃ β') (x : F α α') :
    (mapEquiv F h h' : F α α' ≃ F β β') x = bimap h h' x

{α β : Type u}
{α' β' : Type v}
(F : Type u → Type v → Type w)
[Bifunctor F]
[LawfulBifunctor F]
(h : α ≃ β)
(h' : α' ≃ β')
(x : F α α')

(Bifunctor.mapEquiv F h h') x = bimap (⇑h) (⇑h') x


@[simp]
theorem unmop_mop {X Y : C} {f : X ⟶ Y} : f.mop.unmop = f

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


/-- Constructive information associated with a partition of a type `α` indexed by another type `ι`,
`s : ι → Set α`.

`IndexedPartition.index` sends an element to its index, while `IndexedPartition.some` sends
an index to an element of the corresponding set.

This type is primarily useful for definitional control of `s` - if this is not needed, then
`Setoid.ker index` by itself may be sufficient. -/
structure IndexedPartition {ι α : Type*} (s : ι → Set α) where
  /-- two indexes are equal if they are equal in membership  -/
  eq_of_mem : ∀ {x i j}, x ∈ s i → x ∈ s j → i = j
  /-- sends an index to an element of the corresponding set-/
  some : ι → α
  /-- membership invariance for `some`-/
  some_mem : ∀ i, some i ∈ s i
  /-- index for type `α`-/
  index : α → ι
  /-- membership invariance for `index`-/
  mem_index : ∀ x, x ∈ s (index x)

{ι : Type u_1}
{α : Type u_2}
{s : ι → Set α}
(self : IndexedPartition s)
(i : ι)


lemma Set.biUnion_finsetSigma_univ (s : Finset ι) (f : Sigma κ → Set α) :
    ⋃ ij ∈ s.sigma fun _ ↦ Finset.univ, f ij = ⋃ i ∈ s, ⋃ j, f ⟨i, j⟩

{ι : Type u_1}
{α : Type u_2}
{κ : ι → Type u_5}
[(i : ι) → Fintype (κ i)]
(s : Finset ι)
(f : Sigma κ → Set α)

⋃ ij ∈ s.sigma fun x => Finset.univ, f ij = ⋃ i ∈ s, ⋃ j, f ⟨i, j⟩


theorem cons_le_cons [∀ i, Preorder (α i)] {x₀ y₀ : α 0} {x y : ∀ i : Fin n, α i.succ} :
    cons x₀ x ≤ cons y₀ y ↔ x₀ ≤ y₀ ∧ x ≤ y

{n : ℕ}
{α : Fin (n + 1) → Type u}
[(i : Fin (n + 1)) → Preorder (α i)]
{x₀ y₀ : α 0}
{x y : (i : Fin n) → α i.succ}

Fin.cons x₀ x ≤ Fin.cons y₀ y ↔ x₀ ≤ y₀ ∧ x ≤ y


@[simp]
theorem domLCongr_refl : domLCongr R N ι S (LinearEquiv.refl R M) = LinearEquiv.refl S _

(R : Type u_1)
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
(N : Type u_3)
[AddCommMonoid N]
[Module R N]
(ι : Type u_7)
(S : Type u_12)
[Semiring S]
[Module S N]
[SMulCommClass R S N]

AlternatingMap.domLCongr R N ι S (LinearEquiv.refl R M) = LinearEquiv.refl S (M [⋀^ι]→ₗ[R] N)


lemma isLocallySurjective_iff_epi' :
    IsLocallySurjective φ ↔ Epi φ

{J : CategoryTheory.GrothendieckTopology C}

[CategoryTheory.Balanced (CategoryTheory.Sheaf J A)]

CategoryTheory.Sheaf.IsLocallySurjective φ ↔ CategoryTheory.Epi φ


/-- Auxiliary definition for `mapBifunctorHomologicalComplex`. -/
@[simps!]
def mapBifunctorHomologicalComplexObj (K₁ : HomologicalComplex C₁ c₁) :
    HomologicalComplex C₂ c₂ ⥤ HomologicalComplex₂ D c₁ c₂

[∀ (X₁ : C₁), (F.obj X₁).PreservesZeroMorphisms]

(((F.mapBifunctorHomologicalComplexObj c₂ K₁).obj K₂).X i₁).d i₂ i₂' = (F.obj (K₁.X i₁)).map (K₂.d i₂ i₂')


/-- `LinearEquiv.prodProdProdComm` is isometric. -/
@[simps!]
def IsometryEquiv.prodProdProdComm
    (Q₁ : QuadraticMap R M₁ P) (Q₂ : QuadraticMap R M₂ P)
    (Q₃ : QuadraticMap R N₁ P) (Q₄ : QuadraticMap R N₂ P) :
    ((Q₁.prod Q₂).prod (Q₃.prod Q₄)).IsometryEquiv ((Q₁.prod Q₃).prod (Q₂.prod Q₄))

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{N₁ : Type u_5}
{N₂ : Type u_6}
{P : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid N₁]
[AddCommMonoid N₂]
[AddCommMonoid P]
[Module R M₁]
[Module R M₂]
[Module R N₁]
[Module R N₂]
[Module R P]
(Q₁ : QuadraticMap R M₁ P)
(Q₂ : QuadraticMap R M₂ P)
(Q₃ : QuadraticMap R N₁ P)
(Q₄ : QuadraticMap R N₂ P)
(mnmn : (M₁ × M₂) × N₁ × N₂)

(QuadraticMap.IsometryEquiv.prodProdProdComm Q₁ Q₂ Q₃ Q₄) mnmn = ((mnmn.1.1, mnmn.2.1), mnmn.1.2, mnmn.2.2)


/-- The isomorphism `F.postcomp G ≅ F.postcomp G'` induced by an isomorphism `e : G ≅ G'`
which commutes with the shift. -/
@[simps!]
def postcompIsoOfIso {G G' : D ⥤ E} (e : G ≅ G') [G.CommShift A] [G'.CommShift A]
    [NatTrans.CommShift e.hom A] :
    F.postcomp G ≅ F.postcomp G'

(F : CategoryTheory.SingleFunctors C D A)

((F.postcompIsoOfIso e).hom.hom a).app X = e.hom.app ((F.functor a).obj X)


theorem differentiableAt_Gamma (s : ℂ) (hs : ∀ m : ℕ, s ≠ -m) : DifferentiableAt ℂ Gamma s


/-- If `C` has colimits of shape `Jᵒᵖ`, we can construct limits in `Cᵒᵖ` of shape `J`.
-/
theorem hasLimitsOfShape_op_of_hasColimitsOfShape [HasColimitsOfShape Jᵒᵖ C] :
    HasLimitsOfShape J Cᵒᵖ


/-- An ordered cancellative vector addition is an ordered vector addition that is cancellative. -/
class IsOrderedCancelVAdd (G P : Type*) [LE G] [LE P] [VAdd G P] extends
    IsOrderedVAdd G P : Prop where
  protected le_of_vadd_le_vadd_left : ∀ (a : G) (b c : P), a +ᵥ b ≤ a +ᵥ c → b ≤ c
  protected le_of_vadd_le_vadd_right : ∀ (a b : G) (c : P), a +ᵥ c ≤ b +ᵥ c → a ≤ b

{G : Type u_3}
{P : Type u_4}
[LE G]
[LE P]
[VAdd G P]
[self : IsOrderedCancelVAdd G P]
(a b : G)
(c : P)


theorem ofEven_ι (x y : M × R) :
    ofEven Q ((even.ι (Q' Q)).bilin x y) =
      (ι Q x.1 + algebraMap R _ x.2) * (ι Q y.1 - algebraMap R _ y.2)

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(x y : M × R)

(CliffordAlgebra.ofEven Q) (((CliffordAlgebra.even.ι (CliffordAlgebra.EquivEven.Q' Q)).bilin x) y) =
  ((CliffordAlgebra.ι Q) x.1 + (algebraMap R (CliffordAlgebra Q)) x.2) *
    ((CliffordAlgebra.ι Q) y.1 - (algebraMap R (CliffordAlgebra Q)) y.2)


@[simp]
theorem ofBoolRing_symm_eq : (@ofBoolRing α).symm = toBoolRing


theorem iterate_mono {f g : CircleDeg1Lift} (h : f ≤ g) (n : ℕ) : f^[n] ≤ g^[n]


@[simp]
theorem mem_neLocus {f g : Π₀ a, N a} {a : α} : a ∈ f.neLocus g ↔ f a ≠ g a

{α : Type u_1}
{N : α → Type u_2}
[DecidableEq α]
[(a : α) → DecidableEq (N a)]
[(a : α) → Zero (N a)]
{f g : Π₀ (a : α), N a}
{a : α}


/-- `IsCountableBasis p s` means the image of `s` bounded by `p` is a countable filter basis. -/
structure IsCountableBasis (p : ι → Prop) (s : ι → Set α) extends IsBasis p s : Prop where
  /-- The set of `i` that satisfy the predicate `p` is countable. -/
  countable : (setOf p).Countable

{α : Type u_1}
{ι : Type u_4}
{p : ι → Prop}
{s : ι → Set α}
(self : Filter.IsCountableBasis p s)


theorem augment_hom_zero (X : CosimplicialObject C) (X₀ : C) (f : X₀ ⟶ X.obj [0]) (w) :
    (X.augment X₀ f w).hom.app [0] = f

(X : CategoryTheory.CosimplicialObject C)

(w : ∀ (i : SimplexCategory) (g₁ g₂ : SimplexCategory.mk 0 ⟶ i), f ≫ X.map g₁ = f ≫ X.map g₂)

(X.augment X₀ f w).hom.app (SimplexCategory.mk 0) = f


@[simp] lemma reverse_C (t : R) :
    reverse (C t) = C t

(Polynomial.C t).reverse = Polynomial.C t


theorem ContinuousLinearMap.reApplyInnerSelf_continuous (T : E →L[𝕜] E) :
    Continuous T.reApplyInnerSelf

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(T : E →L[𝕜] E)


@[to_additive (attr := simp)]
theorem mul_inv : (a * ↑a⁻¹ : α) = 1


@[simp]
theorem add_re (z w : ℂ) : (z + w).re = z.re + w.re


theorem integrable_of_nnreal (f : X →ᵇ ℝ≥0) : Integrable (((↑) : ℝ≥0 → ℝ) ∘ ⇑f) μ

{X : Type u_1}
[MeasurableSpace X]
[TopologicalSpace X]
[OpensMeasurableSpace X]
(μ : MeasureTheory.Measure X)
[MeasureTheory.IsFiniteMeasure μ]
(f : X →ᵇ ℝ≥0)

MeasureTheory.Integrable (NNReal.toReal ∘ ⇑f) μ


theorem sub_mod_lt (h : abv.IsEuclidean) (a : R) {b : R} (hb : b ≠ 0) : abv (a % b) < abv b

{R : Type u_1}
{S : Type u_2}
[EuclideanDomain R]
[OrderedSemiring S]
{abv : AbsoluteValue R S}
(h : abv.IsEuclidean)
(a : R)
{b : R}
(hb : b ≠ 0)


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

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

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


@[to_additive]
lemma IsCompact.smul_set {k : Set M} {u : Set X} (hk : IsCompact k) (hu : IsCompact u) :
    IsCompact (k • u)

{M : Type u_1}
{X : Type u_2}
[TopologicalSpace M]
[TopologicalSpace X]
[SMul M X]
[ContinuousSMul M X]
{k : Set M}
{u : Set X}
(hk : IsCompact k)
(hu : IsCompact u)


@[simp] theorem implies_true (α : Sort u) : (α → True) = True


theorem eLpNorm_sub_le {f g : α → E} (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ)
    (hp : 1 ≤ p) : eLpNorm (f - g) p μ ≤ eLpNorm f p μ + eLpNorm g p μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.eLpNorm (f - g) p μ ≤ MeasureTheory.eLpNorm f p μ + MeasureTheory.eLpNorm g p μ


theorem Additive.isAddMonoidHom [MulOneClass α] [MulOneClass β] {f : α → β}
    (hf : IsMonoidHom f) : @IsAddMonoidHom (Additive α) (Additive β) _ _ f

{α : Type u}
{β : Type v}
[MulOneClass α]
[MulOneClass β]
{f : α → β}
(hf : IsMonoidHom f)


theorem MeasureTheory.measure_unitBall_eq_integral_div_gamma {E : Type*} {p : ℝ}
    [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [MeasurableSpace E]
    [BorelSpace E] (μ : Measure E) [IsAddHaarMeasure μ] (hp : 0 < p) :
    μ (Metric.ball 0 1) =
      .ofReal ((∫ (x : E), Real.exp (- ‖x‖ ^ p) ∂μ) / Real.Gamma (finrank ℝ E / p + 1))

{E : Type u_1}
{p : ℝ}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(hp : 0 < p)

μ (Metric.ball 0 1) =
  ENNReal.ofReal ((∫ (x : E), Real.exp (-‖x‖ ^ p) ∂μ) / Real.Gamma (↑(FiniteDimensional.finrank ℝ E) / p + 1))


protected theorem iSup_apply {ι : Sort*} {p : ι → Seminorm 𝕜 E}
    (hp : BddAbove (range p)) {x : E} : (⨆ i, p i) x = ⨆ i, p i x

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{ι : Sort u_13}
{p : ι → Seminorm 𝕜 E}
(hp : BddAbove (Set.range p))
{x : E}


@[simp]
lemma coeff_rTensorAlgHom_tmul
    (p : MvPolynomial σ S) (n : N) (d : σ →₀ ℕ) :
    coeff d (rTensorAlgHom (p ⊗ₜ[R] n)) = (coeff d p) ⊗ₜ[R] n

{R : Type u}
{N : Type w}
[CommSemiring R]
{σ : Type u_1}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[CommSemiring N]
[Algebra R N]
(p : MvPolynomial σ S)
(n : N)
(d : σ →₀ ℕ)

MvPolynomial.coeff d (MvPolynomial.rTensorAlgHom (p ⊗ₜ[R] n)) = MvPolynomial.coeff d p ⊗ₜ[R] n


theorem toDual_lt_iff {a : WithTop α} {b : WithBot αᵒᵈ} :
    WithTop.toDual a < b ↔ WithBot.ofDual b < a

{α : Type u_1}
[LT α]
{a : WithTop α}
{b : WithBot αᵒᵈ}


/-- A subtype of a subtype is equivalent to the subtype of elements satisfying both predicates. -/
@[simps!]
def subtypeSubtypeEquivSubtypeInter {α : Type u} (p q : α → Prop) :
    { x : Subtype p // q x.1 } ≃ Subtype fun x => p x ∧ q x

∀ (a : { x // q ↑x }), ↑((Equiv.subtypeSubtypeEquivSubtypeInter p q) a) = ↑↑a


theorem aecover_Icc_of_Icc (ha : Tendsto a l (𝓝 A)) (hb : Tendsto b l (𝓝 B)) :
    AECover (μ.restrict <| Icc A B) l fun i => Icc (a i) (b i)

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
[OpensMeasurableSpace α]
{a b : ι → α}
{A B : α}
[MeasureTheory.NoAtoms μ]
(ha : Filter.Tendsto a l (𝓝 A))
(hb : Filter.Tendsto b l (𝓝 B))

MeasureTheory.AECover (μ.restrict (Set.Icc A B)) l fun i => Set.Icc (a i) (b i)


/-- The function `fun x ↦ f x / r` tends to infinity along a nontrivial filter
if and only if `r > 0` and `f` tends to infinity or `r < 0` and `f` tends to negative infinity. -/
lemma tendsto_div_const_atTop_iff [NeBot l] :
    Tendsto (fun x ↦ f x / r) l atTop ↔ 0 < r ∧ Tendsto f l atTop ∨ r < 0 ∧ Tendsto f l atBot

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
[l.NeBot]

Filter.Tendsto (fun x => f x / r) l Filter.atTop ↔
  0 < r ∧ Filter.Tendsto f l Filter.atTop ∨ r < 0 ∧ Filter.Tendsto f l Filter.atBot


@[simp, norm_cast]
theorem coe_id' : ⇑(id R₁ M₁) = _root_.id

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[Module R₁ M₁]


/-- The composition of `C^n` functions at points in domains is `C^n`. -/
theorem ContDiffWithinAt.comp {s : Set E} {t : Set F} {g : F → G} {f : E → F} (x : E)
    (hg : ContDiffWithinAt 𝕜 n g t (f x)) (hf : ContDiffWithinAt 𝕜 n f s x) (st : s ⊆ f ⁻¹' t) :
    ContDiffWithinAt 𝕜 n (g ∘ f) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{n : ℕ∞}
{s : Set E}
{t : Set F}
{g : F → G}
{f : E → F}
(x : E)
(hg : ContDiffWithinAt 𝕜 n g t (f x))
(hf : ContDiffWithinAt 𝕜 n f s x)
(st : s ⊆ f ⁻¹' t)


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


/-- Lebesgue dominated convergence theorem for filters with a countable basis -/
theorem tendsto_integral_filter_of_dominated_convergence {ι} {l : Filter ι} [l.IsCountablyGenerated]
    {F : ι → α → G} {f : α → G} (bound : α → ℝ) (hF_meas : ∀ᶠ n in l, AEStronglyMeasurable (F n) μ)
    (h_bound : ∀ᶠ n in l, ∀ᵐ a ∂μ, ‖F n a‖ ≤ bound a) (bound_integrable : Integrable bound μ)
    (h_lim : ∀ᵐ a ∂μ, Tendsto (fun n => F n a) l (𝓝 (f a))) :
    Tendsto (fun n => ∫ a, F n a ∂μ) l (𝓝 <| ∫ a, f a ∂μ)

(hF_meas : ∀ᶠ (n : ι) in l, MeasureTheory.AEStronglyMeasurable (F n) μ)

(h_bound : ∀ᶠ (n : ι) in l, ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a)

(bound_integrable : MeasureTheory.Integrable bound μ)

(h_lim : ∀ᵐ (a : α) ∂μ, Filter.Tendsto (fun n => F n a) l (nhds (f a)))

Filter.Tendsto (fun n => ∫ (a : α), F n a ∂μ) l (nhds (∫ (a : α), f a ∂μ))


/-- The map from the restriction of a presheafed space.
-/
@[simps]
def ofRestrict {U : TopCat} (X : PresheafedSpace C) {f : U ⟶ (X : TopCat)}
    (h : OpenEmbedding f) : X.restrict h ⟶ X

(X : AlgebraicGeometry.PresheafedSpace C)

(X.ofRestrict h).c.app V = X.presheaf.map (⋯.adjunction.counit.app (Opposite.unop V)).op


theorem bddBelow_coe (s : Set ℚ≥0) : BddBelow (((↑) : ℚ≥0 → ℚ) '' s)


/-- A morphism of schemes is surjective if the underlying map is. -/
@[mk_iff]
class Surjective : Prop where
  surj : Function.Surjective f.1.base

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)

AlgebraicGeometry.Surjective f ↔ Function.Surjective ⇑f.val.base


theorem natTrailingDegree_le_of_mem_supp (a : ℕ) : a ∈ p.support → natTrailingDegree p ≤ a

{R : Type u}
[Semiring R]
{p : R[X]}
(a : ℕ)


theorem Coprime.mul_right (H1 : Coprime k m) (H2 : Coprime k n) : Coprime k (m * n)

{k m n : Nat}
(H1 : k.Coprime m)
(H2 : k.Coprime n)


theorem inseparable_iff_clusterPt_uniformity {x y : α} :
    Inseparable x y ↔ ClusterPt (x, y) (𝓤 α)


theorem Ioo_inr_inr : Ioo (inr b₁ : α ⊕ β) (inr b₂) = (Ioo b₁ b₂).map Embedding.inr

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(b₁ b₂ : β)

Finset.Ioo (Sum.inr b₁) (Sum.inr b₂) = Finset.map Function.Embedding.inr (Finset.Ioo b₁ b₂)


theorem LieHom.isSolvable_range (f : L' →ₗ⁅R⁆ L) [LieAlgebra.IsSolvable R L'] :
    LieAlgebra.IsSolvable R f.range

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


@[simp]
theorem implicitToPartialHomeomorphOfComplemented_apply_ker (hf : HasStrictFDerivAt f f' a)
    (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) (y : ker f') :
    hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker (y + a) = (f (y + a), y)

(hker : (LinearMap.ker f').ClosedComplemented)

↑(HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented f f' hf hf' hker) (↑y + a) = (f (↑y + a), y)


theorem shiftRight_eq_div_pow (m : Int) (n : Nat) :
    m >>> n = m / ((2 ^ n) : Nat)


@[simp]
theorem toAddMonoidAlgebra_zero [Semiring M] [∀ m : M, Decidable (m ≠ 0)] :
    toAddMonoidAlgebra 0 = (0 : AddMonoidAlgebra M ι)

{ι : Type u_1}
{M : Type u_3}
[DecidableEq ι]
[Semiring M]
[(m : M) → Decidable (m ≠ 0)]


/-- If a function is `C^n` on a domain with unique derivatives, then its bundled derivative is
`C^m` when `m+1 ≤ n`. In this auxiliary lemma, we prove this fact when the source and target space
are model spaces in models with corners. The general fact is proved in
`ContMDiffOn.contMDiffOn_tangentMapWithin` -/
theorem ContMDiffOn.contMDiffOn_tangentMapWithin_aux {f : H → H'} {s : Set H}
    (hf : ContMDiffOn I I' n f s) (hmn : m + 1 ≤ n) (hs : UniqueMDiffOn I s) :
    ContMDiffOn I.tangent I'.tangent m (tangentMapWithin I I' f s)
      (π E (TangentSpace I) ⁻¹' s)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{m n : ℕ∞}
{f : H → H'}
{s : Set H}
(hf : ContMDiffOn I I' n f s)
(hmn : m + 1 ≤ n)
(hs : UniqueMDiffOn I s)

ContMDiffOn I.tangent I'.tangent m (tangentMapWithin I I' f s) (Bundle.TotalSpace.proj ⁻¹' s)


theorem of_comp_left (hgf : IsLocalHomeomorphOn (g ∘ f) s) (hg : IsLocalHomeomorphOn g (f '' s))
    (cont : ∀ x ∈ s, ContinuousAt f x) : IsLocalHomeomorphOn f s

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{g : Y → Z}
{f : X → Y}
{s : Set X}
(hgf : IsLocalHomeomorphOn (g ∘ f) s)
(hg : IsLocalHomeomorphOn g (f '' s))
(cont : ∀ x ∈ s, ContinuousAt f x)


/-- In the case of a triangle, altitudes are the same thing as Monge
planes. -/
theorem altitude_eq_mongePlane (t : Triangle ℝ P) {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃)
    (h₂₃ : i₂ ≠ i₃) : t.altitude i₁ = t.mongePlane i₂ i₃

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(t : Affine.Triangle ℝ P)
{i₁ i₂ i₃ : Fin 3}
(h₁₂ : i₁ ≠ i₂)
(h₁₃ : i₁ ≠ i₃)
(h₂₃ : i₂ ≠ i₃)

Affine.Simplex.altitude t i₁ = Affine.Simplex.mongePlane t i₂ i₃


/-- An auxiliary lemma for a more general `Function.Periodic.intervalIntegral_add_eq`. -/
theorem intervalIntegral_add_eq_of_pos (hf : Periodic f T) (hT : 0 < T) (t s : ℝ) :
    ∫ x in t..t + T, f x = ∫ x in s..s + T, f x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : ℝ → E}
{T : ℝ}
(hf : Function.Periodic f T)
(hT : 0 < T)
(t s : ℝ)

∫ (x : ℝ) in t..t + T, f x = ∫ (x : ℝ) in s..s + T, f x


/-- If `f a = 1` when `a ∉ s`, then the product of `f i` over `i ∈ insert a s` equals the product of
`f i` over `i ∈ s`. -/
@[to_additive
      "If `f a = 0` when `a ∉ s`, then the sum of `f i` over `i ∈ insert a s` equals the sum
      of `f i` over `i ∈ s`."]
theorem finprod_mem_insert_of_eq_one_if_not_mem (h : a ∉ s → f a = 1) :
    ∏ᶠ i ∈ insert a s, f i = ∏ᶠ i ∈ s, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{a : α}
{s : Set α}
(h : a ∉ s → f a = 0)

∑ᶠ (i : α) (_ : i ∈ insert a s), f i = ∑ᶠ (i : α) (_ : i ∈ s), f i


lemma sdiff_sdiff_sdiff_cancel_right (hcb : z ≤ y) : (x \ z) \ (y \ z) = x \ y

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]
(hcb : z ≤ y)


@[simp] -- Porting note: new, simpNF of `toFun_eq_coe`
theorem coe_toContinuousMap (f : α →CO β) : (f.toContinuousMap : α → β) = f

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
(f : α →CO β)


@[trans]
theorem Joined.trans {x y z : X} (hxy : Joined x y) (hyz : Joined y z) : Joined x z

{X : Type u_1}
[TopologicalSpace X]
{x y z : X}
(hxy : Joined x y)
(hyz : Joined y z)


theorem add_mem_Icc_iff_right : a + b ∈ Set.Icc c d ↔ b ∈ Set.Icc (c - a) (d - a)

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


theorem coe_sSup_of_directedOn {S : Set (Subring R)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) : (↑(sSup S) : Set R) = ⋃ s ∈ S, ↑s

(hS : DirectedOn (fun x x_1 => x ≤ x_1) S)


theorem is3Clique_iff :
    G.IsNClique 3 s ↔ ∃ a b c, G.Adj a b ∧ G.Adj a c ∧ G.Adj b c ∧ s = {a, b, c}

{α : Type u_1}
{G : SimpleGraph α}
{s : Finset α}
[DecidableEq α]


protected theorem flip (hs : IsAntichain r s) : IsAntichain (flip r) s

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
(hs : IsAntichain r s)


@[simp]
theorem Matrix.toLin'_mul [Fintype m] [DecidableEq m] (M : Matrix l m R) (N : Matrix m n R) :
    Matrix.toLin' (M * N) = (Matrix.toLin' M).comp (Matrix.toLin' N)

{R : Type u_1}
[CommSemiring R]
{l : Type u_3}
{m : Type u_4}
{n : Type u_5}
[DecidableEq n]
[Fintype n]
[Fintype m]
[DecidableEq m]
(M : Matrix l m R)
(N : Matrix m n R)

Matrix.toLin' (M * N) = Matrix.toLin' M ∘ₗ Matrix.toLin' N


/-- The category of `MonoOver α`, for `α : Type u`, is equivalent to the partial order `Set α`.
-/
@[simps]
noncomputable def Types.monoOverEquivalenceSet (α : Type u) : MonoOver α ≌ Set α

(Types.monoOverEquivalenceSet α).inverse.map b = CategoryTheory.MonoOver.homMk (fun w => ⟨↑w, ⋯⟩) ⋯


/-- `PreordToPartOrd` and `OrderDual` commute. -/
@[simps! inv_app_coe, simps! (config := .lemmasOnly) hom_app_coe]
def preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd :
    preordToPartOrd.{u} ⋙ PartOrd.dual ≅ Preord.dual ⋙ preordToPartOrd

(a : ↑((Preord.dual ⋙ preordToPartOrd).obj X))

(preordToPartOrdCompToDualIsoToDualCompPreordToPartOrd.inv.app X) a = (OrderIso.dualAntisymmetrization ↑X).symm a


theorem mem_nonunits {z : ℤ_[p]} : z ∈ nonunits ℤ_[p] ↔ ‖z‖ < 1

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


@[simp]
theorem map_symm (γ : Path x y) {f : X → Y} (h : Continuous f) :
    (γ.map h).symm = γ.symm.map h

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{x y : X}
(γ : Path x y)
{f : X → Y}
(h : Continuous f)


lemma essSurj_of_hasRightResolutions [Φ.HasRightResolutions] : (Φ.functor ⋙ L₂).EssSurj

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)


theorem lt_of_not_le {x y : Int} (h : ¬ (x ≤ y)) : y < x


/-- Compressing a finset doesn't change its size. -/
theorem card_compress (huv : u.card = v.card) (a : Finset α) : (compress u v a).card = a.card

{α : Type u_1}
[DecidableEq α]
{u v : Finset α}
(huv : u.card = v.card)
(a : Finset α)


theorem Filter.Eventually.intCast_atTop [StrictOrderedRing R] [Archimedean R] {p : R → Prop}
    (h : ∀ᶠ (x : R) in atTop, p x) : ∀ᶠ (n : ℤ) in atTop, p n

{R : Type u_2}
[StrictOrderedRing R]
[Archimedean R]
{p : R → Prop}
(h : ∀ᶠ (x : R) in Filter.atTop, p x)


theorem contMDiffWithinAt_iff_source_of_mem_maximalAtlas (he : e ∈ maximalAtlas I M)
    (hx : x ∈ e.source) :
    ContMDiffWithinAt I I' n f s x ↔
      ContMDiffWithinAt 𝓘(𝕜, E) I' n (f ∘ (e.extend I).symm) ((e.extend I).symm ⁻¹' s ∩ range I)
        (e.extend I x)

(he : e ∈ SmoothManifoldWithCorners.maximalAtlas I M)

ContMDiffWithinAt I I' n f s x ↔
  ContMDiffWithinAt 𝓘(𝕜, E) I' n (f ∘ ↑(e.extend I).symm) (↑(e.extend I).symm ⁻¹' s ∩ Set.range ↑I) (↑(e.extend I) x)


@[to_additive]
theorem compl_mulSupport {f : α → M} : (mulSupport f)ᶜ = { x | f x = 1 }

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


theorem union_subset {s t r : Set α} (sr : s ⊆ r) (tr : t ⊆ r) : s ∪ t ⊆ r

{α : Type u}
{s t r : Set α}
(sr : s ⊆ r)
(tr : t ⊆ r)


theorem cycleOf_formPerm (hl : Nodup l) (hn : 2 ≤ l.length) (x) :
    cycleOf l.attach.formPerm x = l.attach.formPerm

{α : Type u_1}
[DecidableEq α]
{l : List α}
(hl : l.Nodup)
(hn : 2 ≤ l.length)
(x : { x // x ∈ l })

l.attach.formPerm.cycleOf x = l.attach.formPerm


/-- Change a `Cone F.op` into a `Cocone F`. -/
@[simps]
def Cone.unop (c : Cone F.op) : Cocone F

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


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

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


theorem norm_precompR_le (L : E →L[𝕜] Fₗ →L[𝕜] Gₗ) : ‖precompR Eₗ L‖ ≤ ‖L‖

{𝕜 : Type u_1}
{E : Type u_4}
(Eₗ : Type u_5)
{Fₗ : Type u_7}
{Gₗ : Type u_9}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup Eₗ]
[SeminormedAddCommGroup Fₗ]
[SeminormedAddCommGroup Gₗ]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 Eₗ]
[NormedSpace 𝕜 Fₗ]
[NormedSpace 𝕜 Gₗ]
(L : E →L[𝕜] Fₗ →L[𝕜] Gₗ)

‖ContinuousLinearMap.precompR Eₗ L‖ ≤ ‖L‖


@[simp]
theorem coe_top : ((⊤ : Ideal P) : Set P) = univ

{P : Type u_1}
[LE P]
[IsDirected P fun x x_1 => x ≤ x_1]
[Nonempty P]


@[to_additive]
theorem mul_lt_of_lt_of_lt_one' [CovariantClass α α (· * ·) (· ≤ ·)] {a b c : α} (hbc : b < c)
    (ha : a < 1) :
    b * a < c

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


protected theorem dist_triangle (a b c : ℍ) : dist a c ≤ dist a b + dist b c


theorem contDiff_exp {n} : ContDiff ℝ n exp


theorem list_head? : Primrec (@List.head? α)


/-- Two equal natural transformations `L₁ ⟶ L₂` yield naturally isomorphic functors
    `Comma L₁ R ⥤ Comma L₂ R`. -/
@[simps!]
def mapLeftEq (l l' : L₁ ⟶ L₂) (h : l = l') : mapLeft R l ≅ mapLeft R l'

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(R : CategoryTheory.Functor B T)
{L₁ L₂ : CategoryTheory.Functor A T}
(l l' : L₁ ⟶ L₂)
(h : l = l')
(X : CategoryTheory.Comma L₂ R)

((CategoryTheory.Comma.mapLeftEq R l l' h).inv.app X).right = CategoryTheory.CategoryStruct.id X.right


theorem map_extChartAt_symm_nhdsWithin' {x y : M} (hy : y ∈ (extChartAt I x).source) :
    map (extChartAt I x).symm (𝓝[(extChartAt I x).symm ⁻¹' s ∩ range I] extChartAt I x y) =
      𝓝[s] y

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

Filter.map (↑(extChartAt I x).symm) (𝓝[↑(extChartAt I x).symm ⁻¹' s ∩ Set.range ↑I] ↑(extChartAt I x) y) = 𝓝[s] y


/-- Auxiliary definition used to fight a timeout when building
`AlgebraCat.instMonoidalCategory`. -/
@[simps!]
noncomputable abbrev tensorObj (X Y : AlgebraCat.{u} R) : AlgebraCat.{u} R

{R : Type u}
[CommRing R]
(X Y : AlgebraCat R)

↑(AlgebraCat.instMonoidalCategory.tensorObj X Y) = TensorProduct R ↑X ↑Y


theorem coe_addMonoidHom_injective : Injective (fun f : α →+* β => (f : α →+ β))

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β}, Function.Injective fun f => ↑f


theorem join_singleton (l : List α) : [l].join = l


theorem finite_of_condCount_ne_zero {s t : Set Ω} (h : condCount s t ≠ 0) : s.Finite

(h : (ProbabilityTheory.condCount s) t ≠ 0)


/-- We can convert a multiplicative character into a homomorphism of monoids with zero when
the source has a zero and another element. -/
@[coe, simps]
def toMonoidWithZeroHom {R : Type*} [CommMonoidWithZero R] [Nontrivial R] (χ : MulChar R R') :
    R →*₀ R'

{R' : Type u_2}
[CommMonoidWithZero R']
{R : Type u_3}
[CommMonoidWithZero R]
[Nontrivial R]
(χ : MulChar R R')

∀ (a : R), ↑χ a = (↑χ.toMonoidHom).toFun a


@[reassoc (attr := simp)]
theorem inclusionOfMooreComplexMap_comp_PInfty (X : SimplicialObject A) :
    inclusionOfMooreComplexMap X ≫ PInfty = inclusionOfMooreComplexMap X

{A : Type u_1}
[CategoryTheory.Category.{u_2, u_1} A]
[CategoryTheory.Abelian A]
(X : CategoryTheory.SimplicialObject A)

AlgebraicTopology.inclusionOfMooreComplexMap X ≫ AlgebraicTopology.DoldKan.PInfty =
  AlgebraicTopology.inclusionOfMooreComplexMap X


@[simp]
theorem some_bind' (a : α) (f : α → Option β) : (some a).bind f = f a

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


/-- The functor of adjoining a neutral element `one` to a semigroup.
 -/
@[to_additive (attr := simps) "The functor of adjoining a neutral element `zero` to a semigroup"]
def adjoinOne : Semigrp.{u} ⥤ MonCat.{u}

∀ {X Y : AddSemigrp} (f : AddHom ↑X ↑Y), AddMonCat.adjoinZero.map f = WithZero.map f


theorem image_eq_preimage (t : τ) (s : Set α) : ϕ t '' s = ϕ (-t) ⁻¹' s

{τ : Type u_1}
[AddCommGroup τ]
[TopologicalSpace τ]
[TopologicalAddGroup τ]
{α : Type u_2}
[TopologicalSpace α]
(ϕ : Flow τ α)
(t : τ)
(s : Set α)


/-- The generic case of the first simplicial identity -/
@[reassoc]
theorem δ_comp_δ {n} {i j : Fin (n + 2)} (H : i ≤ j) :
    X.δ j.succ ≫ X.δ i = X.δ (Fin.castSucc i) ≫ X.δ j

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(X : CategoryTheory.SimplicialObject C)
{n : ℕ}
{i j : Fin (n + 2)}
(H : i ≤ j)

X.δ j.succ ≫ X.δ i = X.δ i.castSucc ≫ X.δ j


@[simp] lemma sum'_indep_iff {I} :
    (Matroid.sum' M).Indep I ↔ ∀ i, (M i).Indep (Prod.mk i ⁻¹' I)

{α : Type u_1}
{ι : Type u_2}
{M : ι → Matroid α}
{I : Set (ι × α)}

(Matroid.sum' M).Indep I ↔ ∀ (i : ι), (M i).Indep (Prod.mk i ⁻¹' I)


theorem toL1_smul (f : α → β) (hf : Integrable f μ) (k : 𝕜) :
    toL1 (fun a => k • f a) (hf.smul k) = k • toL1 f hf

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{𝕜 : Type u_5}
[NormedRing 𝕜]
[Module 𝕜 β]
[BoundedSMul 𝕜 β]
(f : α → β)
(hf : MeasureTheory.Integrable f μ)
(k : 𝕜)

MeasureTheory.Integrable.toL1 (fun a => k • f a) ⋯ = k • MeasureTheory.Integrable.toL1 f hf


theorem tendsto_log_mul_rpow_nhds_zero {r : ℝ} (hr : 0 < r) :
    Tendsto (fun x => log x * x ^ r) (𝓝[>] 0) (𝓝 0)

Filter.Tendsto (fun x => Real.log x * x ^ r) (𝓝[>] 0) (𝓝 0)


@[to_additive]
theorem le_mul_inv_iff_le : 1 ≤ a * b⁻¹ ↔ b ≤ a

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


@[to_additive]
theorem image_pow_subset (n : ℕ) (hm : 0 < m) :
    (fun (y : A) => y ^ m) '' approxOrderOf A (n * m) δ ⊆ approxOrderOf A n (m * δ)

{A : Type u_1}
[SeminormedCommGroup A]
{m : ℕ}
(δ : ℝ)
(n : ℕ)
(hm : 0 < m)

(fun y => y ^ m) '' approxOrderOf A (n * m) δ ⊆ approxOrderOf A n (↑m * δ)


@[to_additive (attr := simp) zsmul_neg']
lemma inv_zpow' (a : α) (n : ℤ) : a⁻¹ ^ n = a ^ (-n)

{α : Type u_1}
[DivisionMonoid α]
(a : α)
(n : ℤ)


theorem dite_ite_distrib_left {a : p → α} {b : ¬p → α} {c : ¬p → α} :
    (dite p a fun hp ↦ ite q (b hp) (c hp)) = ite q (dite p a b) (dite p a c)

{α : Sort u_1}
{p q : Prop}
[Decidable p]
[Decidable q]
{a : p → α}
{b c : ¬p → α}

(dite p a fun hp => if q then b hp else c hp) = if q then dite p a b else dite p a c


@[to_additive (attr := measurability)]
theorem Multiset.measurable_prod' (l : Multiset (α → M)) (hl : ∀ f ∈ l, Measurable f) :
    Measurable l.prod

{M : Type u_2}
{α : Type u_4}
[CommMonoid M]
[MeasurableSpace M]
[MeasurableMul₂ M]
{m : MeasurableSpace α}
(l : Multiset (α → M))
(hl : ∀ f ∈ l, Measurable f)


theorem Map.arrows_iff (hφ : Function.Injective φ.obj) (S : Subgroupoid C) {c d : D} (f : c ⟶ d) :
    Map.Arrows φ hφ S c d f ↔
      ∃ (a b : C) (g : a ⟶ b) (ha : φ.obj a = c) (hb : φ.obj b = d) (_hg : g ∈ S.arrows a b),
        f = eqToHom ha.symm ≫ φ.map g ≫ eqToHom hb

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

CategoryTheory.Subgroupoid.Map.Arrows φ hφ S c d f ↔
  ∃ a b g,
    ∃ (ha : φ.obj a = c) (hb : φ.obj b = d) (_ : g ∈ S.arrows a b),
      f =
        CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
          (CategoryTheory.CategoryStruct.comp (φ.map g) (CategoryTheory.eqToHom hb))


lemma eq_bot_of_set_smul_eq_of_subset_jacobson_annihilator {s : Set R}
    {N : Submodule R M} (hN : FG N) (hsN : N = s • N)
    (hsJac : s ⊆ N.annihilator.jacobson) : N = ⊥

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{s : Set R}
{N : Submodule R M}
(hN : N.FG)
(hsN : N = s • N)
(hsJac : s ⊆ ↑N.annihilator.jacobson)


@[simp]
theorem natCast_natAbs_norm {α : Type*} [Ring α] (x : ℤ[i]) : (x.norm.natAbs : α) = x.norm

↑(Zsqrtd.norm x).natAbs = ↑(Zsqrtd.norm x)


@[to_additive (attr := simp)]
protected theorem SemiconjBy.of_map [MulHomClass F M N] (f : F) (hf : Function.Injective f)
    (h : SemiconjBy (f a) (f x) (f y)) : SemiconjBy a x y

{F : Type u_1}
{M : Type u_2}
{N : Type u_3}
[Add M]
[Add N]
{a x y : M}
[FunLike F M N]
[AddHomClass F M N]
(f : F)
(hf : Function.Injective ⇑f)
(h : AddSemiconjBy (f a) (f x) (f y))


@[simp]
theorem coe_add (f g : Poly α) : ⇑(f + g) = f + g


theorem integral_congr_ae (h : ∀ᵐ x ∂μ, x ∈ Ι a b → f x = g x) :
    ∫ x in a..b, f x ∂μ = ∫ x in a..b, g x ∂μ

(h : ∀ᵐ (x : ℝ) ∂μ, x ∈ Ι a b → f x = g x)

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


@[simp]
theorem coe_toRealLinearIsometryEquivOfMapZero (f : E ≃ᵢ F) (h0 : f 0 = 0) :
    ⇑(f.toRealLinearIsometryEquivOfMapZero h0) = f

{E : Type u_1}
{F : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : E ≃ᵢ F)
(h0 : f 0 = 0)

⇑(f.toRealLinearIsometryEquivOfMapZero h0) = ⇑f


theorem aroots_mul [CommRing S] [IsDomain S] [Algebra T S]
    [NoZeroSMulDivisors T S] {p q : T[X]} (hpq : p * q ≠ 0) :
    (p * q).aroots S = p.aroots S + q.aroots S

{S : Type v}
{T : Type w}
[CommRing T]
[CommRing S]
[IsDomain S]
[Algebra T S]
[NoZeroSMulDivisors T S]
{p q : Polynomial T}
(hpq : p * q ≠ 0)


theorem LinearMap.mul_toMatrix₂'_mul (B : (n → R) →ₗ[R] (m → R) →ₗ[R] R) (M : Matrix n' n R)
    (N : Matrix m m' R) :
    M * toMatrix₂' R B * N = toMatrix₂' R (B.compl₁₂ (toLin' Mᵀ) (toLin' N))

{n : Type u_12}
{m : Type u_13}
{n' : Type u_14}
{m' : Type u_15}
{R : Type u_17}
[CommSemiring R]
[Fintype n]
[Fintype m]
[DecidableEq n]
[DecidableEq m]
[Fintype n']
[Fintype m']
[DecidableEq n']
[DecidableEq m']
(B : (n → R) →ₗ[R] (m → R) →ₗ[R] R)
(M : Matrix n' n R)
(N : Matrix m m' R)

M * (LinearMap.toMatrix₂' R) B * N = (LinearMap.toMatrix₂' R) (B.compl₁₂ (Matrix.toLin' Mᵀ) (Matrix.toLin' N))


@[simp]
theorem sumAssoc_apply_inl_inl : sumAssoc α β γ (inl (inl a)) = inl a

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[LE α]
[LE β]
[LE γ]
(a : α)

(OrderIso.sumAssoc α β γ) (Sum.inl (Sum.inl a)) = Sum.inl a


@[to_additive]
theorem multipliable_empty [IsEmpty β] : Multipliable f

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
[IsEmpty β]


@[to_additive]
theorem Step.diamond :
    ∀ {L₁ L₂ L₃ L₄ : List (α × Bool)},
      Red.Step L₁ L₃ → Red.Step L₂ L₄ → L₁ = L₂ → L₃ = L₄ ∨ ∃ L₅, Red.Step L₃ L₅ ∧ Red.Step L₄ L₅

{α : Type u}
{L₁ L₂ L₃ L₄ : List (α × Bool)}

FreeAddGroup.Red.Step L₁ L₃ →
  FreeAddGroup.Red.Step L₂ L₄ → L₁ = L₂ → L₃ = L₄ ∨ ∃ L₅, FreeAddGroup.Red.Step L₃ L₅ ∧ FreeAddGroup.Red.Step L₄ L₅


theorem IsBigO.of_pow {f : α → 𝕜} {g : α → R} {n : ℕ} (hn : n ≠ 0) (h : (f ^ n) =O[l] (g ^ n)) :
    f =O[l] g

{α : Type u_1}
{R : Type u_13}
{𝕜 : Type u_15}
[SeminormedRing R]
[NormedDivisionRing 𝕜]
{l : Filter α}
{f : α → 𝕜}
{g : α → R}
{n : ℕ}
(hn : n ≠ 0)
(h : (f ^ n) =O[l] (g ^ n))


protected lemma Continuous.partialSups_apply (hf : ∀ k ≤ n, Continuous (f k)) :
    Continuous (fun a ↦ partialSups (f · a) n)

{L : Type u_1}
[SemilatticeSup L]
[TopologicalSpace L]
[ContinuousSup L]
{X : Type u_2}
[TopologicalSpace X]
{f : ℕ → X → L}
{n : ℕ}
(hf : ∀ k ≤ n, Continuous (f k))

Continuous fun a => (partialSups fun x => f x a) n


@[simp]
theorem mapAccumr_nil : mapAccumr f Vector.nil s = (s, Vector.nil)

∀ {α : Type u_1} {α_1 : Type} {β : Type u_2} {f : α → α_1 → α_1 × β} {s : α_1},
  Mathlib.Vector.mapAccumr f Mathlib.Vector.nil s = (s, Mathlib.Vector.nil)


theorem IsClosed.isClosedMap_subtype_val {s : Set X} (hs : IsClosed s) :
    IsClosedMap ((↑) : s → X)

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


theorem totallyBounded_iff {s : Set α} :
    TotallyBounded s ↔ ∀ ε > 0, ∃ t : Set α, t.Finite ∧ s ⊆ ⋃ y ∈ t, ball y ε

{α : Type u}
[PseudoEMetricSpace α]
{s : Set α}

TotallyBounded s ↔ ∀ ε > 0, ∃ t, t.Finite ∧ s ⊆ ⋃ y ∈ t, EMetric.ball y ε


theorem LiftRel.swap (R : α → β → Prop) (ca : Computation α) (cb : Computation β) :
    LiftRel (swap R) cb ca ↔ LiftRel R ca cb

{α : Type u}
{β : Type v}
(R : α → β → Prop)
(ca : Computation α)
(cb : Computation β)

Computation.LiftRel (Function.swap R) cb ca ↔ Computation.LiftRel R ca cb


theorem image_iso [LE α] [LE β] (hs : IsAntichain (· ≤ ·) s) (φ : α ≃o β) :
    IsAntichain (· ≤ ·) (φ '' s)

(hs : IsAntichain (fun x x_1 => x ≤ x_1) s)

(φ : α ≃o β)

IsAntichain (fun x x_1 => x ≤ x_1) (⇑φ '' s)


@[simp]
theorem span_singleton_eq_bot {x} : span ({x} : Set α) = ⊥ ↔ x = 0


/-- Forget the cocone structure and obtain just the cocone point. -/
@[simps]
def forget : Cocone F ⥤ C

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

∀ {X Y : CategoryTheory.Limits.Cocone F} (f : X ⟶ Y), (CategoryTheory.Limits.Cocones.forget F).map f = f.hom


lemma isIso_leftHomologyπ (hf : S.f = 0) : IsIso S.leftHomologyπ


@[simp]
theorem toMatrix_mk (i j : n) (hij : i ≠ j) (c : R) :
    TransvectionStruct.toMatrix ⟨i, j, hij, c⟩ = transvection i j c

{n : Type u_1}
{R : Type u₂}
[DecidableEq n]
[CommRing R]
(i j : n)
(hij : i ≠ j)
(c : R)

{ i := i, j := j, hij := hij, c := c }.toMatrix = Matrix.transvection i j c


@[simp]
theorem annIdealGenerator_eq_zero_iff {a : A} : annIdealGenerator 𝕜 a = 0 ↔ annIdeal 𝕜 a = ⊥

{𝕜 : Type u_1}
{A : Type u_2}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
{a : A}

Polynomial.annIdealGenerator 𝕜 a = 0 ↔ Polynomial.annIdeal 𝕜 a = ⊥


theorem vecAlt1_vecAppend (v : Fin (n + 1) → α) :
    vecAlt1 rfl (vecAppend rfl v v) = v ∘ (fun n ↦ (n + n) + 1)

{α : Type u}
{n : ℕ}
(v : Fin (n + 1) → α)

Matrix.vecAlt1 ⋯ (Matrix.vecAppend ⋯ v v) = v ∘ fun n_1 => n_1 + n_1 + 1


lemma HurwitzZeta.completedHurwitzZetaEven_zero (s : ℂ) :
    completedHurwitzZetaEven 0 s = completedRiemannZeta s

HurwitzZeta.completedHurwitzZetaEven 0 s = completedRiemannZeta s


/-- A language is relational when it has no function symbols. -/
class IsRelational : Prop where
  /-- There are no function symbols in the language. -/
  empty_functions : ∀ n, IsEmpty (L.Functions n)

{L : FirstOrder.Language}
[self : L.IsRelational]
(n : ℕ)


@[simp]
theorem restrict_add {_m0 : MeasurableSpace α} (μ ν : Measure α) (s : Set α) :
    (μ + ν).restrict s = μ.restrict s + ν.restrict s

{α : Type u_2}
{_m0 : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)
(s : Set α)


@[to_additive (attr := simp)]
theorem lt_mul_inv_iff_mul_lt : c < a * b⁻¹ ↔ c * b < a

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


/-- From a natural transformation `α : F → G` we get a functor from
coalgebras of `F` to coalgebras of `G`.
-/
@[simps]
def functorOfNatTrans {F G : C ⥤ C} (α : F ⟶ G) : Coalgebra F ⥤ Coalgebra G

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : CategoryTheory.Functor C C}
(α : F ⟶ G)

∀ {X Y : CategoryTheory.Endofunctor.Coalgebra F} (f : X ⟶ Y),
  ((CategoryTheory.Endofunctor.Coalgebra.functorOfNatTrans α).map f).f = f.f


theorem foldlm_toList {f : α → β → m α} {x : α} {xs : t β} :
    foldlm f x xs = List.foldlM f x (toList xs)

{α β : Type u}
{t : Type u → Type u}
[Traversable t]
[LawfulTraversable t]
{m : Type u → Type u}
[Monad m]
[LawfulMonad m]
{f : α → β → m α}
{x : α}
{xs : t β}

Traversable.foldlm f x xs = List.foldlM f x (Traversable.toList xs)


@[to_additive]
theorem measure_pos_iff_nonempty_of_isMulLeftInvariant [Regular μ] (h3μ : μ ≠ 0) {s : Set G}
    (hs : IsOpen s) : 0 < μ s ↔ s.Nonempty

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
{μ : MeasureTheory.Measure G}
[AddGroup G]
[TopologicalAddGroup G]
[μ.IsAddLeftInvariant]
[μ.Regular]
(h3μ : μ ≠ 0)
{s : Set G}
(hs : IsOpen s)


lemma cfc_const_add (r : R) (f : R → R) (a : A)
    (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac) (ha : p a := by cfc_tac) :
    cfc (fun x => r + f x) a = algebraMap R A r + cfc f a

cfc (fun x => r + f x) a = (algebraMap R A) r + cfc f a


theorem _root_.Set.biUnion_finsetSigma (s : Finset ι) (t : ∀ i, Finset (α i))
    (f : Sigma α → Set β) : ⋃ ij ∈ s.sigma t, f ij = ⋃ i ∈ s, ⋃ j ∈ t i, f ⟨i, j⟩

{ι : Type u_1}
{α : ι → Type u_2}
{β : Type u_3}
(s : Finset ι)
(t : (i : ι) → Finset (α i))
(f : Sigma α → Set β)


@[simp]
theorem neLocus_zero_right : f.neLocus 0 = f.support

{α : Type u_1}
{N : α → Type u_2}
[DecidableEq α]
[(a : α) → DecidableEq (N a)]
[(a : α) → Zero (N a)]
(f : Π₀ (a : α), N a)


theorem add_def (α : Type*) (t₁ t₂ : Language.ring.Term α) :
    t₁ + t₂ = addFunc.apply₂ t₁ t₂

(t₁ t₂ : FirstOrder.Language.ring.Term α)

t₁ + t₂ = FirstOrder.Ring.addFunc.apply₂ t₁ t₂


@[simp]
theorem tendsto_Ioi_atBot {f : β → Ioi a} :
    Tendsto f l atBot ↔ Tendsto (fun x => (f x : α)) l (𝓝[>] a)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
{a : α}
{l : Filter β}
{f : β → ↑(Set.Ioi a)}

Filter.Tendsto f l Filter.atBot ↔ Filter.Tendsto (fun x => ↑(f x)) l (𝓝[>] a)


/-- Let `X` be a topological space, `𝔖` a family of compact subsets of `X`,
`α` a uniform space, `F : ι → (X → α)` a family equicontinuous on each `K ∈ 𝔖`, and `ℱ` a filter
on `ι`. Then, `F` tends to `f : X → α` along `ℱ` *uniformly on each `K ∈ 𝔖`* iff it tends to `f`
*pointwise on `⋃₀ 𝔖`* along `ℱ`. -/
theorem EquicontinuousOn.tendsto_uniformOnFun_iff_pi'
    {𝔖 : Set (Set X)} (𝔖_compact : ∀ K ∈ 𝔖, IsCompact K)
    (F_eqcont : ∀ K ∈ 𝔖, EquicontinuousOn F K) (ℱ : Filter ι) (f : X → α) :
    Tendsto (UniformOnFun.ofFun 𝔖 ∘ F) ℱ (𝓝 <| UniformOnFun.ofFun 𝔖 f) ↔
    Tendsto ((⋃₀ 𝔖).restrict ∘ F) ℱ (𝓝 <| (⋃₀ 𝔖).restrict f)

Filter.Tendsto (⇑(UniformOnFun.ofFun 𝔖) ∘ F) ℱ (𝓝 ((UniformOnFun.ofFun 𝔖) f)) ↔
  Filter.Tendsto ((⋃₀ 𝔖).restrict ∘ F) ℱ (𝓝 ((⋃₀ 𝔖).restrict f))


theorem lt_top (f : r ≺i s) (a : α) : s (f a) f.top

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ≺i s)
(a : α)


@[simp]
theorem insepDegree_bot' : insepDegree F (⊥ : IntermediateField E K) = insepDegree F E

{F : Type u}
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(K : Type v)
[Field K]
[Algebra F K]
[Algebra E K]
[IsScalarTower F E K]

Field.insepDegree F ↥⊥ = Field.insepDegree F E


/-- The fifth cosimplicial identity -/
@[reassoc]
theorem σ_comp_σ {n} {i j : Fin (n + 1)} (H : i ≤ j) :
    X.σ (Fin.castSucc i) ≫ X.σ j = X.σ j.succ ≫ X.σ i

(X : CategoryTheory.CosimplicialObject C)

X.σ i.castSucc ≫ X.σ j = X.σ j.succ ≫ X.σ i


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


theorem torusIntegral_neg (f : ℂⁿ → E) (c : ℂⁿ) (R : ℝⁿ) :
    (∯ x in T(c, R), -f x) = -∯ x in T(c, R), f x

{n : ℕ}
{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(f : (Fin n → ℂ) → E)
(c : Fin n → ℂ)
(R : Fin n → ℝ)

(∯ (x : Fin n → ℂ) in T(c, R), -f x) = -∯ (x : Fin n → ℂ) in T(c, R), f x


@[to_additive]
theorem dist_prod_prod_le_of_le (s : Finset ι) {f a : ι → E} {d : ι → ℝ}
    (h : ∀ b ∈ s, dist (f b) (a b) ≤ d b) :
    dist (∏ b ∈ s, f b) (∏ b ∈ s, a b) ≤ ∑ b ∈ s, d b

{ι : Type u_4}
{E : Type u_6}
[SeminormedAddCommGroup E]
(s : Finset ι)
{f a : ι → E}
{d : ι → ℝ}
(h : ∀ b ∈ s, dist (f b) (a b) ≤ d b)

dist (∑ b ∈ s, f b) (∑ b ∈ s, a b) ≤ ∑ b ∈ s, d b


@[to_additive] theorem Units.embedding_val [Group G] [TopologicalSpace G] [ContinuousInv G] :
    Embedding (val : Gˣ → G)

{G : Type w}
[AddGroup G]
[TopologicalSpace G]
[ContinuousNeg G]


/-- `UniqueMul` is preserved by inverse images under injective, multiplicative maps. -/
@[to_additive "`UniqueAdd` is preserved by inverse images under injective, additive maps."]
theorem mulHom_preimage (f : G →ₙ* H) (hf : Function.Injective f) (a0 b0 : G) {A B : Finset H}
    (u : UniqueMul A B (f a0) (f b0)) :
    UniqueMul (A.preimage f hf.injOn) (B.preimage f hf.injOn) a0 b0

{G : Type u_1}
{H : Type u_2}
[Add G]
[Add H]
(f : AddHom G H)
(hf : Function.Injective ⇑f)
(a0 b0 : G)
{A B : Finset H}
(u : UniqueAdd A B (f a0) (f b0))

UniqueAdd (A.preimage ⇑f ⋯) (B.preimage ⇑f ⋯) a0 b0


theorem mk_arrow (α : Type u) (β : Type v) : #(α → β) = (lift.{u} #β^lift.{v} #α)

Cardinal.mk (α → β) = Cardinal.lift.{u, v} (Cardinal.mk β) ^ Cardinal.lift.{v, u} (Cardinal.mk α)


theorem eq_pure {q : Semiquot α} (p) : q = pure (get q p)

{α : Type u_1}
{q : Semiquot α}
(p : q.IsPure)


@[simp]
lemma add_of_X_ne {x₁ x₂ y₁ y₂ : F} {h₁ : W.Nonsingular x₁ y₁} {h₂ : W.Nonsingular x₂ y₂}
    (hx : x₁ ≠ x₂) : some h₁ + some h₂ = some (nonsingular_add h₁ h₂ fun h => (hx h).elim)

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x₁ x₂ y₁ y₂ : F}
{h₁ : W.Nonsingular x₁ y₁}
{h₂ : W.Nonsingular x₂ y₂}
(hx : x₁ ≠ x₂)

WeierstrassCurve.Affine.Point.some h₁ + WeierstrassCurve.Affine.Point.some h₂ = WeierstrassCurve.Affine.Point.some ⋯


theorem inr_apply (x : M₂) : inr R M M₂ x = (0, x)

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(x : M₂)


theorem not_linearIndependent_iff :
    ¬LinearIndependent R v ↔
      ∃ s : Finset ι, ∃ g : ι → R, ∑ i ∈ s, g i • v i = 0 ∧ ∃ i ∈ s, g i ≠ 0

{ι : Type u'}
{R : Type u_2}
{M : Type u_4}
{v : ι → M}
[Semiring R]
[AddCommMonoid M]
[Module R M]

¬LinearIndependent R v ↔ ∃ s g, ∑ i ∈ s, g i • v i = 0 ∧ ∃ i ∈ s, g i ≠ 0


theorem lt_iff_ne (h : a ≤ b) : a < b ↔ a ≠ b

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


@[simp]
theorem birthday_one : birthday 1 = 1


theorem not_mem_support_iff {p : MvPolynomial σ R} {m : σ →₀ ℕ} : m ∉ p.support ↔ p.coeff m = 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{p : MvPolynomial σ R}
{m : σ →₀ ℕ}

m ∉ p.support ↔ MvPolynomial.coeff m p = 0


@[simp]
theorem measure_Ico (a b : ℝ) : f.measure (Ico a b) = ofReal (leftLim f b - leftLim f a)

f.measure (Set.Ico a b) = ENNReal.ofReal (Function.leftLim (↑f) b - Function.leftLim (↑f) a)


/-- If there is a fundamental domain `s`, then `HasFundamentalDomain` holds. -/
@[to_additive]
lemma IsFundamentalDomain.hasFundamentalDomain (ν : Measure α) {s : Set α}
    (fund_dom_s : IsFundamentalDomain G s ν) :
    HasFundamentalDomain G α ν

(fund_dom_s : MeasureTheory.IsAddFundamentalDomain G s ν)

MeasureTheory.HasAddFundamentalDomain G α ν


theorem Membership.mem.lower {i : Nat} {r : Std.Range} (h : i ∈ r) : r.start ≤ i


theorem exists_algebraMap_eq_of_isIntegral_pow {x : A} {n : ℕ} (hn : 0 < n)
    (hx : IsIntegral R <| x ^ n) : ∃ y : R, algebraMap R A y = x

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
[iic : IsIntegrallyClosedIn R A]
{x : A}
{n : ℕ}
(hn : 0 < n)
(hx : IsIntegral R (x ^ n))


/-- The zero morphism has a `MonoFactorisation` through the zero object.
-/
@[simps]
def monoFactorisationZero (X Y : C) : MonoFactorisation (0 : X ⟶ Y)

(CategoryTheory.Limits.monoFactorisationZero X Y).m = 0


@[simp]
theorem cons_val (a : α) : ∀ v : Vector α n, (a ::ᵥ v).val = a :: v.val

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


theorem bind_id_eq_join {x : Option (Option α)} : x.bind id = x.join


/-- Let `f` be a function continuous on a convex (or, equivalently, connected) subset `D`
of the real line. If `f` is differentiable on the interior of `D` and `f'` is nonpositive, then
`f` is an antitone function on `D`. -/
theorem antitoneOn_of_deriv_nonpos {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ}
    (hf : ContinuousOn f D) (hf' : DifferentiableOn ℝ f (interior D))
    (hf'_nonpos : ∀ x ∈ interior D, deriv f x ≤ 0) : AntitoneOn f D


theorem restrict_apply (κ : Kernel α β) (hs : MeasurableSet s) (a : α) :
    κ.restrict hs a = (κ a).restrict s

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{s : Set β}
(κ : ProbabilityTheory.Kernel α β)
(hs : MeasurableSet s)
(a : α)


/-- Given two maps `r : I₁ × I₂ × I₃ → J` and `π : I₁ × I₃ → J`, this structure is the
input in the formulation of the triangle equality `mapBifunctor_triangle` which
relates the left and right unitor and the associator for `GradedObject.mapBifunctor`. -/
structure TriangleIndexData (r : I₁ × I₂ × I₃ → J) (π : I₁ × I₃ → J) where
  /-- a map `I₁ × I₂ → I₁` -/
  p₁₂ : I₁ × I₂ → I₁
  hp₁₂ (i : I₁ × I₂ × I₃) : π ⟨p₁₂ ⟨i.1, i.2.1⟩, i.2.2⟩ = r i
  /-- a map `I₂ × I₃ → I₃` -/
  p₂₃ : I₂ × I₃ → I₃
  hp₂₃ (i : I₁ × I₂ × I₃) : π ⟨i.1, p₂₃ i.2⟩ = r i
  h₁ (i₁ : I₁) : p₁₂ (i₁, 0) = i₁
  h₃ (i₃ : I₃) : p₂₃ (0, i₃) = i₃

(self : CategoryTheory.GradedObject.TriangleIndexData r π)


@[simp]
theorem neighborSet_top (v : V) : (⊤ : G.Subgraph).neighborSet v = G.neighborSet v

{V : Type u}
{G : SimpleGraph V}
(v : V)


theorem pNilradical_one {R : Type*} [CommSemiring R] :
    pNilradical R 1 = ⊥


theorem supported_comap_lmapDomain (f : α → α') (s : Set α') :
    supported M R (f ⁻¹' s) ≤ (supported M R s).comap (lmapDomain M R f)

{α : Type u_1}
(M : Type u_2)
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α' : Type u_7}
(f : α → α')
(s : Set α')

Finsupp.supported M R (f ⁻¹' s) ≤ Submodule.comap (Finsupp.lmapDomain M R f) (Finsupp.supported M R s)


theorem EMetric.isClosed_ball {a : α} {r : ℝ≥0∞} : IsClosed (closedBall a r)

{α : Type u_1}
[PseudoEMetricSpace α]
{a : α}
{r : ℝ≥0∞}


/-- An equivalence of first-order structures is an equivalence that commutes with the
  interpretations of functions and relations. -/
structure Equiv extends M ≃ N where
  map_fun' : ∀ {n} (f : L.Functions n) (x), toFun (funMap f x) = funMap f (toFun ∘ x) := by
    -- Porting note: see porting note on `Hom.map_fun'`
    intros; trivial
  map_rel' : ∀ {n} (r : L.Relations n) (x), RelMap r (toFun ∘ x) ↔ RelMap r x := by
    -- Porting note: see porting note on `Hom.map_fun'`
    intros; trivial

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
(self : L.Equiv M N)
{n : ℕ}
(f : L.Functions n)
(x : Fin n → M)

self.toFun (FirstOrder.Language.Structure.funMap f x) = FirstOrder.Language.Structure.funMap f (self.toFun ∘ x)


/-- The complement of a strongly regular graph is strongly regular. -/
theorem IsSRGWith.compl (h : G.IsSRGWith n k ℓ μ) :
    Gᶜ.IsSRGWith n (n - k - 1) (n - (2 * k - μ) - 2) (n - (2 * k - ℓ))

{V : Type u}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{n k ℓ μ : ℕ}
(h : G.IsSRGWith n k ℓ μ)


/-- The **first isomorphism theorem** for algebras. -/
@[simps!]
noncomputable def quotientKerAlgEquivOfSurjective {f : A →ₐ[R₁] B} (hf : Function.Surjective f) :
    (A ⧸ (RingHom.ker f)) ≃ₐ[R₁] B

{R₁ : Type u_1}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R₁]
[CommRing A]
[Algebra R₁ A]
[Semiring B]
[Algebra R₁ B]
{f : A →ₐ[R₁] B}
(hf : Function.Surjective ⇑f)

∀ (a : B),
  (Ideal.quotientKerAlgEquivOfSurjective hf).symm a = (Ideal.Quotient.mk (RingHom.ker ↑f)) (Classical.choose ⋯ a)


/-- A class for unbundled homs used to define a category. `hom` must
take two types `α`, `β` and instances of the corresponding structures,
and return a predicate on `α → β`. -/
class UnbundledHom {c : Type u → Type u} (hom : ∀ ⦃α β⦄, c α → c β → (α → β) → Prop) : Prop where
  hom_id : ∀ {α} (ia : c α), hom ia ia id
  hom_comp : ∀ {α β γ} {Iα : c α} {Iβ : c β} {Iγ : c γ} {g : β → γ} {f : α → β} (_ : hom Iβ Iγ g)
      (_ : hom Iα Iβ f), hom Iα Iγ (g ∘ f)

{hom : ⦃α β : Type u⦄ → c α → c β → (α → β) → Prop}

[self : CategoryTheory.UnbundledHom hom]

hom Iβ Iγ g → hom Iα Iβ f → hom Iα Iγ (g ∘ f)


/-- The star algebra equivalence obtained by restricting `Unitization.inrNonUnitalStarAlgHom`
to its range. -/
@[simps!]
def inrRangeEquiv (R A : Type*) [CommSemiring R] [StarAddMonoid R] [NonUnitalSemiring A]
    [Star A] [Module R A] [IsScalarTower R A A] [SMulCommClass R A A] :
    A ≃⋆ₐ[R] NonUnitalStarAlgHom.range (inrNonUnitalStarAlgHom R A)

(R : Type u_1)
(A : Type u_2)
[CommSemiring R]
[StarAddMonoid R]
[NonUnitalSemiring A]
[Star A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]

∀ (a : ↥(NonUnitalStarAlgHom.range (Unitization.inrNonUnitalStarAlgHom R A))),
  (Unitization.inrRangeEquiv R A).symm a = (↑a).snd


theorem isBasis_basic_opens : TopologicalSpace.Opens.IsBasis (Set.range (@basicOpen R _))


@[to_additive (attr := simp)]
theorem MulHom.comp_id [Mul M] [Mul N] (f : M →ₙ* N) : f.comp (MulHom.id M) = f

{M : Type u_4}
{N : Type u_5}
[Mul M]
[Mul N]
(f : M →ₙ* N)


/-- `mulShift ψ 0` is the trivial character. -/
@[simp]
theorem mulShift_zero (ψ : AddChar R M) : mulShift ψ 0 = 1

{R : Type u_1}
{M : Type u_2}
[Ring R]
[CommMonoid M]
(ψ : AddChar R M)


@[simp]
lemma descUniq_hom_app (q : (Σi, C i) ⥤ D) (h : ∀ i, incl i ⋙ q ≅ F i) (i : I) (X : C i) :
    (descUniq F q h).hom.app ⟨i, X⟩ = (h i).hom.app X

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

(F : (i : I) → CategoryTheory.Functor (C i) D)

(q : CategoryTheory.Functor ((i : I) × C i) D)

(h : (i : I) → (CategoryTheory.Sigma.incl i).comp q ≅ F i)

(CategoryTheory.Sigma.descUniq F q h).hom.app ⟨i, X⟩ = (h i).hom.app X


theorem StableUnderBaseChange.respectsIso {P : MorphismProperty C} (hP : StableUnderBaseChange P) :
    RespectsIso P

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


@[simp]
theorem closedBall_zero' (x : E) (hr : 0 < r) : closedBall (0 : Seminorm 𝕜 E) x r = Set.univ

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
{r : ℝ}
(x : E)
(hr : 0 < r)


/-- `VectorMeasure.map` as an additive monoid homomorphism. -/
@[simps]
def mapGm (f : α → β) : VectorMeasure α M →+ VectorMeasure β M

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
(f : α → β)
(v : MeasureTheory.VectorMeasure α M)

(MeasureTheory.VectorMeasure.mapGm f) v = v.map f


/-- Characterization of minimizers for the projection on a convex set in a real inner product
space. -/
theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u : F} {v : F}
    (hv : v ∈ K) : (‖u - v‖ = ⨅ w : K, ‖u - w‖) ↔ ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{K : Set F}
(h : Convex ℝ K)
{u v : F}
(hv : v ∈ K)

‖u - v‖ = ⨅ w, ‖u - ↑w‖ ↔ ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0


theorem cramer_transpose_row_self (i : n) : Aᵀ.cramer (A i) = Pi.single i A.det

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A : Matrix n n α)
(i : n)

A.transpose.cramer (A i) = Pi.single i A.det


/-- Countable unions of σ-compact sets are σ-compact. -/
lemma isSigmaCompact_sUnion (S : Set (Set X)) (hc : Set.Countable S)
    (hcomp : ∀ s : S, IsSigmaCompact s (X := X)) : IsSigmaCompact (⋃₀ S)

{X : Type u_1}
[TopologicalSpace X]
(S : Set (Set X))
(hc : S.Countable)
(hcomp : ∀ (s : ↑S), IsSigmaCompact ↑s)


theorem IsCoprime.of_isCoprime_of_dvd_left (h : IsCoprime y z) (hdvd : x ∣ y) : IsCoprime x z

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


theorem coe_pos [Preorder β] [Zero β] {f : α → β} : 0 < (f : β*) ↔ ∀* x, 0 < f x

{α : Type u}
{β : Type v}
{φ : Ultrafilter α}
[Preorder β]
[Zero β]
{f : α → β}


/-- Constructs an isomorphism of Heyting algebras from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : HeytAlg.{u}} (e : α ≃o β) : α ≅ β


/-- See `List.countP_bind` for the corresponding statement using `List.sum`. -/
lemma countP_bind' (p : β → Bool) (l : List α) (f : α → List β) :
    countP p (l.bind f) = Nat.sum (map (countP p ∘ f) l)

{α : Type u_1}
{β : Type u_2}
(p : β → Bool)
(l : List α)
(f : α → List β)

List.countP p (l.bind f) = Nat.sum (List.map (List.countP p ∘ f) l)


lemma support_mono (hfg : f ≤ g) : f.support ⊆ g.support

{ι : Type u_1}
{α : Type u_2}
[CanonicallyOrderedAddCommMonoid α]
{f g : ι →₀ α}
(hfg : f ≤ g)


@[simp]
theorem Ioi_inter_Ioi : Ioi a ∩ Ioi b = Ioi (a ⊔ b)

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


/-- The definitional equality between `(vecCons α p)`-ary heterogeneous functions into `τ`
  and function from `α` to `p`-ary heterogeneous functions into `τ`. -/
@[simps!]
def fromTypes_cons_equiv {n} (α : Type u) (p : Fin n → Type u) (τ : Type u) :
    FromTypes (vecCons α p) τ ≃ (α → FromTypes p τ)

(a : Function.FromTypes (Matrix.vecCons α p) τ)

(Function.fromTypes_cons_equiv α p τ) a = a


lemma coeff_minpolyDiv (i) : coeff (minpolyDiv R x) i =
    algebraMap R S (coeff (minpoly R x) (i + 1)) + coeff (minpolyDiv R x) (i + 1) * x

(R : Type u_2)
{S : Type u_1}
[CommRing R]
[CommRing S]
[Algebra R S]
(x : S)
(i : ℕ)

(minpolyDiv R x).coeff i = (algebraMap R S) ((minpoly R x).coeff (i + 1)) + (minpolyDiv R x).coeff (i + 1) * x


theorem StrictConcaveOn.add (hf : StrictConcaveOn 𝕜 s f) (hg : StrictConcaveOn 𝕜 s g) :
    StrictConcaveOn 𝕜 s (f + g)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedCancelAddCommMonoid β]
[SMul 𝕜 E]
[DistribMulAction 𝕜 β]
{s : Set E}
{f g : E → β}
(hf : StrictConcaveOn 𝕜 s f)
(hg : StrictConcaveOn 𝕜 s g)


@[to_additive (attr := simp, norm_cast)]
theorem val_one : ((1 : αˣ) : α) = 1


theorem mem_nhdsWithin_of_mem_nhds {s t : Set α} {a : α} (h : s ∈ 𝓝 a) : s ∈ 𝓝[t] a

{α : Type u_1}
[TopologicalSpace α]
{s t : Set α}
{a : α}
(h : s ∈ 𝓝 a)


theorem multiplicity_prime_eq_multiplicity_image_by_factor_orderIso {m p : Associates M}
    {n : Associates N} (hn : n ≠ 0) (hp : p ∈ normalizedFactors m) (d : Set.Iic m ≃o Set.Iic n) :
    multiplicity p m = multiplicity (↑(d ⟨p, dvd_of_mem_normalizedFactors hp⟩)) n

(hp : p ∈ UniqueFactorizationMonoid.normalizedFactors m)

multiplicity p m = multiplicity (↑(d ⟨p, ⋯⟩)) n


/-- The determinant of a hermitian matrix is the product of its eigenvalues. -/
theorem det_eq_prod_eigenvalues : det A = ∏ i, (hA.eigenvalues i : 𝕜)

{𝕜 : Type u_1}
[RCLike 𝕜]
{n : Type u_2}
[Fintype n]
{A : Matrix n n 𝕜}
[DecidableEq n]
(hA : A.IsHermitian)


/-- Euler's four-square identity, see <https://en.wikipedia.org/wiki/Euler%27s_four-square_identity>.

This sign choice here corresponds to the signs obtained by multiplying two quaternions.
-/
theorem sum_four_sq_mul_sum_four_sq :
    (x₁ ^ 2 + x₂ ^ 2 + x₃ ^ 2 + x₄ ^ 2) * (y₁ ^ 2 + y₂ ^ 2 + y₃ ^ 2 + y₄ ^ 2) =
      (x₁ * y₁ - x₂ * y₂ - x₃ * y₃ - x₄ * y₄) ^ 2 + (x₁ * y₂ + x₂ * y₁ + x₃ * y₄ - x₄ * y₃) ^ 2 +
          (x₁ * y₃ - x₂ * y₄ + x₃ * y₁ + x₄ * y₂) ^ 2 +
        (x₁ * y₄ + x₂ * y₃ - x₃ * y₂ + x₄ * y₁) ^ 2

{R : Type u_1}
[CommRing R]
{x₁ x₂ x₃ x₄ y₁ y₂ y₃ y₄ : R}


/-- Suppose that the topology on `α` is defined by its restrictions to the sets of `𝔖`.

Then the set of continuous functions is closed
in the topology of uniform convergence on the sets of `𝔖`. -/
@[deprecated isClosed_setOf_continuous (since := "2024-06-29")]
theorem isClosed_setOf_continuous_of_le [t : TopologicalSpace α]
    (h : t ≤ ⨆ s ∈ 𝔖, .coinduced (Subtype.val : s → α) inferInstance) :
    IsClosed {f : α →ᵤ[𝔖] β | Continuous (toFun 𝔖 f)}

(h : t ≤ ⨆ s ∈ 𝔖, TopologicalSpace.coinduced Subtype.val inferInstance)

IsClosed {f | Continuous ((UniformOnFun.toFun 𝔖) f)}


/-- The reverse of a path is another path.  See also `SimpleGraph.Walk.reverse`. -/
@[symm, simps]
def reverse {u v : V} (p : G.Path u v) : G.Path v u

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Path u v)


/-- The equivalence between `BddOrd` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : BddOrd ≌ BddOrd


@[simp] theorem toFin_shiftLeft {n : Nat} (x : BitVec w) :
    BitVec.toFin (x <<< n) = Fin.ofNat' (x.toNat <<< n) (Nat.two_pow_pos w)

(x <<< n).toFin = Fin.ofNat' (x.toNat <<< n) ⋯


lemma faithful_whiskeringLeft (L : C ⥤ D) (W) [L.IsLocalization W] (E : Type*) [Category E] :
    ((whiskeringLeft C D E).obj L).Faithful

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Category.{u_6, u_2} D]
(L : CategoryTheory.Functor C D)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
(E : Type u_4)
[CategoryTheory.Category.{u_7, u_4} E]

((CategoryTheory.whiskeringLeft C D E).obj L).Faithful


/-- Negating a rotation by π / 2 is equivalent to rotation by -π / 2. -/
theorem neg_rotation_pi_div_two (x : V) : -o.rotation (π / 2 : ℝ) x = o.rotation (-π / 2 : ℝ) x

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

-(o.rotation ↑(π / 2)) x = (o.rotation ↑(-π / 2)) x


theorem type_pEmpty : type (@EmptyRelation PEmpty) = 0


theorem iInter_ite (f g : ι → Set α) :
    ⋂ i, (if p i then f i else g i) = (⋂ (i) (_ : p i), f i) ∩ ⋂ (i) (_ : ¬p i), g i

{α : Type u_1}
{ι : Sort u_4}
(p : ι → Prop)
[DecidablePred p]
(f g : ι → Set α)

(⋂ i, if p i then f i else g i) = (⋂ i, ⋂ (_ : p i), f i) ∩ ⋂ i, ⋂ (_ : ¬p i), g i


theorem Tape.map_move {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : PointedMap Γ Γ') (T : Tape Γ) (d) :
    (T.move d).map f = (T.map f).move d

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Turing.PointedMap Γ Γ')
(T : Turing.Tape Γ)
(d : Turing.Dir)

Turing.Tape.map f (Turing.Tape.move d T) = Turing.Tape.move d (Turing.Tape.map f T)


theorem inf_neBot_iff_frequently_right {f g : Filter α} :
    NeBot (f ⊓ g) ↔ ∀ {p : α → Prop}, (∀ᶠ x in g, p x) → ∃ᶠ x in f, p x

(f ⊓ g).NeBot ↔ ∀ {p : α → Prop}, (∀ᶠ (x : α) in g, p x) → ∃ᶠ (x : α) in f, p x


theorem martingale_const (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ] (x : E) :
    Martingale (fun _ _ => x) ℱ μ

{Ω : Type u_1}
{E : Type u_2}
{ι : Type u_3}
[Preorder ι]
{m0 : MeasurableSpace Ω}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
(ℱ : MeasureTheory.Filtration ι m0)
(μ : MeasureTheory.Measure Ω)
[MeasureTheory.IsFiniteMeasure μ]
(x : E)

MeasureTheory.Martingale (fun x_1 x_2 => x) ℱ μ


@[simp]
theorem fold_cons (h : a ∉ s) : (cons a s h).fold op b f = f a * s.fold op b f

{α : Type u_1}
{β : Type u_2}
{op : β → β → β}
[hc : Std.Commutative op]
[ha : Std.Associative op]
{f : α → β}
{b : β}
{s : Finset α}
{a : α}
(h : a ∉ s)

Finset.fold op b f (Finset.cons a s h) = op (f a) (Finset.fold op b f s)


@[measurability, fun_prop]
theorem Measurable.dist {f g : β → α} (hf : Measurable f) (hg : Measurable g) :
    Measurable fun b => dist (f b) (g b)

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[MeasurableSpace β]
[SecondCountableTopology α]
{f g : β → α}
(hf : Measurable f)
(hg : Measurable g)


theorem arg_of_im_neg {z : ℂ} (hz : z.im < 0) : arg z = -Real.arccos (z.re / abs z)

z.arg = -Real.arccos (z.re / Complex.abs z)


theorem IsInfix.filter (p : α → Bool) ⦃l₁ l₂ : List α⦄ (h : l₁ <:+: l₂) :
    l₁.filter p <:+: l₂.filter p

{α : Type u_1}
(p : α → Bool)
⦃l₁ l₂ : List α⦄
(h : l₁ <:+: l₂)


@[to_additive]
theorem mk_smul_indicatorConstLp (c : M)
    {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (b : E) :
    mk c • indicatorConstLp p hs hμs b =
      indicatorConstLp p (hs.preimage <| measurable_const_smul c)
        (by rwa [SMulInvariantMeasure.measure_preimage_smul c hs]) b

[MeasureTheory.SMulInvariantMeasure M α μ]

DomMulAct.mk c • MeasureTheory.indicatorConstLp p hs hμs b = MeasureTheory.indicatorConstLp p ⋯ ⋯ b


@[simp]
theorem uncurrySum_apply (f : ContinuousMultilinearMap 𝕜 (fun _ : ι => G)
    (ContinuousMultilinearMap 𝕜 (fun _ : ι' => G) G'))
    (m : ι ⊕ ι' → G) : f.uncurrySum m = f (m ∘ Sum.inl) (m ∘ Sum.inr)

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

f.uncurrySum m = (f (m ∘ Sum.inl)) (m ∘ Sum.inr)


theorem Symmetric.pairwise_on [LinearOrder ι] (hr : Symmetric r) (f : ι → α) :
    Pairwise (r on f) ↔ ∀ ⦃m n⦄, m < n → r (f m) (f n)

{α : Type u_1}
{ι : Type u_4}
{r : α → α → Prop}
[LinearOrder ι]
(hr : Symmetric r)
(f : ι → α)

Pairwise (r on f) ↔ ∀ ⦃m n : ι⦄, m < n → r (f m) (f n)


/-- Formula for `cosZeta` as a Dirichlet series in the convergence range, with sum over `ℕ`. -/
lemma hasSum_nat_cosZeta (a : ℝ) {s : ℂ} (hs : 1 < re s) :
    HasSum (fun n : ℕ ↦ Real.cos (2 * π * a * n) / (n : ℂ) ^ s) (cosZeta a s)

HasSum (fun n => ↑(Real.cos (2 * π * a * ↑n)) / ↑n ^ s) (HurwitzZeta.cosZeta (↑a) s)


theorem le_inter (h₁ : s ≤ t) (h₂ : s ≤ u) : s ≤ t ∩ u

{α : Type u_1}
[DecidableEq α]
{s t u : Multiset α}
(h₁ : s ≤ t)
(h₂ : s ≤ u)


/-- Sends a complex `X` with objects in `Vᵒᵖ` to the corresponding complex with objects in `V`. -/
@[simps]
protected def unopSymm (X : HomologicalComplex Vᵒᵖ c.symm) : HomologicalComplex V c


@[simp]
theorem LiftRelAux.ret_right (R : α → β → Prop) (C : Computation α → Computation β → Prop) (b ca) :
    LiftRelAux R C (destruct ca) (Sum.inl b) ↔ ∃ a, a ∈ ca ∧ R a b

Computation.LiftRelAux R C ca.destruct (Sum.inl b) ↔ ∃ a, a ∈ ca ∧ R a b


theorem count_le_count_map [DecidableEq β] (l : List α) (f : α → β) (x : α) :
    count x l ≤ count (f x) (map f l)

{α : Type u_2}
[DecidableEq α]
{β : Type u_1}
[DecidableEq β]
(l : List α)
(f : α → β)
(x : α)

List.count x l ≤ List.count (f x) (List.map f l)


theorem pdf_def {_ : MeasurableSpace Ω} {ℙ : Measure Ω} {μ : Measure E} {X : Ω → E} :
    pdf X ℙ μ = (map X ℙ).rnDeriv μ

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]

∀ {x : MeasurableSpace Ω} {ℙ : MeasureTheory.Measure Ω} {μ : MeasureTheory.Measure E} {X : Ω → E},
  MeasureTheory.pdf X ℙ μ = (MeasureTheory.Measure.map X ℙ).rnDeriv μ


theorem toNat_eq_iff {m : ℕ∞} {n : ℕ} (hn : n ≠ 0) : toNat m = n ↔ m = n


@[to_additive]
theorem extend_one : HasCompactMulSupport (g.extend f 1)

{α : Type u_2}
{α' : Type u_3}
{β : Type u_4}
[TopologicalSpace α]
[TopologicalSpace α']
[One β]
{f : α → β}
[T2Space α']
(hf : HasCompactMulSupport f)
{g : α → α'}
(cont : Continuous g)

HasCompactMulSupport (Function.extend g f 1)


theorem comp_inf_eq_inf_comp_of_is_total [SemilatticeInf β] [OrderTop β] (g : α → β)
    (mono_g : Monotone g) (top : g ⊤ = ⊤) : g (s.inf f) = s.inf (g ∘ f)

{α : Type u_2}
{β : Type u_3}
{ι : Type u_5}
[LinearOrder α]
[OrderTop α]
{s : Finset ι}
{f : ι → α}
[SemilatticeInf β]
[OrderTop β]
(g : α → β)
(mono_g : Monotone g)
(top : g ⊤ = ⊤)


/-- `sSup` of `norm` translated by `ε > 0` is positive applied to the image of `f` on the
vertical line `re z = x` -/
lemma sSupNormIm_eps_pos {ε : ℝ} (hε : ε > 0) (x : ℝ) : 0 < ε + sSupNormIm f x

{E : Type u_1}
[NormedAddCommGroup E]
(f : ℂ → E)
{ε : ℝ}
(hε : ε > 0)
(x : ℝ)

0 < ε + Complex.HadamardThreeLines.sSupNormIm f x


@[simp]
theorem natDegree_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).natDegree = 1

{R : Type u_1}
{c d : R}
[Semiring R]
(hc : c ≠ 0)

{ a := 0, b := 0, c := c, d := d }.toPoly.natDegree = 1


theorem HasBasis.comp_equiv (h : l.HasBasis p s) (e : ι' ≃ ι) : l.HasBasis (p ∘ e) (s ∘ e)

{α : Type u_1}
{ι : Sort u_4}
{ι' : Sort u_5}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(h : l.HasBasis p s)
(e : ι' ≃ ι)


theorem divByMonic_eq_of_not_monic (p : R[X]) (hq : ¬Monic q) : p /ₘ q = 0

{R : Type u}
[Ring R]
{q : R[X]}
(p : R[X])
(hq : ¬q.Monic)


@[simp]
theorem min_empty : (∅ : Finset α).min = ⊤


@[to_additive (attr := simp)]
theorem map_mk_symm_nhds (x : Mᵈᵐᵃ) : map (mk.symm : Mᵈᵐᵃ → M) (𝓝 x) = 𝓝 (mk.symm x)

{M : Type u_1}
[TopologicalSpace M]
(x : Mᵈᵐᵃ)

Filter.map (⇑DomMulAct.mk.symm) (𝓝 x) = 𝓝 (DomMulAct.mk.symm x)


/-- As `x → 0`, we have `f x = x ^ (-P.k) • constant` up to a rapidly decaying error. -/
lemma hf_zero (P : WeakFEPair E) (r : ℝ) :
    (fun x ↦ P.f x - (P.ε * ↑(x ^ (-P.k))) • P.g₀) =O[𝓝[>] 0] (· ^ r)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(P : WeakFEPair E)
(r : ℝ)


@[simp]
theorem isCycleOn_inv : f⁻¹.IsCycleOn s ↔ f.IsCycleOn s

{α : Type u_2}
{f : Equiv.Perm α}
{s : Set α}


theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) :
    HasDerivAt (fun y => c y * d) (c' * d) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{c : 𝕜 → 𝔸}
{c' : 𝔸}
(hc : HasDerivAt c c' x)
(d : 𝔸)


@[simp]
theorem algebraMap_eq_zero_iff (x : R) : algebraMap R (TensorAlgebra R M) x = 0 ↔ x = 0

{R : Type u_1}
[CommSemiring R]
(M : Type u_2)
[AddCommMonoid M]
[Module R M]
(x : R)

(algebraMap R (TensorAlgebra R M)) x = 0 ↔ x = 0


protected theorem sub_le (a b c : R) : abv (a - c) ≤ abv (a - b) + abv (b - c)

{R : Type u_5}
{S : Type u_6}
[Ring R]
[OrderedSemiring S]
(abv : AbsoluteValue R S)
(a b c : R)


@[simp]
lemma restrictionLT_obj (k : J) (hk : k < i) :
    (restrictionLT F hi).obj ⟨k, hk⟩ = F.obj ⟨k, hk.le.trans hi⟩

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

(CategoryTheory.Functor.Iteration.restrictionLT F hi).obj ⟨k, hk⟩ = F.obj ⟨k, ⋯⟩


/-- When a right homology data `h` of a short complex `S` is preserved by a functor `F`,
this is the induced right homology data `h.map F` for the short complex `S.map F`. -/
@[simps]
noncomputable def map : (S.map F).RightHomologyData


theorem cycleFactorsFinset_mem_commute : (cycleFactorsFinset f : Set (Perm α)).Pairwise Commute

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


theorem toAddMonoidHom_injective :
    Function.Injective (@NormedAddGroupHom.toAddMonoidHom V₁ V₂ _ _)

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]


theorem IsSubordinate.toSmoothPartitionOfUnity {f : BumpCovering ι M s} {U : ι → Set M}
    (h : f.IsSubordinate U) (hf : ∀ i, Smooth I 𝓘(ℝ) (f i)) :
    (f.toSmoothPartitionOfUnity hf).IsSubordinate U

(hf : ∀ (i : ι), Smooth I 𝓘(ℝ, ℝ) ⇑(f i))


/-- The **extreme value theorem**: if a function `f` is continuous on a closed set `s` and it is
larger than a value in its image away from compact sets, then it has a minimum on this set. -/
theorem ContinuousOn.exists_isMinOn' [ClosedIicTopology α] {s : Set β} {f : β → α}
    (hf : ContinuousOn f s) (hsc : IsClosed s) {x₀ : β} (h₀ : x₀ ∈ s)
    (hc : ∀ᶠ x in cocompact β ⊓ 𝓟 s, f x₀ ≤ f x) : ∃ x ∈ s, IsMinOn f s x

(hc : ∀ᶠ (x : β) in Filter.cocompact β ⊓ 𝓟 s, f x₀ ≤ f x)


theorem part_iff₁ {f : ℕ →. ℕ} : (@Partrec' 1 fun v => f v.head) ↔ _root_.Partrec f

(Nat.Partrec' fun v => f v.head) ↔ Partrec f


theorem Wbtw.collinear {x y z : P} (h : Wbtw R x y z) : Collinear R ({x, y, z} : Set P)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x y z : P}
(h : Wbtw R x y z)


theorem compProd_of_not_isSFiniteKernel_left (κ : Kernel α β) (η : Kernel (α × β) γ)
    (h : ¬ IsSFiniteKernel κ) :
    κ ⊗ₖ η = 0

(η : ProbabilityTheory.Kernel (α × β) γ)

(h : ¬ProbabilityTheory.IsSFiniteKernel κ)


/-- If `X₁ ⟶ X₂ ⟶ X₃ ⟶ 0` is an exact sequence of homological complexes, then
`X₁.opcycles i ⟶ X₂.opcycles i ⟶ X₃.opcycles i ⟶ 0` is exact. This lemma states
the exactness at `X₂.opcycles i`, while the fact that `X₂.opcycles i ⟶ X₃.opcycles i`
is an epi is an instance. -/
lemma opcycles_right_exact (S : ShortComplex (HomologicalComplex C c)) (hS : S.Exact) [Epi S.g]
    (i : ι) [S.X₁.HasHomology i] [S.X₂.HasHomology i] [S.X₃.HasHomology i] :
    (ShortComplex.mk (opcyclesMap S.f i) (opcyclesMap S.g i)
      (by rw [← opcyclesMap_comp, S.zero, opcyclesMap_zero])).Exact

(S : CategoryTheory.ShortComplex (HomologicalComplex C c))

(CategoryTheory.ShortComplex.mk (HomologicalComplex.opcyclesMap S.f i) (HomologicalComplex.opcyclesMap S.g i) ⋯).Exact


theorem ker_stdBasis (i : ι) : ker (stdBasis R φ i) = ⊥

(R : Type u_1)
{ι : Type u_2}
[Semiring R]
(φ : ι → Type u_3)
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[DecidableEq ι]
(i : ι)

LinearMap.ker (LinearMap.stdBasis R φ i) = ⊥


@[simp]
theorem LHom.realize_onSentence [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M]
    (ψ : L.Sentence) : M ⊨ φ.onSentence ψ ↔ M ⊨ ψ

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(M : Type w)
[L.Structure M]
[L'.Structure M]
(φ : L →ᴸ L')
[φ.IsExpansionOn M]
(ψ : L.Sentence)


theorem canonicalEmbedding_eq_basisMatrix_mulVec (α : K) :
    canonicalEmbedding K α = (basisMatrix K).transpose.mulVec
      (fun i ↦ (((integralBasis K).reindex (equivReindex K).symm).repr α i : ℂ))

{K : Type u_1}
[Field K]
[NumberField K]
(α : K)

(NumberField.canonicalEmbedding K) α =
  (NumberField.basisMatrix K).transpose.mulVec fun i =>
    ↑((((NumberField.integralBasis K).reindex (NumberField.equivReindex K).symm).repr α) i)


@[to_additive]
theorem coeFn_div (f g : α →ₘ[μ] γ) : ⇑(f / g) =ᵐ[μ] f / g

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace γ]
[Group γ]
[TopologicalGroup γ]
(f g : α →ₘ[μ] γ)


theorem injOn_arcsin : InjOn arcsin (Icc (-1) 1)


@[simp]
theorem fst_comp_quotientMulEquivQuotientProd (I J : Ideal R) (coprime : IsCoprime I J) :
    (RingHom.fst _ _).comp
        (quotientMulEquivQuotientProd I J coprime : R ⧸ I * J →+* (R ⧸ I) × R ⧸ J) =
      Ideal.Quotient.factor (I * J) I mul_le_right

{R : Type u}
[CommRing R]
(I J : Ideal R)
(coprime : IsCoprime I J)

(RingHom.fst (R ⧸ I) (R ⧸ J)).comp ↑(I.quotientMulEquivQuotientProd J coprime) = Ideal.Quotient.factor (I * J) I ⋯


@[simp]
theorem mk_sub : (mk (x - y) : M ⧸ p) = (mk x : M ⧸ p) - (mk y : M ⧸ p)

{R : Type u_1}
{M : Type u_2}
{x y : M}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)

Submodule.Quotient.mk (x - y) = Submodule.Quotient.mk x - Submodule.Quotient.mk y


theorem map_smulₛₗ₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (r : R) (x y) : f (r • x) y = ρ₁₂ r • f x y

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


@[simp]
theorem injOn_empty (f : α → β) : InjOn f ∅

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


@[to_additive]
protected theorem mul_eq_one_iff : s * t = 1 ↔ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1

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

s + t = 0 ↔ ∃ a b, s = {a} ∧ t = {b} ∧ a + b = 0


theorem iso_w' {W X Y Z : T} {f : W ⟶ X} {g : Y ⟶ Z} (e : Arrow.mk f ≅ Arrow.mk g) :
    g = e.inv.left ≫ f ≫ e.hom.right

(e : CategoryTheory.Arrow.mk f ≅ CategoryTheory.Arrow.mk g)

g = CategoryTheory.CategoryStruct.comp e.inv.left (CategoryTheory.CategoryStruct.comp f e.hom.right)


lemma IsUnit_cast_of_dvd (hm : n ∣ m) (a : Units (ZMod m)) : IsUnit (cast (a : ZMod m) : ZMod n)


theorem isPrimePow_iff_card_primeFactors_eq_one {n : ℕ} :
    IsPrimePow n ↔ n.primeFactors.card = 1


theorem pi_symm_apply (ei : ∀ i, PartialEquiv (αi i) (βi i)) :
    ⇑(PartialEquiv.pi ei).symm = fun f i ↦ (ei i).symm (f i)

(ei : (i : ι) → PartialEquiv (αi i) (βi i))

↑(PartialEquiv.pi ei).symm = fun f i => ↑(ei i).symm (f i)


protected lemma NormedSpace.cobounded_neBot : NeBot (cobounded E)

(𝕜 : Type u_1)
(E : Type u_3)
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[Nontrivial E]


/-- `Function.extend s f 0` as a bundled linear map. -/
@[simps]
noncomputable def Function.ExtendByZero.linearMap : (ι → R) →ₗ[R] η → R

(R : Type u)
{ι η : Type x}
[Semiring R]
(s : ι → η)
(f : ι → R)

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


theorem HasBasis.property_index (h : l.HasBasis p s) (ht : t ∈ l) : p (h.index t ht)

{α : Type u_1}
{ι : Sort u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
{t : Set α}
(h : l.HasBasis p s)
(ht : t ∈ l)


theorem nhds_zero_basis_Iic : (𝓝 (0 : ℝ≥0∞)).HasBasis (fun a : ℝ≥0∞ => 0 < a) Iic


/-- If `f : X → Y` is an `Embedding`, the image `f '' s` of a set `s` is Lindelöf
  if and only if `s` is Lindelöf. -/
theorem Embedding.isLindelof_iff {f : X → Y} (hf : Embedding f) :
    IsLindelof s ↔ IsLindelof (f '' s)

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


/-- The `vectorSpan` of a finite affinely independent family whose
cardinality is one more than that of the finite-dimensional space is
`⊤`. -/
theorem AffineIndependent.vectorSpan_eq_top_of_card_eq_finrank_add_one [FiniteDimensional k V]
    [Fintype ι] {p : ι → P} (hi : AffineIndependent k p) (hc : Fintype.card ι = finrank k V + 1) :
    vectorSpan k (Set.range p) = ⊤

(hc : Fintype.card ι = FiniteDimensional.finrank k V + 1)


lemma add_zero_inv_app (h : ShiftMkCore C A) (n : A) (X : C) :
    (h.add n 0).inv.app X = h.zero.hom.app ((h.F n).obj X) ≫
      eqToHom (by dsimp; rw [add_zero])

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
(h : CategoryTheory.ShiftMkCore C A)
(n : A)
(X : C)

(h.add n 0).inv.app X = CategoryTheory.CategoryStruct.comp (h.zero.hom.app ((h.F n).obj X)) (CategoryTheory.eqToHom ⋯)


theorem map_comap [IsLocalization M S] (J : Ideal S) :
    Ideal.map (algebraMap R S) (Ideal.comap (algebraMap R S) J) = J

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(J : Ideal S)


theorem factor_orderIso_map_one_eq_bot {m : Associates M} {n : Associates N}
    (d : { l : Associates M // l ≤ m } ≃o { l : Associates N // l ≤ n }) :
    (d ⟨1, one_dvd m⟩ : Associates N) = 1

{M : Type u_1}
[CancelCommMonoidWithZero M]
{N : Type u_2}
[CancelCommMonoidWithZero N]
{m : Associates M}
{n : Associates N}
(d : { l // l ≤ m } ≃o { l // l ≤ n })


lemma isIso₃_of_isIso₁₂ {T T' : Triangle C} (φ : T ⟶ T') (hT : T ∈ distTriang C)
    (hT' : T' ∈ distTriang C) (h₁ : IsIso φ.hom₁) (h₂ : IsIso φ.hom₂) : IsIso φ.hom₃

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

{T T' : CategoryTheory.Pretriangulated.Triangle C}

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(hT' : T' ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


theorem is_local_nhds {s u : Set H} {x : H} {f : H → H'} (hu : u ∈ 𝓝[s] x) :
    P f s x ↔ P f (s ∩ u) x

{H : Type u_1}
{H' : Type u_3}
[TopologicalSpace H]
[TopologicalSpace H']
{G : StructureGroupoid H}
{G' : StructureGroupoid H'}
{P : (H → H') → Set H → H → Prop}
(hG : G.LocalInvariantProp G' P)
{s u : Set H}
{x : H}
{f : H → H'}
(hu : u ∈ 𝓝[s] x)


@[simp]
theorem top_toSubmodule : Subalgebra.toSubmodule (⊤ : Subalgebra R A) = ⊤

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


@[simp]
theorem mem_sep_iff : x ∈ { x ∈ s | p x } ↔ x ∈ s ∧ p x

{α : Type u}
{s : Set α}
{p : α → Prop}
{x : α}


protected theorem mul_ciSup (c : Cardinal.{v}) : c * (⨆ i, f i) = ⨆ i, c * f i

{ι : Type u}
(f : ι → Cardinal.{v})
(c : Cardinal.{v})


/-- `Multiset.map f` preserves `count` if `f` is injective on the set of elements contained in
the multiset -/
theorem count_map_eq_count [DecidableEq β] (f : α → β) (s : Multiset α)
    (hf : Set.InjOn f { x : α | x ∈ s }) (x) (H : x ∈ s) : (s.map f).count (f x) = s.count x

{α : Type u_1}
{β : Type v}
[DecidableEq α]
[DecidableEq β]
(f : α → β)
(s : Multiset α)
(hf : Set.InjOn f {x | x ∈ s})
(x : α)
(H : x ∈ s)

Multiset.count (f x) (Multiset.map f s) = Multiset.count x s


lemma _root_.SimpleGraph.Walk.toSubgraph_connected {u v : V} (p : G.Walk u v) :
    p.toSubgraph.Connected

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


@[simp]
theorem pow_neg_one (e : C ≌ C) : e ^ (-1 : ℤ) = e.symm

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


/-- A submodule `S` is a core of `f` if the closure of the restriction of `f` to `S` is `f`. -/
structure HasCore (f : E →ₗ.[R] F) (S : Submodule R E) : Prop where
  le_domain : S ≤ f.domain
  closure_eq : (f.domRestrict S).closure = f

{R : Type u_1}
{E : Type u_2}
{F : Type u_3}
[CommRing R]
[AddCommGroup E]
[AddCommGroup F]
[Module R E]
[Module R F]
[TopologicalSpace E]
[TopologicalSpace F]
[ContinuousAdd E]
[ContinuousAdd F]
[TopologicalSpace R]
[ContinuousSMul R E]
[ContinuousSMul R F]
{f : E →ₗ.[R] F}
{S : Submodule R E}
(self : f.HasCore S)


theorem epi_iff_surjective {X Y : TopCat.{u}} (f : X ⟶ Y) : Epi f ↔ Function.Surjective f

CategoryTheory.Epi f ↔ Function.Surjective ⇑f


@[simp, norm_cast] theorem coe_zero : ↑(0 : ℝ≥0) = (0 : ℝ≥0∞)


theorem leadingCoeff_monic_mul {p q : R[X]} (hp : Monic p) :
    leadingCoeff (p * q) = leadingCoeff q

{R : Type u}
[Semiring R]
{p q : R[X]}
(hp : p.Monic)


@[simp]
theorem map_trans (γ : Path x y) (γ' : Path y z) {f : X → Y}
    (h : Continuous f) : (γ.trans γ').map h = (γ.map h).trans (γ'.map h)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{x y z : X}
(γ : Path x y)
(γ' : Path y z)
{f : X → Y}
(h : Continuous f)


theorem inf_neBot_iff {f : Ultrafilter α} {g : Filter α} : NeBot (↑f ⊓ g) ↔ ↑f ≤ g

{α : Type u}
{f : Ultrafilter α}
{g : Filter α}


@[to_additive]
theorem Step.cons_cons_iff : ∀ {p : α × Bool}, Step (p :: L₁) (p :: L₂) ↔ Step L₁ L₂

{α : Type u}
{L₁ L₂ : List (α × Bool)}
{p : α × Bool}

FreeGroup.Red.Step (p :: L₁) (p :: L₂) ↔ FreeGroup.Red.Step L₁ L₂


@[congr]
theorem bsup_congr {o₁ o₂ : Ordinal.{u}} (f : ∀ a < o₁, Ordinal.{max u v}) (ho : o₁ = o₂) :
    bsup.{_, v} o₁ f = bsup.{_, v} o₂ fun a h => f a (h.trans_eq ho.symm)

(f : (a : Ordinal.{u}) → a < o₁ → Ordinal.{max u v})


@[simp]
theorem rTensorOne'_tmul_one (m : M) : M.rTensorOne' (m ⊗ₜ[R] 1) = m

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


theorem mem_of_elem_eq_true [BEq α] [LawfulBEq α] {a : α} {as : List α} : elem a as = true → a ∈ as

{α : Type u}
[BEq α]
[LawfulBEq α]
{a : α}
{as : List α}


lemma withDensity_sub_add_cancel [IsSFiniteKernel κ] {f g : α → β → ℝ≥0∞}
    (hf : Measurable (Function.uncurry f)) (hg : Measurable (Function.uncurry g))
    (hfg : ∀ a, g a ≤ᵐ[κ a] f a) :
    withDensity κ (fun a x ↦ f a x - g a x) + withDensity κ g = withDensity κ f

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ : ProbabilityTheory.Kernel α β}
[ProbabilityTheory.IsSFiniteKernel κ]
{f g : α → β → ℝ≥0∞}
(hf : Measurable (Function.uncurry f))
(hg : Measurable (Function.uncurry g))
(hfg : ∀ (a : α), g a ≤ᵐ[κ a] f a)

(κ.withDensity fun a x => f a x - g a x) + κ.withDensity g = κ.withDensity f


@[simp]
theorem toHamming_add [∀ i, Add (β i)] {x y : ∀ i, β i} :
    toHamming (x + y) = toHamming x + toHamming y

{ι : Type u_2}
{β : ι → Type u_3}
[(i : ι) → Add (β i)]
{x y : (i : ι) → β i}

Hamming.toHamming (x + y) = Hamming.toHamming x + Hamming.toHamming y


@[simp]
theorem sbtw_one_zero_iff {x : R} : Sbtw R 1 x 0 ↔ x ∈ Set.Ioo (0 : R) 1


/-- The counit isomorphism of the equivalence `equivalence₂` between `A` and `B`. -/
@[simps!]
def equivalence₂CounitIso : (eB.functor ⋙ e'.inverse ⋙ eA.inverse) ⋙ F ⋙ eB.inverse ≅ 𝟭 B

{A : Type u_1}
{A' : Type u_2}
{B : Type u_3}
{B' : Type u_4}
[CategoryTheory.Category.{u_5, u_1} A]
[CategoryTheory.Category.{u_6, u_2} A']
[CategoryTheory.Category.{u_7, u_3} B]
[CategoryTheory.Category.{u_8, u_4} B']
{eA : A ≌ A'}
(eB : B ≌ B')
{e' : A' ≌ B'}
{F : A ⥤ B'}
(hF : eA.functor ⋙ e'.functor ≅ F)
(X : B)

(AlgebraicTopology.DoldKan.Compatibility.equivalence₂CounitIso eB hF).hom.app X =
  eB.inverse.map (hF.inv.app (eA.inverse.obj (e'.inverse.obj (eB.functor.obj X)))) ≫
    eB.inverse.map (e'.functor.map (eA.counitIso.hom.app (e'.inverse.obj (eB.functor.obj X)))) ≫
      eB.inverse.map (e'.counitIso.hom.app (eB.functor.obj X)) ≫ eB.unitIso.inv.app X


theorem Submodule.exists_lieSubalgebra_coe_eq_iff (p : Submodule R L) :
    (∃ K : LieSubalgebra R L, ↑K = p) ↔ ∀ x y : L, x ∈ p → y ∈ p → ⁅x, y⁆ ∈ p

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(p : Submodule R L)

(∃ K, K.toSubmodule = p) ↔ ∀ (x y : L), x ∈ p → y ∈ p → ⁅x, y⁆ ∈ p


theorem hasStrictDerivAt_inv (hx : x ≠ 0) : HasStrictDerivAt Inv.inv (-(x ^ 2)⁻¹) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
(hx : x ≠ 0)


@[simp]
theorem _root_.AlgEquiv.fieldRange_eq_top (f : E ≃ₐ[F] K) :
    (f : E →ₐ[F] K).fieldRange = ⊤

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{K : Type u_3}
[Field K]
[Algebra F K]
(f : E ≃ₐ[F] K)


@[simp] theorem toCoalgEquiv_trans (e : X ≅ Y) (f : Y ≅ Z) :
    toCoalgEquiv (e ≪≫ f) = e.toCoalgEquiv.trans f.toCoalgEquiv

{R : Type u}
[CommRing R]
{X Y Z : CoalgebraCat R}
(e : X ≅ Y)
(f : Y ≅ Z)

(e ≪≫ f).toCoalgEquiv = e.toCoalgEquiv.trans f.toCoalgEquiv


@[simp] lemma in₁₂_iff : (graph t).Adj (in₁ b) (in₂ c) ↔ ∃ a, (a, b, c) ∈ t

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

(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₁ b) (Sum3.in₂ c) ↔ ∃ a, (a, b, c) ∈ t


protected theorem ContinuousLinearMap.derivWithin (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin e s x = e 1

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
{s : Set 𝕜}
(e : 𝕜 →L[𝕜] F)
(hxs : UniqueDiffWithinAt 𝕜 s x)


/-- If the second of three points is strictly between the other two, the oriented angle at that
point is π. -/
theorem _root_.Sbtw.oangle₁₂₃_eq_pi {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) : ∡ p₁ p₂ p₃ = π

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

∡ p₁ p₂ p₃ = ↑π