/-- If `f` is multilinear, then `f (Σ_{j₁} g₁ j₁, ..., Σ_{jₙ} gₙ jₙ)` is the sum of
`f (g₁ (r 1), ..., gₙ (r n))` where `r` ranges over all functions `r`. This follows from
multilinearity by expanding successively with respect to each coordinate. -/
theorem map_sum [DecidableEq ι] [Fintype ι] [∀ i, Fintype (α i)] :
    (f fun i => ∑ j, g i j) = ∑ r : ∀ i, α i, f fun i => g i (r i)

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(f : MultilinearMap R M₁ M₂)
{α : ι → Type u_1}
(g : (i : ι) → α i → M₁ i)
[DecidableEq ι]
[Fintype ι]
[(i : ι) → Fintype (α i)]

(f fun i => ∑ j : α i, g i j) = ∑ r : (i : ι) → α i, f fun i => g i (r i)


lemma reflTransGen_minimal {r' : α → α → Prop} (hr₁ : Reflexive r') (hr₂ : Transitive r')
    (h : ∀ x y, r x y → r' x y) {x y : α} (hxy : ReflTransGen r x y) : r' x y

{α : Type u_1}
{r r' : α → α → Prop}
(hr₁ : Reflexive r')
(hr₂ : Transitive r')
(h : ∀ (x y : α), r x y → r' x y)
{x y : α}
(hxy : Relation.ReflTransGen r x y)


theorem ContMDiffWithinAt.div₀
    (hf : ContMDiffWithinAt I' I n f s a) (hg : ContMDiffWithinAt I' I n g s a) (h₀ : g a ≠ 0) :
    ContMDiffWithinAt I' I n (f / g) s a

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[TopologicalSpace G]
[ChartedSpace H G]
[GroupWithZero G]
[SmoothInv₀ I G]
[SmoothMul I G]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_7}
[TopologicalSpace M]
[ChartedSpace H' M]
{f g : M → G}
{s : Set M}
{a : M}
{n : ℕ∞}
(hf : ContMDiffWithinAt I' I n f s a)
(hg : ContMDiffWithinAt I' I n g s a)
(h₀ : g a ≠ 0)


@[simp, rclike_simps]
theorem conjAe_coe : (conjAe : K → K) = conj


@[simp]
theorem id_apply_self (M : Mat_ C) (i : M.ι) : (𝟙 M : Hom M M) i i = 𝟙 _

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
(M : CategoryTheory.Mat_ C)
(i : M.ι)


private theorem smul_nonneg_of_nonneg_of_pos (ha : 0 ≤ a) (hb : 0 < b) : 0 ≤ a • b

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


theorem degrees_neg (p : MvPolynomial σ R) : (-p).degrees = p.degrees

{R : Type u}
{σ : Type u_1}
[CommRing R]
(p : MvPolynomial σ R)


@[to_additive (attr := simp)]
theorem one_apply (a : α) : (1 : α →*o β) a = 1

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[AddZeroClass α]
[AddZeroClass β]
(a : α)


/-- The five lemma. -/
theorem isIso_of_epi_of_isIso_of_isIso_of_mono (h₀ : Epi (app' φ 0)) (h₁ : IsIso (app' φ 1))
    (h₂ : IsIso (app' φ 3)) (h₃ : Mono (app' φ 4)) : IsIso (app' φ 2)

{R₁ R₂ : CategoryTheory.ComposableArrows C 4}

(h₀ : CategoryTheory.Epi (CategoryTheory.ComposableArrows.app' φ 0 ⋯))

(h₁ : CategoryTheory.IsIso (CategoryTheory.ComposableArrows.app' φ 1 ⋯))

(h₂ : CategoryTheory.IsIso (CategoryTheory.ComposableArrows.app' φ 3 ⋯))

(h₃ : CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 4 ⋯))

CategoryTheory.IsIso (CategoryTheory.ComposableArrows.app' φ 2 ⋯)


theorem zpow_log_le_self {b : ℕ} {r : R} (hb : 1 < b) (hr : 0 < r) : (b : R) ^ log b r ≤ r

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
{b : ℕ}
{r : R}
(hb : 1 < b)
(hr : 0 < r)


theorem tsupport_iteratedFDeriv_subset (n : ℕ) : tsupport (iteratedFDeriv 𝕜 n f) ⊆ tsupport f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
(n : ℕ)


theorem IsLittleO.trans_isBigOWith (hfg : f =o[l] g) (hgk : IsBigOWith c l g k) (hc : 0 < c) :
    f =o[l] k

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
{G : Type u_5}
[Norm E]
[Norm F]
[Norm G]
{c : ℝ}
{f : α → E}
{g : α → F}
{k : α → G}
{l : Filter α}
(hfg : f =o[l] g)
(hgk : Asymptotics.IsBigOWith c l g k)
(hc : 0 < c)


theorem linMulLinSelfPosDef {R} [LinearOrderedCommRing R] [Module R M] [LinearOrderedSemiring A]
    [ExistsAddOfLE A] [Module R A] [SMulCommClass R A A] [IsScalarTower R A A] (f : M →ₗ[R] A)
    (hf : LinearMap.ker f = ⊥) : PosDef (linMulLin (A := A) f f)

{M : Type u_4}
{A : Type u_7}
[AddCommMonoid M]
{R : Type u_9}
[LinearOrderedCommRing R]
[Module R M]
[LinearOrderedSemiring A]
[ExistsAddOfLE A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
(f : M →ₗ[R] A)
(hf : LinearMap.ker f = ⊥)


@[simp]
theorem zero_vecMul [Fintype m] (A : Matrix m n α) : 0 ᵥ* A = 0

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[NonUnitalNonAssocSemiring α]
[Fintype m]
(A : Matrix m n α)


@[to_additive]
theorem Function.Injective.tprod_eq {g : γ → β} (hg : Injective g) {f : β → α}
    (hf : mulSupport f ⊆ Set.range g) : ∏' c, f (g c) = ∏' b, f b

(hf : Function.mulSupport f ⊆ Set.range g)


@[simp]
theorem zero_left (y : M) : SameRay R 0 y

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
(y : M)


/-- A binary fan with vertex `P` consists of the two projections `π₁ : P ⟶ X` and `π₂ : P ⟶ Y`. -/
@[simps pt]
def BinaryFan.mk {P : C} (π₁ : P ⟶ X) (π₂ : P ⟶ Y) : BinaryFan X Y

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y P : C}
(π₁ : P ⟶ X)
(π₂ : P ⟶ Y)

(CategoryTheory.Limits.BinaryFan.mk π₁ π₂).pt = P


@[to_additive]
theorem noncommPiCoprod_range
    {hcomm : Pairwise fun i j : ι => ∀ (x : H i) (y : H j), Commute (ϕ i x) (ϕ j y)} :
    (noncommPiCoprod ϕ hcomm).range = ⨆ i : ι, (ϕ i).range

{hcomm : Pairwise fun i j => ∀ (x : H i) (y : H j), Commute ((ϕ i) x) ((ϕ j) y)}

(MonoidHom.noncommPiCoprod ϕ hcomm).range = ⨆ i, (ϕ i).range


protected theorem StrictMono.comp_strictMonoOn (hg : StrictMono g) (hf : StrictMonoOn f s) :
    StrictMonoOn (g ∘ f) s

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder α]
[Preorder β]
[Preorder γ]
{g : β → γ}
{f : α → β}
{s : Set α}
(hg : StrictMono g)
(hf : StrictMonoOn f s)


/-- Auxiliary definition for `functorCategoryEquivalence`. -/
@[simps]
def inverse : (SingleObj G ⥤ V) ⥤ Action V G

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
(F : CategoryTheory.SingleObj ↑G ⥤ V)
(g : ↑G)

(Action.FunctorCategoryEquivalence.inverse.obj F).ρ g = F.map g


@[simp 1100]
theorem constrL_basis (v : Basis ι 𝕜 E) (f : ι → F) (i : ι) : v.constrL f (v i) = f i

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
{F : Type w}
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousSMul 𝕜 F]
[CompleteSpace 𝕜]
{ι : Type u_1}
[Finite ι]
[T2Space E]
(v : Basis ι 𝕜 E)
(f : ι → F)
(i : ι)


theorem hexagon_reverse (X Y Z : C) :
    (BinaryFan.associatorOfLimitCone ℬ X Y Z).inv ≫
        (Limits.BinaryFan.braiding (ℬ (tensorObj ℬ X Y) Z).isLimit
              (ℬ Z (tensorObj ℬ X Y)).isLimit).hom ≫
          (BinaryFan.associatorOfLimitCone ℬ Z X Y).inv =
      tensorHom ℬ (𝟙 X) (Limits.BinaryFan.braiding (ℬ Y Z).isLimit (ℬ Z Y).isLimit).hom ≫
        (BinaryFan.associatorOfLimitCone ℬ X Z Y).inv ≫
          tensorHom ℬ (Limits.BinaryFan.braiding (ℬ X Z).isLimit (ℬ Z X).isLimit).hom (𝟙 Y)

(ℬ : (X Y : C) → CategoryTheory.Limits.LimitCone (CategoryTheory.Limits.pair X Y))

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.BinaryFan.associatorOfLimitCone ℬ X Y Z).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Limits.BinaryFan.braiding
          (ℬ (CategoryTheory.MonoidalOfChosenFiniteProducts.tensorObj ℬ X Y) Z).isLimit
          (ℬ Z (CategoryTheory.MonoidalOfChosenFiniteProducts.tensorObj ℬ X Y)).isLimit).hom
      (CategoryTheory.Limits.BinaryFan.associatorOfLimitCone ℬ Z X Y).inv) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalOfChosenFiniteProducts.tensorHom ℬ (CategoryTheory.CategoryStruct.id X)
      (CategoryTheory.Limits.BinaryFan.braiding (ℬ Y Z).isLimit (ℬ Z Y).isLimit).hom)
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.BinaryFan.associatorOfLimitCone ℬ X Z Y).inv
      (CategoryTheory.MonoidalOfChosenFiniteProducts.tensorHom ℬ
        (CategoryTheory.Limits.BinaryFan.braiding (ℬ X Z).isLimit (ℬ Z X).isLimit).hom
        (CategoryTheory.CategoryStruct.id Y)))


/-- The equivalence `Fin n ≃ {i // i < n}` is an order isomorphism. -/
@[simps! apply symm_apply]
def orderIsoSubtype : Fin n ≃o {i // i < n}

(RelIso.symm Fin.orderIsoSubtype) a = ⟨↑a, ⋯⟩


lemma not_mem_closure_iff_nhdsWithin_eq_bot : x ∉ closure s ↔ 𝓝[s] x = ⊥

{X : Type u}
{x : X}
{s : Set X}
[TopologicalSpace X]


@[to_additive] lemma AntivaryOn.pow_right (hfg : AntivaryOn f g s) (n : ℕ) :
    AntivaryOn f (g ^ n) s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[LinearOrderedCommGroup β]
{s : Set ι}
{f : ι → α}
{g : ι → β}
(hfg : AntivaryOn f g s)
(n : ℕ)


@[to_additive exists_le_of_sum_le]
theorem exists_le_of_prod_le' (hs : s.Nonempty) (Hle : ∏ i ∈ s, f i ≤ ∏ i ∈ s, g i) :
    ∃ i ∈ s, f i ≤ g i

{ι : Type u_1}
{M : Type u_4}
[LinearOrderedCancelAddCommMonoid M]
{f g : ι → M}
{s : Finset ι}
(hs : s.Nonempty)
(Hle : ∑ i ∈ s, f i ≤ ∑ i ∈ s, g i)


@[to_additive (attr := simp)]
theorem mulSupport_inv' : mulSupport f⁻¹ = mulSupport f

{α : Type u_1}
{G : Type u_9}
[SubtractionMonoid G]
(f : α → G)

Function.support (-f) = Function.support f


@[to_additive (attr := simp)]
theorem prod_univ_get' [CommMonoid β] (l : List α) (f : α → β) :
    ∏ i : Fin l.length, f l[i.1] = (l.map f).prod

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

∏ i : Fin l.length, f l[↑i] = (List.map f l).prod


theorem prod_sup (f : Filter α) (g₁ g₂ : Filter β) : f ×ˢ (g₁ ⊔ g₂) = (f ×ˢ g₁) ⊔ (f ×ˢ g₂)

{α : Type u_1}
{β : Type u_2}
(f : Filter α)
(g₁ g₂ : Filter β)

f ×ˢ (g₁ ⊔ g₂) = f ×ˢ g₁ ⊔ f ×ˢ g₂


theorem t0Space_iff_exists_isOpen_xor'_mem (X : Type u) [TopologicalSpace X] :
    T0Space X ↔ Pairwise fun x y => ∃ U : Set X, IsOpen U ∧ Xor' (x ∈ U) (y ∈ U)

T0Space X ↔ Pairwise fun x y => ∃ U, IsOpen U ∧ Xor' (x ∈ U) (y ∈ U)


theorem isGreatest_ofFunction :
    IsGreatest { μ : OuterMeasure α | ∀ s, μ s ≤ m s } (OuterMeasure.ofFunction m m_empty)

{α : Type u_1}
{m : Set α → ℝ≥0∞}
{m_empty : m ∅ = 0}

IsGreatest {μ | ∀ (s : Set α), μ s ≤ m s} (MeasureTheory.OuterMeasure.ofFunction m m_empty)


@[simp]
theorem tail_map {β : Type*} (v : Vector α (n + 1)) (f : α → β) :
    (v.map f).tail = v.tail.map f

{n : ℕ}
{α : Type u_1}
{β : Type u_2}
(v : Mathlib.Vector α (n + 1))
(f : α → β)

(Mathlib.Vector.map f v).tail = Mathlib.Vector.map f v.tail


@[simp]
theorem floor_ofNat_add (n : ℕ) [n.AtLeastTwo] (a : α) :
    ⌊(no_index (OfNat.ofNat n)) + a⌋ = OfNat.ofNat n + ⌊a⌋

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(n : ℕ)
[n.AtLeastTwo]
(a : α)

⌊OfNat.ofNat n + a⌋ = OfNat.ofNat n + ⌊a⌋


@[simp] theorem negSucc_mul_negSucc (m n : Nat) : -[m+1] * -[n+1] = succ m * succ n

Int.negSucc m * Int.negSucc n = ↑m.succ * ↑n.succ


@[simp, norm_cast]
theorem coe_sInf (S : Set (IntermediateField F E)) : (↑(sInf S) : Set E) =
    sInf ((fun (x : IntermediateField F E) => (x : Set E)) '' S)

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


@[simp]
theorem coe_prod : (prod S S₁ : Set (A × B)) = (S : Set A) ×ˢ S₁

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[NonUnitalNonAssocSemiring B]
[Module R B]
(S : NonUnitalSubalgebra R A)
(S₁ : NonUnitalSubalgebra R B)


theorem coeff_hermite_of_odd_add {n k : ℕ} (hnk : Odd (n + k)) : coeff (hermite n) k = 0


theorem comp_left {α β γ δ : Sort*} {f : α → β} {g : α → γ} (h : FactorsThrough g f) (g' : γ → δ) :
    FactorsThrough (g' ∘ g) f

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{δ : Sort u_4}
{f : α → β}
{g : α → γ}
(h : Function.FactorsThrough g f)
(g' : γ → δ)


theorem closure_mul_closure (S T : Set R) : closure S * closure T = closure (S * T)

{R : Type u_4}
[NonUnitalNonAssocSemiring R]
(S T : Set R)

AddSubmonoid.closure S * AddSubmonoid.closure T = AddSubmonoid.closure (S * T)


theorem Adj.symm {G : SimpleGraph V} {u v : V} (h : G.Adj u v) : G.Adj v u

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(h : G.Adj u v)


@[to_additive]
theorem map_eq_bot_iff_of_injective {f : G →* N} (hf : Function.Injective f) :
    H.map f = ⊥ ↔ H = ⊥

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(H : Subgroup G)
{f : G →* N}
(hf : Function.Injective ⇑f)


/-- A version of `Quotient.ind` taking `{s : Setoid α}` as an implicit argument instead of an
instance argument. -/
@[elab_as_elim]
protected theorem ind' {p : Quotient s₁ → Prop} (h : ∀ a, p (Quotient.mk'' a)) (q : Quotient s₁) :
    p q

{α : Sort u_1}
{s₁ : Setoid α}
{p : Quotient s₁ → Prop}
(h : ∀ (a : α), p (Quotient.mk'' a))
(q : Quotient s₁)


@[simp]
theorem shiftFun_succ {n : ℕ} {X : Type*} [Zero X] (f : Fin n → X) (i : Fin n) :
    shiftFun f i.succ = f i

{n : ℕ}
{X : Type u_1}
[Zero X]
(f : Fin n → X)
(i : Fin n)

SSet.Augmented.StandardSimplex.shiftFun f i.succ = f i


/-- Two finite measures are equal if they are equal on the π-system generating the σ-algebra
  (and `univ`). -/
theorem ext_of_generate_finite (C : Set (Set α)) (hA : m0 = generateFrom C) (hC : IsPiSystem C)
    [IsFiniteMeasure μ] (hμν : ∀ s ∈ C, μ s = ν s) (h_univ : μ univ = ν univ) : μ = ν

(hA : m0 = MeasurableSpace.generateFrom C)


/-- **Orzech's theorem** for Noetherian module: if `R` is a ring (not necessarily commutative),
`M` and `N` are `R`-modules, `M` is Noetherian, `i : N →ₗ[R] M` is injective,
`f : N →ₗ[R] M` is surjective, then `f` is also injective. The proof here is adapted from
Djoković's paper *Epimorphisms of modules which must be isomorphisms* [djokovic1973],
utilizing `LinearMap.iterateMapComap`.
See also Orzech's original paper: *Onto endomorphisms are isomorphisms* [orzech1971]. -/
theorem IsNoetherian.injective_of_surjective_of_injective (i f : N →ₗ[R] M)
    (hi : Injective i) (hf : Surjective f) : Injective f

{R : Type u_1}
{M : Type u_2}
{N : Type w}
[Ring R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[IsNoetherian R M]
(i f : N →ₗ[R] M)
(hi : Function.Injective ⇑i)
(hf : Function.Surjective ⇑f)


theorem isIntegrallyClosedOfFiniteExtension [IsDomain R] [FiniteDimensional K L] :
    IsIntegrallyClosed (integralClosure R L)

{R : Type u_1}
[CommRing R]
(K : Type u_2)
[Field K]
[Algebra R K]
[IsFractionRing R K]
{L : Type u_3}
[Field L]
[Algebra K L]
[Algebra R L]
[IsScalarTower R K L]
[IsDomain R]
[FiniteDimensional K L]

IsIntegrallyClosed ↥(integralClosure R L)


/-- Given `φ : F ⟶ G`, this is the cocycle in `Cocycle (mappingCone φ) K n` that is
constructed from `α : Cochain F K m` (with `m + 1 = n`) and `β : Cocycle F K n`,
when a suitable cocycle relation is satisfied. -/
@[simps!]
noncomputable def descCocycle {K : CochainComplex C ℤ} {n m : ℤ}
    (α : Cochain F K m) (β : Cocycle G K n)
    (h : m + 1 = n) (eq : δ m n α = n.negOnePow • (Cochain.ofHom φ).comp β.1 (zero_add n)) :
    Cocycle (mappingCone φ) K n

(α : CochainComplex.HomComplex.Cochain F K m)

(β : CochainComplex.HomComplex.Cocycle G K n)

(eq : CochainComplex.HomComplex.δ m n α = n.negOnePow • (CochainComplex.HomComplex.Cochain.ofHom φ).comp ↑β ⋯)

↑(CochainComplex.mappingCone.descCocycle φ α β h eq) = CochainComplex.mappingCone.descCochain φ α (↑β) h


theorem Sized.size_eq {s l x r} (H : Sized (@node α s l x r)) :
    size (@node α s l x r) = size l + size r + 1

{α : Type u_1}
{s : ℕ}
{l : Ordnode α}
{x : α}
{r : Ordnode α}
(H : (Ordnode.node s l x r).Sized)

(Ordnode.node s l x r).size = l.size + r.size + 1


theorem addRothNumber_Ico (a b : ℕ) : addRothNumber (Ico a b) = rothNumberNat (b - a)

addRothNumber (Finset.Ico a b) = rothNumberNat (b - a)


@[aesop unsafe 20% (rule_sets := [Matroid])]
theorem Dep.subset_ground (hD : M.Dep D) : D ⊆ M.E

{α : Type u_1}
{M : Matroid α}
{D : Set α}
(hD : M.Dep D)


theorem frequently_eq_iff_eventually_eq (hf : AnalyticAt 𝕜 f z₀) (hg : AnalyticAt 𝕜 g z₀) :
    (∃ᶠ z in 𝓝[≠] z₀, f z = g z) ↔ ∀ᶠ z in 𝓝 z₀, f z = g z

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f g : 𝕜 → E}
{z₀ : 𝕜}
(hf : AnalyticAt 𝕜 f z₀)
(hg : AnalyticAt 𝕜 g z₀)

(∃ᶠ (z : 𝕜) in 𝓝[≠] z₀, f z = g z) ↔ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = g z


/-- `Function.eval` as an `AlgHom`. The name matches `Pi.evalRingHom`, `Pi.evalMonoidHom`,
etc. -/
@[simps]
def evalAlgHom {_ : CommSemiring R} [∀ i, Semiring (f i)] [∀ i, Algebra R (f i)] (i : I) :
    (∀ i, f i) →ₐ[R] f i

{I : Type u}
(R : Type u_1)
(f : I → Type v)

∀ {x : CommSemiring R} [inst : (i : I) → Semiring (f i)] [inst_1 : (i : I) → Algebra R (f i)] (i : I)
  (f_1 : (i : I) → f i), (Pi.evalAlgHom R f i) f_1 = f_1 i


theorem getVert_reverse {u v : V} (p : G.Walk u v) (i : ℕ) :
    p.reverse.getVert i = p.getVert (p.length - i)

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


theorem exists_simpleFunc_forall_lintegral_sub_lt_of_pos {f : α → ℝ≥0∞} (h : ∫⁻ x, f x ∂μ ≠ ∞)
    {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ φ : α →ₛ ℝ≥0,
      (∀ x, ↑(φ x) ≤ f x) ∧
        ∀ ψ : α →ₛ ℝ≥0, (∀ x, ↑(ψ x) ≤ f x) → (map (↑) (ψ - φ)).lintegral μ < ε

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(h : ∫⁻ (x : α), f x ∂μ ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

∃ φ,
  (∀ (x : α), ↑(↑φ x) ≤ f x) ∧
    ∀ (ψ : MeasureTheory.SimpleFunc α ℝ≥0),
      (∀ (x : α), ↑(↑ψ x) ≤ f x) → (MeasureTheory.SimpleFunc.map ENNReal.ofNNReal (ψ - φ)).lintegral μ < ε


/-- The unit isomorphism of the equivalence of categories `whiskeringLeftEquivalence W D`. -/
@[simps!]
def unitIso : 𝟭 (W.Localization ⥤ D) ≅ functor W D ⋙ inverse W D

{C : Type uC}
[CategoryTheory.Category.{uC', uC} C]
(W : CategoryTheory.MorphismProperty C)
(D : Type uD)
[CategoryTheory.Category.{uD', uD} D]

(CategoryTheory.Localization.Construction.WhiskeringLeftEquivalence.unitIso W D).inv = CategoryTheory.eqToHom ⋯


@[to_additive]
theorem TopologicalGroup.t2Space_of_one_sep (H : ∀ x : G, x ≠ 1 → ∃ U ∈ 𝓝 (1 : G), x ∉ U) :
    T2Space G

(H : ∀ (x : G), x ≠ 1 → ∃ U ∈ 𝓝 1, x ∉ U)


theorem mfderiv_add (hf : MDifferentiableAt I 𝓘(𝕜, E') f z)
    (hg : MDifferentiableAt I 𝓘(𝕜, E') g z) :
    (by exact mfderiv I 𝓘(𝕜, E') (f + g) z : TangentSpace I z →L[𝕜] E') =
      (by exact mfderiv I 𝓘(𝕜, E') f z) + (by exact mfderiv I 𝓘(𝕜, E') g z)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{z : M}
{f g : M → E'}
(hf : MDifferentiableAt I 𝓘(𝕜, E') f z)
(hg : MDifferentiableAt I 𝓘(𝕜, E') g z)

mfderiv I 𝓘(𝕜, E') (f + g) z = mfderiv I 𝓘(𝕜, E') f z + mfderiv I 𝓘(𝕜, E') g z


@[simp]
theorem DifferentiableAt.csin (hc : DifferentiableAt ℂ f x) :
    DifferentiableAt ℂ (fun x => Complex.sin (f x)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{x : E}
(hc : DifferentiableAt ℂ f x)


@[simp] lemma compl_truncatedSup (s : Finset α) (a : α) :
    (truncatedSup s a)ᶜ = truncatedInf sᶜˢ aᶜ

{α : Type u_1}
[BooleanAlgebra α]
[DecidableRel fun x x_1 => x ≤ x_1]
(s : Finset α)
(a : α)

(s.truncatedSup a)ᶜ = sᶜˢ.truncatedInf aᶜ


theorem preimage_sigmaMap_sigma {α' : ι' → Type*} (f : ι → ι') (g : ∀ i, α i → α' (f i))
    (s : Set ι') (t : ∀ i, Set (α' i)) :
    Sigma.map f g ⁻¹' s.sigma t = (f ⁻¹' s).sigma fun i ↦ g i ⁻¹' t (f i)

{ι : Type u_1}
{ι' : Type u_2}
{α : ι → Type u_3}
{α' : ι' → Type u_8}
(f : ι → ι')
(g : (i : ι) → α i → α' (f i))
(s : Set ι')
(t : (i : ι') → Set (α' i))

Sigma.map f g ⁻¹' s.sigma t = (f ⁻¹' s).sigma fun i => g i ⁻¹' t (f i)


@[to_additive (attr := simp)]
theorem prod_dite_eq' [DecidableEq α] (s : Finset α) (a : α) (b : ∀ x : α, x = a → β) :
    ∏ x ∈ s, (if h : x = a then b x h else 1) = ite (a ∈ s) (b a rfl) 1

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
[DecidableEq α]
(s : Finset α)
(a : α)
(b : (x : α) → x = a → β)

(∑ x ∈ s, if h : x = a then b x h else 0) = if a ∈ s then b a ⋯ else 0


theorem not_lt_minimum_of_mem' (ha : a ∈ l) : ¬(a : WithTop α) < minimum l

{α : Type u_1}
[Preorder α]
[DecidableRel fun x x_1 => x < x_1]
{l : List α}
{a : α}
(ha : a ∈ l)


theorem ite_ae_eq_of_measure_zero {γ} (f : α → γ) (g : α → γ) (s : Set α) [DecidablePred (· ∈ s)]
    (hs_zero : μ s = 0) :
    (fun x => ite (x ∈ s) (f x) (g x)) =ᵐ[μ] g

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{γ : Type u_5}
(f g : α → γ)
(s : Set α)
[DecidablePred fun x => x ∈ s]
(hs_zero : μ s = 0)

(fun x => if x ∈ s then f x else g x) =ᵐ[μ] g


lemma cdf_eq_toReal [IsProbabilityMeasure μ] (x : ℝ) : cdf μ x = (μ (Iic x)).toReal

(μ : MeasureTheory.Measure ℝ)
[MeasureTheory.IsProbabilityMeasure μ]
(x : ℝ)

↑(ProbabilityTheory.cdf μ) x = (μ (Set.Iic x)).toReal


theorem update_comm (f : α →₀ M) {a₁ a₂ : α} (h : a₁ ≠ a₂) (m₁ m₂ : M) :
    update (update f a₁ m₁) a₂ m₂ = update (update f a₂ m₂) a₁ m₁

{α : Type u_1}
{M : Type u_5}
[Zero M]
(f : α →₀ M)
{a₁ a₂ : α}
(h : a₁ ≠ a₂)
(m₁ m₂ : M)

(f.update a₁ m₁).update a₂ m₂ = (f.update a₂ m₂).update a₁ m₁


@[to_additive (attr := simp)]
theorem prod_map_erase [DecidableEq ι] {a : ι} (h : a ∈ m) :
    f a * ((m.erase a).map f).prod = (m.map f).prod

{ι : Type u_2}
{α : Type u_3}
[AddCommMonoid α]
{m : Multiset ι}
{f : ι → α}
[DecidableEq ι]
{a : ι}
(h : a ∈ m)

f a + (Multiset.map f (m.erase a)).sum = (Multiset.map f m).sum


/-- The category of based categories. -/
@[simps]
instance : Category (BasedCategory.{v₂, u₂} 𝒮)

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

CategoryTheory.CategoryStruct.id 𝒳 = CategoryTheory.BasedFunctor.id 𝒳


@[fun_prop]
theorem hasStrictFDerivAt_pi'' (hφ : ∀ i, HasStrictFDerivAt (fun x => Φ x i) ((proj i).comp Φ') x) :
    HasStrictFDerivAt Φ Φ' x

(hφ : ∀ (i : ι), HasStrictFDerivAt (fun x => Φ x i) ((ContinuousLinearMap.proj i).comp Φ') x)


@[simp]
theorem mk_add : (mk (x + y) : M ⧸ p) = (mk x : M ⧸ p) + (mk y : M ⧸ p)

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

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


/-- The `p`-adic norm of `q` is `1` if `q` is prime and not equal to `p`. -/
theorem padicNorm_of_prime_of_ne {q : ℕ} [p_prime : Fact p.Prime] [q_prime : Fact q.Prime]
    (neq : p ≠ q) : padicNorm p q = 1

{p q : ℕ}
[p_prime : Fact (Nat.Prime p)]
[q_prime : Fact (Nat.Prime q)]
(neq : p ≠ q)


/-- A fixed point of f is reached after the successor of the domains cardinality -/
lemma gfpApprox_ord_mem_fixedPoint (h_init : f x ≤ x) :
    gfpApprox f x (ord <| succ #α) ∈ fixedPoints f

{α : Type u}
[CompleteLattice α]
(f : α →o α)
(x : α)
(h_init : f x ≤ x)

OrdinalApprox.gfpApprox f x (Order.succ (Cardinal.mk α)).ord ∈ Function.fixedPoints ⇑f


theorem le_def {S T : A} : S ≤ T ↔ ∀ ⦃x : B⦄, x ∈ S → x ∈ T

{A : Type u_1}
{B : Type u_2}
[i : SetLike A B]
{S T : A}


@[simp]
lemma id_f (R : Φ.RightResolution X₂) : Hom.f (𝟙 R) = 𝟙 R.X₁

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}

(CategoryTheory.CategoryStruct.id R).f = CategoryTheory.CategoryStruct.id R.X₁


/-- If two values of quadratic characters with target `ℤ` agree after coercion into a ring
of characteristic not `2`, then they agree in `ℤ`. -/
theorem IsQuadratic.eq_of_eq_coe {χ : MulChar R ℤ} (hχ : IsQuadratic χ) {χ' : MulChar R' ℤ}
    (hχ' : IsQuadratic χ') [Nontrivial R''] (hR'' : ringChar R'' ≠ 2) {a : R} {a' : R'}
    (h : (χ a : R'') = χ' a') : χ a = χ' a'

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommRing R']
{R'' : Type u_3}
[CommRing R'']
{χ : MulChar R ℤ}
(hχ : χ.IsQuadratic)
{χ' : MulChar R' ℤ}
(hχ' : χ'.IsQuadratic)
[Nontrivial R'']
(hR'' : ringChar R'' ≠ 2)
{a : R}
{a' : R'}
(h : ↑(χ a) = ↑(χ' a'))


@[to_additive]
theorem index_eq_zero_of_relindex_eq_zero (h : H.relindex K = 0) : H.index = 0

{G : Type u_1}
[Group G]
{H K : Subgroup G}
(h : H.relindex K = 0)


theorem continuous_inr [Zero R] : Continuous (inr : M → tsze R M)

{R : Type u_3}
{M : Type u_4}
[TopologicalSpace R]
[TopologicalSpace M]
[Zero R]


/-- Suppose that `N` acts on `X` and `M` continuously acts on `Y`.
Suppose that `g : Y → X` is an action homomorphism in the following sense:
there exists a continuous function `f : N → M` such that `g (c • x) = f c • g x`.
Then the action of `N` on `X` is continuous as well.

In many cases, `f = id` so that `g` is an action homomorphism in the sense of `MulActionHom`.
However, this version also works for semilinear maps and `f = Units.val`. -/
@[to_additive
  "Suppose that `N` additively acts on `X` and `M` continuously additively acts on `Y`.
Suppose that `g : Y → X` is an additive action homomorphism in the following sense:
there exists a continuous function `f : N → M` such that `g (c +ᵥ x) = f c +ᵥ g x`.
Then the action of `N` on `X` is continuous as well.

In many cases, `f = id` so that `g` is an action homomorphism in the sense of `AddActionHom`.
However, this version also works for `f = AddUnits.val`."]
lemma Inducing.continuousSMul {N : Type*} [SMul N Y] [TopologicalSpace N] {f : N → M}
    (hg : Inducing g) (hf : Continuous f) (hsmul : ∀ {c x}, g (c • x) = f c • g x) :
    ContinuousSMul N Y

(hsmul : ∀ {c : N} {x : Y}, g (c +ᵥ x) = f c +ᵥ g x)


@[simp]
theorem id_comp {α β : TypeVec n} (f : α ⟹ β) : id ⊚ f = f

{n : ℕ}
{α : TypeVec.{u_1} n}
{β : TypeVec.{u_2} n}
(f : α.Arrow β)


lemma measurable_rnDerivAux (κ η : Kernel α γ) :
    Measurable (fun p : α × γ ↦ Kernel.rnDerivAux κ η p.1 p.2)

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

Measurable fun p => κ.rnDerivAux η p.1 p.2


theorem of_vert_isIso [IsIso snd] [IsIso f] (sq : CommSq fst snd f g) : IsPullback fst snd f g

(sq : CategoryTheory.CommSq fst snd f g)


theorem algebraicIndependent_iff_injective_aeval :
    AlgebraicIndependent R x ↔ Injective (MvPolynomial.aeval x : MvPolynomial ι R →ₐ[R] A)

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]

AlgebraicIndependent R x ↔ Function.Injective ⇑(MvPolynomial.aeval x)


@[reassoc]
theorem map_inv_hom (F : C ⥤ D) {X Y : C} (f : X ⟶ Y) [IsIso f] :
    F.map (inv f) ≫ F.map f = 𝟙 (F.obj Y)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
{X Y : C}
(f : X ⟶ Y)
[CategoryTheory.IsIso f]

CategoryTheory.CategoryStruct.comp (F.map (CategoryTheory.inv f)) (F.map f) = CategoryTheory.CategoryStruct.id (F.obj Y)


@[simp]
theorem ι_comp_lift (φ : NormedAddGroupHom V₁ V) (h : f.comp φ = g.comp φ) :
    (ι _ _).comp (lift φ h) = φ

{V : Type u_1}
{W : Type u_2}
{V₁ : Type u_3}
[SeminormedAddCommGroup V]
[SeminormedAddCommGroup W]
[SeminormedAddCommGroup V₁]
{f g : NormedAddGroupHom V W}
(φ : NormedAddGroupHom V₁ V)
(h : f.comp φ = g.comp φ)

(NormedAddGroupHom.Equalizer.ι f g).comp (NormedAddGroupHom.Equalizer.lift φ h) = φ


theorem filter_gt_eq_Iio [DecidablePred (· < a)] : univ.filter (· < a) = Iio a

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrderBot α]
{a : α}
[Fintype α]
[DecidablePred fun x => x < a]

Finset.filter (fun x => x < a) Finset.univ = Finset.Iio a


/-- `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ᵒᵖ


theorem map_nhds_induced_of_surjective [T : TopologicalSpace α] {f : β → α} (hf : Surjective f)
    (a : β) : map f (@nhds β (TopologicalSpace.induced f T) a) = 𝓝 (f a)

{α : Type u}
{β : Type v}
[T : TopologicalSpace α]
{f : β → α}
(hf : Function.Surjective f)
(a : β)


@[deprecated (since := "2023-01-05")]
theorem get_reverse_aux₁ :
    ∀ (l r : List α) (i h1 h2), get (reverseAux l r) ⟨i + length l, h1⟩ = get r ⟨i, h2⟩

(h1 : i + l.length < (l.reverseAux r).length)

(l.reverseAux r).get ⟨i + l.length, h1⟩ = r.get ⟨i, h2⟩


@[simp]
theorem foldl.ofFreeMonoid_comp_of (f : α → β → α) :
    Foldl.ofFreeMonoid f ∘ FreeMonoid.of = Foldl.mk ∘ flip f

⇑(Monoid.Foldl.ofFreeMonoid f) ∘ FreeMonoid.of = Monoid.Foldl.mk ∘ flip f


theorem coe_toDualBotEquiv [LE α] :
    (WithTop.toDualBotEquiv : WithTop αᵒᵈ → (WithBot α)ᵒᵈ) = toDual ∘ WithTop.ofDual

⇑WithTop.toDualBotEquiv = ⇑OrderDual.toDual ∘ ⇑WithTop.ofDual


theorem Valid'.node4L_lemma₂ {b c d : ℕ} (mr₂ : b + c + 1 ≤ 3 * d) : c ≤ 3 * d


@[to_additive]
theorem monotone_map {f : F} : Monotone (map f)

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{f : F}


/-- Constant functions are Lipschitz (with any constant). -/
protected theorem const (b : β) : LipschitzWith 0 fun _ : α => b

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


@[simp, norm_cast] lemma den_intCast (n : ℤ) : (n : ℚ).den = 1


@[simp]
theorem coe_map (f : E →L[𝕜] F) : (WeakSpace.map f : E → F) = f

{𝕜 : Type u_2}
{E : Type u_5}
{F : Type u_6}
[CommSemiring 𝕜]
[TopologicalSpace 𝕜]
[ContinuousAdd 𝕜]
[ContinuousConstSMul 𝕜 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[TopologicalSpace E]
[AddCommMonoid F]
[Module 𝕜 F]
[TopologicalSpace F]
(f : E →L[𝕜] F)


theorem IsOption.mk_left {xl xr : Type u} (xL : xl → PGame) (xR : xr → PGame) (i : xl) :
    (xL i).IsOption (mk xl xr xL xR)

{xl xr : Type u}
(xL : xl → SetTheory.PGame)
(xR : xr → SetTheory.PGame)
(i : xl)

(xL i).IsOption (SetTheory.PGame.mk xl xr xL xR)


/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps!]
def coneEquivUnitIso :
    𝟭 (Limits.Cone ((diagram U).op ⋙ F)) ≅ coneEquivFunctor F U ⋙ coneEquivInverse F U

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasProducts C]
{X : TopCat}
(F : TopCat.Presheaf C X)
{ι : Type v'}
(U : ι → TopologicalSpace.Opens ↑X)

∀ (X_1 : CategoryTheory.Limits.Cone ((CategoryTheory.Pairwise.diagram U).op ⋙ F)),
  ((TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivUnitIso F U).hom.app X_1).hom = 𝟙 X_1.pt


/--
If `F ⊣ G` and `F' ⊣ G'` are adjunctions, then giving a natural isomorphism `G ≅ G'` is the
same as giving a natural transformation `F' ≅ F`.
-/
@[simps]
def natIsoEquiv {F F' : C ⥤ D} {G G' : D ⥤ C} (adj1 : F ⊣ G) (adj2 : F' ⊣ G') :
    (G ≅ G') ≃ (F' ≅ F)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{F F' : C ⥤ D}
{G G' : D ⥤ C}
(adj1 : F ⊣ G)
(adj2 : F' ⊣ G')
(i : F' ≅ F)

((adj1.natIsoEquiv adj2).symm i).hom = (adj1.natTransEquiv adj2).symm i.hom


lemma mulSupport_intCast (hn : n ≠ 1) : mulSupport (n : α → β) = univ

{α : Type u_1}
{β : Type u_2}
[AddGroupWithOne β]
[CharZero β]
{n : ℤ}
(hn : n ≠ 1)


@[to_additive]
theorem Multiset.prod_eq_prod_coe [CommMonoid α] (m : Multiset α) : m.prod = ∏ x : m, (x : α)

{α : Type u_1}
[DecidableEq α]
[CommMonoid α]
(m : Multiset α)


@[fun_prop]
theorem Measurable.snd {f : α → β × γ} (hf : Measurable f) : Measurable fun a : α => (f a).2

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{mγ : MeasurableSpace γ}
{f : α → β × γ}
(hf : Measurable f)


@[simp]
theorem integral_inv_of_neg (ha : a < 0) (hb : b < 0) : ∫ x in a..b, x⁻¹ = log (b / a)

∫ (x : ℝ) in a..b, x⁻¹ = Real.log (b / a)


theorem hasDerivAt_tan_of_mem_Ioo {x : ℝ} (h : x ∈ Ioo (-(π / 2) : ℝ) (π / 2)) :
    HasDerivAt tan (1 / cos x ^ 2) x

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

HasDerivAt Real.tan (1 / Real.cos x ^ 2) x


/-- See also the strictly more general `final_of_final_comp` below. -/
theorem final_of_equivalence_comp [IsEquivalence F] [Final (F ⋙ G)] : Final G

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


@[to_additive (attr := simp)]
theorem tprod_empty [IsEmpty β] : ∏' b, f b = 1

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


theorem continuousAt_angle {x : V × V} (hx1 : x.1 ≠ 0) (hx2 : x.2 ≠ 0) :
    ContinuousAt (fun y : V × V => angle y.1 y.2) x

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x : V × V}
(hx1 : x.1 ≠ 0)
(hx2 : x.2 ≠ 0)

ContinuousAt (fun y => InnerProductGeometry.angle y.1 y.2) x


theorem IsRegular.himp (ha : IsRegular a) (hb : IsRegular b) : IsRegular (a ⇨ b)

{α : Type u_1}
[HeytingAlgebra α]
{a b : α}
(ha : Heyting.IsRegular a)
(hb : Heyting.IsRegular b)


@[simp]
theorem dist_left_lineMap (p₁ p₂ : P) (c : 𝕜) : dist p₁ (lineMap p₁ p₂ c) = ‖c‖ * dist p₁ p₂

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 V]
(p₁ p₂ : P)
(c : 𝕜)

dist p₁ ((AffineMap.lineMap p₁ p₂) c) = ‖c‖ * dist p₁ p₂


/-- Let `f` be a measurable function integrable on `a..b`. The function `(u, v) ↦ ∫ x in u..v, f x`
has derivative `(u, v) ↦ v • f b - u • f a` within `s × t` at `(a, b)`, where
`s ∈ {Iic a, {a}, Ici a, univ}` and `t ∈ {Iic b, {b}, Ici b, univ}` provided that `f` tends to
`f a` and `f b` at the filters `la` and `lb` from the following table. In most cases this assumption
is definitionally equal `ContinuousAt f _` or `ContinuousWithinAt f _ _`.

| `s`     | `la`     | `t`     | `lb`     |
| ------- | ----     | ---     | ----     |
| `Iic a` | `𝓝[≤] a` | `Iic b` | `𝓝[≤] b` |
| `Ici a` | `𝓝[>] a` | `Ici b` | `𝓝[>] b` |
| `{a}`   | `⊥`      | `{b}`   | `⊥`      |
| `univ`  | `𝓝 a`    | `univ`  | `𝓝 b`    |
-/
theorem integral_hasFDerivWithinAt (hf : IntervalIntegrable f volume a b)
    (hmeas_a : StronglyMeasurableAtFilter f la) (hmeas_b : StronglyMeasurableAtFilter f lb)
    {s t : Set ℝ} [FTCFilter a (𝓝[s] a) la] [FTCFilter b (𝓝[t] b) lb] (ha : Tendsto f la (𝓝 <| f a))
    (hb : Tendsto f lb (𝓝 <| f b)) :
    HasFDerivWithinAt (fun p : ℝ × ℝ => ∫ x in p.1..p.2, f x)
      ((snd ℝ ℝ ℝ).smulRight (f b) - (fst ℝ ℝ ℝ).smulRight (f a)) (s ×ˢ t) (a, b)

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas_a : StronglyMeasurableAtFilter f la MeasureTheory.volume)

(hmeas_b : StronglyMeasurableAtFilter f lb MeasureTheory.volume)

[intervalIntegral.FTCFilter a (𝓝[s] a) la]

[intervalIntegral.FTCFilter b (𝓝[t] b) lb]

HasFDerivWithinAt (fun p => ∫ (x : ℝ) in p.1 ..p.2, f x)
  ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight (f b) - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight (f a)) (s ×ˢ t) (a, b)


theorem not_lt_of_mem_argmax : a ∈ l → m ∈ argmax f l → ¬f m < f a

{α : Type u_1}
{β : Type u_2}
[Preorder β]
[DecidableRel fun x x_1 => x < x_1]
{f : α → β}
{l : List α}
{a m : α}

a ∈ l → m ∈ List.argmax f l → ¬f m < f a


@[simp]
theorem rotate_replicate (a : α) (n : ℕ) (k : ℕ) : (replicate n a).rotate k = replicate n a

(List.replicate n a).rotate k = List.replicate n a


theorem min_of_mem {s : Finset α} {a : α} (h : a ∈ s) : ∃ b : α, s.min = b

{α : Type u_2}
[LinearOrder α]
{s : Finset α}
{a : α}
(h : a ∈ s)


theorem AntitoneOn.integrableOn_of_measure_ne_top (hanti : AntitoneOn f s) {a b : X}
    (ha : IsLeast s a) (hb : IsGreatest s b) (hs : μ s ≠ ∞) (h's : MeasurableSet s) :
    IntegrableOn f s μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[TopologicalSpace X]
[NormedAddCommGroup E]
{f : X → E}
{μ : MeasureTheory.Measure X}
{s : Set X}
[BorelSpace X]
[ConditionallyCompleteLinearOrder X]
[ConditionallyCompleteLinearOrder E]
[OrderTopology X]
[OrderTopology E]
[SecondCountableTopology E]
(hanti : AntitoneOn f s)
{a b : X}
(ha : IsLeast s a)
(hb : IsGreatest s b)
(hs : μ s ≠ ⊤)
(h's : MeasurableSet s)


lemma piFinset_update_eq_filter_piFinset_mem (s : ∀ i, Finset (δ i)) (i : α) {t : Finset (δ i)}
    (hts : t ⊆ s i) : piFinset (Function.update s i t) = (piFinset s).filter (fun f ↦ f i ∈ t)

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{δ : α → Type u_3}
[(a : α) → DecidableEq (δ a)]
(s : (i : α) → Finset (δ i))
(i : α)
{t : Finset (δ i)}
(hts : t ⊆ s i)

Fintype.piFinset (Function.update s i t) = Finset.filter (fun f => f i ∈ t) (Fintype.piFinset s)


@[to_additive]
theorem mk_one_mul_mk_one [Mul M] [Monoid N] (a₁ a₂ : M) :
    (a₁, (1 : N)) * (a₂, 1) = (a₁ * a₂, 1)

{M : Type u_5}
{N : Type u_6}
[Mul M]
[Monoid N]
(a₁ a₂ : M)


@[simp, norm_cast]
theorem cast_one [Zero α] [One α] [Add α] : ((1 : Num) : α) = 1


theorem Monotone.comp_antitoneOn (hg : Monotone g) (hf : AntitoneOn f s) : AntitoneOn (g ∘ f) s

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder α]
[Preorder β]
[Preorder γ]
{g : β → γ}
{f : α → β}
{s : Set α}
(hg : Monotone g)
(hf : AntitoneOn f s)


@[simp]
theorem isLittleO_map {k : β → α} {l : Filter β} : f =o[map k l] g ↔ (f ∘ k) =o[l] (g ∘ k)

{α : Type u_1}
{β : Type u_2}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{f : α → E}
{g : α → F}
{k : β → α}
{l : Filter β}

f =o[Filter.map k l] g ↔ (f ∘ k) =o[l] (g ∘ k)


lemma lt_def : f < g ↔ f ≤ g ∧ ∃ i, f i < g i

{ι : Type u_1}
{α : Type u_2}
[Zero α]
[Preorder α]
{f g : ι →₀ α}


@[to_additive (attr := simp)]
theorem edist_mul_right [Mul M] [PseudoEMetricSpace M] [IsometricSMul Mᵐᵒᵖ M] (a b c : M) :
    edist (a * c) (b * c) = edist a b

{M : Type u}
[Add M]
[PseudoEMetricSpace M]
[IsometricVAdd Mᵃᵒᵖ M]
(a b c : M)


theorem ContDiff.ccosh {n} (h : ContDiff ℂ n f) : ContDiff ℂ n fun x => Complex.cosh (f x)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{n : ℕ∞}
(h : ContDiff ℂ n f)


@[simp]
theorem curry_apply (F : Homotopy f₀ f₁) (t : I) (x : X) : F.curry t x = F (t, x)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
(F : f₀.Homotopy f₁)
(t : ↑I)
(x : X)


@[simp]
theorem range_fst : range (fst R M M₂) = ⊤

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

LinearMap.range (LinearMap.fst R M M₂) = ⊤


theorem zoom_zoomed₂ (e : zoom cut t path = (t', path'))
    (hp : path.Zoomed cut) : path'.Zoomed cut

∀ {α : Type u_1} {cut : α → Ordering} {t : Batteries.RBNode α} {path : Batteries.RBNode.Path α}
  {t' : Batteries.RBNode α} {path' : Batteries.RBNode.Path α},
  Batteries.RBNode.zoom cut t path = (t', path') →
    Batteries.RBNode.Path.Zoomed cut path → Batteries.RBNode.Path.Zoomed cut path'


@[simp]
lemma sub_eq_top_iff {a b : WithTop α} : a - b = ⊤ ↔ (a = ⊤ ∨ b = ⊤)

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


theorem map_equiv_eq_comap_symm (f : R ≃+* S) (K : Subsemiring R) :
    K.map (f : R →+* S) = K.comap f.symm

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R ≃+* S)
(K : Subsemiring R)

Subsemiring.map (↑f) K = Subsemiring.comap (↑f.symm) K


lemma AddMonoidHom.apply_int (f : ℤ →+ β) (n : ℤ) : f n = n • f 1

(β : Type u_4)
[AddGroup β]
(f : ℤ →+ β)
(n : ℤ)


theorem vec_ex1_dioph (n) {S : Set (Vector3 ℕ (succ n))} (d : Dioph S) :
    Dioph {v : Fin2 n → ℕ | ∃ x, (x::v) ∈ S}

(n : ℕ)
{S : Set (Vector3 ℕ n.succ)}
(d : Dioph S)


theorem mul_mem_nonunits_right [CommMonoid α] : b ∈ nonunits α → a * b ∈ nonunits α


@[simp]
theorem of_apply (f : m → n → α) (i j) : of f i j = f i j

{m : Type u_2}
{n : Type u_3}
{α : Type v}
(f : m → n → α)
(i : m)
(j : n)


/-- A general version of **Dirichlet's approximation theorem**.

See also `AddCircle.exists_norm_nsmul_le`. -/
lemma _root_.NormedAddCommGroup.exists_norm_nsmul_le {A : Type*}
    [NormedAddCommGroup A] [CompactSpace A] [ConnectedSpace A]
    [MeasurableSpace A] [BorelSpace A] {μ : Measure A} [μ.IsAddHaarMeasure]
    (ξ : A) {n : ℕ} (hn : 0 < n) (δ : ℝ) (hδ : μ univ ≤ (n + 1) • μ (closedBall (0 : A) (δ/2))) :
    ∃ j ∈ Icc 1 n, ‖j • ξ‖ ≤ δ

(hδ : μ Set.univ ≤ (n + 1) • μ (Metric.closedBall 0 (δ / 2)))


theorem quotient_norm_sub_rev {S : AddSubgroup M} (x y : M ⧸ S) : ‖x - y‖ = ‖y - x‖

{M : Type u_1}
[SeminormedAddCommGroup M]
{S : AddSubgroup M}
(x y : M ⧸ S)


@[simp]
theorem partiallyWellOrderedOn_insert :
    PartiallyWellOrderedOn (insert a s) r ↔ PartiallyWellOrderedOn s r

{α : Type u_2}
{r : α → α → Prop}
{s : Set α}
{a : α}
[IsRefl α r]

(insert a s).PartiallyWellOrderedOn r ↔ s.PartiallyWellOrderedOn r


lemma isSMulRegular_on_quot_iff_smul_mem_implies_mem :
    IsSMulRegular (M ⧸ N) r ↔ ∀ x : M, r • x ∈ N → x ∈ N

{R : Type u_1}
{M : Type u_3}
[Ring R]
[AddCommGroup M]
[Module R M]
(N : Submodule R M)
(r : R)

IsSMulRegular (M ⧸ N) r ↔ ∀ (x : M), r • x ∈ N → x ∈ N


@[to_additive]
theorem inf_subgroupOf_inf_normal_of_left {A' A : Subgroup G} (B : Subgroup G) (hA : A' ≤ A)
    [hN : (A'.subgroupOf A).Normal] : ((A' ⊓ B).subgroupOf (A ⊓ B)).Normal

{G : Type u_1}
[Group G]
{A' A : Subgroup G}
(B : Subgroup G)
(hA : A' ≤ A)
[hN : (A'.subgroupOf A).Normal]


theorem div_le_of_le_mul {a b c : ℝ≥0} (h : a ≤ b * c) : a / c ≤ b


protected theorem map_sub : X (f - f') = X f - X f'

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[TopologicalSpace G]
[ChartedSpace H G]
[Monoid G]
[SmoothMul I G]
(X : LeftInvariantDerivation I G)
(f : C^⊤⟮I, G; 𝓘(𝕜, 𝕜), 𝕜⟯)
{f' : C^⊤⟮I, G; 𝓘(𝕜, 𝕜), 𝕜⟯}


theorem apply_mul_add_le (k n r) : u (k * n + r) ≤ k * u n + u r

{u : ℕ → ℝ}
(h : Subadditive u)
(k n r : ℕ)


@[simp]
theorem equivAlgHom_symm_coe (f : A →ₐ[𝕜] 𝕜) : ⇑(equivAlgHom.symm f) = f

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedRing A]
[CompleteSpace A]
[NormedAlgebra 𝕜 A]
(f : A →ₐ[𝕜] 𝕜)

⇑(WeakDual.CharacterSpace.equivAlgHom.symm f) = ⇑f


theorem mapsTo_emetric_ball (h : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ≥0∞) :
    MapsTo f (ball x r) (ball (f x) (K * r))

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(h : LipschitzWith K f)
(hK : K ≠ 0)
(x : α)
(r : ℝ≥0∞)

Set.MapsTo f (EMetric.ball x r) (EMetric.ball (f x) (↑K * r))


lemma nonempty_oreSet_of_strongRankCondition [StrongRankCondition R] :
    Nonempty (OreLocalization.OreSet R⁰)

{R : Type u_1}
[Ring R]
[IsDomain R]
[StrongRankCondition R]


/-- A finite formal multilinear series sums to its sum at every point. -/
protected theorem FormalMultilinearSeries.hasSum_of_finite (p : FormalMultilinearSeries 𝕜 E F)
    {n : ℕ} (hn : ∀ m, n ≤ m → p m = 0) (x : E) :
    HasSum (fun n : ℕ => p n fun _ => x) (p.sum x)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{n : ℕ}
(hn : ∀ (m : ℕ), n ≤ m → p m = 0)
(x : E)

HasSum (fun n => (p n) fun x_1 => x) (p.sum x)


theorem add_pow_mem_of_pow_mem_of_le {m n k : ℕ}
    (ha : a ^ m ∈ I) (hb : b ^ n ∈ I) (hk : m + n ≤ k + 1) :
    (a + b) ^ k ∈ I

{α : Type u}
{a b : α}
[CommSemiring α]
(I : Ideal α)
{m n k : ℕ}
(ha : a ^ m ∈ I)
(hb : b ^ n ∈ I)
(hk : m + n ≤ k + 1)


theorem norm_compLpL_le [Fact (1 ≤ p)] (L : E →L[𝕜] F) : ‖L.compLpL p μ‖ ≤ ‖L‖

{α : Type u_1}
{E : Type u_2}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{𝕜 : Type u_5}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
[Fact (1 ≤ p)]
(L : E →L[𝕜] F)

‖ContinuousLinearMap.compLpL p μ L‖ ≤ ‖L‖


@[reassoc (attr := simp)]
theorem biproduct.ι_desc {f : J → C} [HasBiproduct f] {P : C} (p : ∀ b, f b ⟶ P) (j : J) :
    biproduct.ι f j ≫ biproduct.desc p = p j

CategoryTheory.Limits.biproduct.ι f j ≫ CategoryTheory.Limits.biproduct.desc p = p j


@[simp, norm_cast]
theorem coe_smul_closedBall (z : closedBall (0 : ℂ) 1) (w : 𝔻) : ↑(z • w) = (z * w : ℂ)

(z : ↑(Metric.closedBall 0 1))
(w : Complex.UnitDisc)


protected theorem restrict (h : Monotone f) (s : Set α) : Monotone (s.restrict f)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f : α → β}
(h : Monotone f)
(s : Set α)


theorem StarConvex.mem (hs : StarConvex 𝕜 x s) (h : s.Nonempty) : x ∈ s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{x : E}
{s : Set E}
(hs : StarConvex 𝕜 x s)
(h : s.Nonempty)


theorem zero_ne_one_of_proper {I : Ideal α} (h : I ≠ ⊤) : (0 : α) ≠ 1

{α : Type u}
[Semiring α]
{I : Ideal α}
(h : I ≠ ⊤)


@[simp]
theorem image_Icc (e : α ≃o β) (a b : α) : e '' Icc a b = Icc (e a) (e b)

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


theorem Kernel.continuous_integral_integral :
    -- Continuous fun f : α × β →₁[(κ ⊗ₖ η) a] E => ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a := by
    Continuous fun f : (MeasureTheory.Lp (α := β × γ) E 1 (((κ ⊗ₖ η) a) : Measure (β × γ))) =>
        ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a

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

Continuous fun f => ∫ (x : β), ∫ (y : γ), ↑↑f (x, y) ∂η (a, x) ∂κ a


/-- If a functor `G : C ⥤ (D, K)` is fully faithful and locally dense,
then the set `{ T ∩ mor(C) | T ∈ K }` is a grothendieck topology of `C`.
-/
@[simps]
def inducedTopology : GrothendieckTopology C

(K : CategoryTheory.GrothendieckTopology D)

(G.inducedTopology K).sieves X S = K.sieves (G.obj X) (CategoryTheory.Sieve.functorPushforward G S)


/-- If the angle between three points is `π / 2`, the last two points are not equal. -/
theorem right_ne_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = (π / 2 : ℝ)) : p₃ ≠ p₂

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


lemma Hom.toCoalgHom_injective (V W : CoalgebraCat.{v} R) :
    Function.Injective (Hom.toCoalgHom : Hom V W → _)

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


lemma auxbound1 {c : ℝ} (d : ℝ) (hc : 1 ≤ c ^ 2) : r z ≤ Complex.abs (c * z + d)

EisensteinSeries.r z ≤ Complex.abs (↑c * ↑z + ↑d)


protected theorem tsub_tsub_tsub_cancel_left (hab : AddLECancellable (a - b)) (h : b ≤ a) :
    a - c - (a - b) = b - c

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


theorem disjoint_iUnion₂_right {s : Set α} {t : ∀ i, κ i → Set α} :
    Disjoint s (⋃ (i) (j), t i j) ↔ ∀ i j, Disjoint s (t i j)

{α : Type u_1}
{ι : Sort u_4}
{κ : ι → Sort u_7}
{s : Set α}
{t : (i : ι) → κ i → Set α}

Disjoint s (⋃ i, ⋃ j, t i j) ↔ ∀ (i : ι) (j : κ i), Disjoint s (t i j)


/-- Note that we rarely use `CompleteSemilatticeInf`
(in fact, any such object is always a `CompleteLattice`, so it's usually best to start there).

Nevertheless it is sometimes a useful intermediate step in constructions.
-/
class CompleteSemilatticeInf (α : Type*) extends PartialOrder α, InfSet α where
  /-- Any element of a set is more than the set infimum. -/
  sInf_le : ∀ s, ∀ a ∈ s, sInf s ≤ a
  /-- Any lower bound is less than the set infimum. -/
  le_sInf : ∀ s a, (∀ b ∈ s, a ≤ b) → a ≤ sInf s

{α : Type u_9}
[self : CompleteSemilatticeInf α]
(s : Set α)
(a : α)


theorem bddAbove_l_image {s : Set α} : BddAbove (l '' s) ↔ BddAbove s

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{s : Set α}


theorem update_apply (f : (i : ι) → M₂ →ₗ[R] φ i) (c : M₂) (i j : ι) (b : M₂ →ₗ[R] φ i) :
    (update f i b j) c = update (fun i => f i c) i (b c) j

{R : Type u}
{M₂ : Type w}
{ι : Type x}
[Semiring R]
[AddCommMonoid M₂]
[Module R M₂]
{φ : ι → Type i}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[DecidableEq ι]
(f : (i : ι) → M₂ →ₗ[R] φ i)
(c : M₂)
(i j : ι)
(b : M₂ →ₗ[R] φ i)

(Function.update f i b j) c = Function.update (fun i => (f i) c) i (b c) j


theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
    s.antidiagonal = s.powerset.map fun t ↦ (s - t, t)

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

s.antidiagonal = Multiset.map (fun t => (s - t, t)) s.powerset


@[to_additive]
theorem IsUpperSet.div_right (hs : IsUpperSet s) : IsUpperSet (s / t)

{α : Type u_1}
[OrderedAddCommGroup α]
{s t : Set α}
(hs : IsUpperSet s)


protected theorem Set.UniformEquicontinuous.uniformContinuous_of_mem {H : Set <| β → α}
    (h : H.UniformEquicontinuous) {f : β → α} (hf : f ∈ H) : UniformContinuous f

{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
{H : Set (β → α)}
(h : H.UniformEquicontinuous)
{f : β → α}
(hf : f ∈ H)


/-- A linear isomorphism induces an order isomorphism of submodules. -/
@[simps symm_apply apply]
def orderIsoMapComapOfBijective [FunLike F M M₂] [SemilinearMapClass F σ₁₂ M M₂]
    (f : F) (hf : Bijective f) : Submodule R M ≃o Submodule R₂ M₂

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[RingHomSurjective σ₁₂]
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
(f : F)
(hf : Function.Bijective ⇑f)
(p : Submodule R₂ M₂)

(RelIso.symm (Submodule.orderIsoMapComapOfBijective f hf)) p = Submodule.comap f p


theorem cos_int_mul_pi_sub (x : ℝ) (n : ℤ) : cos (n * π - x) = (-1) ^ n * cos x

Real.cos (↑n * Real.pi - x) = (-1) ^ n * Real.cos x


@[simp]
theorem primitiveRoots_one : primitiveRoots 1 R = {(1 : R)}

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


theorem tendsto_ceil_left_pure_ceil (x : α) : Tendsto (ceil : α → ℤ) (𝓝[≤] x) (pure ⌈x⌉)

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

Filter.Tendsto Int.ceil (𝓝[≤] x) (pure ⌈x⌉)


/-- This gives the first pair of coefficients of the continued fraction of a non-integer `v`.
-/
theorem of_s_head (h : fract v ≠ 0) : (of v).s.head = some ⟨1, ⌊(fract v)⁻¹⌋⟩

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
{v : K}
(h : Int.fract v ≠ 0)

(GenContFract.of v).s.head = some { a := 1, b := ↑⌊(Int.fract v)⁻¹⌋ }


@[mono]
theorem bind_mono {f₁ f₂ : Filter α} {g₁ g₂ : α → Filter β} (hf : f₁ ≤ f₂) (hg : g₁ ≤ᶠ[f₁] g₂) :
    bind f₁ g₁ ≤ bind f₂ g₂

{α : Type u}
{β : Type v}
{f₁ f₂ : Filter α}
{g₁ g₂ : α → Filter β}
(hf : f₁ ≤ f₂)
(hg : g₁ ≤ᶠ[f₁] g₂)


theorem LeftInverse.leftInvOn {g : β → α} (h : LeftInverse f g) (s : Set β) : LeftInvOn f g s

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{g : β → α}
(h : Function.LeftInverse f g)
(s : Set β)


theorem Subgroup.commProb_subgroup_le : commProb H ≤ commProb G * (H.index : ℚ) ^ 2

{G : Type u_2}
[Group G]
[Finite G]
(H : Subgroup G)


@[simp]
theorem mapPath_cons {a b c : V} (p : Path a b) (e : b ⟶ c) :
    F.mapPath (Path.cons p e) = Path.cons (F.mapPath p) (F.map e)

{V : Type u₁}
[Quiver V]
{W : Type u₂}
[Quiver W]
(F : V ⥤q W)
{a b c : V}
(p : Quiver.Path a b)
(e : b ⟶ c)

F.mapPath (p.cons e) = (F.mapPath p).cons (F.map e)


theorem condexp_stoppedValue_stopping_time_ae_eq_restrict_le (h : Martingale f ℱ μ)
    (hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ) [SigmaFinite (μ.trim hσ.measurableSpace_le)]
    (hτ_le : ∀ x, τ x ≤ n) :
    μ[stoppedValue f τ|hσ.measurableSpace] =ᵐ[μ.restrict {x : Ω | τ x ≤ σ x}] stoppedValue f τ

{Ω : Type u_1}
{E : Type u_2}
{m : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{ι : Type u_3}
[LinearOrder ι]
[LocallyFiniteOrder ι]
[OrderBot ι]
[TopologicalSpace ι]
[DiscreteTopology ι]
[MeasurableSpace ι]
[BorelSpace ι]
[MeasurableSpace E]
[BorelSpace E]
[SecondCountableTopology E]
{ℱ : MeasureTheory.Filtration ι m}
{τ σ : Ω → ι}
{f : ι → Ω → E}
{n : ι}
(h : MeasureTheory.Martingale f ℱ μ)
(hτ : MeasureTheory.IsStoppingTime ℱ τ)
(hσ : MeasureTheory.IsStoppingTime ℱ σ)
[MeasureTheory.SigmaFinite (μ.trim ⋯)]
(hτ_le : ∀ (x : Ω), τ x ≤ n)

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


lemma hasMap_of_iso (e : X ≅ Y) (p: I → J) [HasMap X p] : HasMap Y p

{I : Type u_1}
{J : Type u_2}
{C : Type u_4}
[CategoryTheory.Category.{u_5, u_4} C]
{X Y : CategoryTheory.GradedObject I C}
(e : X ≅ Y)
(p : I → J)
[X.HasMap p]


@[norm_cast, simp]
theorem inf_coe_toSubmodule :
    (↑(N ⊓ N') : Submodule R M) = (N : Submodule R M) ⊓ (N' : Submodule R M)

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(N N' : LieSubmodule R L M)


/-- Scalar multiplication of one analytic function by another. -/
lemma AnalyticAt.smul [NormedSpace 𝕝 F] [IsScalarTower 𝕜 𝕝 F] {f : E → 𝕝} {g : E → F} {z : E}
    (hf : AnalyticAt 𝕜 f z) (hg : AnalyticAt 𝕜 g z) :
    AnalyticAt 𝕜 (fun x ↦ f x • g x) z

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{𝕝 : Type u_7}
[NontriviallyNormedField 𝕝]
[NormedAlgebra 𝕜 𝕝]
[NormedSpace 𝕝 F]
[IsScalarTower 𝕜 𝕝 F]
{f : E → 𝕝}
{g : E → F}
{z : E}
(hf : AnalyticAt 𝕜 f z)
(hg : AnalyticAt 𝕜 g z)


@[to_additive]
theorem OneHom.coe_copy_eq {_ : One M} {_ : One N} (f : OneHom M N) (f' : M → N) (h : f' = f) :
    f.copy f' h = f

∀ {x : Zero M} {x_1 : Zero N} (f : ZeroHom M N) (f' : M → N) (h : f' = ⇑f), f.copy f' h = f


theorem union_le (h₁ : s ≤ u) (h₂ : t ≤ u) : s ∪ t ≤ u

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


theorem toJordanDecomposition_smul (s : SignedMeasure α) (r : ℝ≥0) :
    (r • s).toJordanDecomposition = r • s.toJordanDecomposition

{α : Type u_1}
[MeasurableSpace α]
(s : MeasureTheory.SignedMeasure α)
(r : ℝ≥0)


/-- Two open immersions with equal range is isomorphic. -/
@[simps]
def isoOfRangeEq [IsOpenImmersion g] (e : Set.range f.base = Set.range g.base) : X ≅ Y

{X Y Z : AlgebraicGeometry.PresheafedSpace C}

[hf : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

(e : Set.range ⇑f.base = Set.range ⇑g.base)

(AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.isoOfRangeEq f g e).inv =
  AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.lift f g ⋯


theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x)

{J : CategoryTheory.GrothendieckTopology C}

[CategoryTheory.Category.{max v u, w} D]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

((J.toPlus P).app (Opposite.op I.Y)) (↑x I) = ((J.plusObj P).map I.f.op) (CategoryTheory.GrothendieckTopology.Plus.mk x)


lemma isLeftKanExtension_iff_postcomp₁ (α : F ⟶ L' ⋙ F') :
    F'.IsLeftKanExtension α ↔ (G ⋙ F').IsLeftKanExtension
      (α ≫ whiskerRight e.inv _ ≫ (Functor.associator _ _ _).hom)

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

F'.IsLeftKanExtension α ↔
  (G.comp F').IsLeftKanExtension
    (CategoryTheory.CategoryStruct.comp α
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight e.inv F') (L.associator G F').hom))


@[to_additive (attr := simp)]
theorem smul_univ [Fintype β] {s : Finset α} (hs : s.Nonempty) : s • (univ : Finset β) = univ

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[AddGroup α]
[AddAction α β]
[Fintype β]
{s : Finset α}
(hs : s.Nonempty)


lemma prod_sum {ι ι' : Type*} [Countable ι'] (m : ι → Measure α) (m' : ι' → Measure β)
    [∀ n, SFinite (m' n)] :
    (Measure.sum m).prod (Measure.sum m') =
      Measure.sum (fun (p : ι × ι') ↦ (m p.1).prod (m' p.2))

[∀ (n : ι'), MeasureTheory.SFinite (m' n)]

(MeasureTheory.Measure.sum m).prod (MeasureTheory.Measure.sum m') =
  MeasureTheory.Measure.sum fun p => (m p.1).prod (m' p.2)


private theorem HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
    BddAbove (range fun y : Y => ⨅ x, f (inl x, inr y) + C)

{X : Type u}
{Y : Type v}
[MetricSpace X]
[Nonempty X]
[MetricSpace Y]
(f : GromovHausdorff.Cb X Y)
(C : ℝ)

BddAbove (Set.range fun y => ⨅ x, f (Sum.inl x, Sum.inr y) + C)


@[simp] lemma multiplesAddHom_apply (x : β) (n : ℕ) : multiplesAddHom β x n = n • x

(β : Type u_2)
[AddCommMonoid β]
(x : β)
(n : ℕ)


theorem tmul_add (m : M) (n₁ n₂ : N) : m ⊗ₜ (n₁ + n₂) = m ⊗ₜ n₁ + m ⊗ₜ[R] n₂

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(m : M)
(n₁ n₂ : N)

m ⊗ₜ[R] (n₁ + n₂) = m ⊗ₜ[R] n₁ + m ⊗ₜ[R] n₂


theorem erase_add_single (i : ι) (f : Π₀ i, β i) : f.erase i + single i (f i) = f

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

DFinsupp.erase i f + DFinsupp.single i (f i) = f


theorem range_succ : range (succ n) = insert n (range n)

Finset.range n.succ = insert n (Finset.range n)


/-- Lift a functor between over categories to a functor between `MonoOver` categories,
given suitable evidence that morphisms are taken to monomorphisms.
-/
@[simps]
def lift {Y : D} (F : Over Y ⥤ Over X)
    (h : ∀ f : MonoOver Y, Mono (F.obj ((MonoOver.forget Y).obj f)).hom) :
    MonoOver Y ⥤ MonoOver X

(F : CategoryTheory.Functor (CategoryTheory.Over Y) (CategoryTheory.Over X))

(h : ∀ (f : CategoryTheory.MonoOver Y), CategoryTheory.Mono (F.obj ((CategoryTheory.MonoOver.forget Y).obj f)).hom)

∀ {X_1 Y_1 : CategoryTheory.MonoOver Y} (k : X_1 ⟶ Y_1),
  (CategoryTheory.MonoOver.lift F h).map k = ((CategoryTheory.MonoOver.forget Y).comp F).map k


theorem Frequently.filter_mono {p : α → Prop} {f g : Filter α} (h : ∃ᶠ x in f, p x) (hle : f ≤ g) :
    ∃ᶠ x in g, p x

{α : Type u}
{p : α → Prop}
{f g : Filter α}
(h : ∃ᶠ (x : α) in f, p x)
(hle : f ≤ g)


/-- A `DivisionRing` is a `Ring` with multiplicative inverses for nonzero elements.

An instance of `DivisionRing K` includes maps `ratCast : ℚ → K` and `qsmul : ℚ → K → K`.
Those two fields are needed to implement the `DivisionRing K → Algebra ℚ K` instance since we need
to control the specific definitions for some special cases of `K` (in particular `K = ℚ` itself).
See also note [forgetful inheritance]. Similarly, there are maps `nnratCast ℚ≥0 → K` and
`nnqsmul : ℚ≥0 → K → K` to implement the `DivisionSemiring K → Algebra ℚ≥0 K` instance.

If the division ring has positive characteristic `p`, our division by zero convention forces
`ratCast (1 / p) = 1 / 0 = 0`. -/
class DivisionRing (α : Type*)
  extends Ring α, DivInvMonoid α, Nontrivial α, NNRatCast α, RatCast α where
  /-- For a nonzero `a`, `a⁻¹` is a right multiplicative inverse. -/
  protected mul_inv_cancel : ∀ (a : α), a ≠ 0 → a * a⁻¹ = 1
  /-- The inverse of `0` is `0` by convention. -/
  protected inv_zero : (0 : α)⁻¹ = 0
  protected nnratCast := NNRat.castRec
  /-- However `NNRat.cast` is defined, it must be equal to `a / b`.

  Do not use this lemma directly. Use `NNRat.cast_def` instead. -/
  protected nnratCast_def (q : ℚ≥0) : (NNRat.cast q : α) = q.num / q.den := by intros; rfl
  /-- Scalar multiplication by a nonnegative rational number.

  Unless there is a risk of a `Module ℚ≥0 _` instance diamond, write `nnqsmul := _`. This will set
  `nnqsmul` to `(NNRat.cast · * ·)` thanks to unification in the default proof of `nnqsmul_def`.

  Do not use directly. Instead use the `•` notation. -/
  protected nnqsmul : ℚ≥0 → α → α
  /-- However `qsmul` is defined, it must be propositionally equal to multiplication by `Rat.cast`.

  Do not use this lemma directly. Use `NNRat.smul_def` instead. -/
  protected nnqsmul_def (q : ℚ≥0) (a : α) : nnqsmul q a = NNRat.cast q * a := by intros; rfl
  protected ratCast := Rat.castRec
  /-- However `Rat.cast q` is defined, it must be propositionally equal to `q.num / q.den`.

  Do not use this lemma directly. Use `Rat.cast_def` instead. -/
  protected ratCast_def (q : ℚ) : (Rat.cast q : α) = q.num / q.den := by intros; rfl
  /-- Scalar multiplication by a rational number.

  Unless there is a risk of a `Module ℚ _` instance diamond, write `qsmul := _`. This will set
  `qsmul` to `(Rat.cast · * ·)` thanks to unification in the default proof of `qsmul_def`.

  Do not use directly. Instead use the `•` notation. -/
  protected qsmul : ℚ → α → α
  /-- However `qsmul` is defined, it must be propositionally equal to multiplication by `Rat.cast`.

  Do not use this lemma directly. Use `Rat.cast_def` instead. -/
  protected qsmul_def (a : ℚ) (x : α) : qsmul a x = Rat.cast a * x := by intros; rfl

{α : Type u_4}
[self : DivisionRing α]
(a : α)


theorem StrictRestriction.ssubset (h : N <r M) : N.E ⊂ M.E

{α : Type u_1}
{M N : Matroid α}
(h : N.StrictRestriction M)


/-- For a functor `G : J ⥤ K ⥤ C`, its limit `K ⥤ C` is given by `(G' : K ⥤ J ⥤ C) ⋙ lim`.
Note that this does not require `K` to be small.
-/
@[simps!]
def limitIsoSwapCompLim [HasLimitsOfShape J C] (G : J ⥤ K ⥤ C) :
    limit G ≅ curry.obj (Prod.swap K J ⋙ uncurry.obj G) ⋙ lim

(CategoryTheory.Limits.limitIsoSwapCompLim G).hom.app X =
  (CategoryTheory.Limits.limitObjIsoLimitCompEvaluation G X).hom ≫
    CategoryTheory.Limits.limMap ((CategoryTheory.flipIsoCurrySwapUncurry G).hom.app X)


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

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

s ∈ 𝓝ˢ K ×ˢ l


@[simp]
theorem pushoutCoconeOfRightIso_inl : (pushoutCoconeOfRightIso f g).inl = 𝟙 _

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

(CategoryTheory.Limits.pushoutCoconeOfRightIso f g).inl = 𝟙 Y


@[simp] theorem eq_self (a : α) : (a = a) = True


theorem HasBasis.eq_of_same_basis (hl : l.HasBasis p s) (hl' : l'.HasBasis p s) : l = l'

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


theorem inducing_iff_inducing_of_iSup_eq_top (h : Continuous f) :
    Inducing f ↔ ∀ i, Inducing ((U i).1.restrictPreimage f)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{ι : Type u_3}
{U : ι → TopologicalSpace.Opens β}
(hU : iSup U = ⊤)
(h : Continuous f)

Inducing f ↔ ∀ (i : ι), Inducing ((U i).carrier.restrictPreimage f)


/-- Given a category of complexes with objects in `V`, there is a natural equivalence between its
opposite category and a category of complexes with objects in `Vᵒᵖ`. -/
@[simps]
def opEquivalence : (HomologicalComplex V c)ᵒᵖ ≌ HomologicalComplex Vᵒᵖ c.symm

(HomologicalComplex.opEquivalence V c).inverse = HomologicalComplex.opInverse V c


/-- If `μ` satisfies `QuotientMeasureEqMeasurePreimage` relative to a both left- and right-
  invariant measure `ν` on `G`, then it is a `G` invariant measure on `G ⧸ Γ`. -/
@[to_additive]
lemma MeasureTheory.QuotientMeasureEqMeasurePreimage.smulInvariantMeasure_quotient
    [IsMulLeftInvariant ν] [hasFun : HasFundamentalDomain Γ.op G ν] :
    SMulInvariantMeasure G (G ⧸ Γ) μ

[hasFun : MeasureTheory.HasAddFundamentalDomain (↥Γ.op) G ν]

MeasureTheory.VAddInvariantMeasure G (G ⧸ Γ) μ


theorem Iio_eq_ssubsets : Iio s = s.ssubsets

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


lemma Construction.prodIsLocalization :
    (W₁.Q.prod W₂.Q).IsLocalization (W₁.prod W₂)

(W₁ : CategoryTheory.MorphismProperty C₁)

(W₂ : CategoryTheory.MorphismProperty C₂)


theorem MonoidHom.map_iterate_frobenius (n : ℕ) :
    f ((frobenius R p)^[n] x) = (frobenius S p)^[n] (f x)

{R : Type u}
[CommSemiring R]
{S : Type u_1}
[CommSemiring S]
(f : R →* S)
(p : ℕ)
[ExpChar R p]
[ExpChar S p]
(x : R)
(n : ℕ)

f ((⇑(frobenius R p))^[n] x) = (⇑(frobenius S p))^[n] (f x)


/-- `Finsupp.split` is a linear equivalence between `(Σ i, η i) →₀ N` and `Π₀ i, (η i →₀ N)`. -/
@[simps]
def sigmaFinsuppLequivDFinsupp [AddCommMonoid N] [Module R N] :
    ((Σi, η i) →₀ N) ≃ₗ[R] Π₀ i, η i →₀ N

{ι : Type u_1}
(R : Type u_2)
{η : ι → Type u_4}
{N : Type u_5}
[Semiring R]
[AddCommMonoid N]
[Module R N]
(a : Π₀ (i : ι), η i →₀ N)

(sigmaFinsuppLequivDFinsupp R).symm a = sigmaFinsuppEquivDFinsupp.symm a


@[to_additive]
theorem prod_neg_index [∀ i, AddGroup (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)] [CommMonoid γ]
    {g : Π₀ i, β i} {h : ∀ i, β i → γ} (h0 : ∀ i, h i 0 = 1) :
    (-g).prod h = g.prod fun i b => h i (-b)

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


@[to_additive]
theorem units_val {a x y : Mˣ} (h : SemiconjBy a x y) : SemiconjBy (a : M) x y

{M : Type u_1}
[AddMonoid M]
{a x y : AddUnits M}
(h : AddSemiconjBy a x y)


protected theorem MonotoneOn.Ioc (hf : MonotoneOn f s) (hg : AntitoneOn g s) :
    AntitoneOn (fun x => Ioc (f x) (g x)) s

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f g : α → β}
{s : Set α}
(hf : MonotoneOn f s)
(hg : AntitoneOn g s)

AntitoneOn (fun x => Set.Ioc (f x) (g x)) s


theorem hasMFDerivWithinAt_symm {x} (hx : x ∈ range I) :
    HasMFDerivWithinAt 𝓘(𝕜, E) I I.symm (range I) x (ContinuousLinearMap.id _ _)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{x : E}
(hx : x ∈ Set.range ↑I)

HasMFDerivWithinAt 𝓘(𝕜, E) I (↑I.symm) (Set.range ↑I) x (ContinuousLinearMap.id 𝕜 (TangentSpace 𝓘(𝕜, E) x))


theorem image_image' (hf : LeftInvOn f' f s) (hs : s₁ ⊆ s) : f' '' (f '' s₁) = s₁

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


@[simp]
theorem append_left {α : Type*} (u : Fin m → α) (v : Fin n → α) (i : Fin m) :
    append u v (Fin.castAdd n i) = u i

{m n : ℕ}
{α : Type u_1}
(u : Fin m → α)
(v : Fin n → α)
(i : Fin m)


theorem or_assoc : (a ∨ b) ∨ c ↔ a ∨ (b ∨ c)


theorem nfpFamily_lt_ord_of_isRegular {ι} {f : ι → Ordinal → Ordinal} {c} (hc : IsRegular c)
    (hι : #ι < c) (hc' : c ≠ ℵ₀) {a} (hf : ∀ (i), ∀ b < c.ord, f i b < c.ord) :
    a < c.ord → nfpFamily.{u, u} f a < c.ord

(hf : ∀ (i : ι), ∀ b < c.ord, f i b < c.ord)

a < c.ord → Ordinal.nfpFamily f a < c.ord


protected theorem bijective (h : X ≃ₜ Y) : Function.Bijective h

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)


/-- The set difference of a compact set and an open set is a compact set. -/
theorem IsCompact.diff (hs : IsCompact s) (ht : IsOpen t) : IsCompact (s \ t)

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


/-- A submonoid is closed under multiplication. -/
@[to_additive "An `AddSubmonoid` is closed under addition."]
protected theorem mul_mem {x y : M} : x ∈ S → y ∈ S → x * y ∈ S

{M : Type u_1}
[AddZeroClass M]
(S : AddSubmonoid M)
{x y : M}


theorem mkRat_mul_mkRat (n₁ n₂ : Int) (d₁ d₂) :
    mkRat n₁ d₁ * mkRat n₂ d₂ = mkRat (n₁ * n₂) (d₁ * d₂)


theorem lintegral_mul_rpow_le_lintegral_rpow_mul_lintegral_rpow {p q : ℝ}
    (hpq : p.IsConjExponent q) {f g : α → ℝ≥0∞} (hf : AEMeasurable f μ) (hg : AEMeasurable g μ)
    (hf_top : (∫⁻ a, f a ^ p ∂μ) ≠ ⊤) :
    (∫⁻ a, f a * g a ^ (p - 1) ∂μ) ≤
      (∫⁻ a, f a ^ p ∂μ) ^ (1 / p) * (∫⁻ a, g a ^ p ∂μ) ^ (1 / q)

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{p q : ℝ}
(hpq : p.IsConjExponent q)
{f g : α → ENNReal}
(hf : AEMeasurable f μ)
(hg : AEMeasurable g μ)
(hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤)


theorem norm_mem_relNorm (I : Ideal S) {x : S} (hx : x ∈ I) : Algebra.norm R x ∈ relNorm R I

(R : Type u_1)
[CommRing R]
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsDomain R]
[IsDomain S]
[IsDedekindDomain R]
[IsDedekindDomain S]
[Module.Finite R S]
[Module.Free R S]
(I : Ideal S)
{x : S}
(hx : x ∈ I)

(Algebra.norm R) x ∈ (Ideal.relNorm R) I


theorem neg_def {X Y : C} (a : X ⟶ Y) : -a = 0 - a


/-- If `n` is a natural number, then `mulShift ψ n x = (ψ x) ^ n`. -/
theorem mulShift_spec' (ψ : AddChar R M) (n : ℕ) (x : R) : mulShift ψ n x = ψ x ^ n

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


@[simp]
theorem isAdjointPair_toLinearMap₂ :
    LinearMap.IsAdjointPair (Matrix.toLinearMap₂ b₁ b₁ J)
      (Matrix.toLinearMap₂ b₂ b₂ J') (Matrix.toLin b₁ b₂ A) (Matrix.toLin b₂ b₁ A') ↔
      Matrix.IsAdjointPair J J' A A'

{R : Type u_1}
{M₁ : Type u_7}
{M₂ : Type u_8}
{n : Type u_12}
{n' : Type u_14}
[CommRing R]
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
[Fintype n]
[Fintype n']
(b₁ : Basis n R M₁)
(b₂ : Basis n' R M₂)
(J : Matrix n n R)
(J' : Matrix n' n' R)
(A : Matrix n' n R)
(A' : Matrix n n' R)
[DecidableEq n]
[DecidableEq n']

((Matrix.toLinearMap₂ b₁ b₁) J).IsAdjointPair ((Matrix.toLinearMap₂ b₂ b₂) J') ((Matrix.toLin b₁ b₂) A)
    ((Matrix.toLin b₂ b₁) A') ↔
  J.IsAdjointPair J' A A'


theorem testAgainstNN_smul [IsScalarTower R ℝ≥0 ℝ≥0] [PseudoMetricSpace R] [Zero R]
    [BoundedSMul R ℝ≥0] (μ : FiniteMeasure Ω) (c : R) (f : Ω →ᵇ ℝ≥0) :
    μ.testAgainstNN (c • f) = c • μ.testAgainstNN f

{Ω : Type u_1}
[MeasurableSpace Ω]
{R : Type u_2}
[SMul R ℝ≥0]
[SMul R ℝ≥0∞]
[IsScalarTower R ℝ≥0 ℝ≥0∞]
[IsScalarTower R ℝ≥0∞ ℝ≥0∞]
[TopologicalSpace Ω]
[OpensMeasurableSpace Ω]
[IsScalarTower R ℝ≥0 ℝ≥0]
[PseudoMetricSpace R]
[Zero R]
[BoundedSMul R ℝ≥0]
(μ : MeasureTheory.FiniteMeasure Ω)
(c : R)
(f : Ω →ᵇ ℝ≥0)


@[simp]
theorem toMatrix_apply [DecidableEq n] [Zero α] [One α] (f : m ≃. n) (i j) :
    toMatrix f i j = if j ∈ f i then (1 : α) else 0

{m : Type u_3}
{n : Type u_4}
{α : Type v}
[DecidableEq n]
[Zero α]
[One α]
(f : m ≃. n)
(i : m)
(j : n)

f.toMatrix i j = if j ∈ f i then 1 else 0


theorem supported_union (s t : Set α) :
    supported M R (s ∪ t) = supported M R s ⊔ supported M R t

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(s t : Set α)

Finsupp.supported M R (s ∪ t) = Finsupp.supported M R s ⊔ Finsupp.supported M R t


/-- The left fraction from `X` to `Y` given by a morphism `s : Y ⟶ X` such that `W s`. -/
@[simps]
def ofInv (s : Y ⟶ X) (hs : W s) :
    W.LeftFraction X Y

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(s : Y ⟶ X)
(hs : W s)

(CategoryTheory.MorphismProperty.LeftFraction.ofInv s hs).s = s


lemma two_mul_ne_two_mul_add_one : 2 * n ≠ 2 * m + 1


lemma Module.finitePresentation_of_ker [Module.FinitePresentation R N]
    (l : M →ₗ[R] N) (hl : Function.Surjective l) [Module.FinitePresentation R (LinearMap.ker l)] :
    Module.FinitePresentation R M

[Module.FinitePresentation R ↥(LinearMap.ker l)]


@[simp] theorem tail_cons : @tail α (a::as) = as


@[simp] theorem pred_eq_sub_one : pred n = n - 1


@[simp]
theorem nthRoots_zero (r : R) : nthRoots 0 r = 0

{R : Type u}
[CommRing R]
[IsDomain R]
(r : R)


/-- Coercing a dependent product of subtypes is the same as taking the regular product of the
coercions. -/
@[simp,nolint simpNF]
theorem SetLike.coe_list_dProd (A : ι → S) [SetLike.GradedMonoid A] (fι : α → ι)
    (fA : ∀ a, A (fι a)) (l : List α) : ↑(@List.dProd _ _ (fun i => ↥(A i)) _ _ l fι fA)
    = (List.prod (l.map fun a => fA a) : R)

{ι : Type u_1}
{R : Type u_2}
{α : Type u_3}
{S : Type u_4}
[SetLike S R]
[Monoid R]
[AddMonoid ι]
(A : ι → S)
[SetLike.GradedMonoid A]
(fι : α → ι)
(fA : (a : α) → ↥(A (fι a)))
(l : List α)

↑(l.dProd fι fA) = (List.map (fun a => ↑(fA a)) l).prod


@[simp]
theorem length_mergeSort (l : List α) : (mergeSort r l).length = l.length

{α : Type u}
(r : α → α → Prop)
[DecidableRel r]
(l : List α)


theorem fiber_ncard_ne_zero_iff_mem_image {y : β} (hs : s.Finite := by toFinite_tac) :
    { x ∈ s | f x = y }.ncard ≠ 0 ↔ y ∈ f '' s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
{y : β}
(hs : s.Finite := by toFinite_tac)

{x | x ∈ s ∧ f x = y}.ncard ≠ 0 ↔ y ∈ f '' s


theorem vector_cons {n} : Computable₂ (@Vector.cons α n)


protected theorem lt_tsub_of_add_lt_left (ha : AddLECancellable a) (h : a + c < b) : c < b - a

{α : Type u_1}
[PartialOrder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]
{a b c : α}
(ha : AddLECancellable a)
(h : a + c < b)


theorem eval_eq_sum : p.eval x = p.sum fun e a => a * x ^ e

{R : Type u}
[Semiring R]
{p : R[X]}
{x : R}

Polynomial.eval x p = p.sum fun e a => a * x ^ e


theorem Γ_obj_op (X : SheafedSpace C) : Γ.obj (op X) = X.presheaf.obj (op ⊤)

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

AlgebraicGeometry.SheafedSpace.Γ.obj (Opposite.op X) = X.presheaf.obj (Opposite.op ⊤)


theorem delayReflRight_one (γ : Path x y) : delayReflRight 1 γ = γ

{X : Type u}
[TopologicalSpace X]
{x y : X}
(γ : Path x y)


theorem sin_pos_of_pos_of_le_one {x : ℝ} (hx0 : 0 < x) (hx : x ≤ 1) : 0 < sin x


theorem tendsto_addHaar_inter_smul_one_of_density_one_aux (s : Set E) (hs : MeasurableSet s)
    (x : E) (h : Tendsto (fun r => μ (s ∩ closedBall x r) / μ (closedBall x r)) (𝓝[>] 0) (𝓝 1))
    (t : Set E) (ht : MeasurableSet t) (h't : μ t ≠ 0) (h''t : μ t ≠ ∞) :
    Tendsto (fun r : ℝ => μ (s ∩ ({x} + r • t)) / μ ({x} + r • t)) (𝓝[>] 0) (𝓝 1)

(h : Filter.Tendsto (fun r => μ (s ∩ Metric.closedBall x r) / μ (Metric.closedBall x r)) (𝓝[>] 0) (𝓝 1))

Filter.Tendsto (fun r => μ (s ∩ ({x} + r • t)) / μ ({x} + r • t)) (𝓝[>] 0) (𝓝 1)


lemma lTensor.inverse_comp_lTensor :
    (lTensor.inverse Q hfg hg).comp (lTensor Q g) =
      Submodule.mkQ (p := LinearMap.range (lTensor Q f))

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

lTensor.inverse Q hfg hg ∘ₗ LinearMap.lTensor Q g = (LinearMap.range (LinearMap.lTensor Q f)).mkQ


@[simp] lemma cast_nonneg : ∀ {n : ℤ}, (0 : R) ≤ n ↔ 0 ≤ n

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

0 ≤ ↑n ↔ 0 ≤ n


theorem hasDerivAtFilter_id : HasDerivAtFilter id 1 x L

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(x : 𝕜)
(L : Filter 𝕜)


theorem map_equiv_eq_comap_symm (e : M ≃ₛₗ[τ₁₂] M₂) (K : Submodule R M) :
    K.map (e : M →ₛₗ[τ₁₂] M₂) = K.comap (e.symm : M₂ →ₛₗ[τ₂₁] M)

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{τ₂₁ : R₂ →+* R}
[RingHomInvPair τ₁₂ τ₂₁]
[RingHomInvPair τ₂₁ τ₁₂]
(e : M ≃ₛₗ[τ₁₂] M₂)
(K : Submodule R M)

Submodule.map (↑e) K = Submodule.comap (↑e.symm) K


/-- *Bubble sort induction*: Prove that the sorted version of `f` has some property `P`
if `f` satisfies `P` and `P` is preserved on permutations of `f` when swapping two
antitone values. -/
theorem bubble_sort_induction' {n : ℕ} {α : Type*} [LinearOrder α] {f : Fin n → α}
    {P : (Fin n → α) → Prop} (hf : P f)
    (h : ∀ (σ : Equiv.Perm (Fin n)) (i j : Fin n),
      i < j → (f ∘ σ) j < (f ∘ σ) i → P (f ∘ σ) → P (f ∘ σ ∘ Equiv.swap i j)) :
    P (f ∘ sort f)

(h :
  ∀ (σ : Equiv.Perm (Fin n)) (i j : Fin n),
    i < j → (f ∘ ⇑σ) j < (f ∘ ⇑σ) i → P (f ∘ ⇑σ) → P (f ∘ ⇑σ ∘ ⇑(Equiv.swap i j)))


@[measurability]
theorem measurable_inr [MeasurableSpace α] [MeasurableSpace β] : Measurable (@Sum.inr α β)

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


/-- The **spectral mapping theorem** for the continuous functional calculus. -/
lemma cfc_map_spectrum : spectrum R (cfc f a) = f '' spectrum R a

(hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)


lemma strongRec_of_ge :
    ∀ hn : m ≤ n, m.strongRec lt ge n = ge n hn fun k _ ↦ m.strongRec lt ge k

{ge : (n : ℤ) → n ≥ m → ((k : ℤ) → k < n → P k) → P n}

Int.strongRec lt ge n = ge n hn fun k x => Int.strongRec lt ge k


theorem formPerm_pow_apply_getElem (l : List α) (w : Nodup l) (n : ℕ) (i : Nat) (h : i < l.length) :
    (formPerm l ^ n) l[i] =
      l[(i + n) % l.length]'(Nat.mod_lt _ (i.zero_le.trans_lt h))

{α : Type u_1}
[DecidableEq α]
(l : List α)
(w : l.Nodup)
(n i : ℕ)
(h : i < l.length)

(l.formPerm ^ n) l[i] = l[(i + n) % l.length]


/-- Powers of analytic functions (into a normed `𝕜`-algebra) are analytic. -/
lemma AnalyticAt.pow {f : E → A} {z : E} (hf : AnalyticAt 𝕜 f z) (n : ℕ) :
    AnalyticAt 𝕜 (fun x ↦ f x ^ n) z

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{A : Type u_8}
[NormedRing A]
[NormedAlgebra 𝕜 A]
{f : E → A}
{z : E}
(hf : AnalyticAt 𝕜 f z)
(n : ℕ)


theorem isBigO_comp [RingHomIsometric σ₂₃] {α : Type*} (g : F →SL[σ₂₃] G) (f : α → F)
    (l : Filter α) : (fun x' => g (f x')) =O[l] f

{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
{F : Type u_5}
{G : Type u_6}
[SeminormedAddCommGroup F]
[SeminormedAddCommGroup G]
[NontriviallyNormedField 𝕜₂]
[NontriviallyNormedField 𝕜₃]
[NormedSpace 𝕜₂ F]
[NormedSpace 𝕜₃ G]
{σ₂₃ : 𝕜₂ →+* 𝕜₃}
[RingHomIsometric σ₂₃]
{α : Type u_7}
(g : F →SL[σ₂₃] G)
(f : α → F)
(l : Filter α)


theorem integral_comp_neg_Ioi {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (c : ℝ) (f : ℝ → E) : (∫ x in Ioi c, f (-x)) = ∫ x in Iic (-c), f x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(c : ℝ)
(f : ℝ → E)

∫ (x : ℝ) in Set.Ioi c, f (-x) = ∫ (x : ℝ) in Set.Iic (-c), f x


/-- A closed ball in a product space is a product of closed balls. See also `closedBall_pi`
for a version assuming `0 ≤ r` instead of `Nonempty β`. -/
lemma closedBall_pi' [Nonempty β] (x : ∀ b, π b) (r : ℝ) :
    closedBall x r = Set.pi univ fun b => closedBall (x b) r

{β : Type u_2}
{π : β → Type u_3}
[Fintype β]
[(b : β) → PseudoMetricSpace (π b)]
[Nonempty β]
(x : (b : β) → π b)
(r : ℝ)

Metric.closedBall x r = Set.univ.pi fun b => Metric.closedBall (x b) r


theorem ContDiffAt.of_le (h : ContDiffAt 𝕜 n f x) (hmn : m ≤ n) : ContDiffAt 𝕜 m f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{m n : ℕ∞}
(h : ContDiffAt 𝕜 n f x)
(hmn : m ≤ n)


@[to_additive (attr := simp)]
theorem finprod_mem_mulSupport (f : α → M) (a : α) : ∏ᶠ _ : f a ≠ 1, f a = f a

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
(f : α → M)
(a : α)


theorem Finite.injOn_iff_bijOn_of_mapsTo (hs : s.Finite) (hm : MapsTo f s s) :
    InjOn f s ↔ BijOn f s s

{α : Type u}
{s : Set α}
{f : α → α}
(hs : s.Finite)
(hm : Set.MapsTo f s s)


@[simp] lemma map_addX : addX (W'.map f) (f ∘ P) (f ∘ Q) = f (W'.addX P Q)

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{S : Type u_1}
[CommRing S]
(f : R →+* S)
(P Q : Fin 3 → R)

WeierstrassCurve.Jacobian.addX (WeierstrassCurve.map W' f) (⇑f ∘ P) (⇑f ∘ Q) = f (W'.addX P Q)


@[simp] theorem length_range' (s step) : ∀ n : Nat, length (range' s n step) = n


protected theorem map_add (f : A →A[R] B) (x y : A) : f (x + y) = f x + f y

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
{B : Type u_3}
[Semiring B]
[TopologicalSpace B]
[Algebra R A]
[Algebra R B]
(f : A →A[R] B)
(x y : A)


lemma coe_mul_top_of_neg {x : ℝ} (h : x < 0) : (x : EReal) * ⊤ = ⊥


lemma next_π₂ (i₁ : I₁) {i₂ i₂' : I₂} (h : c₂.Rel i₂ i₂') :
    c₁₂.next (π c₁ c₂ c₁₂ ⟨i₁, i₂⟩) = π c₁ c₂ c₁₂ ⟨i₁, i₂'⟩

{I₁ : Type u_1}
{I₂ : Type u_2}
{I₁₂ : Type u_3}
(c₁ : ComplexShape I₁)
{c₂ : ComplexShape I₂}
(c₁₂ : ComplexShape I₁₂)
[TotalComplexShape c₁ c₂ c₁₂]
(i₁ : I₁)
{i₂ i₂' : I₂}
(h : c₂.Rel i₂ i₂')

c₁₂.next (c₁.π c₂ c₁₂ (i₁, i₂)) = c₁.π c₂ c₁₂ (i₁, i₂')


/-- Adding a point to a set with a finite-dimensional span increases the dimension by at most
one. -/
theorem finrank_vectorSpan_insert_le_set (s : Set P) (p : P) :
    finrank k (vectorSpan k (insert p s)) ≤ finrank k (vectorSpan k s) + 1

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(s : Set P)
(p : P)

FiniteDimensional.finrank k ↥(vectorSpan k (insert p s)) ≤ FiniteDimensional.finrank k ↥(vectorSpan k s) + 1


@[to_additive sum_add_card_nsmul]
theorem prod_mul_pow_card {b : β} : (∏ a ∈ s, f a) * b ^ s.card = ∏ a ∈ s, f a * b

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f : α → β}
[AddCommMonoid β]
{b : β}

∑ a ∈ s, f a + s.card • b = ∑ a ∈ s, (f a + b)


theorem eventually_ne_atTop [Preorder α] [NoMaxOrder α] (a : α) : ∀ᶠ x in atTop, x ≠ a

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


/-- `LinearMap.single` as an isometry. -/
@[simps!]
def Isometry.single [Fintype ι] [DecidableEq ι] (Q : ∀ i, QuadraticMap R (Mᵢ i) P) (i : ι) :
    Q i →qᵢ pi Q

{ι : Type u_1}
{R : Type u_2}
{P : Type u_7}
{Mᵢ : ι → Type u_8}
[CommSemiring R]
[(i : ι) → AddCommMonoid (Mᵢ i)]
[AddCommMonoid P]
[(i : ι) → Module R (Mᵢ i)]
[Module R P]
[Fintype ι]
[DecidableEq ι]
(Q : (i : ι) → QuadraticMap R (Mᵢ i) P)
(i : ι)
(x : Mᵢ i)
(j : ι)

(QuadraticMap.Isometry.single Q i) x j = Pi.single i x j


@[simp]
theorem rec.constant {α : Type u} {β : Sort v} (b : β) :
    (@ULift.rec α (fun _ => β) fun _ => b) = fun _ => b


/-- A predicate to express that a (semi)ring is a (semi)field.

This is mainly useful because such a predicate does not contain data,
and can therefore be easily transported along ring isomorphisms.
Additionally, this is useful when trying to prove that
a particular ring structure extends to a (semi)field. -/
structure IsField (R : Type u) [Semiring R] : Prop where
  /-- For a semiring to be a field, it must have two distinct elements. -/
  exists_pair_ne : ∃ x y : R, x ≠ y
  /-- Fields are commutative. -/
  mul_comm : ∀ x y : R, x * y = y * x
  /-- Nonzero elements have multiplicative inverses. -/
  mul_inv_cancel : ∀ {a : R}, a ≠ 0 → ∃ b, a * b = 1

{R : Type u}
[Semiring R]
(self : IsField R)
(x y : R)


@[simp]
theorem card_Ioc : (Ioc a b).card = b - a


@[to_additive (attr := simp)]
theorem mem_comap {H : OpenSubgroup N} {f : G →* N} {hf : Continuous f} {x : G} :
    x ∈ H.comap f hf ↔ f x ∈ H

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
{N : Type u_2}
[AddGroup N]
[TopologicalSpace N]
{H : OpenAddSubgroup N}
{f : G →+ N}
{hf : Continuous ⇑f}
{x : G}

x ∈ OpenAddSubgroup.comap f hf H ↔ f x ∈ H


theorem IsTopologicalBasis.nhds_hasBasis {b : Set (Set α)} (hb : IsTopologicalBasis b) {a : α} :
    (𝓝 a).HasBasis (fun t : Set α => t ∈ b ∧ a ∈ t) fun t => t

(hb : TopologicalSpace.IsTopologicalBasis b)

(𝓝 a).HasBasis (fun t => t ∈ b ∧ a ∈ t) fun t => t


@[simp]
theorem lift_of' : lift (fun i ↦ (of : M i →* CoprodI M)) = .id (CoprodI M)

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]

(Monoid.CoprodI.lift fun i => Monoid.CoprodI.of) = MonoidHom.id (Monoid.CoprodI M)


theorem getLastD_mem_cons : ∀ (l : List α) (a : α), getLastD l a ∈ a::l


theorem toFiniteMeasure_embedding (Ω : Type*) [MeasurableSpace Ω] [TopologicalSpace Ω]
    [OpensMeasurableSpace Ω] :
    Embedding (toFiniteMeasure : ProbabilityMeasure Ω → FiniteMeasure Ω)

(Ω : Type u_2)
[MeasurableSpace Ω]
[TopologicalSpace Ω]
[OpensMeasurableSpace Ω]


@[simp]
theorem laurent_algebraMap : laurent r (algebraMap _ _ p) = algebraMap _ _ (taylor r p)

{R : Type u}
[CommRing R]
[hdomain : IsDomain R]
(r : R)
(p : Polynomial R)

(RatFunc.laurent r) ((algebraMap (Polynomial R) (RatFunc R)) p) =
  (algebraMap (Polynomial R) (RatFunc R)) ((Polynomial.taylor r) p)


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

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

∀ (a : η), (Function.ExtendByOne.hom R s) f a = Function.extend s f 1 a


@[simp]
theorem projRight_map (x₀ x₁ : πₓ (TopCat.of (A × B))) (p : x₀ ⟶ x₁) :
    (projRight A B).map p = Path.Homotopic.projRight p

(x₀ x₁ : ↑(π.obj (TopCat.of (↑A × ↑B))))

(FundamentalGroupoidFunctor.projRight A B).map p = Path.Homotopic.projRight p


theorem translationNumber_eq_of_semiconjBy {f g₁ g₂ : CircleDeg1Lift} (H : SemiconjBy f g₁ g₂) :
    τ g₁ = τ g₂


theorem card_Icc : (Icc f g).card = ∏ i ∈ f.support ∪ g.support, (Icc (f i) (g i)).card

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → DecidableEq (α i)]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → Zero (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
(f g : Π₀ (i : ι), α i)

(Finset.Icc f g).card = ∏ i ∈ f.support ∪ g.support, (Finset.Icc (f i) (g i)).card


theorem eq_one_of_monic_natDegree_zero (hf : p.Monic) (hfd : p.natDegree = 0) : p = 1

{R : Type u}
[Semiring R]
{p : R[X]}
(hf : p.Monic)
(hfd : p.natDegree = 0)


@[simp] lemma disjoint_empty (s : Set α) : Disjoint s ∅


@[simp]
theorem sort_empty : sort r ∅ = []

{α : Type u_1}
(r : α → α → Prop)
[DecidableRel r]
[IsTrans α r]
[IsAntisymm α r]
[IsTotal α r]


{ι : Type u_1}
(I J : BoxIntegral.Box ι)


/-- If `f` is continuous on `F` and `F` is path-connected, so is `f(F)`. -/
theorem IsPathConnected.image' (hF : IsPathConnected F)
    {f : X → Y} (hf : ContinuousOn f F) : IsPathConnected (f '' F)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{F : Set X}
(hF : IsPathConnected F)
{f : X → Y}
(hf : ContinuousOn f F)


@[simp]
theorem coeff_rename_embDomain (f : σ ↪ τ) (φ : MvPolynomial σ R) (d : σ →₀ ℕ) :
    (rename f φ).coeff (d.embDomain f) = φ.coeff d

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
[CommSemiring R]
(f : σ ↪ τ)
(φ : MvPolynomial σ R)
(d : σ →₀ ℕ)

MvPolynomial.coeff (Finsupp.embDomain f d) ((MvPolynomial.rename ⇑f) φ) = MvPolynomial.coeff d φ


protected theorem lt_iff_le_not_le {m n : Nat} : m < n ↔ m ≤ n ∧ ¬ n ≤ m


theorem head_some_of_get?_some {s : WSeq α} {a n} (h : some a ∈ get? s n) :
    ∃ a', some a' ∈ head s

{α : Type u}
{s : Stream'.WSeq α}
{a : α}
{n : ℕ}
(h : some a ∈ s.get? n)


theorem mul_self_eq_zero : a * a = 0 ↔ a = 0

{M₀ : Type u_1}
[MulZeroClass M₀]
[NoZeroDivisors M₀]
{a : M₀}


lemma BijOn.exists {p : β → Prop} (hf : BijOn f s t) : (∃ b ∈ t, p b) ↔ ∃ a ∈ s, p (f a)

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


theorem gt_mem_nhds [OrderTopology α] {a b : α} (h : a < b) : ∀ᶠ x in 𝓝 a, x < b

{α : Type u}
[TopologicalSpace α]
[Preorder α]
[OrderTopology α]
{a b : α}
(h : a < b)


/-- The left inverse unitor `C ⥤ 1 × C` -/
@[simps]
def leftInverseUnitor : C ⥤ Discrete (PUnit : Type w) × C

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

∀ {X Y : C} (f : X ⟶ Y),
  (CategoryTheory.prod.leftInverseUnitor C).map f = (𝟙 ((fun X => ({ as := PUnit.unit }, X)) X).1, f)


@[simp]
lemma inr_descCochain :
    (Cochain.ofHom (inr φ)).comp (descCochain φ α β h) (zero_add n) = β

(α : CochainComplex.HomComplex.Cochain F K m)

(β : CochainComplex.HomComplex.Cochain G K n)

(CochainComplex.HomComplex.Cochain.ofHom (CochainComplex.mappingCone.inr φ)).comp
    (CochainComplex.mappingCone.descCochain φ α β h) ⋯ =
  β


@[to_additive]
theorem set_mul_normal_comm (s : Set G) (N : Subgroup G) [hN : N.Normal] :
    s * (N : Set G) = (N : Set G) * s

{G : Type u_2}
[Group G]
(s : Set G)
(N : Subgroup G)
[hN : N.Normal]


theorem neg_apply [∀ i, AddGroup (β i)] (g : Π₀ i, β i) (i : ι) : (-g) i = -g i

{ι : Type u}
{β : ι → Type v}
[(i : ι) → AddGroup (β i)]
(g : Π₀ (i : ι), β i)
(i : ι)


theorem Subperm.subset {l₁ l₂ : List α} : l₁ <+~ l₂ → l₁ ⊆ l₂


theorem swap_eq_iff : swap r = r ↔ Symmetric r


protected theorem coe_zero : ((0 : S) : L) = 0

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)


@[simp]
theorem snoc_nil : (nil.snoc x) = x ::ᵥ nil

∀ {α : Type u_1} {x : α}, Mathlib.Vector.nil.snoc x = x ::ᵥ Mathlib.Vector.nil


/-- Units of a `Monoid`, bundled version. Notation: `αˣ`.

An element of a `Monoid` is a unit if it has a two-sided inverse.
This version bundles the inverse element so that it can be computed.
For a predicate see `IsUnit`. -/
structure Units (α : Type u) [Monoid α] where
  /-- The underlying value in the base `Monoid`. -/
  val : α
  /-- The inverse value of `val` in the base `Monoid`. -/
  inv : α
  /-- `inv` is the right inverse of `val` in the base `Monoid`. -/
  val_inv : val * inv = 1
  /-- `inv` is the left inverse of `val` in the base `Monoid`. -/
  inv_val : inv * val = 1


theorem mem_specialUnitaryGroup_iff :
    A ∈ specialUnitaryGroup n α ↔ A ∈ unitaryGroup n α ∧ A.det = 1

{n : Type u}
[DecidableEq n]
[Fintype n]
{α : Type v}
[CommRing α]
[StarRing α]
{A : Matrix n n α}

A ∈ Matrix.specialUnitaryGroup n α ↔ A ∈ Matrix.unitaryGroup n α ∧ A.det = 1


lemma leRecOn_self {C : ℕ → Sort*} {n} {next : ∀ {k}, C k → C (k + 1)} (x : C n) :
    (leRecOn n.le_refl next x : C n) = x

{C : ℕ → Sort u_1}
{n : ℕ}
{next : {k : ℕ} → C k → C (k + 1)}
(x : C n)


/-- We can turn any limit cone over a pair into a bicone. -/
@[simps]
def BinaryBicone.ofLimitCone {X Y : C} {t : Cone (pair X Y)} (ht : IsLimit t) :
    BinaryBicone X Y

{t : CategoryTheory.Limits.Cone (CategoryTheory.Limits.pair X Y)}

(CategoryTheory.Limits.BinaryBicone.ofLimitCone ht).fst = t.π.app { as := CategoryTheory.Limits.WalkingPair.left }


lemma isUnramified_iff_mult_le :
    IsUnramified k w ↔ mult w ≤ mult (w.comap (algebraMap k K))

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
{w : NumberField.InfinitePlace K}

NumberField.InfinitePlace.IsUnramified k w ↔ w.mult ≤ (w.comap (algebraMap k K)).mult


theorem exists_lt_add_of_not_principal_add {a} (ha : ¬Principal (· + ·) a) :
    ∃ b c, b < a ∧ c < a ∧ b + c = a

(ha : ¬Ordinal.Principal (fun x x_1 => x + x_1) a)


theorem integral [IsGalois F E] (x : E) : IsIntegral F x

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
[IsGalois F E]
(x : E)


@[simp]
theorem Icc_diff_Ioc_self (h : a ≤ b) : Icc a b \ Ioc a b = {a}

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


theorem isReal_iff {w : InfinitePlace K} :
    IsReal w ↔ ComplexEmbedding.IsReal (embedding w)

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

w.IsReal ↔ NumberField.ComplexEmbedding.IsReal w.embedding


/-- Expand `⟪x - y, x - y⟫_ℝ` -/
theorem real_inner_sub_sub_self (x y : F) :
    ⟪x - y, x - y⟫_ℝ = ⟪x, x⟫_ℝ - 2 * ⟪x, y⟫_ℝ + ⟪y, y⟫_ℝ

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
(x y : F)


theorem eq_σ_comp_of_not_injective' {n : ℕ} {Δ' : SimplexCategory} (θ : mk (n + 1) ⟶ Δ')
    (i : Fin (n + 1)) (hi : θ.toOrderHom (Fin.castSucc i) = θ.toOrderHom i.succ) :
    ∃ θ' : mk n ⟶ Δ', θ = σ i ≫ θ'

(hi : (SimplexCategory.Hom.toOrderHom θ) i.castSucc = (SimplexCategory.Hom.toOrderHom θ) i.succ)


@[simp]
theorem iUnion_right_iff [Countable ι] {t : ι → Set α} :
    AEDisjoint μ s (⋃ i, t i) ↔ ∀ i, AEDisjoint μ s (t i)

{ι : Type u_1}
{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[Countable ι]
{t : ι → Set α}

MeasureTheory.AEDisjoint μ s (⋃ i, t i) ↔ ∀ (i : ι), MeasureTheory.AEDisjoint μ s (t i)


protected lemma exists_congr (h : ∀ a, p a ↔ q (e a)) : (∃ a, p a) ↔ ∃ b, q b

{α : Sort u}
{β : Sort v}
{p : α → Prop}
{q : β → Prop}
(e : α ≃ β)
(h : ∀ (a : α), p a ↔ q (e a))


theorem killCompl_comp_rename : (killCompl hf).comp (rename f) = AlgHom.id R _

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
[CommSemiring R]
{f : σ → τ}
(hf : Function.Injective f)

(MvPolynomial.killCompl hf).comp (MvPolynomial.rename f) = AlgHom.id R (MvPolynomial σ R)


theorem gcd_dvd_right {a b : Int} : (gcd a b : Int) ∣ b


theorem tendsto_atBot_add_const_left (C : β) (hf : Tendsto f l atBot) :
    Tendsto (fun x => C + f x) l atBot

{α : Type u_3}
{β : Type u_4}
[OrderedAddCommGroup β]
(l : Filter α)
{f : α → β}
(C : β)
(hf : Filter.Tendsto f l Filter.atBot)

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


protected theorem nsmul : a ≡ b [PMOD p] → n • a ≡ n • b [PMOD n • p]

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


theorem zipRight_eq_zipRight' : zipRight as bs = (zipRight' as bs).fst

{α : Type u}
{β : Type v}
(as : List α)
(bs : List β)


theorem inf_continuous' {f g : α → β} (hf : Continuous' f) (hg : Continuous' g) :
    Continuous' (f ⊓ g)

(hf : OmegaCompletePartialOrder.Continuous' f)

(hg : OmegaCompletePartialOrder.Continuous' g)

OmegaCompletePartialOrder.Continuous' (f ⊓ g)


@[mono]
theorem prod_mono ⦃s₁ s₂ : NonUnitalSubring R⦄ (hs : s₁ ≤ s₂) ⦃t₁ t₂ : NonUnitalSubring S⦄
    (ht : t₁ ≤ t₂) : s₁.prod t₁ ≤ s₂.prod t₂

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
⦃s₁ s₂ : NonUnitalSubring R⦄
(hs : s₁ ≤ s₂)
⦃t₁ t₂ : NonUnitalSubring S⦄
(ht : t₁ ≤ t₂)


@[simp]
theorem pre_id (A : C) [Closed A] : pre (𝟙 A) = 𝟙 _

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

CategoryTheory.MonoidalClosed.pre (CategoryTheory.CategoryStruct.id A) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.ihom A)


@[simp]
theorem top_coe : ((⊤ : Submodule R M) : Set M) = Set.univ

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


theorem measurable_piCongrLeft (f : δ' ≃ δ) : Measurable (piCongrLeft π f)

{δ : Type u_4}
{δ' : Type u_5}
{π : δ → Type u_6}
[(a : δ) → MeasurableSpace (π a)]
(f : δ' ≃ δ)


lemma copy_eq {m : MeasurableSpace α} {p : Set α → Prop} (h : ∀ s, p s ↔ MeasurableSet[m] s) :
    m.copy p h = m

(h : ∀ (s : Set α), p s ↔ MeasurableSet s)


@[simp]
theorem domCongr_trans [AddCommMonoid M] (e : α ≃ β) (f : β ≃ γ) :
    (Finsupp.domCongr e).trans (Finsupp.domCongr f) =
      (Finsupp.domCongr (e.trans f) : (α →₀ M) ≃+ _)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{M : Type u_5}
[AddCommMonoid M]
(e : α ≃ β)
(f : β ≃ γ)

(Finsupp.domCongr e).trans (Finsupp.domCongr f) = Finsupp.domCongr (e.trans f)


theorem ae_eq_trans {f g h : α → β} (h₁ : f =ᵐ[μ] g) (h₂ : g =ᵐ[μ] h) : f =ᵐ[μ] h

{α : Type u_1}
{β : Type u_2}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{f g h : α → β}
(h₁ : f =ᵐ[μ] g)
(h₂ : g =ᵐ[μ] h)


@[reassoc (attr := simp)]
theorem Pi.reindex_inv_π (b : β) : (Pi.reindex ε f).inv ≫ Pi.π (f ∘ ε) b = Pi.π f (ε b)

[CategoryTheory.Limits.HasProduct (f ∘ ⇑ε)]

(CategoryTheory.Limits.Pi.reindex ε f).inv ≫ CategoryTheory.Limits.Pi.π (f ∘ ⇑ε) b = CategoryTheory.Limits.Pi.π f (ε b)


@[simp]
theorem inv_map_inv_app (F : C ⥤ D ⥤ E) {X Y : C} (e : X ≅ Y) (Z : D) :
    inv ((F.map e.inv).app Z) = (F.map e.hom).app Z

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
(F : C ⥤ D ⥤ E)
{X Y : C}
(e : X ≅ Y)
(Z : D)

CategoryTheory.inv ((F.map e.inv).app Z) = (F.map e.hom).app Z


theorem seq_pos_lt_seq_of_lt_of_le (hf : Monotone f) {n : ℕ} (hn : 0 < n) (h₀ : x 0 ≤ y 0)
    (hx : ∀ k < n, x (k + 1) < f (x k)) (hy : ∀ k < n, f (y k) ≤ y (k + 1)) : x n < y n

(hy : ∀ (k : ℕ), k < n → f (y k) ≤ y (k + 1))


/-- The `n`-th coefficient of the `k`-th power of a power series. -/
lemma coeff_pow (k n : ℕ) (φ : R⟦X⟧) :
    coeff R n (φ ^ k) = ∑ l ∈ finsuppAntidiag (range k) n, ∏ i ∈ range k, coeff R (l i) φ

{R : Type u_2}
[CommSemiring R]
(k n : ℕ)
(φ : PowerSeries R)

(PowerSeries.coeff R n) (φ ^ k) =
  ∑ l ∈ (Finset.range k).finsuppAntidiag n, ∏ i ∈ Finset.range k, (PowerSeries.coeff R (l i)) φ


theorem findIdx_eq {p : α → Bool} {xs : List α} {i : ℕ} (h : i < xs.length) :
    xs.findIdx p = i ↔ p (xs.get ⟨i, h⟩) ∧ ∀ j (hji : j < i), ¬p (xs.get ⟨j, hji.trans h⟩)

{α : Type u}
{p : α → Bool}
{xs : List α}
{i : ℕ}
(h : i < xs.length)

List.findIdx p xs = i ↔ p (xs.get ⟨i, h⟩) = true ∧ ∀ (j : ℕ) (hji : j < i), ¬p (xs.get ⟨j, ⋯⟩) = true


@[to_additive]
protected theorem Filter.EventuallyEq.mulIndicator [One β] {l : Filter α} {f g : α → β} {s : Set α}
    (hfg : f =ᶠ[l] g) : s.mulIndicator f =ᶠ[l] s.mulIndicator g

{α : Type u_1}
{β : Type u_2}
[One β]
{l : Filter α}
{f g : α → β}
{s : Set α}
(hfg : f =ᶠ[l] g)


@[simp]
theorem card_disjUnion (s t : Finset α) (h) : (s.disjUnion t h).card = s.card + t.card

{α : Type u_1}
(s t : Finset α)
(h : Disjoint s t)


theorem mem_core_res (f : α → β) (s : Set α) (t : Set β) (x : α) :
    x ∈ (res f s).core t ↔ x ∈ s → f x ∈ t

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

x ∈ (PFun.res f s).core t ↔ x ∈ s → f x ∈ t


theorem convexHull_range_eq_exists_affineCombination (v : ι → E) : convexHull R (range v) =
    { x | ∃ (s : Finset ι) (w : ι → R), (∀ i ∈ s, 0 ≤ w i) ∧ s.sum w = 1 ∧
      s.affineCombination R v w = x }

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(v : ι → E)

(convexHull R) (Set.range v) = {x | ∃ s w, (∀ i ∈ s, 0 ≤ w i) ∧ s.sum w = 1 ∧ (Finset.affineCombination R s v) w = x}


@[simp]
theorem map₂_right [NeBot f] : map₂ (fun _ y => y) f g = g

{α : Type u_1}
{β : Type u_3}
{f : Filter α}
{g : Filter β}
[f.NeBot]


lemma Basis.eq_of_closure_subset (hI : M.Basis I X) (hJI : J ⊆ I) (hJ : X ⊆ M.closure J) :
    J = I

{α : Type u_2}
{M : Matroid α}
{X I J : Set α}
(hI : M.Basis I X)
(hJI : J ⊆ I)
(hJ : X ⊆ M.closure J)


@[continuity]
protected theorem continuous (F : HomotopyWith f₀ f₁ P) : Continuous F

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
{P : C(X, Y) → Prop}
(F : f₀.HomotopyWith f₁ P)


@[simp]
theorem range_map_iterate (n : ℕ) (f : α → α) (a : α) :
    (List.range n).map (f^[·] a) = List.iterate f a n

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

List.map (fun x => f^[x] a) (List.range n) = List.iterate f a n


theorem uniformContinuous_map : UniformContinuous (map f)

{α : Type u_1}
[UniformSpace α]
(pkg : AbstractCompletion α)
{β : Type u_2}
[UniformSpace β]
(pkg' : AbstractCompletion β)
(f : α → β)


@[simp]
theorem nhdsSet_union (s t : Set X) : 𝓝ˢ (s ∪ t) = 𝓝ˢ s ⊔ 𝓝ˢ t

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

𝓝ˢ (s ∪ t) = 𝓝ˢ s ⊔ 𝓝ˢ t


theorem fromSpec_image_basicOpen :
    hU.fromSpec ''ᵁ (PrimeSpectrum.basicOpen f) = X.basicOpen f

{X : AlgebraicGeometry.Scheme}
{U : X.Opens}
(hU : AlgebraicGeometry.IsAffineOpen U)
(f : ↑(X.presheaf.obj (Opposite.op U)))

(AlgebraicGeometry.Scheme.Hom.opensFunctor hU.fromSpec).obj (PrimeSpectrum.basicOpen f) = X.basicOpen f


@[simp]
theorem sum_add_distrib {ι} (f g : ι → Cardinal) : sum (f + g) = sum f + sum g

{ι : Type u_1}
(f g : ι → Cardinal.{u_2})

Cardinal.sum (f + g) = Cardinal.sum f + Cardinal.sum g


theorem neg_sat : {c : Constraint} → {v : Int} → sat c v → sat (c.neg) (-v)


theorem subsingleton_of_not_nonempty {α : Sort*} (h : ¬Nonempty α) : Subsingleton α


theorem forall_and_right [Nonempty α] (p : α → Prop) (q : Prop) :
    (∀ x, p x ∧ q) ↔ (∀ x, p x) ∧ q

{α : Sort u_1}
[Nonempty α]
(p : α → Prop)
(q : Prop)

(∀ (x : α), p x ∧ q) ↔ (∀ (x : α), p x) ∧ q


/-- The localization of `R` at `M` as a quotient type is isomorphic to any other localization. -/
@[simps!]
noncomputable def algEquiv : Localization M ≃ₐ[R] S

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

(Localization.algEquiv M S).symm a = (IsLocalization.map (Localization M) (RingHom.id R) ⋯) a


theorem sOppSide_smul_vsub_vadd_left {s : AffineSubspace R P} {x p₁ p₂ : P} (hx : x ∉ s)
    (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) {t : R} (ht : t < 0) : s.SOppSide (t • (x -ᵥ p₁) +ᵥ p₂) x

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x p₁ p₂ : P}
(hx : x ∉ s)
(hp₁ : p₁ ∈ s)
(hp₂ : p₂ ∈ s)
{t : R}
(ht : t < 0)