/-- If a set `s` is separable in a (pseudo extended) metric space, then it admits a countable dense
subset. This is not obvious, as the countable set whose closure covers `s` given by the definition
of separability does not need in general to be contained in `s`. -/
theorem _root_.TopologicalSpace.IsSeparable.exists_countable_dense_subset
    {s : Set α} (hs : IsSeparable s) : ∃ t, t ⊆ s ∧ t.Countable ∧ s ⊆ closure t

{α : Type u}
[PseudoEMetricSpace α]
{s : Set α}
(hs : TopologicalSpace.IsSeparable s)


theorem card (h : n ≠ 0) : Fintype.card (GaloisField p n) = p ^ n

(p : ℕ)
[h_prime : Fact (Nat.Prime p)]
(n : ℕ)
(h : n ≠ 0)


protected theorem tendsto_nhds_atBot_iff [Preorder β] {l : Filter α} {f : α → Filter β} :
    Tendsto f l (𝓝 atBot) ↔ ∀ y, ∀ᶠ a in l, Iic y ∈ f a

{α : Type u_2}
{β : Type u_3}
[Preorder β]
{l : Filter α}
{f : α → Filter β}

Filter.Tendsto f l (𝓝 Filter.atBot) ↔ ∀ (y : β), ∀ᶠ (a : α) in l, Set.Iic y ∈ f a


@[simp]
theorem toLinearEquiv_toLinearMap : e.toLinearEquiv.toLinearMap = e.toLinearMap

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


theorem card_ofPrime (p : Nat.Primes) : Multiset.card (ofPrime p) = 1

Multiset.card (PrimeMultiset.ofPrime p) = 1


/-- For `A` positive semidefinite, we have `x⋆ A x = 0` iff `A x = 0`. -/
theorem PosSemidef.dotProduct_mulVec_zero_iff
    {A : Matrix n n 𝕜} (hA : PosSemidef A) (x : n → 𝕜) :
    star x ⬝ᵥ A *ᵥ x = 0 ↔ A *ᵥ x = 0

{n : Type u_2}
{𝕜 : Type u_4}
[Fintype n]
[RCLike 𝕜]
{A : Matrix n n 𝕜}
(hA : A.PosSemidef)
(x : n → 𝕜)

Matrix.dotProduct (star x) (A.mulVec x) = 0 ↔ A.mulVec x = 0


protected theorem linearIsometry_apply (f : lp G 2) : hV.linearIsometry f = ∑' i, V i (f i)

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[cplt : CompleteSpace E]
{G : ι → Type u_4}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
{V : (i : ι) → G i →ₗᵢ[𝕜] E}
(hV : OrthogonalFamily 𝕜 G V)
(f : ↥(lp G 2))

hV.linearIsometry f = ∑' (i : ι), (V i) (↑f i)


protected theorem isIntegral [Algebra R A] [IsScalarTower R A B] (x : A) : IsIntegral R x

(R : Type u_1)
{A : Type u_2}
(B : Type u_3)
[CommRing R]
[CommRing A]
[CommRing B]
[Algebra R B]
[Algebra A B]
[IsIntegralClosure A R B]
[Algebra R A]
[IsScalarTower R A B]
(x : A)


theorem Codisjoint.left_le_of_le_inf_right (h : a ⊓ b ≤ c) (hd : Codisjoint b c) : a ≤ c

{α : Type u_1}
[DistribLattice α]
[OrderTop α]
{a b c : α}
(h : a ⊓ b ≤ c)
(hd : Codisjoint b c)


theorem strictMono_iff_Icc [LinearOrderedAddCommGroup G] [Archimedean G] [OrderedAddCommGroup H]
    [AddConstMapClass F G H a b] {f : F} (ha : 0 < a) (l : G) :
    StrictMono f ↔ StrictMonoOn f (Icc l (l + a))

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
{a : G}
{b : H}
[LinearOrderedAddCommGroup G]
[Archimedean G]
[OrderedAddCommGroup H]
[AddConstMapClass F G H a b]
{f : F}
(ha : 0 < a)
(l : G)

StrictMono ⇑f ↔ StrictMonoOn (⇑f) (Set.Icc l (l + a))


@[simp]
theorem coe_inj {x y : R} : (x : ℍ[R]) = y ↔ x = y


/-- Suppose that, given objects defined on all nonempty strict subsets of any nontrivial finset `s`,
one knows how to define an object on `s`. Then one can inductively define an object on all finsets,
starting from singletons and iterating.

TODO: Currently this can only be used to prove properties.
Replace `Finset.Nonempty.exists_eq_singleton_or_nontrivial` with computational content
in order to let `p` be `Sort`-valued. -/
@[elab_as_elim]
protected lemma Nonempty.strong_induction {p : ∀ s, s.Nonempty → Prop}
    (h₀ : ∀ a, p {a} (singleton_nonempty _))
    (h₁ : ∀ ⦃s⦄ (hs : s.Nontrivial), (∀ t ht, t ⊂ s → p t ht) → p s hs.nonempty) :
    ∀ ⦃s : Finset α⦄ (hs), p s hs

{p : (s : Finset α) → s.Nonempty → Prop}

(h₁ : ∀ ⦃s : Finset α⦄ (hs : s.Nontrivial), (∀ (t : Finset α) (ht : t.Nonempty), t ⊂ s → p t ht) → p s ⋯)


@[reassoc (attr := simp)]
lemma liftOfIsRightKanExtension_fac (G : D ⥤ H) (β : L ⋙ G ⟶ F) :
    whiskerLeft L (F'.liftOfIsRightKanExtension α G β) ≫ α = β

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_9, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_7, u_5} D]
(F' : CategoryTheory.Functor D H)
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
(α : L.comp F' ⟶ F)
[F'.IsRightKanExtension α]
(G : CategoryTheory.Functor D H)
(β : L.comp G ⟶ F)

CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft L (F'.liftOfIsRightKanExtension α G β)) α = β


/-- A `Partition` of a simple graph `G` is a structure constituted by
* `parts`: a set of subsets of the vertices `V` of `G`
* `isPartition`: a proof that `parts` is a proper partition of `V`
* `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices
-/
structure Partition where
  /-- `parts`: a set of subsets of the vertices `V` of `G`. -/
  parts : Set (Set V)
  /-- `isPartition`: a proof that `parts` is a proper partition of `V`. -/
  isPartition : Setoid.IsPartition parts
  /-- `independent`: a proof that each element of `parts` doesn't have a pair of adjacent vertices.
-/
  independent : ∀ s ∈ parts, IsAntichain G.Adj s

{V : Type u}
{G : SimpleGraph V}
(self : G.Partition)


@[to_additive]
lemma subset_mul_closure_one (s : Set G) : s ⊆ s * (closure {1} : Set G)

{G : Type w}
[TopologicalSpace G]
[Group G]
(s : Set G)


theorem proj_continuous : Continuous S.proj

{X : Type u_2}
[TopologicalSpace X]
(S : DiscreteQuotient X)


/-- The yoneda functor that sends a type to a sheaf over the category of types. -/
@[simps]
def yoneda' : Type u ⥤ SheafOfTypes typesGrothendieckTopology

(CategoryTheory.yoneda'.obj α).val = CategoryTheory.yoneda.obj α


theorem smul_integral_comp_mul_sub (c d) :
    (c • ∫ x in a..b, f (c * x - d)) = ∫ x in c * a - d..c * b - d, f x

{E : Type u_3}
[NormedAddCommGroup E]
[CompleteSpace E]
[NormedSpace ℝ E]
{a b : ℝ}
(f : ℝ → E)
(c d : ℝ)

c • ∫ (x : ℝ) in a..b, f (c * x - d) = ∫ (x : ℝ) in c * a - d..c * b - d, f x


theorem gcd_dvd_left (m n : Nat) : gcd m n ∣ m


theorem measure_eq_left_of_subset_of_measure_add_eq {s t : Set α} (h : (μ + ν) t ≠ ∞) (h' : s ⊆ t)
    (h'' : (μ + ν) s = (μ + ν) t) : μ s = μ t

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{s t : Set α}
(h : (μ + ν) t ≠ ⊤)
(h' : s ⊆ t)
(h'' : (μ + ν) s = (μ + ν) t)


@[to_additive]
theorem _root_.Group.mulLeft_bijective (a : G) : Function.Bijective (a * ·)


/-- An algebra morphism with an underlying epimorphism hom in `C` is an algebra epimorphism. -/
theorem epi_of_epi {X Y : Coalgebra F} (f : X ⟶ Y) [h : Epi f.1] : Epi f

{X Y : CategoryTheory.Endofunctor.Coalgebra F}


@[to_additive (attr := simp)]
theorem OneHom.one_comp [One M] [One N] [One P] (f : OneHom M N) :
    (1 : OneHom N P).comp f = 1

{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[Zero M]
[Zero N]
[Zero P]
(f : ZeroHom M N)


/-- When `m` and `n` are odd, then the square of `qrSign m n` is `1`. -/
theorem sq_eq_one {m n : ℕ} (hm : Odd m) (hn : Odd n) : qrSign m n ^ 2 = 1


@[to_additive]
theorem mem_map_of_mem (f : M →ₙ* N) {S : Subsemigroup M} {x : M} (hx : x ∈ S) : f x ∈ S.map f

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(f : AddHom M N)
{S : AddSubsemigroup M}
{x : M}
(hx : x ∈ S)


/-- The Fourier integral is well defined iff the function is integrable. Version with a general
continuous bilinear function `L`. For the specialization to the inner product in an inner product
space, see `Real.fourierIntegral_convergent_iff`. -/
@[simp]
theorem fourierIntegral_convergent_iff' {V W : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V]
    [NormedAddCommGroup W] [NormedSpace ℝ W] [MeasurableSpace V] [BorelSpace V] {μ : Measure V}
    {f : V → E} (L : V →L[ℝ] W →L[ℝ] ℝ) (w : W) :
    Integrable (fun v : V ↦ 𝐞 (- L v w) • f v) μ ↔ Integrable f μ

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
{W : Type u_3}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[NormedAddCommGroup W]
[NormedSpace ℝ W]
[MeasurableSpace V]
[BorelSpace V]
{μ : MeasureTheory.Measure V}
{f : V → E}
(L : V →L[ℝ] W →L[ℝ] ℝ)
(w : W)

MeasureTheory.Integrable (fun v => Real.fourierChar (-(L v) w) • f v) μ ↔ MeasureTheory.Integrable f μ


theorem torusIntegral_const_mul (a : ℂ) (f : ℂⁿ → ℂ) (c : ℂⁿ) (R : ℝⁿ) :
    (∯ x in T(c, R), a * f x) = a * ∯ x in T(c, R), f x

{n : ℕ}
(a : ℂ)
(f : (Fin n → ℂ) → ℂ)
(c : Fin n → ℂ)
(R : Fin n → ℝ)

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


@[simp, norm_cast]
theorem coe_fst' [Module R₁ M₂] : ⇑(fst R₁ M₁ M₂) = Prod.fst

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

⇑(ContinuousLinearMap.fst R₁ M₁ M₂) = Prod.fst


@[simp]
theorem llift_symm_apply (f : (X →₀ R) →ₗ[R] M) (x : X) :
    (llift M R S X).symm f x = f (single x 1)

(M : Type u_2)
(R : Type u_5)
(S : Type u_6)
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[Module R M]
(X : Type u_7)
[Module S M]
[SMulCommClass R S M]
(f : (X →₀ R) →ₗ[R] M)
(x : X)

(Finsupp.llift M R S X).symm f x = f (Finsupp.single x 1)


/-- If `a : ZMod p` is nonzero, then `a^(p/2)` is either `1` or `-1`. -/
theorem pow_div_two_eq_neg_one_or_one {a : ZMod p} (ha : a ≠ 0) :
    a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1

(p : ℕ)
[Fact (Nat.Prime p)]
{a : ZMod p}
(ha : a ≠ 0)


@[simp]
theorem prod_pow [Fintype α] (f : α →₀ ℕ) (g : α → N) :
    (f.prod fun a b => g a ^ b) = ∏ a, g a ^ f a

{α : Type u_1}
{N : Type u_10}
[CommMonoid N]
[Fintype α]
(f : α →₀ ℕ)
(g : α → N)

(f.prod fun a b => g a ^ b) = ∏ a : α, g a ^ f a


@[typevec]
theorem repeat_eq_append1 {β} {n} (α : TypeVec n) :
    repeatEq (α ::: β) = splitFun (α := (α ⊗ α) ::: _ )
    (α' := («repeat» n Prop) ::: _) (repeatEq α) (uncurry Eq)

{β : Type u_1}
{n : ℕ}
(α : TypeVec.{u_1} n)

(α ::: β).repeatEq = TypeVec.splitFun α.repeatEq (Function.uncurry Eq)


theorem disjoint_of_nodup_add {s t : Multiset α} (d : Nodup (s + t)) : Disjoint s t

{α : Type u_1}
{s t : Multiset α}
(d : (s + t).Nodup)


nonrec theorem IsOpen.tendstoLocallyUniformlyOn_iff_forall_tendsto (hs : IsOpen s) :
    TendstoLocallyUniformlyOn F f p s ↔
      ∀ x ∈ s, Tendsto (fun y : ι × α => (f y.2, F y.1 y.2)) (p ×ˢ 𝓝 x) (𝓤 β)

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s : Set α}
{p : Filter ι}
[TopologicalSpace α]
(hs : IsOpen s)

TendstoLocallyUniformlyOn F f p s ↔ ∀ x ∈ s, Filter.Tendsto (fun y => (f y.2, F y.1 y.2)) (p ×ˢ 𝓝 x) (𝓤 β)


@[simp]
theorem rightUnitor_hom_app {F : C ⥤ D} {X} :
    ((ρ_ F).hom : F ⊗ 𝟙_ _ ⟶ F).app X = (ρ_ (F.obj X)).hom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
{F : C ⥤ D}
{X : C}


lemma left_unique_of_rel_eq {eq' : β → β → Prop} (he : (R ⇒ (R ⇒ Iff)) Eq eq') : LeftUnique R

{α : Type u₁}
{β : Type u₂}
{R : α → β → Prop}
{eq' : β → β → Prop}
(he : (R ⇒ R ⇒ Iff) Eq eq')


protected theorem min_def {n m : Nat} : min n m = if n ≤ m then n else m


@[simp]
theorem mem_nonMemberSubfamily : s ∈ 𝒜.nonMemberSubfamily a ↔ s ∈ 𝒜 ∧ a ∉ s

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

s ∈ Finset.nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s


/-- The function `expNegInvGlue` vanishes on `(-∞, 0]`. -/
theorem zero_of_nonpos {x : ℝ} (hx : x ≤ 0) : expNegInvGlue x = 0


lemma SeminormedAddCommGroup.lipschitzWith_sub :
    LipschitzWith 2 (fun (p : R × R) ↦ p.1 - p.2)

{R : Type u_1}
[SeminormedAddCommGroup R]


theorem countP_eq_card_filter (s) : countP p s = card (filter p s)

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

Multiset.countP p s = Multiset.card (Multiset.filter p s)


theorem toIcoDiv_neg (a b : α) : toIcoDiv hp a (-b) = -(toIocDiv hp (-a) b + 1)

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


@[simp]
theorem himp_apply [∀ i, HImp (π i)] (a b : ∀ i, π i) (i : ι) : (a ⇨ b) i = a i ⇨ b i

{ι : Type u_1}
{π : ι → Type u_4}
[(i : ι) → HImp (π i)]
(a b : (i : ι) → π i)
(i : ι)


lemma isOpen_iInter₂ {f : ∀ i, κ i → Set α} (hf : ∀ i j, IsOpen (f i j)) :
    IsOpen (⋂ i, ⋂ j, f i j)

(hf : ∀ (i : ι) (j : κ i), IsOpen (f i j))


theorem coe_toReal_le {x : EReal} (h : x ≠ ⊥) : ↑x.toReal ≤ x


/-- A natural isomorphism between functors induces a natural isomorphism
between those functors applied to homological complexes.
-/
@[simps!]
def NatIso.mapHomologicalComplex {F G : W₁ ⥤ W₂} [F.PreservesZeroMorphisms]
    [G.PreservesZeroMorphisms] (α : F ≅ G) (c : ComplexShape ι) :
    F.mapHomologicalComplex c ≅ G.mapHomologicalComplex c

((CategoryTheory.NatIso.mapHomologicalComplex α c).inv.app C).f i = α.inv.app (C.X i)


theorem div_eq (x y : Nat) : x / y = if 0 < y ∧ y ≤ x then (x - y) / y + 1 else 0


/-- A filter `F` is prime if its complement is an ideal.
-/
@[mk_iff]
class IsPrime (F : PFilter P) : Prop where
  compl_ideal : IsIdeal (F : Set P)ᶜ

{P : Type u_1}
[Preorder P]
(F : Order.PFilter P)


@[simp] theorem comap_bot (f : P₁ →ᵃ[k] P₂) : comap f ⊥ = ⊥

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(f : P₁ →ᵃ[k] P₂)


@[simp]
theorem comp_lift [FormallySmooth R A] (I : Ideal B) (hI : IsNilpotent I)
    (g : A →ₐ[R] B ⧸ I) : (Ideal.Quotient.mkₐ R I).comp (FormallySmooth.lift I hI g) = g

{R : Type u}
[CommSemiring R]
{A : Type u}
[Semiring A]
[Algebra R A]
{B : Type u}
[CommRing B]
[Algebra R B]
[Algebra.FormallySmooth R A]
(I : Ideal B)
(hI : IsNilpotent I)
(g : A →ₐ[R] B ⧸ I)

(Ideal.Quotient.mkₐ R I).comp (Algebra.FormallySmooth.lift I hI g) = g


@[simp]
theorem matrixDecomposition_id (o : HomOrthogonal s) {α : Type} [Finite α] {f : α → ι} (i : ι) :
    o.matrixDecomposition (𝟙 (⨁ fun a => s (f a))) i = 1

o.matrixDecomposition (CategoryTheory.CategoryStruct.id (⨁ fun a => s (f a))) i = 1


theorem coe_injective : Injective ((↑) : Ultrafilter α → Filter α)


@[simp]
theorem ofIsClopen_fiber_one {X : Type*} [TopologicalSpace X] {U : Set X} [∀ x, Decidable (x ∈ U)]
    (hU : IsClopen U) : ofIsClopen hU ⁻¹' ({1} : Set (Fin 2)) = Uᶜ

{X : Type u_5}
[TopologicalSpace X]
{U : Set X}
[(x : X) → Decidable (x ∈ U)]
(hU : IsClopen U)

⇑(LocallyConstant.ofIsClopen hU) ⁻¹' {1} = Uᶜ


theorem eq_adjoint_iff_basis_right {ι : Type*} (b : Basis ι 𝕜 F) (A : E →ₗ[𝕜] F) (B : F →ₗ[𝕜] E) :
    A = LinearMap.adjoint B ↔ ∀ i x, ⟪A x, b i⟫ = ⟪x, B (b i)⟫

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[FiniteDimensional 𝕜 E]
[FiniteDimensional 𝕜 F]
{ι : Type u_5}
(b : Basis ι 𝕜 F)
(A : E →ₗ[𝕜] F)
(B : F →ₗ[𝕜] E)

A = LinearMap.adjoint B ↔ ∀ (i : ι) (x : E), ⟪A x, b i⟫_𝕜 = ⟪x, B (b i)⟫_𝕜


/-- A variation of `Algebra.discr_powerBasis_eq_prod`. -/
theorem discr_powerBasis_eq_prod'' [Algebra.IsSeparable K L] (e : Fin pb.dim ≃ (L →ₐ[K] E)) :
    algebraMap K E (discr K pb.basis) =
      (-1) ^ (n * (n - 1) / 2) *
        ∏ i : Fin pb.dim, ∏ j ∈ Ioi i, (e j pb.gen - e i pb.gen) * (e i pb.gen - e j pb.gen)

(K : Type u)
{L : Type v}
(E : Type z)
[Field K]
[Field L]
[Field E]
[Algebra K L]
[Algebra K E]
[Module.Finite K L]
[IsAlgClosed E]
(pb : PowerBasis K L)
[Algebra.IsSeparable K L]
(e : Fin pb.dim ≃ (L →ₐ[K] E))

(algebraMap K E) (Algebra.discr K ⇑pb.basis) =
  (-1) ^ (FiniteDimensional.finrank K L * (FiniteDimensional.finrank K L - 1) / 2) *
    ∏ i : Fin pb.dim, ∏ j ∈ Finset.Ioi i, ((e j) pb.gen - (e i) pb.gen) * ((e i) pb.gen - (e j) pb.gen)


@[simp] theorem zip_nil_right : zip (l : List α) ([] : List β)  = []


/-- Show that for small values of the right argument, the middle value is largest. -/
private theorem choose_le_middle_of_le_half_left {n r : ℕ} (hr : r ≤ n / 2) :
    choose n r ≤ choose n (n / 2)


theorem antisymmetrization_fibration :
    Relation.Fibration (· < ·) (· < ·) (@toAntisymmetrization α (· ≤ ·) _)

Relation.Fibration (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (toAntisymmetrization fun x x_1 => x ≤ x_1)


@[simp]
theorem iUnion_disjUnion (h : Disjoint π₁.iUnion π₂.iUnion) :
    (π₁.disjUnion π₂ h).iUnion = π₁.iUnion ∪ π₂.iUnion

{π₁ π₂ : BoxIntegral.TaggedPrepartition I}


theorem hasSum_lt {f g : α → ℝ≥0∞} {sf sg : ℝ≥0∞} {i : α} (h : ∀ a : α, f a ≤ g a) (hi : f i < g i)
    (hsf : sf ≠ ∞) (hf : HasSum f sf) (hg : HasSum g sg) : sf < sg

{α : Type u_1}
{f g : α → ℝ≥0∞}
{sf sg : ℝ≥0∞}
{i : α}
(h : ∀ (a : α), f a ≤ g a)
(hi : f i < g i)
(hsf : sf ≠ ⊤)
(hf : HasSum f sf)
(hg : HasSum g sg)


@[to_additive]
theorem map_div_le_add : f (x / y) ≤ f x + f y

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


/-- If `α` is non-empty, an action is pretransitive if and only if the quotient has exactly one
element. -/
@[to_additive "If `α` is non-empty, an additive action is pretransitive if and only if the
quotient has exactly one element."]
theorem pretransitive_iff_unique_quotient_of_nonempty [Nonempty α] :
    IsPretransitive G α ↔ Nonempty (Unique <| orbitRel.Quotient G α)

(G : Type u_1)
(α : Type u_2)
[AddGroup G]
[AddAction G α]
[Nonempty α]

AddAction.IsPretransitive G α ↔ Nonempty (Unique (AddAction.orbitRel.Quotient G α))


lemma rank_le_natTrailingDegree_charpoly_ad :
    rank R L ≤ (ad R L x).charpoly.natTrailingDegree

(R : Type u_1)
{L : Type u_3}
[CommRing R]
[Nontrivial R]
[LieRing L]
[LieAlgebra R L]
[Module.Finite R L]
[Module.Free R L]
(x : L)

LieAlgebra.rank R L ≤ (LinearMap.charpoly ((LieAlgebra.ad R L) x)).natTrailingDegree


theorem subset_cons_of_subset (a : α) {l₁ l₂ : List α} : l₁ ⊆ l₂ → l₁ ⊆ a :: l₂

l₁ ⊆ l₂ → l₁ ⊆ a :: l₂


protected theorem covBy_iff_succ_eq {m n : ℤ} : m ⋖ n ↔ m + 1 = n


theorem image_subset_iff (s : Set α) (t : Set β) : image r s ⊆ t ↔ s ⊆ core r t

{α : Type u_1}
{β : Type u_2}
(r : Rel α β)
(s : Set α)
(t : Set β)


@[simp]
theorem multiequalizerEquiv_apply (I : MulticospanIndex.{w} C) [HasMultiequalizer I]
    [PreservesLimit I.multicospan (forget C)] (x : ↑(multiequalizer I)) (i : I.L) :
    ((Concrete.multiequalizerEquiv I) x : ∀ i : I.L, I.left i) i = Multiequalizer.ι I i x

(I : CategoryTheory.Limits.MulticospanIndex C)

[CategoryTheory.Limits.PreservesLimit I.multicospan (CategoryTheory.forget C)]

(x : (CategoryTheory.forget C).obj (CategoryTheory.Limits.multiequalizer I))

↑((CategoryTheory.Limits.Concrete.multiequalizerEquiv I) x) i = (CategoryTheory.Limits.Multiequalizer.ι I i) x


theorem foldMap_hom [Monoid α] [Monoid β] (f : α →* β) (g : γ → α) (x : t γ) :
    f (foldMap g x) = foldMap (f ∘ g) x

{α β γ : Type u}
{t : Type u → Type u}
[Traversable t]
[LawfulTraversable t]
[Monoid α]
[Monoid β]
(f : α →* β)
(g : γ → α)
(x : t γ)

f (Traversable.foldMap g x) = Traversable.foldMap (⇑f ∘ g) x


/-- An element of `R` is algebraic, when viewed as an element of the `R`-algebra `A`. -/
theorem isAlgebraic_algebraMap [Nontrivial R] (x : R) : IsAlgebraic R (algebraMap R A x)

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
[Nontrivial R]
(x : R)


lemma neg_of_smul_neg_left' [SMulPosMono α β] (h : a • b < 0) (ha : 0 ≤ a) : b < 0

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Zero α]
[Zero β]
[SMulWithZero α β]
[LinearOrder α]
[LinearOrder β]
[SMulPosMono α β]
(h : a • b < 0)
(ha : 0 ≤ a)


@[simp]
theorem transvection_mul_apply_same (b : n) (c : R) (M : Matrix n n R) :
    (transvection i j c * M) i b = M i b + c * M j b

{n : Type u_1}
{R : Type u₂}
[DecidableEq n]
[CommRing R]
(i j : n)
[Fintype n]
(b : n)
(c : R)
(M : Matrix n n R)

(Matrix.transvection i j c * M) i b = M i b + c * M j b


theorem nhds_right'_le_nhds_ne (a : α) : 𝓝[>] a ≤ 𝓝[≠] a

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


/-- The closure is unique. -/
theorem IsClosable.existsUnique {f : E →ₗ.[R] F} (hf : f.IsClosable) :
    ∃! f' : E →ₗ.[R] F, f.graph.topologicalClosure = f'.graph

{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}
(hf : f.IsClosable)

∃! f', f.graph.topologicalClosure = f'.graph


theorem Nonempty.of_image2_right (h : (Set.image2 f s t).Nonempty) : t.Nonempty

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{f : α → β → γ}
{s : Set α}
{t : Set β}
(h : (Set.image2 f s t).Nonempty)


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

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

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


theorem mk.inj_iff {a₁ a₂ : α} {b₁ : β a₁} {b₂ : β a₂} :
    @PSigma.mk α β a₁ b₁ = @PSigma.mk α β a₂ b₂ ↔ a₁ = a₂ ∧ HEq b₁ b₂

{α : Sort u_1}
{β : α → Sort u_2}
{a₁ a₂ : α}
{b₁ : β a₁}
{b₂ : β a₂}

⟨a₁, b₁⟩ = ⟨a₂, b₂⟩ ↔ a₁ = a₂ ∧ HEq b₁ b₂


@[simp]
theorem pred_succ_of_not_isMax (h : ¬IsMax a) : pred (succ a) = a

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
[PredOrder α]
{a : α}
(h : ¬IsMax a)


lemma le_card_of_inj_on_range (f : ℕ → α) (hf : ∀ i < n, f i ∈ s)
    (f_inj : ∀ i < n, ∀ j < n, f i = f j → i = j) : n ≤ s.card


@[to_additive (attr := measurability)]
theorem Finset.aemeasurable_prod' (s : Finset ι) (hf : ∀ i ∈ s, AEMeasurable (f i) μ) :
    AEMeasurable (∏ i ∈ s, f i) μ

{M : Type u_2}
{ι : Type u_3}
{α : Type u_4}
[CommMonoid M]
[MeasurableSpace M]
[MeasurableMul₂ M]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : ι → α → M}
(s : Finset ι)
(hf : ∀ i ∈ s, AEMeasurable (f i) μ)


/-- A convex cone is a subset `s` of a `𝕜`-module such that `a • x + b • y ∈ s` whenever `a, b > 0`
and `x, y ∈ s`. -/
structure ConvexCone [AddCommMonoid E] [SMul 𝕜 E] where
  /-- The **carrier set** underlying this cone: the set of points contained in it -/
  carrier : Set E
  smul_mem' : ∀ ⦃c : 𝕜⦄, 0 < c → ∀ ⦃x : E⦄, x ∈ carrier → c • x ∈ carrier
  add_mem' : ∀ ⦃x⦄ (_ : x ∈ carrier) ⦃y⦄ (_ : y ∈ carrier), x + y ∈ carrier

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
(self : ConvexCone 𝕜 E)
⦃x : E⦄

x ∈ self.carrier → ∀ ⦃y : E⦄, y ∈ self.carrier → x + y ∈ self.carrier


@[to_additive (attr := simp)]
theorem snd_toProd (x : M ∗ N) : (toProd x).2 = snd x

{M : Type u_1}
{N : Type u_2}
[Monoid M]
[Monoid N]
(x : Monoid.Coprod M N)

(Monoid.Coprod.toProd x).2 = Monoid.Coprod.snd x


theorem is_pow_of_dvd_count [DecidableEq (Associates α)] {a : Associates α}
    (ha : a ≠ 0) {k : ℕ} (hk : ∀ p : Associates α, Irreducible p → k ∣ count p a.factors) :
    ∃ b : Associates α, a = b ^ k

[(p : Associates α) → Decidable (Irreducible p)]

(hk : ∀ (p : Associates α), Irreducible p → k ∣ p.count a.factors)


@[aesop safe]
lemma mem_set_smul_of_mem_mem {r : S} {m : M} (mem1 : r ∈ s) (mem2 : m ∈ N) :
    r • m ∈ s • N

{R : Type u_2}
{M : Type u_3}
[Semiring R]
{S : Type u_4}
[Monoid S]
[AddCommMonoid M]
[Module R M]
[DistribMulAction S M]
{s : Set S}
{N : Submodule R M}
{r : S}
{m : M}
(mem1 : r ∈ s)
(mem2 : m ∈ N)


@[simp] theorem partition_eq_filter_filter (p : α → Bool) (l : List α) :
    partition p l = (filter p l, filter (not ∘ p) l)

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

List.partition p l = (List.filter p l, List.filter (not ∘ p) l)


@[congr]
theorem image2_congr (h : ∀ a ∈ s, ∀ b ∈ t, f a b = f' a b) : image2 f s t = image2 f' s t

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{f f' : α → β → γ}
{s : Set α}
{t : Set β}
(h : ∀ a ∈ s, ∀ b ∈ t, f a b = f' a b)


/-- Given a property of germs of functions and sets in the model space, then one defines
a corresponding property in a charted space, by requiring that it holds at the preferred chart at
this point. (When the property is local and invariant, it will in fact hold using any chart, see
`liftPropWithinAt_indep_chart`). We require continuity in the lifted property, as otherwise one
single chart might fail to capture the behavior of the function.
-/
@[mk_iff liftPropWithinAt_iff']
structure LiftPropWithinAt (P : (H → H') → Set H → H → Prop) (f : M → M') (s : Set M) (x : M) :
    Prop where
  continuousWithinAt : ContinuousWithinAt f s x
  prop : P (chartAt H' (f x) ∘ f ∘ (chartAt H x).symm) ((chartAt H x).symm ⁻¹' s) (chartAt H x x)

(self : ChartedSpace.LiftPropWithinAt P f s x)

P (↑(chartAt H' (f x)) ∘ f ∘ ↑(chartAt H x).symm) (↑(chartAt H x).symm ⁻¹' s) (↑(chartAt H x) x)


theorem tsum_apply [T2Space β] [AddCommMonoid β] [ContinuousAdd β] {γ : Type*} {f : γ → C(α, β)}
    (hf : Summable f) (x : α) :
    ∑' i : γ, f i x = (∑' i : γ, f i) x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[T2Space β]
[AddCommMonoid β]
[ContinuousAdd β]
{γ : Type u_3}
{f : γ → C(α, β)}
(hf : Summable f)
(x : α)


theorem range_le_iff_comap [RingHomSurjective τ₁₂] {f : F} {p : Submodule R₂ M₂} :
    range f ≤ p ↔ comap f p = ⊤

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_6}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_11}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
[RingHomSurjective τ₁₂]
{f : F}
{p : Submodule R₂ M₂}

LinearMap.range f ≤ p ↔ Submodule.comap f p = ⊤


@[to_additive lowerClosure_interior_subset] lemma lowerClosure_interior_subset' (s : Set α) :
    (lowerClosure (interior s) : Set α) ⊆ interior (lowerClosure s)

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

↑(lowerClosure (interior s)) ⊆ interior ↑(lowerClosure s)


theorem lipschitzWith_addEquiv :
    LipschitzWith 2 (Unitization.addEquiv 𝕜 A)

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[IsScalarTower 𝕜 A A]
[SMulCommClass 𝕜 A A]
[RegularNormedAlgebra 𝕜 A]

LipschitzWith 2 ⇑(Unitization.addEquiv 𝕜 A)


theorem Integrable.norm_integral_condKernel {f : α × Ω → E} (hf_int : Integrable f ρ) :
    Integrable (fun x ↦ ‖∫ y, f (x, y) ∂ρ.condKernel x‖) ρ.fst

{α : Type u_1}
{Ω : Type u_2}
{E : Type u_3}
{mα : MeasurableSpace α}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{ρ : MeasureTheory.Measure (α × Ω)}
[MeasureTheory.IsFiniteMeasure ρ]
{f : α × Ω → E}
(hf_int : MeasureTheory.Integrable f ρ)

MeasureTheory.Integrable (fun x => ‖∫ (y : Ω), f (x, y) ∂ρ.condKernel x‖) ρ.fst


/-- The **Minkowski Convex Body Theorem**. If `s` is a convex symmetric domain of `E` whose volume
is large enough compared to the covolume of a lattice `L` of `E`, then it contains a non-zero
lattice point of `L`.  -/
theorem exists_ne_zero_mem_lattice_of_measure_mul_two_pow_lt_measure [NormedAddCommGroup E]
    [NormedSpace ℝ E] [BorelSpace E] [FiniteDimensional ℝ E] [IsAddHaarMeasure μ]
    {L : AddSubgroup E} [Countable L] (fund : IsAddFundamentalDomain L F μ)
    (h_symm : ∀ x ∈ s, -x ∈ s) (h_conv : Convex ℝ s) (h : μ F * 2 ^ finrank ℝ E < μ s) :
    ∃ x ≠ 0, ((x : L) : E) ∈ s

(fund : MeasureTheory.IsAddFundamentalDomain (↥L) F μ)

(h : μ F * 2 ^ FiniteDimensional.finrank ℝ E < μ s)


theorem rescale_injective {a : R} (ha : a ≠ 0) : Function.Injective (rescale a)

{R : Type u_1}
[CommRing R]
[IsDomain R]
{a : R}
(ha : a ≠ 0)


/-- A diagram `WalkingCospan ⥤ C` is isomorphic to some `PullbackCone.mk` after
composing with `diagramIsoCospan`. -/
@[simps!]
def PullbackCone.isoMk {F : WalkingCospan ⥤ C} (t : Cone F) :
    (Cones.postcompose (diagramIsoCospan.{v} _).hom).obj t ≅
      PullbackCone.mk (t.π.app WalkingCospan.left) (t.π.app WalkingCospan.right)
        ((t.π.naturality inl).symm.trans (t.π.naturality inr : _))

{F : CategoryTheory.Limits.WalkingCospan ⥤ C}

(CategoryTheory.Limits.PullbackCone.isoMk t).hom.hom = 𝟙 t.pt


theorem kerase_kerase {a a'} {l : List (Sigma β)} :
    (kerase a' l).kerase a = (kerase a l).kerase a'

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

List.kerase a (List.kerase a' l) = List.kerase a' (List.kerase a l)


theorem max_def (a b : α) : max a b = if a ≤ b then b else a


@[simp]
theorem map_coe' {a : α} {f : α → β} : Option.map f (a : Option α) = ↑(f a)

{α : Type u_1}
{β : Type u_2}
{a : α}
{f : α → β}


theorem filter_le_lt_eq_Ico [DecidablePred fun j => a ≤ j ∧ j < b] :
    (univ.filter fun j => a ≤ j ∧ j < b) = Ico a b

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
(a b : α)
[Fintype α]
[DecidablePred fun j => a ≤ j ∧ j < b]

Finset.filter (fun j => a ≤ j ∧ j < b) Finset.univ = Finset.Ico a b


@[reassoc (attr := simp)]
theorem ι_colimitLimitIso_limit_π (F : J ⥤ K ⥤ C) (a) (b) :
    colimit.ι (limit F) a ≫ (colimitLimitIso F).hom ≫ limit.π (colimit F.flip) b =
      (limit.π F b).app a ≫ (colimit.ι F.flip a).app b

[CategoryTheory.Limits.ReflectsLimitsOfShape J (CategoryTheory.forget C)]

[CategoryTheory.Limits.PreservesColimitsOfShape K (CategoryTheory.forget C)]

[CategoryTheory.Limits.PreservesLimitsOfShape J (CategoryTheory.forget C)]

CategoryTheory.Limits.colimit.ι (CategoryTheory.Limits.limit F) a ≫
    (CategoryTheory.Limits.colimitLimitIso F).hom ≫
      CategoryTheory.Limits.limit.π (CategoryTheory.Limits.colimit F.flip) b =
  (CategoryTheory.Limits.limit.π F b).app a ≫ (CategoryTheory.Limits.colimit.ι F.flip a).app b


theorem HasSum.matrix_diagonal [DecidableEq n] {f : X → n → R} {a : n → R} (hf : HasSum f a) :
    HasSum (fun x => diagonal (f x)) (diagonal a)

{X : Type u_1}
{n : Type u_5}
{R : Type u_8}
[AddCommMonoid R]
[TopologicalSpace R]
[DecidableEq n]
{f : X → n → R}
{a : n → R}
(hf : HasSum f a)

HasSum (fun x => Matrix.diagonal (f x)) (Matrix.diagonal a)


/-- `PowerBasis.map pb (e : S ≃ₐ[R] S')` is the power basis for `S'` generated by `e pb.gen`. -/
@[simps dim gen basis]
noncomputable def map (pb : PowerBasis R S) (e : S ≃ₐ[R] S') : PowerBasis R S'

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
{S' : Type u_7}
[CommRing S']
[Algebra R S']
(pb : PowerBasis R S)
(e : S ≃ₐ[R] S')


@[simp high]
theorem inner_orthogonalProjection_eq_of_mem_right [HasOrthogonalProjection K] (u : K) (v : E) :
    ⟪orthogonalProjection K v, u⟫ = ⟪v, u⟫

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

⟪(orthogonalProjection K) v, u⟫_𝕜 = ⟪v, ↑u⟫_𝕜


/-- Every Galois connection induces a closure operator given by the composition. This is the partial
order version of the statement that every adjunction induces a monad. -/
@[simps!]
def GaloisConnection.closureOperator [PartialOrder α] [Preorder β] {l : α → β} {u : β → α}
    (gc : GaloisConnection l u) : ClosureOperator α

{α : Type u_1}
{β : Type u_4}
[PartialOrder α]
[Preorder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
(x : α)


@[simp]
theorem cliqueSet_map (hn : n ≠ 1) (G : SimpleGraph α) (f : α ↪ β) :
    (G.map f).cliqueSet n = map f '' G.cliqueSet n

{α : Type u_1}
{β : Type u_2}
{n : ℕ}
(hn : n ≠ 1)
(G : SimpleGraph α)
(f : α ↪ β)

(SimpleGraph.map f G).cliqueSet n = Finset.map f '' G.cliqueSet n


theorem isCodetecting_unop_iff {𝒢 : Set Cᵒᵖ} : IsCodetecting 𝒢.unop ↔ IsDetecting 𝒢

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{𝒢 : Set Cᵒᵖ}

CategoryTheory.IsCodetecting 𝒢.unop ↔ CategoryTheory.IsDetecting 𝒢


theorem degree_X_sub_C_le (r : R) : (X - C r).degree ≤ 1

(Polynomial.X - Polynomial.C r).degree ≤ 1


theorem isIdempotentElem_iff_eq_bot_or_top {R : Type*} [CommRing R] [IsDomain R] (I : Ideal R)
    (h : I.FG) : IsIdempotentElem I ↔ I = ⊥ ∨ I = ⊤

{R : Type u_1}
[CommRing R]
[IsDomain R]
(I : Ideal R)
(h : I.FG)


theorem Indep.coindep (hI : M.Indep I) : M✶.Coindep I

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


lemma in₀₁_iff' :
    (graph t).Adj (in₀ a) (in₁ b) ↔ ∃ x : α × β × γ, x ∈ t ∧ x.1 = a ∧ x.2.1 = b

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

(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₁ b) ↔ ∃ x ∈ t, x.1 = a ∧ x.2.1 = b


theorem Base.insert_dep (hB : M.Base B) (h : e ∈ M.E \ B) : M.Dep (insert e B)

{α : Type u_1}
{M : Matroid α}
{B : Set α}
{e : α}
(hB : M.Base B)
(h : e ∈ M.E \ B)


@[simp]
theorem optionCongr_refl : optionCongr (Equiv.refl α) = Equiv.refl _

(Equiv.refl α).optionCongr = Equiv.refl (Option α)


lemma exact_iff_degreewise_exact :
    S.Exact ↔ ∀ (i : ι), (S.map (eval C c i)).Exact

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

S.Exact ↔ ∀ (i : ι), (S.map (HomologicalComplex.eval C c i)).Exact


theorem edist_efixedPoint_lt_top (hf : ContractingWith K f) {x : α} (hx : edist x (f x) ≠ ∞) :
    edist x (efixedPoint f hf x hx) < ∞

{α : Type u_1}
[EMetricSpace α]
[cs : CompleteSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
{x : α}
(hx : edist x (f x) ≠ ⊤)

edist x (ContractingWith.efixedPoint f hf x hx) < ⊤


theorem le_sum (μ : ι → Measure α) (i : ι) : μ i ≤ sum μ

{α : Type u_1}
{ι : Type u_5}
{m0 : MeasurableSpace α}
(μ : ι → MeasureTheory.Measure α)
(i : ι)


@[simp]
theorem toEquiv_inducedStructureEquiv (e : M ≃ N) :
    @Language.Equiv.toEquiv L M N _ (inducedStructure e) (inducedStructureEquiv e) = e

{L : FirstOrder.Language}
{M : Type u_1}
{N : Type u_2}
[L.Structure M]
(e : M ≃ N)


theorem isSimpleModule_iff_toSpanSingleton_surjective : IsSimpleModule R M ↔
    Nontrivial M ∧ ∀ x : M, x ≠ 0 → Function.Surjective (LinearMap.toSpanSingleton R M x)

{R : Type u_2}
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]

IsSimpleModule R M ↔ Nontrivial M ∧ ∀ (x : M), x ≠ 0 → Function.Surjective ⇑(LinearMap.toSpanSingleton R M x)


@[to_additive (attr := simp)]
theorem set_smul_subset_set_smul_iff : a • A ⊆ a • B ↔ A ⊆ B

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[AddAction α β]
{A B : Set β}
{a : α}


@[simp]
theorem bot_eq_false : ⊥ = false


theorem minFacHelper_0 (n : ℕ)
    (h1 : Nat.ble (nat_lit 2) n = true) (h2 : nat_lit 1 = n % (nat_lit 2)) :
    MinFacHelper n (nat_lit 3)


@[simp]
theorem coe_toLocallyBoundedMap (hf : LipschitzWith K f) : ⇑(hf.toLocallyBoundedMap f) = f

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(hf : LipschitzWith K f)

⇑(LipschitzWith.toLocallyBoundedMap f hf) = f


theorem rangeS_top_iff_surjective {f : R →+* S} :
    f.rangeS = (⊤ : Subsemiring S) ↔ Function.Surjective f

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
{f : R →+* S}


theorem HasFDerivWithinAt.exp (hf : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (fun x => Real.exp (f x)) (Real.exp (f x) • f') s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{f' : E →L[ℝ] ℝ}
{x : E}
{s : Set E}
(hf : HasFDerivWithinAt f f' s x)


@[simp]
theorem zero_comp (f : NormedAddGroupHom V₁ V₂) : (0 : NormedAddGroupHom V₂ V₃).comp f = 0

{V₁ : Type u_2}
{V₂ : Type u_3}
{V₃ : Type u_4}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
[SeminormedAddCommGroup V₃]
(f : NormedAddGroupHom V₁ V₂)


private theorem rexp_cexp_aux (x : ℝ) (s : ℂ) (f : E) :
    rexp (-x) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(x : ℝ)
(s : ℂ)
(f : E)


@[to_additive]
theorem map_mono {f : G →* N} {K K' : Subgroup G} : K ≤ K' → map f K ≤ map f K'

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{f : G →* N}
{K K' : Subgroup G}

K ≤ K' → Subgroup.map f K ≤ Subgroup.map f K'


theorem range_eq_map (f : R →+* S) : f.range = Subring.map f ⊤

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
(f : R →+* S)


theorem sum_le_one (x : M) : ∑ᶠ i, f i x ≤ 1

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{s : Set M}
(f : SmoothPartitionOfUnity ι I M s)
(x : M)


@[to_additive]
theorem subset_one_iff_eq : s ⊆ 1 ↔ s = ∅ ∨ s = 1


theorem finite_of_ncard_pos (hs : 0 < s.ncard) : s.Finite

{α : Type u_1}
{s : Set α}
(hs : 0 < s.ncard)


theorem coeff_index_single_X [DecidableEq σ] (s t : σ) :
    coeff R (single t 1) (X s : MvPowerSeries σ R) = if t = s then 1 else 0

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
[DecidableEq σ]
(s t : σ)

(MvPowerSeries.coeff R (Finsupp.single t 1)) (MvPowerSeries.X s) = if t = s then 1 else 0


/-- `pb : PowerBasis R S` states that `1, pb.gen, ..., pb.gen ^ (pb.dim - 1)`
is a basis for the `R`-algebra `S` (viewed as `R`-module).

This is a structure, not a class, since the same algebra can have many power bases.
For the common case where `S` is defined by adjoining an integral element to `R`,
the canonical power basis is given by `{Algebra,IntermediateField}.adjoin.powerBasis`.
-/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure PowerBasis (R S : Type*) [CommRing R] [Ring S] [Algebra R S] where
  gen : S
  dim : ℕ
  basis : Basis (Fin dim) R S
  basis_eq_pow : ∀ (i), basis i = gen ^ (i : ℕ)

{R : Type u_7}
{S : Type u_8}
[CommRing R]
[Ring S]
[Algebra R S]
(self : PowerBasis R S)
(i : Fin self.dim)


@[simp]
theorem comp_right {X Y Z : StructuredArrow S T} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).right = f.right ≫ g.right

{X Y Z : CategoryTheory.StructuredArrow S T}

(CategoryTheory.CategoryStruct.comp f g).right = CategoryTheory.CategoryStruct.comp f.right g.right


theorem nonneg_muld {a : ℤ√d} (ha : Nonneg a) : Nonneg (sqrtd * a)


@[to_additive]
theorem ball_mul_one : ball 1 δ * s = thickening δ s

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(s : Set E)

Metric.ball 0 δ + s = Metric.thickening δ s


/-- Shifting `f` by `(1 / (2 * ‖w‖ ^ 2)) • w` negates the integral in the Riemann-Lebesgue lemma. -/
theorem fourierIntegral_half_period_translate {w : V} (hw : w ≠ 0) :
    (∫ v : V, 𝐞 (-⟪v, w⟫) • f (v + i w)) = -∫ v : V, 𝐞 (-⟪v, w⟫) • f v

{E : Type u_1}
{V : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : V → E}
[NormedAddCommGroup V]
[MeasurableSpace V]
[BorelSpace V]
[InnerProductSpace ℝ V]
[FiniteDimensional ℝ V]
{w : V}
(hw : w ≠ 0)


theorem contractLeftAux_contractLeftAux (v : M) (x : CliffordAlgebra Q) (fx : CliffordAlgebra Q) :
    contractLeftAux Q d v (ι Q v * x, contractLeftAux Q d v (x, fx)) = Q v • fx

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

((CliffordAlgebra.contractLeftAux Q d) v)
    ((CliffordAlgebra.ι Q) v * x, ((CliffordAlgebra.contractLeftAux Q d) v) (x, fx)) =
  Q v • fx


@[to_additive]
theorem prod_embDomain [Zero M] [CommMonoid N] {v : α →₀ M} {f : α ↪ β} {g : β → M → N} :
    (v.embDomain f).prod g = v.prod fun a b => g (f a) b

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

(Finsupp.embDomain f v).sum g = v.sum fun a b => g (f a) b


@[simp]
theorem vanishingIdeal_empty : vanishingIdeal (∅ : Set (PrimeSpectrum R)) = ⊤


@[simp]
theorem coe_copy (S : StarSubsemiring R) (s : Set R) (hs : s = ↑S) : (S.copy s hs : Set R) = s

{R : Type v}
[NonAssocSemiring R]
[StarRing R]
(S : StarSubsemiring R)
(s : Set R)
(hs : s = ↑S)


theorem mapₗ_congr {f g : α → β} (hf : Measurable f) (hg : Measurable g) (h : f =ᵐ[μ] g) :
    mapₗ f μ = mapₗ g μ

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{f g : α → β}
(hf : Measurable f)
(hg : Measurable g)
(h : f =ᵐ[μ] g)

(MeasureTheory.Measure.mapₗ f) μ = (MeasureTheory.Measure.mapₗ g) μ


theorem exists_square_le [CovariantClass α α (· * ·) (· < ·)] (a : α) : ∃ b : α, b * b ≤ a

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


theorem pderiv_C {i : σ} : pderiv i (C a) = 0

{R : Type u}
{σ : Type v}
{a : R}
[CommSemiring R]
{i : σ}

(MvPolynomial.pderiv i) (MvPolynomial.C a) = 0


theorem coe_nnreal_ne_top (x : ℝ≥0) : ((x : ℝ≥0∞) : EReal) ≠ ⊤


/-- The class number of a number field is `1` iff the ring of integers is a PID. -/
theorem classNumber_eq_one_iff : classNumber K = 1 ↔ IsPrincipalIdealRing (𝓞 K)

{K : Type u_1}
[Field K]
[NumberField K]

NumberField.classNumber K = 1 ↔ IsPrincipalIdealRing (NumberField.RingOfIntegers K)


@[simp]
lemma zero_comp (a : M) {b c : M} (β : ShiftedHom Y Z b) (h : b + a = c) :
    (0 : ShiftedHom X Y a).comp β h = 0

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
{M : Type u_4}
[AddMonoid M]
[CategoryTheory.HasShift C M]
(X : C)
{Y Z : C}
[CategoryTheory.Preadditive C]
(a : M)
{b c : M}
(β : CategoryTheory.ShiftedHom Y Z b)
(h : b + a = c)

CategoryTheory.ShiftedHom.comp 0 β h = 0


@[simp]
theorem iterate_eq_nil {f : α → α} {a : α} {n : ℕ} : iterate f a n = [] ↔ n = 0

{α : Type u_1}
{f : α → α}
{a : α}
{n : ℕ}


@[simp]
theorem pi'_eval (f : ∀ i, A ⥤ C i) (i : I) : pi' f ⋙ Pi.eval C i = f i

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

(f : (i : I) → CategoryTheory.Functor A (C i))

(CategoryTheory.Functor.pi' f).comp (CategoryTheory.Pi.eval C i) = f i


nonrec lemma Filter.Tendsto.eventually_ne_cobounded [Bornology α] {f : β → α} {l : Filter β}
    (h : Tendsto f l (cobounded α)) (a : α) : ∀ᶠ x in l, f x ≠ a

(h : Filter.Tendsto f l (Bornology.cobounded α))


theorem toComplex_zero : ((0 : ℤ[i]) : ℂ) = 0


@[to_additive]
protected theorem UniformOnFun.hasBasis_nhds_one_of_basis (𝔖 : Set <| Set α) (h𝔖₁ : 𝔖.Nonempty)
    (h𝔖₂ : DirectedOn (· ⊆ ·) 𝔖) {p : ι → Prop} {b : ι → Set G}
    (h : (𝓝 1 : Filter G).HasBasis p b) :
    (𝓝 1 : Filter (α →ᵤ[𝔖] G)).HasBasis (fun Si : Set α × ι => Si.1 ∈ 𝔖 ∧ p Si.2) fun Si =>
      { f : α →ᵤ[𝔖] G | ∀ x ∈ Si.1, toFun 𝔖 f x ∈ b Si.2 }

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

(𝓝 0).HasBasis (fun Si => Si.1 ∈ 𝔖 ∧ p Si.2) fun Si => {f | ∀ x ∈ Si.1, (UniformOnFun.toFun 𝔖) f x ∈ b Si.2}


theorem nth_mul_coeff (n : ℕ) :
    ∃ f : TruncatedWittVector p (n + 1) k → TruncatedWittVector p (n + 1) k → k,
    ∀ x y : 𝕎 k, (x * y).coeff (n + 1) =
      x.coeff (n + 1) * y.coeff 0 ^ p ^ (n + 1) + y.coeff (n + 1) * x.coeff 0 ^ p ^ (n + 1) +
      f (truncateFun (n + 1) x) (truncateFun (n + 1) y)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(k : Type u_1)
[CommRing k]
[CharP k p]
(n : ℕ)

∃ f,
  ∀ (x y : WittVector p k),
    (x * y).coeff (n + 1) =
      x.coeff (n + 1) * y.coeff 0 ^ p ^ (n + 1) + y.coeff (n + 1) * x.coeff 0 ^ p ^ (n + 1) +
        f (WittVector.truncateFun (n + 1) x) (WittVector.truncateFun (n + 1) y)


theorem exists_simple_submodule [Nontrivial M] : ∃ m : Submodule R M, IsSimpleModule R m

(R : Type u_2)
[Ring R]
(M : Type u_4)
[AddCommGroup M]
[Module R M]
[IsSemisimpleModule R M]
[Nontrivial M]


theorem rpow_le_rpow_of_exponent_nonpos {x y : ℝ} (hy : 0 < y) (hxy : y ≤ x) (hz : z ≤ 0) :
    x ^ z ≤ y ^ z

{z x y : ℝ}
(hy : 0 < y)
(hxy : y ≤ x)
(hz : z ≤ 0)


@[simp]
theorem union_insert (a : α) (s t : Finset α) : s ∪ insert a t = insert a (s ∪ t)

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


theorem eq_inv_comp (α : X ≅ Y) {f : X ⟶ Z} {g : Y ⟶ Z} : g = α.inv ≫ f ↔ α.hom ≫ g = f

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

g = CategoryTheory.CategoryStruct.comp α.inv f ↔ CategoryTheory.CategoryStruct.comp α.hom g = f


@[to_additive]
theorem ContinuousMul.induced {α : Type*} {β : Type*} {F : Type*} [FunLike F α β] [MulOneClass α]
    [MulOneClass β] [MonoidHomClass F α β] [tβ : TopologicalSpace β] [ContinuousMul β] (f : F) :
    @ContinuousMul α (tβ.induced f) _

{α : Type u_6}
{β : Type u_7}
{F : Type u_8}
[FunLike F α β]
[MulOneClass α]
[MulOneClass β]
[MonoidHomClass F α β]
[tβ : TopologicalSpace β]
[ContinuousMul β]
(f : F)


theorem preimage_mk_interior : mk ⁻¹' interior t = interior (mk ⁻¹' t)

{X : Type u_1}
[TopologicalSpace X]
{t : Set (SeparationQuotient X)}

SeparationQuotient.mk ⁻¹' interior t = interior (SeparationQuotient.mk ⁻¹' t)


lemma residue_ne_zero_iff_isUnit (x : R) : residue R x ≠ 0 ↔ IsUnit x

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


theorem integral_mono (h : f ≤ g) : (∫ u in a..b, f u ∂μ) ≤ ∫ u in a..b, g u ∂μ

{f g : ℝ → ℝ}
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
(hab : a ≤ b)
(hf : IntervalIntegrable f μ a b)
(hg : IntervalIntegrable g μ a b)
(h : f ≤ g)

∫ (u : ℝ) in a..b, f u ∂μ ≤ ∫ (u : ℝ) in a..b, g u ∂μ


protected theorem isClosed : IsClosed (nonunits R)

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]


theorem filter_le_of_le {n m l : ℕ} (hnl : n ≤ l) :
    ((Ico n m).filter fun x => l ≤ x) = Ico l m

List.filter (fun x => decide (l ≤ x)) (List.Ico n m) = List.Ico l m


theorem integrable_condexpL1 (f : α → F') : Integrable (condexpL1 hm μ f) μ

{α : Type u_1}
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(f : α → F')

MeasureTheory.Integrable (↑↑(MeasureTheory.condexpL1 hm μ f)) μ


@[simp]
theorem mapRange.linearEquiv_toLinearMap (f : M ≃ₗ[R] N) :
    (mapRange.linearEquiv f).toLinearMap = (mapRange.linearMap f.toLinearMap : (α →₀ M) →ₗ[R] _)

{α : Type u_1}
{M : Type u_2}
{N : Type u_3}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
(f : M ≃ₗ[R] N)

↑(Finsupp.mapRange.linearEquiv f) = Finsupp.mapRange.linearMap ↑f


theorem totalDegree_list_prod :
    ∀ s : List (MvPolynomial σ R), s.prod.totalDegree ≤ (s.map MvPolynomial.totalDegree).sum

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(s : List (MvPolynomial σ R))

s.prod.totalDegree ≤ (List.map MvPolynomial.totalDegree s).sum


@[to_additive]
theorem multipliable_prod {f : γ → β → α} {s : Finset γ} (hf : ∀ i ∈ s, Multipliable (f i)) :
    Multipliable fun b ↦ ∏ i ∈ s, f i b

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
[ContinuousAdd α]
{f : γ → β → α}
{s : Finset γ}
(hf : ∀ i ∈ s, Summable (f i))


/-- When all the indexed types are the same, the dependent product is just the regular product. -/
@[simp]
theorem List.dProd_monoid {α} [AddMonoid ι] [Monoid R] (l : List α) (fι : α → ι) (fA : α → R) :
    @List.dProd _ _ (fun _ : ι => R) _ _ l fι fA = (l.map fA).prod

(ι : Type u_1)
{R : Type u_2}
{α : Type u_3}
[AddMonoid ι]
[Monoid R]
(l : List α)
(fι : α → ι)
(fA : α → R)


theorem open_image (hf : ApproximatesLinearOn f f' s c) (f'symm : f'.NonlinearRightInverse)
    (hs : IsOpen s) (hc : Subsingleton F ∨ c < f'symm.nnnorm⁻¹) : IsOpen (f '' s)


@[simp] lemma coeFn_toFiniteMeasure (μ : ProbabilityMeasure Ω) : ⇑μ.toFiniteMeasure = μ

(μ : MeasureTheory.ProbabilityMeasure Ω)


theorem corec_unique (g : α → P α) (f : α → M P) (hyp : ∀ x, M.dest (f x) = P.map f (g x)) :
    f = M.corec g

(hyp : ∀ (x : α), (f x).dest = P.map f (g x))


@[to_additive]
theorem IsGLB.inv (h : IsGLB s a) : IsLUB s⁻¹ a⁻¹

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

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


@[simps!]
instance category : Category (Square C)

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

∀ {X Y Z : CategoryTheory.Square C} (f : X.Hom Y) (g : Y.Hom Z),
  (CategoryTheory.CategoryStruct.comp f g).τ₃ = CategoryTheory.CategoryStruct.comp f.τ₃ g.τ₃


/-- In a real vector space, a function `f` that approximates a linear equivalence on a subset `s`
can be extended to a homeomorphism of the whole space. -/
theorem exists_homeomorph_extension {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] {s : Set E}
    {f : E → F} {f' : E ≃L[ℝ] F} {c : ℝ≥0} (hf : ApproximatesLinearOn f (f' : E →L[ℝ] F) s c)
    (hc : Subsingleton E ∨ lipschitzExtensionConstant F * c < ‖(f'.symm : F →L[ℝ] E)‖₊⁻¹) :
    ∃ g : E ≃ₜ F, EqOn f g s

(hc : Subsingleton E ∨ lipschitzExtensionConstant F * c < ‖↑f'.symm‖₊⁻¹)


theorem toNat_le_iff_le_of_lt_aleph0 (hc : c < ℵ₀) (hd : d < ℵ₀) :
    toNat c ≤ toNat d ↔ c ≤ d

{c d : Cardinal.{u}}
(hc : c < Cardinal.aleph0)
(hd : d < Cardinal.aleph0)

Cardinal.toNat c ≤ Cardinal.toNat d ↔ c ≤ d


@[simp] theorem dist_pointReflection_left (p q : P) :
    dist (Equiv.pointReflection p q) p = dist p q

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(p q : P)

dist ((Equiv.pointReflection p) q) p = dist p q


/-- Two equivalent partial homeomorphisms have coinciding `toFun` on the source -/
theorem EqOnSource.eqOn {e e' : PartialHomeomorph X Y} (h : e ≈ e') : EqOn e e' e.source

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


theorem cons_le [∀ i, Preorder (α i)] {x : α 0} {q : ∀ i, α i} {p : ∀ i : Fin n, α i.succ} :
    cons x p ≤ q ↔ x ≤ q 0 ∧ p ≤ tail q

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

Fin.cons x p ≤ q ↔ x ≤ q 0 ∧ p ≤ Fin.tail q


@[to_additive]
theorem map_le_map_iff_of_injective {S T : Subsemigroup M} : S.map f ≤ T.map f ↔ S ≤ T

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
{f : M →ₙ* N}
(hf : Function.Injective ⇑f)
{S T : Subsemigroup M}

Subsemigroup.map f S ≤ Subsemigroup.map f T ↔ S ≤ T


nonrec
lemma Inducing.isLocallyClosed_iff {s : Set X}
    {f : X → Y} (hf : Inducing f) :
    IsLocallyClosed s ↔ ∃ s' : Set Y, IsLocallyClosed s' ∧ f ⁻¹' s' = s

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

IsLocallyClosed s ↔ ∃ s', IsLocallyClosed s' ∧ f ⁻¹' s' = s


theorem localization_map [FormallySmooth R S] : FormallySmooth Rₘ Sₘ

[IsLocalization (Submonoid.map (algebraMap R S) M) Sₘ]


@[norm_cast] lemma odd_coe_nat (n : ℕ) : Odd (n : ℤ) ↔ Odd n


@[simp]
theorem OrderIso.dualAntisymmetrization_symm_apply (a : α) :
    (OrderIso.dualAntisymmetrization _).symm (toAntisymmetrization _ <| toDual a) =
      toDual (toAntisymmetrization _ a)

(OrderIso.dualAntisymmetrization α).symm (toAntisymmetrization (fun x x_1 => x ≤ x_1) (OrderDual.toDual a)) =
  OrderDual.toDual (toAntisymmetrization (fun x x_1 => x ≤ x_1) a)


theorem not_le {i j : Fin n} : ¬ i ≤ j ↔ j < i


lemma smash_castAdd {p q : RelSeries r} (connect : p.last = q.head) (i : Fin p.length) :
    p.smash q connect (Fin.castSucc <| i.castAdd q.length) = p (Fin.castSucc i)

{α : Type u_1}
{r : Rel α α}
{p q : RelSeries r}
(connect : p.last = q.head)
(i : Fin p.length)

(p.smash q connect).toFun (Fin.castAdd q.length i).castSucc = p.toFun i.castSucc


@[to_additive (attr := simp)]
theorem liftOfRightInverse_comp_apply (hf : Function.RightInverse f_inv f)
    (g : { g : G₁ →* G₃ // f.ker ≤ g.ker }) (x : G₁) :
    (f.liftOfRightInverse f_inv hf g) (f x) = g.1 x

{G₁ : Type u_5}
{G₂ : Type u_6}
{G₃ : Type u_7}
[AddGroup G₁]
[AddGroup G₂]
[AddGroup G₃]
(f : G₁ →+ G₂)
(f_inv : G₂ → G₁)
(hf : Function.RightInverse f_inv ⇑f)
(g : { g // f.ker ≤ g.ker })
(x : G₁)

((f.liftOfRightInverse f_inv hf) g) (f x) = ↑g x


theorem mul_mem_mul_rev (hm : m ∈ M) (hn : n ∈ N) : n * m ∈ M * N

{R : Type u}
[CommSemiring R]
{A : Type v}
[CommSemiring A]
[Algebra R A]
{M N : Submodule R A}
{m n : A}
(hm : m ∈ M)
(hn : n ∈ N)


theorem iUnion_range_eq_iUnion (C : ι → Set α) {f : ∀ x : ι, β → C x}
    (hf : ∀ x : ι, Surjective (f x)) : ⋃ y : β, range (fun x : ι => (f x y).val) = ⋃ x, C x

(hf : ∀ (x : ι), Function.Surjective (f x))

(⋃ y, Set.range fun x => ↑(f x y)) = ⋃ x, C x


theorem exists_of_mem_map {f} {b : β} : ∀ {s : Seq α}, b ∈ map f s → ∃ a, a ∈ s ∧ f a = b

{α : Type u}
{β : Type v}
{f : α → β}
{b : β}
{s : Stream'.Seq α}

b ∈ Stream'.Seq.map f s → ∃ a, a ∈ s ∧ f a = b


@[simp]
lemma ofNat_le_toNNReal {n : ℕ} {r : ℝ} [n.AtLeastTwo] :
    no_index (OfNat.ofNat n) ≤ r.toNNReal ↔ OfNat.ofNat n ≤ r

OfNat.ofNat n ≤ r.toNNReal ↔ OfNat.ofNat n ≤ r


theorem BilinForm.toMatrix_compLeft (B : BilinForm R₂ M₂) (f : M₂ →ₗ[R₂] M₂) :
    BilinForm.toMatrix b (B.compLeft f) = (LinearMap.toMatrix b b f)ᵀ * BilinForm.toMatrix b B

{R₂ : Type u_5}
{M₂ : Type u_6}
[CommSemiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]
(b : Basis n R₂ M₂)
(B : LinearMap.BilinForm R₂ M₂)
(f : M₂ →ₗ[R₂] M₂)

(BilinForm.toMatrix b) (B.compLeft f) = ((LinearMap.toMatrix b b) f).transpose * (BilinForm.toMatrix b) B


@[to_additive]
theorem prod_comm {ι₁ ι₂ : Sort _} {β₁ : ι₁ → Type*} {β₂ : ι₂ → Type*} [DecidableEq ι₁]
    [DecidableEq ι₂] [∀ i, Zero (β₁ i)] [∀ i, Zero (β₂ i)] [∀ (i) (x : β₁ i), Decidable (x ≠ 0)]
    [∀ (i) (x : β₂ i), Decidable (x ≠ 0)] [CommMonoid γ] (f₁ : Π₀ i, β₁ i) (f₂ : Π₀ i, β₂ i)
    (h : ∀ i, β₁ i → ∀ i, β₂ i → γ) :
    (f₁.prod fun i₁ x₁ => f₂.prod fun i₂ x₂ => h i₁ x₁ i₂ x₂) =
      f₂.prod fun i₂ x₂ => f₁.prod fun i₁ x₁ => h i₁ x₁ i₂ x₂

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

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

(h : (i : ι₁) → β₁ i → (i : ι₂) → β₂ i → γ)


/-- We say that the action of `M` on `α` has `Measurable_SMul₂` if the map
`(c, x) ↦ c • x` is a measurable function. -/
@[to_additive MeasurableVAdd₂]
class MeasurableSMul₂ (M α : Type*) [SMul M α] [MeasurableSpace M] [MeasurableSpace α] :
    Prop where
  measurable_smul : Measurable (Function.uncurry (· • ·) : M × α → α)

{M : Type u_2}
{α : Type u_3}
[SMul M α]
[MeasurableSpace M]
[MeasurableSpace α]
[self : MeasurableSMul₂ M α]

Measurable (Function.uncurry fun x x_1 => x • x_1)


@[to_additive]
lemma prod_lt_one_iff_of_le_one (hf : f ≤ 1) : ∏ i, f i < 1 ↔ f < 1

{ι : Type u_1}
{M : Type u_4}
[Fintype ι]
[OrderedCancelCommMonoid M]
{f : ι → M}
(hf : f ≤ 1)


/-- Extensionality. See `ext` below for the version that will actually be used. -/
theorem ext' {χ χ' : MulChar R R'} (h : ∀ a, χ a = χ' a) : χ = χ'

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommMonoidWithZero R']
{χ χ' : MulChar R R'}
(h : ∀ (a : R), χ a = χ' a)


@[simp]
theorem Iic_diff_Iic : Iic b \ Iic a = Ioc a b

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


theorem pointReflection_involutive (x : P) : Function.Involutive (pointReflection 𝕜 x)

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

Function.Involutive ⇑(AffineIsometryEquiv.pointReflection 𝕜 x)


theorem Preadditive.isCoseparator_iff (G : C) :
    IsCoseparator G ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ h : Y ⟶ G, f ≫ h = 0) → f = 0

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

CategoryTheory.IsCoseparator G ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ (h : Y ⟶ G), f ≫ h = 0) → f = 0


/-- The functor `Square C ⥤ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the top morphism of `sq`
to the bottom morphism of `sq`. -/
@[simps!]
def toArrowArrowFunctor' : Square C ⥤ Arrow (Arrow C)

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

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


/-- Uses `left` co(ntra)variant. -/
@[to_additive (attr := simp) Left.neg_pos_iff "Uses `left` co(ntra)variant."]
theorem Left.one_lt_inv_iff : 1 < a⁻¹ ↔ a < 1

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


theorem mk_equiv_eq_arrow_of_lift_eq (leq : lift.{v} #α = lift.{u} #β') :
    #(α ≃ β') = #(α → β')

(leq : Cardinal.lift.{v, u} #α = Cardinal.lift.{u, v} #β')


@[to_additive]
lemma map_injective {f : M →* N} (hf : Function.Injective f) :
    Function.Injective (map f)

{M : Type u}
{N : Type v}
[AddMonoid M]
[AddMonoid N]
{f : M →+ N}
(hf : Function.Injective ⇑f)


lemma uncurry_obj_curry_obj_flip_flip' (F₁ : B ⥤ C) (F₂ : D ⥤ E) (G : C × E ⥤ H) :
    uncurry.obj (F₁ ⋙ (F₂ ⋙ (curry.obj G).flip).flip) = (F₁.prod F₂) ⋙ G

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

CategoryTheory.uncurry.obj (F₁.comp (F₂.comp (CategoryTheory.curry.obj G).flip).flip) = (F₁.prod F₂).comp G


@[simp]
theorem coe_toHomeomorph_symm (h : α ≃ᵢ β) : ⇑h.toHomeomorph.symm = h.symm

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(h : α ≃ᵢ β)


/-- An index category is connected iff the colimit of the constant singleton-valued functor is a
singleton. -/
theorem isConnected_iff_colimit_constPUnitFunctor_iso_pUnit
    [HasColimit (constPUnitFunctor.{w} C)] :
    IsConnected C ↔ Nonempty (colimit (constPUnitFunctor.{w} C) ≅ PUnit)

CategoryTheory.IsConnected C ↔
  Nonempty (CategoryTheory.Limits.colimit (CategoryTheory.Limits.Types.constPUnitFunctor C) ≅ PUnit.{w + 1})


@[simp]
theorem coeFn_zero : ⇑(0 : 𝓢(E, F)) = (0 : E → F)

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]


/-- If a linear map is surjective, then its dual is injective. -/
theorem LinearMap.dualMap_injective_of_surjective {f : M₁ →ₗ[R] M₂} (hf : Function.Surjective f) :
    Function.Injective f.dualMap

{R : Type u}
[CommSemiring R]
{M₁ : Type v}
{M₂ : Type v'}
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
{f : M₁ →ₗ[R] M₂}
(hf : Function.Surjective ⇑f)


@[simp]
theorem coe_ofEq_apply (h : S₁ = S₂) (x : S₁) : (ofEq S₁ S₂ h x : P₁) = x

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(S₁ S₂ : AffineSubspace k P₁)
[Nonempty ↥S₁]
[Nonempty ↥S₂]
(h : S₁ = S₂)
(x : ↥S₁)


@[simp]
theorem fst_prod (f : A →ₐ[R] B) (g : A →ₐ[R] C) : (fst R B C).comp (prod f g) = f

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[Semiring C]
[Algebra R C]
(f : A →ₐ[R] B)
(g : A →ₐ[R] C)


@[to_additive sub_abs_eq_neg_two_nsmul_negPart]
lemma div_mabs_eq_inv_leOnePart_sq (a : α) : a / |a|ₘ = (a⁻ᵐ ^ 2)⁻¹

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


@[to_additive uniformContinuous_nnnorm]
theorem uniformContinuous_nnnorm' : UniformContinuous fun a : E => ‖a‖₊


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

FinBoolAlg.dual.obj X = FinBoolAlg.of (↑X.toBoolAlg)ᵒᵈ


/-- The power basis `1, x, ..., x ^ (d - 1)` for `K⟮x⟯`,
where `d` is the degree of the minimal polynomial of `x`. -/
@[simps]
noncomputable def adjoin.powerBasis {x : L} (hx : IsIntegral K x) : PowerBasis K K⟮x⟯

{K : Type u}
[Field K]
{L : Type u_3}
[Field L]
[Algebra K L]
{x : L}
(hx : IsIntegral K x)

(IntermediateField.adjoin.powerBasis hx).dim = (minpoly K x).natDegree


@[simp] theorem isLeft_eq_false {x : α ⊕ β} : x.isLeft = false ↔ x.isRight

{α : Type u_1}
{β : Type u_2}
{x : α ⊕ β}


lemma eq_one_or_neg_one_of_mul_eq_one (h : u * v = 1) : u = 1 ∨ u = -1


@[reassoc (attr := simp)]
theorem inv_hom_id_app {F G : C ⥤ D} (α : F ≅ G) (X : C) :
    α.inv.app X ≫ α.hom.app X = 𝟙 (G.obj X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F G : C ⥤ D}
(α : F ≅ G)
(X : C)


@[simp] theorem bitIndices_two_mul_add_one (n : ℕ) :
    bitIndices (2 * n + 1) = 0 :: (bitIndices n).map (· + 1)

(2 * n + 1).bitIndices = 0 :: List.map (fun x => x + 1) n.bitIndices


lemma Cauchy.mono_uniformSpace {u v : UniformSpace β} {F : Filter β} (huv : u ≤ v)
    (hF : Cauchy (uniformSpace := u) F) : Cauchy (uniformSpace := v) F

{β : Type v}
{u v : UniformSpace β}
{F : Filter β}
(huv : u ≤ v)
(hF : Cauchy F)


@[to_additive (attr := simp)]
lemma lipschitzOnWith_inv_iff : LipschitzOnWith K f⁻¹ s ↔ LipschitzOnWith K f s

{α : Type u_5}
{E : Type u_6}
[SeminormedCommGroup E]
[PseudoEMetricSpace α]
{K : ℝ≥0}
{f : α → E}
{s : Set α}


theorem aecover_Icc_of_Ioo (ha : Tendsto a l (𝓝 A)) (hb : Tendsto b l (𝓝 B)) :
    AECover (μ.restrict <| Icc A B) l fun i => Ioo (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.Ioo (a i) (b i)


@[simp]
theorem rTensorOne_tmul (y : R) (m : M) : M.rTensorOne (m ⊗ₜ[R] algebraMap R _ y) = y • m

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

M.rTensorOne (m ⊗ₜ[R] (algebraMap R ↥⊥) y) = y • m


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


@[simp]
theorem average_zero_measure (f : α → E) : ⨍ x, f x ∂(0 : Measure α) = 0

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(f : α → E)


@[simp]
theorem Sphere.mk_center_radius (s : Sphere P) : (⟨s.center, s.radius⟩ : Sphere P) = s

{P : Type u_2}
[MetricSpace P]
(s : EuclideanGeometry.Sphere P)

{ center := s.center, radius := s.radius } = s


/-- Typeclass for scalar multiplication that preserves `0` and `+` on the right.

This is exactly `DistribMulAction` without the `MulAction` part.
-/
@[ext]
class DistribSMul (M A : Type*) [AddZeroClass A] extends SMulZeroClass M A where
  /-- Scalar multiplication distributes across addition -/
  smul_add : ∀ (a : M) (x y : A), a • (x + y) = a • x + a • y

{M : Type u_10}
{A : Type u_11}
[AddZeroClass A]
[self : DistribSMul M A]
(a : M)
(x y : A)


@[simp]
theorem map_comp_includeRight (f : A →ₐ[R] B) (g : C →ₐ[R] D) :
    (map f g).comp includeRight = includeRight.comp g

{R : Type uR}
{A : Type uA}
{B : Type uB}
{C : Type uC}
{D : Type uD}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[Semiring C]
[Algebra R C]
[Semiring D]
[Algebra R D]
(f : A →ₐ[R] B)
(g : C →ₐ[R] D)

(Algebra.TensorProduct.map f g).comp Algebra.TensorProduct.includeRight = Algebra.TensorProduct.includeRight.comp g


theorem star_invOf {R : Type*} [Monoid R] [StarMul R] (r : R) [Invertible r]
    [Invertible (star r)] : star (⅟ r) = ⅟ (star r)

{R : Type u_1}
[Monoid R]
[StarMul R]
(r : R)
[Invertible r]
[Invertible (star r)]


@[simp]
theorem mem_zero (x : E) : x ∈ (0 : ConvexCone 𝕜 E) ↔ x = 0

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


theorem norm_eq_of_add_equiv_zero {f g : PadicSeq p} (h : f + g ≈ 0) : f.norm = g.norm

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{f g : PadicSeq p}
(h : f + g ≈ 0)


theorem subset_union {R : Type u} [Ring R] {I J K : Ideal R} :
    (I : Set R) ⊆ J ∪ K ↔ I ≤ J ∨ I ≤ K

↑I ⊆ ↑J ∪ ↑K ↔ I ≤ J ∨ I ≤ K


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

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

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


@[simp] theorem extractP_eq_find?_eraseP
    (l : List α) : extractP p l = (find? p l, eraseP p l)

{α : Type u_1}
{p : α → Bool}
(l : List α)
(acc : Array α)
(xs : List α)

l = acc.data ++ xs → List.extractP.go p l xs acc = (List.find? p xs, acc.data ++ List.eraseP p xs)


@[simp]
theorem eval_nil : M.eval [] = M.start


theorem iff_eq_of_eq_true_left {a b : Prop} (h : a = True) : (a ↔ b) = b


@[simp]
theorem comap_normalizer (f : M' →ₗ⁅R,L⁆ M) : N.normalizer.comap f = (N.comap f).normalizer

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
{M' : Type u_4}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[AddCommGroup M']
[Module R M']
[LieRingModule L M']
[LieModule R L M']
(N : LieSubmodule R L M)
(f : M' →ₗ⁅R,L⁆ M)

LieSubmodule.comap f N.normalizer = (LieSubmodule.comap f N).normalizer


theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩ e.target

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

↑e'.symm '' (e.trans e').target = e'.source ∩ e.target


@[simp]
theorem realize_irreflexive : M ⊨ r.irreflexive ↔ Irreflexive fun x y : M => RelMap r ![x, y]

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{r : L.Relations 2}

M ⊨ r.irreflexive ↔ Irreflexive fun x y => FirstOrder.Language.Structure.RelMap r ![x, y]


/-- If `f` is a `K`-Lipschitz map, then it increases the Hausdorff `d`-measures of sets at most
by the factor of `K ^ d`. -/
theorem hausdorffMeasure_image_le (h : LipschitzWith K f) {d : ℝ} (hd : 0 ≤ d) (s : Set X) :
    μH[d] (f '' s) ≤ (K : ℝ≥0∞) ^ d * μH[d] s

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
[MeasurableSpace X]
[BorelSpace X]
[MeasurableSpace Y]
[BorelSpace Y]
{K : ℝ≥0}
{f : X → Y}
(h : LipschitzWith K f)
{d : ℝ}
(hd : 0 ≤ d)
(s : Set X)


theorem IsEquipartition.card_part_eq_average_iff (hP : P.IsEquipartition) (ht : t ∈ P.parts) :
    t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
{P : Finpartition s}
(hP : P.IsEquipartition)
(ht : t ∈ P.parts)


theorem mul_pos {a b : Ordinal} (h₁ : 0 < a) (h₂ : 0 < b) : 0 < a * b


theorem symm_trans_source_eq (e e' : Trivialization F proj) :
    (e.toPartialEquiv.symm.trans e'.toPartialEquiv).source = (e.baseSet ∩ e'.baseSet) ×ˢ univ

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e e' : Trivialization F proj)

(e.symm.trans e'.toPartialEquiv).source = (e.baseSet ∩ e'.baseSet) ×ˢ Set.univ


lemma fromTypes_fin_const (α β : Type u) (n : ℕ) :
    FromTypes (fun (_ : Fin n) => α) β = OfArity α β n

Function.FromTypes (fun x => α) β = Function.OfArity α β n


lemma moduleCat_exact_iff :
    S.Exact ↔ ∀ (x₂ : S.X₂) (_ : S.g x₂ = 0), ∃ (x₁ : S.X₁), S.f x₁ = x₂

(S : CategoryTheory.ShortComplex (ModuleCat R))

S.Exact ↔ ∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂


lemma natDegree_preΨ₄_le : W.preΨ₄.natDegree ≤ 6

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)


lemma exists_smul_basis_eq (x : W.CoordinateRing) :
    ∃ p q : R[X], p • (1 : W.CoordinateRing) + q • mk W Y = x

{R : Type u}
[CommRing R]
{W : WeierstrassCurve.Affine R}
(x : W.CoordinateRing)

∃ p q, p • 1 + q • (WeierstrassCurve.Affine.CoordinateRing.mk W) Y = x


protected theorem mul_le_mul {a b c d : Int}
    (hac : a ≤ c) (hbd : b ≤ d) (nn_b : 0 ≤ b) (nn_c : 0 ≤ c) : a * b ≤ c * d


theorem pi'_pi [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) :
    pi' μ (pi univ s) = ∏ i, μ i (s i)

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

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

(MeasureTheory.Measure.pi' μ) (Set.univ.pi s) = ∏ i : ι, (μ i) (s i)


theorem integrable_comp (g : F' → A) : Integrable (g ∘ f) ↔ Integrable g

{E' : Type u_2}
{F' : Type u_3}
{A : Type u_4}
[NormedAddCommGroup E']
[InnerProductSpace ℝ E']
[FiniteDimensional ℝ E']
[MeasurableSpace E']
[BorelSpace E']
[NormedAddCommGroup F']
[InnerProductSpace ℝ F']
[FiniteDimensional ℝ F']
[MeasurableSpace F']
[BorelSpace F']
(f : E' ≃ₗᵢ[ℝ] F')
[NormedAddCommGroup A]
(g : F' → A)

MeasureTheory.Integrable (g ∘ ⇑f) MeasureTheory.volume ↔ MeasureTheory.Integrable g MeasureTheory.volume


theorem subcanonical_typesGrothendieckTopology : Sheaf.Subcanonical typesGrothendieckTopology.{u}


protected theorem fderivWithin (hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 iso s x = iso

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{s : Set E}
(iso : E ≃ₗᵢ[𝕜] F)
(hxs : UniqueDiffWithinAt 𝕜 s x)

fderivWithin 𝕜 (⇑iso) s x = ↑{ toLinearEquiv := iso.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }


theorem aevalTower_toAlgHom (x : R) : aevalTower g y (IsScalarTower.toAlgHom S R R[X] x) = g x

{R : Type u}
{S : Type v}
{A' : Type u_1}
[CommSemiring R]
[CommSemiring A']
[CommSemiring S]
[Algebra S R]
[Algebra S A']
(g : R →ₐ[S] A')
(y : A')
(x : R)

(Polynomial.aevalTower g y) ((IsScalarTower.toAlgHom S R R[X]) x) = g x


theorem invFun_eq_symm : e.invFun = e.symm

{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]
(e : A ≃ₐc[R] B)


lemma extensiveTopology.mem_sieves_iff_contains_colimit_cofan {X : C} (S : Sieve X) :
    S ∈ (extensiveTopology C).sieves X ↔
      (∃ (α : Type) (_ : Finite α) (Y : α → C) (π : (a : α) → (Y a ⟶ X)),
        Nonempty (IsColimit (Cofan.mk X π)) ∧ (∀ a : α, (S.arrows) (π a)))

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.FinitaryPreExtensive C]
{X : C}
(S : CategoryTheory.Sieve X)

S ∈ (CategoryTheory.extensiveTopology C).sieves X ↔
  ∃ α,
    ∃ (_ : Finite α),
      ∃ Y π, Nonempty (CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.Cofan.mk X π)) ∧ ∀ (a : α), S.arrows (π a)


@[to_additive (attr := simp)]
theorem toList_prod (xs : List (FreeMonoid α)) : toList xs.prod = (xs.map toList).join

{α : Type u_1}
(xs : List (FreeMonoid α))

FreeMonoid.toList xs.prod = (List.map (⇑FreeMonoid.toList) xs).join


/-- We construct an open cover from another, by providing the needed fields and showing that the
provided fields are isomorphic with the original open cover. -/
@[simps J obj map]
def OpenCover.copy {X : Scheme.{u}} (𝒰 : OpenCover X) (J : Type*) (obj : J → Scheme)
    (map : ∀ i, obj i ⟶ X) (e₁ : J ≃ 𝒰.J) (e₂ : ∀ i, obj i ≅ 𝒰.obj (e₁ i))
    (e₂ : ∀ i, map i = (e₂ i).hom ≫ 𝒰.map (e₁ i)) : OpenCover X

{X : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(J : Type u_1)
(obj : J → AlgebraicGeometry.Scheme)
(map : (i : J) → obj i ⟶ X)
(e₁ : J ≃ 𝒰.J)
(e₂ : (i : J) → obj i ≅ 𝒰.obj (e₁ i))

∀ (e₂_1 : ∀ (i : J), map i = (e₂ i).hom ≫ 𝒰.map (e₁ i)) (a : J), (𝒰.copy J obj map e₁ e₂ e₂_1).obj a = obj a


theorem mem_ball_comm : x ∈ ball y ε ↔ y ∈ ball x ε

{α : Type u}
[PseudoMetricSpace α]
{x y : α}
{ε : ℝ}

x ∈ Metric.ball y ε ↔ y ∈ Metric.ball x ε


/-- In a preadditive category, if the coproduct of `X` and `Y` exists, then the
    binary biproduct of `X` and `Y` exists. -/
theorem HasBinaryBiproduct.of_hasBinaryCoproduct (X Y : C) [HasBinaryCoproduct X Y] :
    HasBinaryBiproduct X Y


@[simp]
theorem differentiableWithinAt_add_const_iff (c : F) :
    DifferentiableWithinAt 𝕜 (fun y => f y + c) s x ↔ DifferentiableWithinAt 𝕜 f s x

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


theorem cliqueFree_of_chromaticNumber_lt {n : ℕ} (hc : G.chromaticNumber < n) :
    G.CliqueFree n

{V : Type u}
{G : SimpleGraph V}
{n : ℕ}
(hc : G.chromaticNumber < ↑n)


lemma map_polynomialX : (W.map f).toAffine.polynomialX = W.polynomialX.map (mapRingHom f)

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type v}
[CommRing S]
(f : R →+* S)

(WeierstrassCurve.map W f).toAffine.polynomialX = Polynomial.map (Polynomial.mapRingHom f) W.polynomialX


@[to_additive (attr := simp, nolint simpNF) zmultiples_equiv_zmultiples_apply]
theorem zpowersEquivZPowers_apply (h : orderOf x = orderOf y) (n : ℕ) :
    zpowersEquivZPowers h ⟨x ^ n, n, zpow_natCast x n⟩ = ⟨y ^ n, n, zpow_natCast y n⟩

{G : Type u_1}
[AddGroup G]
[Finite G]
{x y : G}
(h : addOrderOf x = addOrderOf y)
(n : ℕ)

(zmultiplesEquivZMultiples h) ⟨n • x, ⋯⟩ = ⟨n • y, ⋯⟩


@[simp]
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q)


theorem Lcomplement_iff (P : M) : IsLprojection X P ↔ IsLprojection X (1 - P)

{X : Type u_1}
[NormedAddCommGroup X]
{M : Type u_2}
[Ring M]
[Module M X]
(P : M)


theorem sum_modByMonic_coeff (hq : q.Monic) {n : ℕ} (hn : q.degree ≤ n) :
    (∑ i : Fin n, monomial i ((p %ₘ q).coeff i)) = p %ₘ q

{R : Type u}
[Ring R]
{p q : R[X]}
(hq : q.Monic)
{n : ℕ}
(hn : q.degree ≤ ↑n)

∑ i : Fin n, (Polynomial.monomial ↑i) ((p %ₘ q).coeff ↑i) = p %ₘ q


theorem norm_indicator_le_norm_self : ‖indicator s f a‖ ≤ ‖f a‖

{α : Type u_1}
{E : Type u_2}
[SeminormedAddCommGroup E]
{s : Set α}
(f : α → E)
(a : α)


theorem map_eq_bot_iff_of_injective {I : Ideal R} {f : F} (hf : Function.Injective f) :
    I.map f = ⊥ ↔ I = ⊥

{R : Type u_1}
{S : Type u_2}
{F : Type u_3}
[Ring R]
[Ring S]
[FunLike F R S]
[rc : RingHomClass F R S]
{I : Ideal R}
{f : F}
(hf : Function.Injective ⇑f)


/-- **Equality case of the Rearrangement Inequality**: Pointwise scalar multiplication of `f` and
`g`, which antivary together, is unchanged by a permutation if and only if `f ∘ σ` and `g` antivary
together. Stated by permuting the entries of `f`. -/
theorem Antivary.sum_comp_perm_smul_eq_sum_smul_iff (hfg : Antivary f g) :
    ∑ i, f (σ i) • g i = ∑ i, f i • g i ↔ Antivary (f ∘ σ) g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{σ : Equiv.Perm ι}
{f : ι → α}
{g : ι → β}
[Fintype ι]
(hfg : Antivary f g)

∑ i : ι, f (σ i) • g i = ∑ i : ι, f i • g i ↔ Antivary (f ∘ ⇑σ) g


@[to_additive]
theorem one_ker_inv' {f : G → H} (hf : IsGroupHom f) {a b : G} (h : f (a⁻¹ * b) = 1) :
    f a = f b

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
{f : G → H}
(hf : IsAddGroupHom f)
{a b : G}
(h : f (-a + b) = 0)


@[simp]
theorem mul_X_divMonomial (x : MvPolynomial σ R) (i : σ) :
    x * X i /ᵐᵒⁿᵒᵐⁱᵃˡ Finsupp.single i 1 = x

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(x : MvPolynomial σ R)
(i : σ)

(x * MvPolynomial.X i).divMonomial (Finsupp.single i 1) = x


@[simp]
theorem dom_one : (1 : PartENat).Dom


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

(V : (TopologicalSpace.Opens ↑↑X.toPresheafedSpace)ᵒᵖ)

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


theorem _root_.PrimrecPred.and {p q : α → Prop} [DecidablePred p] [DecidablePred q]
    (hp : PrimrecPred p) (hq : PrimrecPred q) : PrimrecPred fun a => p a ∧ q a

{α : Type u_1}
[Primcodable α]
{p q : α → Prop}
[DecidablePred p]
[DecidablePred q]
(hp : PrimrecPred p)
(hq : PrimrecPred q)


@[simp] theorem or_self_right : ∀(a b : Bool), ((a || b) || b) = (a || b)


/-- The top subsemigroup is isomorphic to the semigroup. -/
@[to_additive (attr := simps)
  "The top additive subsemigroup is isomorphic to the additive semigroup."]
def topEquiv : (⊤ : Subsemigroup M) ≃* M


theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) {X Y : Over S} (g : X ⟶ Y)
    (H : P g.left) : P ((Over.pullback f).map g).left

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasPullbacks C]
{P : CategoryTheory.MorphismProperty C}
(hP : P.StableUnderBaseChange)
{S S' : C}
(f : S' ⟶ S)
{X Y : CategoryTheory.Over S}
(g : X ⟶ Y)
(H : P g.left)

P ((CategoryTheory.Over.pullback f).map g).left


theorem iterate_eq (f : α → α) (a : α) : iterate f a = a::iterate f (f a)

Stream'.iterate f a = Stream'.cons a (Stream'.iterate f (f a))


theorem _root_.NonUnitalSubalgebra.starClosure_eq_adjoin (S : NonUnitalSubalgebra R A) :
    S.starClosure = adjoin R (S : Set A)

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
(S : NonUnitalSubalgebra R A)

S.starClosure = NonUnitalStarAlgebra.adjoin R ↑S


/-- `rel` is self-dual: The map that swaps the argument order of a
    relation induces an equivalence between `rel` and its opposite. -/
@[simps]
def opEquivalence : Equivalence RelCat RelCatᵒᵖ

CategoryTheory.RelCat.opEquivalence.unitIso = CategoryTheory.Iso.refl (CategoryTheory.Functor.id CategoryTheory.RelCat)


theorem subsingleton_of_finrank_adjoin_le_one [FiniteDimensional F E]
    (h : ∀ x : E, finrank F F⟮x⟯ ≤ 1) : Subsingleton (IntermediateField F E)

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


theorem norm_setToSimpleFunc_le_integral_norm (T : Set α → E →L[ℝ] F) {C : ℝ}
    (hT_norm : ∀ s, MeasurableSet s → μ s < ∞ → ‖T s‖ ≤ C * (μ s).toReal) {f : α →ₛ E}
    (hf : Integrable f μ) : ‖f.setToSimpleFunc T‖ ≤ C * (f.map norm).integral μ

(hT_norm : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ‖T s‖ ≤ C * (μ s).toReal)

‖MeasureTheory.SimpleFunc.setToSimpleFunc T f‖ ≤
  C * MeasureTheory.SimpleFunc.integral μ (MeasureTheory.SimpleFunc.map norm f)


/-- `drop` of vectors corresponds under `toList` to `drop` of lists. -/
@[simp]
theorem toList_drop {n m : ℕ} (v : Vector α m) : toList (drop n v) = List.drop n (toList v)

{α : Type u}
{n m : ℕ}
(v : Mathlib.Vector α m)

(Mathlib.Vector.drop n v).toList = List.drop n v.toList


@[simp]
theorem Sphere.mem_coe' {p : P} {s : Sphere P} : dist p s.center = s.radius ↔ p ∈ s

{P : Type u_2}
[MetricSpace P]
{p : P}
{s : EuclideanGeometry.Sphere P}


lemma exists_basis_inter_ground_basis_closure (M : Matroid α) (X : Set α) :
    ∃ I, M.Basis I (X ∩ M.E) ∧ M.Basis I (M.closure X)

{α : Type u_2}
(M : Matroid α)
(X : Set α)


@[mono]
theorem eLpNorm'_mono_measure (f : α → F) (hμν : ν ≤ μ) (hq : 0 ≤ q) :
    eLpNorm' f q ν ≤ eLpNorm' f q μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ ν : MeasureTheory.Measure α}
[NormedAddCommGroup F]
(f : α → F)
(hμν : ν ≤ μ)
(hq : 0 ≤ q)

MeasureTheory.eLpNorm' f q ν ≤ MeasureTheory.eLpNorm' f q μ


lemma IsTheta.add_isLittleO {f₁ f₂ : α → E'} {g : α → F}
    (hΘ : f₁ =Θ[l] g) (ho : f₂ =o[l] g) : (f₁ + f₂) =Θ[l] g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{l : Filter α}
{f₁ f₂ : α → E'}
{g : α → F}
(hΘ : f₁ =Θ[l] g)
(ho : f₂ =o[l] g)


/-- If `forget C` preserves and reflects initials, then `X` is initial if and only if
`(forget C).obj X` is empty. -/
lemma initial_iff_empty_of_preserves_of_reflects [PreservesColimit (Functor.empty.{0} C) (forget C)]
    [ReflectsColimit (Functor.empty.{0} C) (forget C)] (X : C) :
    Nonempty (IsInitial X) ↔ IsEmpty ((forget C).obj X)

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Functor.empty C) (CategoryTheory.forget C)]

[CategoryTheory.Limits.ReflectsColimit (CategoryTheory.Functor.empty C) (CategoryTheory.forget C)]

Nonempty (CategoryTheory.Limits.IsInitial X) ↔ IsEmpty ((CategoryTheory.forget C).obj X)


theorem ext {s t : Multiset α} : s = t ↔ ∀ a, count a s = count a t

{α : Type u_1}
[DecidableEq α]
{s t : Multiset α}

s = t ↔ ∀ (a : α), Multiset.count a s = Multiset.count a t


/-- `Submodule.exists_finset_of_mem_iSup` as an `iff` -/
theorem Submodule.mem_iSup_iff_exists_finset {ι : Sort _} {p : ι → Submodule R M} {m : M} :
    (m ∈ ⨆ i, p i) ↔ ∃ s : Finset ι, m ∈ ⨆ i ∈ s, p i

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{ι : Type u_4}
{p : ι → Submodule R M}
{m : M}


theorem subtype_ext_iff {β : Sort*} {p : α → β → Prop} {x₀ x₁ : Σ'a, Subtype (p a)} :
    x₀ = x₁ ↔ x₀.fst = x₁.fst ∧ (x₀.snd : β) = x₁.snd

{α : Sort u_1}
{β : Sort u_3}
{p : α → β → Prop}
{x₀ x₁ : (a : α) ×' Subtype (p a)}

x₀ = x₁ ↔ x₀.fst = x₁.fst ∧ x₀.snd.val = x₁.snd.val


theorem Set.Finite.exists_le [IsDirected α (· ≤ ·)] {s : Set α} (hs : s.Finite) :
    ∃ M, ∀ i ∈ s, i ≤ M

{α : Type u_1}
[Nonempty α]
[Preorder α]
[IsDirected α fun x x_1 => x ≤ x_1]
{s : Set α}
(hs : s.Finite)


@[to_additive]
theorem mem_subgroupOf {H K : Subgroup G} {h : K} : h ∈ H.subgroupOf K ↔ (h : G) ∈ H

{G : Type u_1}
[AddGroup G]
{H K : AddSubgroup G}
{h : ↥K}


@[simp]
theorem succ_eq_succ_iff : succ a = succ b ↔ a = b

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


@[simp]
theorem mem_sup {μ ν : YoungDiagram} {x : ℕ × ℕ} : x ∈ μ ⊔ ν ↔ x ∈ μ ∨ x ∈ ν

x ∈ μ ⊔ ν ↔ x ∈ μ ∨ x ∈ ν


protected theorem map_smulₛₗ (f : R →ₑ+*[φ] S) (m : M) (x : R) : f (m • x) = φ m • f x

{M : Type u_1}
[Monoid M]
{N : Type u_2}
[Monoid N]
{φ : M →* N}
{R : Type u_10}
[Semiring R]
[MulSemiringAction M R]
{S : Type u_12}
[Semiring S]
[MulSemiringAction N S]
(f : R →ₑ+*[φ] S)
(m : M)
(x : R)


lemma mk_obj {V W : Type*} [Quiver V] [Quiver W] {obj : V → W} {map} {X : V} :
    (Prefunctor.mk obj map).obj X = obj X

{map : {X Y : V} → (X ⟶ Y) → (obj X ⟶ obj Y)}

{ obj := obj, map := map }.obj X = obj X


/-- The set of nonzero vectors in the same ray as the nonzero vector `x` is connected. -/
theorem isConnected_setOf_sameRay_and_ne_zero {x : E} (hx : x ≠ 0) :
    IsConnected { y | SameRay ℝ x y ∧ y ≠ 0 }

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{x : E}
(hx : x ≠ 0)


@[simp]
theorem coe_refl : ⇑(Diffeomorph.refl I M n) = id

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_5}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(M : Type u_9)
[TopologicalSpace M]
[ChartedSpace H M]
(n : ℕ∞)


theorem stmts_supportsStmt {M : Λ → Stmt₂} {S : Finset Λ} {q : Stmt₂} (ss : Supports M S) :
    some q ∈ stmts M S → SupportsStmt S q

{K : Type u_1}
{Γ : K → Type u_2}
{Λ : Type u_3}
{σ : Type u_4}
[Inhabited Λ]
{M : Λ → Turing.TM2.Stmt Γ Λ σ}
{S : Finset Λ}
{q : Turing.TM2.Stmt Γ Λ σ}
(ss : Turing.TM2.Supports M S)

some q ∈ Turing.TM2.stmts M S → Turing.TM2.SupportsStmt S q


/--
An invertible fractional ideal of a commutative ring with finitely many maximal ideals is principal.

https://math.stackexchange.com/a/95857 -/
theorem FractionalIdeal.isPrincipal.of_finite_maximals_of_inv {A : Type*} [CommRing A]
    [Algebra R A] {S : Submonoid R} [IsLocalization S A] (hS : S ≤ R⁰)
    (hf : {I : Ideal R | I.IsMaximal}.Finite) (I I' : FractionalIdeal S A) (hinv : I * I' = 1) :
    Submodule.IsPrincipal (I : Submodule R A)

{R : Type u_1}
[CommRing R]
{A : Type u_2}
[CommRing A]
[Algebra R A]
{S : Submonoid R}
[IsLocalization S A]
(hS : S ≤ R⁰)
(hf : {I | I.IsMaximal}.Finite)
(I I' : FractionalIdeal S A)
(hinv : I * I' = 1)


/-- The `LinearEquiv` between spaces of matrices induced by a `LinearEquiv` between their
coefficients. This is `Matrix.map` as a `LinearEquiv`. -/
@[simps apply]
def mapMatrix (f : α ≃ₗ[R] β) : Matrix m n α ≃ₗ[R] Matrix m n β

{m : Type u_2}
{n : Type u_3}
{R : Type u_7}
{α : Type v}
{β : Type w}
[Semiring R]
[AddCommMonoid α]
[AddCommMonoid β]
[Module R α]
[Module R β]
(f : α ≃ₗ[R] β)
(M : Matrix m n α)


/-- The left unitor isomorphism for binary coproducts with the initial object. -/
@[simps]
def coprod.leftUnitor (P : C) : (⊥_ C) ⨿ P ≅ P

(CategoryTheory.Limits.coprod.leftUnitor P).hom =
  CategoryTheory.Limits.coprod.desc (CategoryTheory.Limits.initial.to P) (𝟙 P)


@[simp]
lemma compares_gt [LT α] (a b : α) : Compares gt a b = (a > b)


theorem isRightDescent_inv_iff {w : W} {i : B} :
    cs.IsRightDescent w⁻¹ i ↔ cs.IsLeftDescent w i

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


@[simp]
theorem cons_erase {s : Multiset α} {a : α} : a ∈ s → a ::ₘ s.erase a = s

{α : Type u_1}
[DecidableEq α]
{s : Multiset α}
{a : α}


@[simp]
lemma evalEval_polynomialX_zero : W.polynomialX.evalEval 0 0 = -W.a₄

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)

Polynomial.evalEval 0 0 W.polynomialX = -W.a₄


theorem Disjoint.cycleType {σ τ : Perm α} (h : Disjoint σ τ) :
    (σ * τ).cycleType = σ.cycleType + τ.cycleType

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{σ τ : Equiv.Perm α}
(h : σ.Disjoint τ)


@[to_additive]
theorem Inseparable.const_smul {x y : α} (h : Inseparable x y) (c : M) :
    Inseparable (c • x) (c • y)

{M : Type u_1}
{α : Type u_2}
[TopologicalSpace α]
[SMul M α]
[ContinuousConstSMul M α]
{x y : α}
(h : Inseparable x y)
(c : M)


theorem memℒp_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Memℒp (u n) p μ)
    {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) : Memℒp (stoppedValue u τ) p μ

(hu : ∀ (n : ι), MeasureTheory.Memℒp (u n) p μ)

MeasureTheory.Memℒp (MeasureTheory.stoppedValue u τ) p μ


theorem HasFDerivWithinAt.sqrt (hf : HasFDerivWithinAt f f' s x) (hx : f x ≠ 0) :
    HasFDerivWithinAt (fun y => √(f y)) ((1 / (2 * √(f x))) • f') s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
{x : E}
{f' : E →L[ℝ] ℝ}
(hf : HasFDerivWithinAt f f' s x)
(hx : f x ≠ 0)


@[simp]
theorem isLittleO_neg_right : (f =o[l] fun x => -g' x) ↔ f =o[l] g'

{α : Type u_1}
{E : Type u_3}
{F' : Type u_7}
[Norm E]
[SeminormedAddCommGroup F']
{f : α → E}
{g' : α → F'}
{l : Filter α}


/-- The obvious functor `WidePullbackShape J ⥤ (WidePushoutShape J)ᵒᵖ` -/
@[simps]
def widePullbackShapeOp : WidePullbackShape J ⥤ (WidePushoutShape J)ᵒᵖ

{X₁ X₂ : CategoryTheory.Limits.WidePullbackShape J}

∀ (a : X₁ ⟶ X₂),
  (CategoryTheory.Limits.widePullbackShapeOp J).map a = CategoryTheory.Limits.widePullbackShapeOpMap J X₁ X₂ a


/-- For every cospan `j ⟶ i ⟵ j'`,
 there exists a cone `j ⟵ k ⟶ j'` such that the square commutes. -/
theorem cospan {i j j' : C} (f : j ⟶ i) (f' : j' ⟶ i) :
    ∃ (k : C) (g : k ⟶ j) (g' : k ⟶ j'), g ≫ f = g' ≫ f'

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.IsCofilteredOrEmpty C]
{i j j' : C}
(f : j ⟶ i)
(f' : j' ⟶ i)

∃ k g g', CategoryTheory.CategoryStruct.comp g f = CategoryTheory.CategoryStruct.comp g' f'


theorem le_edist_of_le_infsep {d x} (hx : x ∈ s) {y} (hy : y ∈ s) (hxy : x ≠ y)
    (hd : d ≤ s.infsep) : d ≤ dist x y

{α : Type u_1}
[PseudoMetricSpace α]
{s : Set α}
{d : ℝ}
{x : α}
(hx : x ∈ s)
{y : α}
(hy : y ∈ s)
(hxy : x ≠ y)
(hd : d ≤ s.infsep)


/-- Auxiliary lemma for `Lp.induction_stronglyMeasurable`. -/
@[elab_as_elim]
theorem Lp.induction_stronglyMeasurable_aux (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : Lp F p μ → Prop)
    (h_ind : ∀ (c : F) {s : Set α} (hs : MeasurableSet[m] s) (hμs : μ s < ∞),
      P (Lp.simpleFunc.indicatorConst p (hm s hs) hμs.ne c))
    (h_add : ∀ ⦃f g⦄, ∀ hf : Memℒp f p μ, ∀ hg : Memℒp g p μ, AEStronglyMeasurable' m f μ →
      AEStronglyMeasurable' m g μ → Disjoint (Function.support f) (Function.support g) →
        P (hf.toLp f) → P (hg.toLp g) → P (hf.toLp f + hg.toLp g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f}) :
    ∀ f : Lp F p μ, AEStronglyMeasurable' m f μ → P f

(h_ind :
  ∀ (c : F) {s : Set α} (hs : MeasurableSet s) (hμs : μ s < ⊤), P ↑(MeasureTheory.Lp.simpleFunc.indicatorConst p ⋯ ⋯ c))

(h_add :
  ∀ ⦃f g : α → F⦄ (hf : MeasureTheory.Memℒp f p μ) (hg : MeasureTheory.Memℒp g p μ),
    MeasureTheory.AEStronglyMeasurable' m f μ →
      MeasureTheory.AEStronglyMeasurable' m g μ →
        Disjoint (Function.support f) (Function.support g) →
          P (MeasureTheory.Memℒp.toLp f hf) →
            P (MeasureTheory.Memℒp.toLp g hg) → P (MeasureTheory.Memℒp.toLp f hf + MeasureTheory.Memℒp.toLp g hg))

MeasureTheory.AEStronglyMeasurable' m (↑↑f) μ → P f


/-- When `Φ : LocalizerMorphism W₁ W₂`, if the composition `Φ.functor ⋙ L₂` is a
localization functor for `W₁`, then `Φ` is a localized equivalence. -/
lemma IsLocalizedEquivalence.of_isLocalization_of_isLocalization
    [(Φ.functor ⋙ L₂).IsLocalization W₁] :
    IsLocalizedEquivalence Φ

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)


/-- An integral element of an algebra is algebraic. -/
theorem IsIntegral.isAlgebraic [Nontrivial R] {x : A} : IsIntegral R x → IsAlgebraic R x

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
[Nontrivial R]
{x : A}


theorem Filter.EventuallyEq.tendsto {l : Filter α} {f : α → X} (hf : f =ᶠ[l] fun _ ↦ x) :
    Tendsto f l (𝓝 x)

{X : Type u}
{α : Type u_1}
{x : X}
[TopologicalSpace X]
{l : Filter α}
{f : α → X}
(hf : f =ᶠ[l] fun x_1 => x)


@[to_additive]
theorem TopologicalGroup.t2Space_iff_one_closed : T2Space G ↔ IsClosed ({1} : Set G)

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


/-- The equivalence of categories expressing right unity of products of categories.  -/
@[simps]
def rightUnitorEquivalence : C × Discrete (PUnit : Type w) ≌ C

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

(CategoryTheory.prod.rightUnitorEquivalence C).functor = CategoryTheory.prod.rightUnitor C


@[simp]
theorem unitsEquivAut_apply_symm (u : Rˣ) (x : R) : (unitsEquivAut R u).symm x = x * ↑u⁻¹

{R : Type u_1}
[Ring R]
[TopologicalSpace R]
[ContinuousMul R]
(u : Rˣ)
(x : R)

((ContinuousLinearEquiv.unitsEquivAut R) u).symm x = x * ↑u⁻¹


theorem smul_closure (a : M) (s : Set R) : a • closure s = closure (a • s)

{M : Type u_1}
{R : Type u_2}
[Monoid M]
[Ring R]
[MulSemiringAction M R]
(a : M)
(s : Set R)

a • Subring.closure s = Subring.closure (a • s)


@[simp]
theorem sups_eq_empty : s ⊻ t = ∅ ↔ s = ∅ ∨ t = ∅

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


@[ext]
lemma ext {M N : SemiNormedGrp} {f₁ f₂ : M ⟶ N} (h : ∀ (x : M), f₁ x = f₂ x) : f₁ = f₂

{M N : SemiNormedGrp}
{f₁ f₂ : M ⟶ N}
(h : ∀ (x : ↑M), f₁ x = f₂ x)


theorem prod_right (hf : LocallyFinite f) (g : ι → Set Y) : LocallyFinite (fun i ↦ f i ×ˢ g i)

{ι : Type u_1}
{X : Type u_4}
{Y : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : ι → Set X}
(hf : LocallyFinite f)
(g : ι → Set Y)


protected theorem locallyCompactSpace [LocallyCompactSpace E] (I : ModelWithCorners 𝕜 E H) :
    LocallyCompactSpace H

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


theorem ClusterPt.of_le_nhds {f : Filter X} (H : f ≤ 𝓝 x) [NeBot f] : ClusterPt x f

{X : Type u}
{x : X}
[TopologicalSpace X]
{f : Filter X}
(H : f ≤ 𝓝 x)
[f.NeBot]


theorem Embedding.continuous (hf : Embedding f) : Continuous f

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


@[simp] theorem polar_prod (Q₁ : QuadraticMap R M₁ P) (Q₂ : QuadraticMap R M₂ P) (x y : M₁ × M₂) :
    polar (Q₁.prod Q₂) x y = polar Q₁ x.1 y.1 + polar Q₂ x.2 y.2

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{P : Type u_7}
[CommRing R]
[AddCommGroup M₁]
[AddCommGroup M₂]
[AddCommGroup P]
[Module R M₁]
[Module R M₂]
[Module R P]
(Q₁ : QuadraticMap R M₁ P)
(Q₂ : QuadraticMap R M₂ P)
(x y : M₁ × M₂)

QuadraticMap.polar (⇑(Q₁.prod Q₂)) x y = QuadraticMap.polar (⇑Q₁) x.1 y.1 + QuadraticMap.polar (⇑Q₂) x.2 y.2


/-- A point is its own reflection if and only if it is in the subspace. -/
theorem reflection_eq_self_iff (x : E) : reflection K x = x ↔ x ∈ K

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


protected lemma neg_iff {f : ℝ → ℝ} : GrowsPolynomially f ↔ GrowsPolynomially (-f)

AkraBazziRecurrence.GrowsPolynomially f ↔ AkraBazziRecurrence.GrowsPolynomially (-f)


@[simp]
theorem verts_sInf (s : Set G.Subgraph) : (sInf s).verts = ⋂ G' ∈ s, verts G'

{V : Type u}
{G : SimpleGraph V}
(s : Set G.Subgraph)


theorem diff_union_diff_cancel (hts : t ⊆ s) (hut : u ⊆ t) : s \ t ∪ t \ u = s \ u

{α : Type u}
{s t u : Set α}
(hts : t ⊆ s)
(hut : u ⊆ t)


@[simp] lemma singleton_diffs : {a} \\ t = t.image (a \ ·)

{α : Type u_2}
[DecidableEq α]
[GeneralizedBooleanAlgebra α]
{t : Finset α}
{a : α}

{a}.diffs t = Finset.image (fun x => a \ x) t


/-- The full set is a (trivial) block -/
theorem isFixedBlock_top : IsFixedBlock G (⊤ : Set X)

{G : Type u_1}
[Group G]
(X : Type u_2)
[MulAction G X]


theorem Irreducible.dvd_irreducible_iff_associated [Monoid α] {p q : α}
    (pp : Irreducible p) (qp : Irreducible q) : p ∣ q ↔ Associated p q

{α : Type u_1}
[Monoid α]
{p q : α}
(pp : Irreducible p)
(qp : Irreducible q)


@[simp] theorem set_cons_zero (x : α) (xs : List α) (a : α) :
  (x :: xs).set 0 a = a :: xs

{α : Type u_1}
(x : α)
(xs : List α)
(a : α)


theorem map_surjective (hf : Function.Surjective f) :
    Function.Surjective (map f : MvPolynomial σ R → MvPolynomial σ S₁)

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
(f : R →+* S₁)
(hf : Function.Surjective ⇑f)


/-- The cardinality of the interval (a, b]. -/
theorem mk_Ioc_real {a b : ℝ} (h : a < b) : #(Ioc a b) = 𝔠


theorem image_inter' (hf : LeftInvOn f' f s) : f '' (s₁ ∩ s) = f' ⁻¹' s₁ ∩ f '' s

{α : Type u_1}
{β : Type u_2}
{s s₁ : Set α}
{f : α → β}
{f' : β → α}
(hf : Set.LeftInvOn f' f s)


theorem selfAdjoint.nnnorm_pow_two_pow [NormedRing E] [StarRing E] [CstarRing E] (x : selfAdjoint E)
    (n : ℕ) : ‖x ^ 2 ^ n‖₊ = ‖x‖₊ ^ 2 ^ n

{E : Type u_2}
[NormedRing E]
[StarRing E]
[CstarRing E]
(x : ↥(selfAdjoint E))
(n : ℕ)


/-- Chain rule for formal derivative of polynomials. -/
theorem derivative_eval₂_C (p q : R[X]) :
    derivative (p.eval₂ C q) = p.derivative.eval₂ C q * derivative q

{R : Type u}
[CommSemiring R]
(p q : R[X])

Polynomial.derivative (Polynomial.eval₂ Polynomial.C q p) =
  Polynomial.eval₂ Polynomial.C q (Polynomial.derivative p) * Polynomial.derivative q


/-- Suppose `α` is equipped with a conditionally complete linear dense order and `f : α → δ` is
continuous and injective. Then `f` is strictly monotone (increasing) if
it is strictly monotone (increasing) on some closed interval `[a, b]`. -/
theorem Continuous.strictMonoOn_of_inj_rigidity {f : α → δ}
    (hf_c : Continuous f) (hf_i : Injective f) {a b : α} (hab : a < b)
    (hf_mono : StrictMonoOn f (Icc a b)) : StrictMono f

(hf_mono : StrictMonoOn f (Set.Icc a b))


theorem tendstoUniformlyOn_iff_seq_tendstoUniformlyOn {l : Filter ι} [l.IsCountablyGenerated] :
    TendstoUniformlyOn F f l s ↔
      ∀ u : ℕ → ι, Tendsto u atTop l → TendstoUniformlyOn (fun n => F (u n)) f atTop s

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s : Set α}
{l : Filter ι}
[l.IsCountablyGenerated]

TendstoUniformlyOn F f l s ↔
  ∀ (u : ℕ → ι), Filter.Tendsto u Filter.atTop l → TendstoUniformlyOn (fun n => F (u n)) f Filter.atTop s


@[to_additive (attr := simp)]
theorem Monoid.fg_iff_submonoid_fg (N : Submonoid M) : Monoid.FG N ↔ N.FG

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


theorem HasStrictDerivAt.cpow_const (hf : HasStrictDerivAt f f' x)
    (h0 : f x ∈ slitPlane) :
    HasStrictDerivAt (fun x => f x ^ c) (c * f x ^ (c - 1) * f') x

{f : ℂ → ℂ}
{f' x c : ℂ}
(hf : HasStrictDerivAt f f' x)
(h0 : f x ∈ Complex.slitPlane)


theorem Submodule.mem_sSup_iff_exists_finset {S : Set (Submodule R M)} {m : M} :
    m ∈ sSup S ↔ ∃ s : Finset (Submodule R M), ↑s ⊆ S ∧ m ∈ ⨆ i ∈ s, i

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{S : Set (Submodule R M)}
{m : M}

m ∈ sSup S ↔ ∃ s, ↑s ⊆ S ∧ m ∈ ⨆ i ∈ s, i


@[simp]
theorem Commute.smul_right_iff₀ [Mul β] [SMulCommClass α β β] [IsScalarTower α β β] {a b : β}
    {c : α} (hc : c ≠ 0) : Commute a (c • b) ↔ Commute a b

{α : Type u}
{β : Type v}
[GroupWithZero α]
[MulAction α β]
[Mul β]
[SMulCommClass α β β]
[IsScalarTower α β β]
{a b : β}
{c : α}
(hc : c ≠ 0)


@[simp] protected theorem mul_div_cancel (a : Int) {b : Int} (H : b ≠ 0) : (a * b).div b = a


@[to_additive] lemma prod_le_one (hf : f ≤ 1) : ∏ i, f i ≤ 1

{ι : Type u_1}
{M : Type u_4}
[Fintype ι]
[OrderedCommMonoid M]
{f : ι → M}
(hf : f ≤ 1)


/-- The isomorphism between `incl ⋙ lift F _ _` with `F`. -/
@[simps!]
def inclLift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : incl ⋙ lift F M hM ≅ F

(hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (M x) (F.map f) = M y)

(CategoryTheory.WithInitial.inclLift F M hM).inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)


theorem Valued.continuous_valuation [Valued K Γ₀] : Continuous (v : K → Γ₀)

{K : Type u_1}
[DivisionRing K]
{Γ₀ : Type u_2}
[LinearOrderedCommGroupWithZero Γ₀]
[Valued K Γ₀]


/-- `(F ⨿ G).obj a` is in bijection with disjoint union of `F.obj a` and `G.obj a`. -/
@[simps]
noncomputable
def binaryCoproductEquiv (a : C) :
    (F ⨿ G).obj a ≃ (F.obj a) ⊕ (G.obj a)

(F G : CategoryTheory.Functor C (Type w))

(CategoryTheory.FunctorToTypes.binaryCoproductEquiv F G a).symm z =
  (CategoryTheory.FunctorToTypes.binaryCoproductIso F G).inv.app a z


@[simp, reassoc, elementwise]
theorem localizationToStalk_stalkSpecializes {R : Type*} [CommRing R] {x y : PrimeSpectrum R}
    (h : x ⤳ y) :
    StructureSheaf.localizationToStalk R y ≫ (structureSheaf R).presheaf.stalkSpecializes h =
      CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫
        StructureSheaf.localizationToStalk R x

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

AlgebraicGeometry.StructureSheaf.localizationToStalk R y ≫
    (AlgebraicGeometry.Spec.structureSheaf R).presheaf.stalkSpecializes h =
  CommRingCat.ofHom (PrimeSpectrum.localizationMapOfSpecializes h) ≫
    AlgebraicGeometry.StructureSheaf.localizationToStalk R x


theorem sameRay_iff_arg_div_eq_zero : SameRay ℝ x y ↔ arg (x / y) = 0


lemma irreducible_polynomial [IsDomain R] : Irreducible W.polynomial

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
[IsDomain R]


theorem ne_of_mem_erase : b ∈ erase s a → b ≠ a

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


/-- The `n`th coefficient of a formal power series is `0` if `n` is strictly
smaller than the order of the power series. -/
theorem coeff_of_lt_order (n : ℕ) (h : ↑n < order φ) : coeff R n φ = 0

{R : Type u_1}
[Semiring R]
{φ : PowerSeries R}
(n : ℕ)
(h : ↑n < φ.order)


@[to_additive (attr := simp)]
theorem empty_smul (t : Finset β) : (∅ : Finset α) • t = ∅

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
(t : Finset β)


theorem ContDiff.comp' {g : F → G} (hg : ContDiff K n g) (hf : ContDiff K n f) :
    ContDiff K n (fun x => g (f x))

{K : Type u_1}
[NontriviallyNormedField K]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace K E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace K F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace K G]
{f : E → F}
{n : ℕ∞}
{g : F → G}
(hg : ContDiff K n g)
(hf : ContDiff K n f)


theorem count_edges_eq_one [DecidableEq V] {u v : V} {p : G.Path u v} (e : Sym2 V)
    (hw : e ∈ (p : G.Walk u v).edges) : (p : G.Walk u v).edges.count e = 1

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Path u v}
(e : Sym2 V)
(hw : e ∈ (↑p).edges)


lemma support_const_smul_subset [Zero M] [SMulZeroClass R M] (a : R) (f : α → M) :
    support (a • f) ⊆ support f

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Zero M]
[SMulZeroClass R M]
(a : R)
(f : α → M)

Function.support (a • f) ⊆ Function.support f


theorem superset_antisymm_iff [IsRefl α (· ⊆ ·)] [IsAntisymm α (· ⊆ ·)] : a = b ↔ b ⊆ a ∧ a ⊆ b

{α : Type u}
[HasSubset α]
{a b : α}
[IsRefl α fun x x_1 => x ⊆ x_1]
[IsAntisymm α fun x x_1 => x ⊆ x_1]


theorem measurableSet_lt {m : MeasurableSpace α} [TopologicalSpace β] [LinearOrder β]
    [OrderClosedTopology β] [PseudoMetrizableSpace β] {f g : α → β} (hf : StronglyMeasurable f)
    (hg : StronglyMeasurable g) : MeasurableSet { a | f a < g a }

(hf : MeasureTheory.StronglyMeasurable f)

(hg : MeasureTheory.StronglyMeasurable g)


@[to_additive is_left_invariant_addCHaar]
theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compacts G) :
    chaar K₀ (K.map _ <| continuous_mul_left g) = chaar K₀ K

{K₀ : TopologicalSpace.PositiveCompacts G}

MeasureTheory.Measure.haar.chaar K₀ (TopologicalSpace.Compacts.map (fun b => g * b) ⋯ K) =
  MeasureTheory.Measure.haar.chaar K₀ K