@[measurability, fun_prop]
theorem AEMeasurable.ennreal_toReal {f : α → ℝ≥0∞} {μ : Measure α} (hf : AEMeasurable f μ) :
    AEMeasurable (fun x => ENNReal.toReal (f x)) μ

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ≥0∞}
{μ : MeasureTheory.Measure α}
(hf : AEMeasurable f μ)


@[simp]
theorem bypass_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
    (p.copy hu hv).bypass = p.bypass.copy hu hv

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v u' v' : V}
(p : G.Walk u v)
(hu : u = u')
(hv : v = v')


theorem HasAffineProperty.diagonal_of_diagonal_of_isPullback
    (P) {Q} [HasAffineProperty P Q]
    {X Y U V : Scheme.{u}} {f : X ⟶ Y} {g : U ⟶ Y}
    [IsAffine U] [IsOpenImmersion g]
    {iV : V ⟶ X} {f' : V ⟶ U} (h : IsPullback iV f' f g) (H : P.diagonal f) :
    Q.diagonal f'

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)

(h : CategoryTheory.IsPullback iV f' f g)


theorem nhds_le_nhdsSet (h : x ∈ s) : 𝓝 x ≤ 𝓝ˢ s

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
{x : X}
(h : x ∈ s)


@[simp]
theorem leftUnitor_inv_apply {X : Type u} {x : X} :
    ((λ_ X).inv : X ⟶ 𝟙_ (Type u) ⊗ X) x = (PUnit.unit, x)


theorem rev_castSucc (k : Fin n) : rev (castSucc k) = succ (rev k)


theorem map_zero_apply (x : α) : ϕ 0 x = x

{τ : Type u_1}
[AddMonoid τ]
[TopologicalSpace τ]
[ContinuousAdd τ]
{α : Type u_2}
[TopologicalSpace α]
(ϕ : Flow τ α)
(x : α)


/-- **Gallagher's ergodic theorem** on Diophantine approximation. -/
theorem addWellApproximable_ae_empty_or_univ (δ : ℕ → ℝ) (hδ : Tendsto δ atTop (𝓝 0)) :
    (∀ᵐ x, ¬addWellApproximable 𝕊 δ x) ∨ ∀ᵐ x, addWellApproximable 𝕊 δ x

(hδ : Filter.Tendsto δ Filter.atTop (𝓝 0))

(∀ᵐ (x : AddCircle T), ¬addWellApproximable (AddCircle T) δ x) ∨
  ∀ᵐ (x : AddCircle T), addWellApproximable (AddCircle T) δ x


theorem comp_assoc {δ : Type*} [PseudoEMetricSpace δ] (f : α →ᵈ β) (g : β →ᵈ γ)
    (h : γ →ᵈ δ) : (h.comp g).comp f = h.comp (g.comp f)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[PseudoEMetricSpace γ]
{δ : Type u_6}
[PseudoEMetricSpace δ]
(f : α →ᵈ β)
(g : β →ᵈ γ)
(h : γ →ᵈ δ)


theorem StrictMono.id_le {φ : ℕ → ℕ} (h : StrictMono φ) : ∀ n, n ≤ φ n


@[simp]
lemma isoAdd_hom_app {a b : A}
    (e₁ : shiftFunctor C a ⋙ F ≅ F ⋙ shiftFunctor D a)
    (e₂ : shiftFunctor C b ⋙ F ≅ F ⋙ shiftFunctor D b) (X : C) :
      (CommShift.isoAdd e₁ e₂).hom.app X =
        F.map ((shiftFunctorAdd C a b).hom.app X) ≫ e₂.hom.app ((shiftFunctor C a).obj X) ≫
          (shiftFunctor D b).map (e₁.hom.app X) ≫ (shiftFunctorAdd D a b).inv.app (F.obj X)

(e₁ : (CategoryTheory.shiftFunctor C a).comp F ≅ F.comp (CategoryTheory.shiftFunctor D a))

(e₂ : (CategoryTheory.shiftFunctor C b).comp F ≅ F.comp (CategoryTheory.shiftFunctor D b))

(CategoryTheory.Functor.CommShift.isoAdd e₁ e₂).hom.app X =
  CategoryTheory.CategoryStruct.comp (F.map ((CategoryTheory.shiftFunctorAdd C a b).hom.app X))
    (CategoryTheory.CategoryStruct.comp (e₂.hom.app ((CategoryTheory.shiftFunctor C a).obj X))
      (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctor D b).map (e₁.hom.app X))
        ((CategoryTheory.shiftFunctorAdd D a b).inv.app (F.obj X))))


theorem le_sSup {A : C} (s : Set (Subobject A)) (f) (hf : f ∈ s) : f ≤ sSup s

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.WellPowered C]
[CategoryTheory.Limits.HasCoproducts C]
[CategoryTheory.Limits.HasImages C]
{A : C}
(s : Set (CategoryTheory.Subobject A))
(f : CategoryTheory.Subobject A)
(hf : f ∈ s)


theorem of'_dvd_iff_modOf_eq_zero {x : k[G]} {g : G} :
    of' k G g ∣ x ↔ x %ᵒᶠ g = 0

{k : Type u_1}
{G : Type u_2}
[Semiring k]
[AddCancelCommMonoid G]
{x : AddMonoidAlgebra k G}
{g : G}

AddMonoidAlgebra.of' k G g ∣ x ↔ x.modOf g = 0


lemma addMap_of_Z_eq_zero_left {P : Fin 3 → F} {Q : PointClass F} (hP : W.Nonsingular P)
    (hQ : W.NonsingularLift Q) (hPz : P z = 0) : W.addMap ⟦P⟧ Q = Q

{Q : WeierstrassCurve.Jacobian.PointClass F}


@[simp] lemma lift_sup_lift (a b : α) : lift a ⊔ lift b = lift (a ⊔ b)

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

Booleanisation.lift a ⊔ Booleanisation.lift b = Booleanisation.lift (a ⊔ b)


theorem smul_apply (c : R) (m : OuterMeasure α) (s : Set α) : (c • m) s = c • m s

{α : Type u_1}
{R : Type u_3}
[SMul R ℝ≥0∞]
[IsScalarTower R ℝ≥0∞ ℝ≥0∞]
(c : R)
(m : MeasureTheory.OuterMeasure α)
(s : Set α)


lemma IsSemisimple.genEigenspace_eq_eigenspace
    (hf : f.IsSemisimple) (μ : R) {k : ℕ} (hk : 0 < k) :
    f.genEigenspace μ k = f.eigenspace μ

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{f : Module.End R M}
(hf : f.IsSemisimple)
(μ : R)
{k : ℕ}
(hk : 0 < k)


theorem preVal_zero : preVal K v O hv p 0 = 0

{K : Type u₁}
[Field K]
{v : Valuation K ℝ≥0}
{O : Type u₂}
[CommRing O]
[Algebra O K]
{hv : v.Integers O}
{p : ℕ}


/-- Universe lift functor for monoids. -/
@[to_additive (attr := simps)
  "Universe lift functor for additive monoids."]
def uliftFunctor : MonCat.{u} ⥤ MonCat.{max u v}

AddMonCat.uliftFunctor.map f =
  AddMonCat.ofHom (AddEquiv.ulift.symm.toAddMonoidHom.comp (AddMonoidHom.comp f AddEquiv.ulift.toAddMonoidHom))


protected theorem find_min : ∀ {m : ℕ+}, m < PNat.find h → ¬p m

{p : ℕ+ → Prop}
[DecidablePred p]
(h : ∃ n, p n)
{m : ℕ+}


theorem map_bind (f : β → γ) (g : α → List β) :
    ∀ l : List α, (l.bind g).map f = l.bind fun a => (g a).map f

{β : Type u_1}
{γ : Type u_2}
{α : Type u_3}
(f : β → γ)
(g : α → List β)
(l : List α)

List.map f (l.bind g) = l.bind fun a => List.map f (g a)


lemma lie_mem_weightSpaceChain_of_weightSpace_eq_bot_left [LieAlgebra.IsNilpotent R H]
    (hp : weightSpace M (p • α + χ) = ⊥)
    {x : L} (hx : x ∈ rootSpace H (-α))
    {y : M} (hy : y ∈ weightSpaceChain M α χ p q) :
    ⁅x, y⁆ ∈ weightSpaceChain M α χ p q

(hp : LieModule.weightSpace M (p • α + χ) = ⊥)

(hy : y ∈ LieModule.weightSpaceChain M α χ p q)

⁅x, y⁆ ∈ LieModule.weightSpaceChain M α χ p q


/-- If `g` is surjective, then `lTensor Q g` is surjective -/
theorem LinearMap.lTensor_surjective (hg : Function.Surjective g) :
    Function.Surjective (lTensor Q g)

{R : Type u_1}
[CommSemiring R]
{N : Type u_3}
{P : Type u_4}
(Q : Type u_5)
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R N]
[Module R P]
[Module R Q]
{g : N →ₗ[R] P}
(hg : Function.Surjective ⇑g)

Function.Surjective ⇑(LinearMap.lTensor Q g)


/-- A semigroup homomorphism `f : M →ₙ* N` with a left-inverse `g : N → M` defines a multiplicative
equivalence between `M` and `f.srange`.

This is a bidirectional version of `MulHom.srangeRestrict`. -/
@[to_additive (attr := simps (config := { simpRhs := true }))
      "An additive semigroup homomorphism `f : M →+ N` with a left-inverse
      `g : N → M` defines an additive equivalence between `M` and `f.srange`.
      This is a bidirectional version of `AddHom.srangeRestrict`. "]
def ofLeftInverse (f : M →ₙ* N) {g : N → M} (h : Function.LeftInverse g f) : M ≃* f.srange

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(f : AddHom M N)
{g : N → M}
(h : Function.LeftInverse g ⇑f)
(a : M)

(AddEquiv.ofLeftInverse f h) a = f.srangeRestrict a


/-- The push forward of a complete sublattice under a complete lattice hom is a complete
sublattice. -/
@[simps] def map (L : CompleteSublattice α) : CompleteSublattice β

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
[CompleteLattice β]
(f : CompleteLatticeHom α β)
(L : CompleteSublattice α)

(CompleteSublattice.map f L).carrier = ⇑f '' ↑L


@[to_additive (attr := simp)]
theorem noncommProd_coe (l : List α) (comm) : noncommProd (l : Multiset α) comm = l.prod

(comm : {x | x ∈ ↑l}.Pairwise AddCommute)


@[simp]
theorem LinearMap.uncurryLeft_apply (f : M 0 →ₗ[R] MultilinearMap R (fun i : Fin n => M i.succ) M₂)
    (m : ∀ i, M i) : f.uncurryLeft m = f (m 0) (tail m)

[(i : Fin n.succ) → AddCommMonoid (M i)]

(f : M 0 →ₗ[R] MultilinearMap R (fun i => M i.succ) M₂)

f.uncurryLeft m = (f (m 0)) (Fin.tail m)


/-- The functor in the equivalence of sheaf categories. -/
@[simps!]
def sheafCongr.functor : Sheaf J A ⥤ Sheaf K A

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[CategoryTheory.Equivalence.TransportsGrothendieckTopology J K e]

((CategoryTheory.Equivalence.sheafCongr.functor J K e A).obj F).val.obj X =
  F.val.obj (Opposite.op (e.inverse.obj (Opposite.unop X)))


@[simp]
theorem sub_top (x : EReal) : x - ⊤ = ⊥


theorem erase_insert_subset (a : α) (s : Finset α) : erase (insert a s) a ⊆ s

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


lemma gc_map_comap (f : LatticeHom α β) : GaloisConnection (map f) (comap f)

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
(f : LatticeHom α β)

GaloisConnection (Sublattice.map f) (Sublattice.comap f)


@[to_additive (attr := simp)]
theorem mul_eq_one_iff : a * b = 1 ↔ a = 1 ∧ b = 1

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
{a b : α}


/-- A commuting square of isomorphisms induces an isomorphism of kernels. -/
@[simps]
def kernel.mapIso {X' Y' : C} (f' : X' ⟶ Y') [HasKernel f'] (p : X ≅ X') (q : Y ≅ Y')
    (w : f ≫ q.hom = p.hom ≫ f') : kernel f ≅ kernel f'

(CategoryTheory.Limits.kernel.mapIso f f' p q w).hom = CategoryTheory.Limits.kernel.map f f' p.hom q.hom w


protected theorem nil {n} : @Vec n 0 fun _ => nil

Nat.Partrec'.Vec fun x => Mathlib.Vector.nil


@[to_additive]
theorem exponent_min' (n : ℕ) (hpos : 0 < n) (hG : ∀ g : G, g ^ n = 1) : exponent G ≤ n

{G : Type u}
[Monoid G]
(n : ℕ)
(hpos : 0 < n)
(hG : ∀ (g : G), g ^ n = 1)


theorem antidiagonal.snd_le {n : A} {kl : A × A} (hlk : kl ∈ antidiagonal n) : kl.2 ≤ n

{A : Type u_1}
[CanonicallyOrderedAddCommMonoid A]
[Finset.HasAntidiagonal A]
{n : A}
{kl : A × A}
(hlk : kl ∈ Finset.antidiagonal n)


@[to_additive zsmul_right_inj]
lemma zpow_left_inj (hn : n ≠ 0) : a ^ n = b ^ n ↔ a = b

{α : Type u_1}
[LinearOrderedCommGroup α]
{n : ℤ}
{a b : α}
(hn : n ≠ 0)


theorem mk_injective : Function.Injective (@ConjClasses.mk α _)


nonrec theorem ContinuousWithinAt.const_cpow {b : ℂ} (hf : ContinuousWithinAt f s a)
    (h : b ≠ 0 ∨ f a ≠ 0) : ContinuousWithinAt (fun x => b ^ f x) s a

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℂ}
{s : Set α}
{a : α}
{b : ℂ}
(hf : ContinuousWithinAt f s a)
(h : b ≠ 0 ∨ f a ≠ 0)


/-- The map `p ↦ v +ᵥ p` as an affine automorphism of an affine space.

Note that there is no need for an `AffineMap.constVAdd` as it is always an equivalence.
This is roughly to `DistribMulAction.toLinearEquiv` as `+ᵥ` is to `•`. -/
@[simps! apply linear]
def constVAdd (v : V₁) : P₁ ≃ᵃ[k] P₁

(k : Type u_1)
(P₁ : Type u_2)
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(v : V₁)

(AffineEquiv.constVAdd k P₁ v).linear = LinearEquiv.refl k V₁


theorem extend_union {s₁ s₂ : Set α} (hd : Disjoint s₁ s₂) (h₁ : P s₁) (h₂ : P s₂) :
    extend m (s₁ ∪ s₂) = extend m s₁ + extend m s₂

(PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i))

(mU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), Pairwise (Disjoint on f) → m (⋃ i, f i) ⋯ = ∑' (i : ℕ), m (f i) ⋯)

MeasureTheory.extend m (s₁ ∪ s₂) = MeasureTheory.extend m s₁ + MeasureTheory.extend m s₂


/-- (Impl) Prove that the lifted cocone is colimiting. -/
@[simps]
def liftedCoconeIsColimit : IsColimit (liftedCocone D c t)

(D : CategoryTheory.Functor J T.Coalgebra)

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

((CategoryTheory.Comonad.ForgetCreatesColimits'.liftedCoconeIsColimit D c t).desc s).f = t.desc (T.forget.mapCocone s)


@[ext high]
theorem ext_of_ring {f g : R →ₗc[R] A} (h : f 1 = g 1) : f = g

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[CoalgebraStruct R A]
{f g : R →ₗc[R] A}
(h : f 1 = g 1)


@[simp]
theorem basis_repr {φ : ι → Type*} (b : ∀ i, Basis (φ i) R M) (g : ι →₀ M) (ix) :
    (Finsupp.basis b).repr g ix = (b ix.1).repr (g ix.1) ix.2

{R : Type u_1}
{M : Type u_2}
{ι : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{φ : ι → Type u_4}
(b : (i : ι) → Basis (φ i) R M)
(g : ι →₀ M)
(ix : (i : ι) × φ i)

((Finsupp.basis b).repr g) ix = ((b ix.fst).repr (g ix.fst)) ix.snd


@[simp]
theorem antidiagonal_succ {n : ℕ} :
    antidiagonal (n + 1) = (0, n + 1) :: (antidiagonal n).map (Prod.map Nat.succ id)

List.Nat.antidiagonal (n + 1) = (0, n + 1) :: List.map (Prod.map Nat.succ id) (List.Nat.antidiagonal n)


theorem of_comp {C₁ C₂ C₃ : Type*} [Category C₁] [Category C₂] [Category C₃]
    (W : MorphismProperty C₁) (F : C₁ ⥤ C₂) (hF : W.IsInvertedBy F) (G : C₂ ⥤ C₃) :
    W.IsInvertedBy (F ⋙ G)

(W : CategoryTheory.MorphismProperty C₁)


theorem finiteType_is_local : PropertyIsLocal @FiniteType


lemma add_of_equiv {P Q : Fin 3 → R} (h : P ≈ Q) : W'.add P Q = W'.dblXYZ P

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


@[to_additive]
theorem Nonempty.one_mem_div (h : s.Nonempty) : (1 : α) ∈ s / s

{α : Type u_2}
[DecidableEq α]
[Group α]
{s : Finset α}
(h : s.Nonempty)


/-- A type class for natural numbers which are greater than or equal to `2`. -/
class Nat.AtLeastTwo (n : ℕ) : Prop where
  prop : n ≥ 2


theorem IsGδ.setOf_liouville : IsGδ { x | Liouville x }


protected lemma mul_div_cancel_left' (Hd : a ∣ b) : a * (b / a) = b


theorem not_mem_diff_of_mem {s t : Set α} {x : α} (hx : x ∈ t) : x ∉ s \ t

{α : Type u}
{s t : Set α}
{x : α}
(hx : x ∈ t)


theorem sign_eq_sign (n : ℤ) : Int.sign n = SignType.sign n


@[simp]
lemma ofReal_eq_ofNat {r : ℝ} {n : ℕ} [n.AtLeastTwo] :
    ENNReal.ofReal r = no_index (OfNat.ofNat n) ↔ r = OfNat.ofNat n

ENNReal.ofReal r = OfNat.ofNat n ↔ r = OfNat.ofNat n


@[simp, norm_cast]
theorem fun_support_eq (f : α →₀ M) : Function.support f = f.support

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


/-- Two `R`-linear maps from `Π₀ i, M i` which agree on each `single i x` agree everywhere.

See note [partially-applied ext lemmas].
After apply this lemma, if `M = R` then it suffices to verify `φ (single a 1) = ψ (single a 1)`. -/
@[ext 1100]
theorem lhom_ext' ⦃φ ψ : (Π₀ i, M i) →ₗ[R] N⦄ (h : ∀ i, φ.comp (lsingle i) = ψ.comp (lsingle i)) :
    φ = ψ

(h : ∀ (i : ι), φ ∘ₗ DFinsupp.lsingle i = ψ ∘ₗ DFinsupp.lsingle i)


@[simp]
theorem offDiag_nonempty : s.offDiag.Nonempty ↔ s.Nontrivial


/-- The multiplicity of `p` in `choose (n + k) k` is the number of carries when `k` and `n`
  are added in base `p`. The set is expressed by filtering `Ico 1 b` where `b`
  is any bound greater than `log p (n + k)`. -/
theorem multiplicity_choose' {p n k b : ℕ} (hp : p.Prime) (hnb : log p (n + k) < b) :
    multiplicity p (choose (n + k) k) =
      ((Ico 1 b).filter fun i => p ^ i ≤ k % p ^ i + n % p ^ i).card

{p n k b : ℕ}
(hp : Nat.Prime p)
(hnb : Nat.log p (n + k) < b)

multiplicity p ((n + k).choose k) = ↑(Finset.filter (fun i => p ^ i ≤ k % p ^ i + n % p ^ i) (Finset.Ico 1 b)).card


@[to_additive (attr := simp)]
theorem toMonoidHom_eq_coe (f : M ≃* N) : f.toMonoidHom = (f : M →* N)

{M : Type u_6}
{N : Type u_7}
[MulOneClass M]
[MulOneClass N]
(f : M ≃* N)


theorem range_eq_top (coercive : IsCoercive B) : range B♯ = ⊤

{V : Type u}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[CompleteSpace V]
{B : V →L[ℝ] V →L[ℝ] ℝ}
(coercive : IsCoercive B)

LinearMap.range (InnerProductSpace.continuousLinearMapOfBilin B) = ⊤


theorem IsCycle.of_zpow {n : ℤ} (h1 : IsCycle (f ^ n)) (h2 : f.support ⊆ (f ^ n).support) :
    IsCycle f

{α : Type u_2}
{f : Equiv.Perm α}
[DecidableEq α]
[Fintype α]
{n : ℤ}
(h1 : (f ^ n).IsCycle)
(h2 : f.support ⊆ (f ^ n).support)


theorem prod_mono : s₁ ≤ s₂ → t₁ ≤ t₂ → s₁ ×ˢ t₁ ≤ s₂ ×ˢ t₂

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{s₁ s₂ : LowerSet α}
{t₁ t₂ : LowerSet β}

s₁ ≤ s₂ → t₁ ≤ t₂ → s₁ ×ˢ t₁ ≤ s₂ ×ˢ t₂


theorem erase_subset (a : α) (l : List α) : l.erase a ⊆ l

{α : Type u_1}
[BEq α]
(a : α)
(l : List α)


@[to_additive]
theorem smul_toEquiv (f : F) (T : leftTransversals (H : Set G)) (q : G ⧸ H) :
    f • (toEquiv T.2 q : G) = toEquiv (f • T).2 (f • q)

(T : ↑(AddSubgroup.leftTransversals ↑H))

f +ᵥ ↑((AddSubgroup.MemLeftTransversals.toEquiv ⋯) q) = ↑((AddSubgroup.MemLeftTransversals.toEquiv ⋯) (f +ᵥ q))


theorem list_indexOf₁ [DecidableEq α] (l : List α) : Primrec fun a => l.indexOf a

{α : Type u_1}
[Primcodable α]
[DecidableEq α]
(l : List α)


@[simp]
theorem cliqueFreeOn_two : G.CliqueFreeOn s 2 ↔ s.Pairwise (G.Adjᶜ)

{α : Type u_1}
(G : SimpleGraph α)
{s : Set α}


theorem sdiff_sup : y \ (x ⊔ z) = y \ x ⊓ y \ z

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]


theorem traceMatrix_reindex {κ' : Type*} (b : Basis κ A B) (f : κ ≃ κ') :
    traceMatrix A (b.reindex f) = reindex f f (traceMatrix A b)

{κ : Type w}
(A : Type u)
{B : Type v}
[CommRing A]
[CommRing B]
[Algebra A B]
{κ' : Type u_7}
(b : Basis κ A B)
(f : κ ≃ κ')

Algebra.traceMatrix A ⇑(b.reindex f) = (Matrix.reindex f f) (Algebra.traceMatrix A ⇑b)


/-- If `b` is an `A`-integral basis of `L` with discriminant `b`, then `d • a * x` is integral over
  `A` for all `a ∈ I` and `x ∈ Iᵛ`. -/
lemma isIntegral_discr_mul_of_mem_traceDual
    (I : Submodule B L) {ι} [DecidableEq ι] [Fintype ι]
    {b : Basis ι K L} (hb : ∀ i, IsIntegral A (b i))
    {a x : L} (ha : a ∈ I) (hx : x ∈ Iᵛ) :
    IsIntegral A ((discr K b) • a * x)

{A : Type u_1}
{K : Type u_2}
{L : Type u}
{B : Type u_3}
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
[IsFractionRing A K]
[IsIntegralClosure B A L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
[IsIntegrallyClosed A]
(I : Submodule B L)
{ι : Type u_4}
[DecidableEq ι]
[Fintype ι]
{b : Basis ι K L}
(hb : ∀ (i : ι), IsIntegral A (b i))
{a x : L}
(ha : a ∈ I)
(hx : x ∈ Submodule.traceDual A K I)

IsIntegral A (Algebra.discr K ⇑b • a * x)


@[simp]
theorem equivOfInverse_apply (f₁ : M₁ →SL[σ₁₂] M₂) (f₂ h₁ h₂ x) :
    equivOfInverse f₁ f₂ h₁ h₂ x = f₁ x

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(f₁ : M₁ →SL[σ₁₂] M₂)
(f₂ : M₂ →SL[σ₂₁] M₁)
(h₁ : Function.LeftInverse ⇑f₂ ⇑f₁)
(h₂ : Function.RightInverse ⇑f₂ ⇑f₁)
(x : M₁)

(ContinuousLinearEquiv.equivOfInverse f₁ f₂ h₁ h₂) x = f₁ x


@[simp]
theorem map_map (g : β → γ) (f : α → β) (s : Multiset α) : map g (map f s) = map (g ∘ f) s

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

Multiset.map g (Multiset.map f s) = Multiset.map (g ∘ f) s


/-- Two linear maps are equal on `Submodule.span s` iff they are equal on `s`. -/
theorem eqOn_span_iff {s : Set M} {f g : F} : Set.EqOn f g (span R s) ↔ Set.EqOn f g s

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_4}
{M₂ : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Semiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{F : Type u_8}
{σ₁₂ : R →+* R₂}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
{s : Set M}
{f g : F}

Set.EqOn ⇑f ⇑g ↑(Submodule.span R s) ↔ Set.EqOn (⇑f) (⇑g) s


@[to_additive]
lemma dite_le_one [LE α] (ha : ∀ h, a h ≤ 1) (hb : ∀ h, b h ≤ 1) : dite p a b ≤ 1

{α : Type u_2}
[Zero α]
{p : Prop}
[Decidable p]
{a : p → α}
{b : ¬p → α}
[LE α]
(ha : ∀ (h : p), a h ≤ 0)
(hb : ∀ (h : ¬p), b h ≤ 0)


theorem wellFoundedGT_of_chainHeight_ne_top (s : Set α) (hs : s.chainHeight ≠ ⊤) :
    WellFoundedGT s

{α : Type u_1}
[Preorder α]
(s : Set α)
(hs : s.chainHeight ≠ ⊤)


@[simp]
theorem toIocDiv_zsmul_add (a b : α) (m : ℤ) : toIocDiv hp a (m • p + b) = m + toIocDiv hp a b

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


@[simp] theorem ofFin_sub (x : Fin (2^n)) (y : BitVec n) : .ofFin x - y = .ofFin (x - y.toFin)

{n : Nat}
(x : Fin (2 ^ n))
(y : BitVec n)

{ toFin := x } - y = { toFin := x - y.toFin }


theorem empty_data : (#[] : Array α).data = []


theorem apply_comp_inclusion {T S : E →ₗ.[R] F} (h : T ≤ S) (x : T.domain) :
    T x = S (Submodule.inclusion h.1 x)

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{T S : E →ₗ.[R] F}
(h : T ≤ S)
(x : ↥T.domain)


theorem tendsto_nhds_bot_iff_real {α : Type*} {m : α → EReal} {f : Filter α} :
    Tendsto m f (𝓝 ⊥) ↔ ∀ x : ℝ, ∀ᶠ a in f, m a < x

{α : Type u_2}
{m : α → EReal}
{f : Filter α}

Filter.Tendsto m f (𝓝 ⊥) ↔ ∀ (x : ℝ), ∀ᶠ (a : α) in f, m a < ↑x


@[simp]
theorem coe_zero : ((0 : ConvexCone 𝕜 E) : Set E) = 0

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


@[simp]
theorem quot_neg (x) :
    -- Porting note: force Lean to treat `ColimitType F` no as `Quot _`
    (by exact Quot.mk Setoid.r (neg x) : ColimitType.{w} F) =
      -(by exact Quot.mk Setoid.r x)

{J : Type u}
[CategoryTheory.Category.{v, u} J]
(F : J ⥤ AddCommGrp)
(x : AddCommGrp.Colimits.Prequotient F)

Quot.mk Setoid.r x.neg = -Quot.mk Setoid.r x


@[to_additive]
theorem pow_mem_pow (hs : s ∈ f) : ∀ n : ℕ, s ^ n ∈ f ^ n

{α : Type u_2}
[AddMonoid α]
{f : Filter α}
{s : Set α}
(hs : s ∈ f)
(n : ℕ)


/-- Suppose `f : [a, b] → δ` is
continuous and injective. Then `f` is strictly antitone (decreasing) if `f(b) ≤ f(a)`. -/
theorem ContinuousOn.strictAntiOn_of_injOn_Icc {a b : α} {f : α → δ}
    (hab : a ≤ b) (hfab : f b ≤ f a)
    (hf_c : ContinuousOn f (Icc a b)) (hf_i : InjOn f (Icc a b)) :
    StrictAntiOn f (Icc a b)

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[DenselyOrdered α]
{δ : Type u_1}
[LinearOrder δ]
[TopologicalSpace δ]
[OrderClosedTopology δ]
{a b : α}
{f : α → δ}
(hab : a ≤ b)
(hfab : f b ≤ f a)
(hf_c : ContinuousOn f (Set.Icc a b))
(hf_i : Set.InjOn f (Set.Icc a b))


@[simp]
theorem id_comp (f : BoundedOrderHom α β) : (BoundedOrderHom.id β).comp f = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[BoundedOrder α]
[BoundedOrder β]
(f : BoundedOrderHom α β)


theorem image_inter (i j : D.J) :
    Set.range (𝖣.ι i) ∩ Set.range (𝖣.ι j) = Set.range (D.f i j ≫ 𝖣.ι _)

Set.range ⇑(D.ι i) ∩ Set.range ⇑(D.ι j) = Set.range ⇑(D.f i j ≫ D.ι i)


@[reassoc (attr := simp)]
theorem biproduct.map_π {f g : J → C} [HasBiproduct f] [HasBiproduct g] (p : ∀ j, f j ⟶ g j)
    (j : J) : biproduct.map p ≫ biproduct.π g j = biproduct.π f j ≫ p j

CategoryTheory.Limits.biproduct.map p ≫ CategoryTheory.Limits.biproduct.π g j =
  CategoryTheory.Limits.biproduct.π f j ≫ p j


@[simp]
theorem eLpNorm_aeeqFun {α E : Type*} [MeasurableSpace α] {μ : Measure α} [NormedAddCommGroup E]
    {p : ℝ≥0∞} {f : α → E} (hf : AEStronglyMeasurable f μ) :
    eLpNorm (AEEqFun.mk f hf) p μ = eLpNorm f p μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.eLpNorm (↑(MeasureTheory.AEEqFun.mk f hf)) p μ = MeasureTheory.eLpNorm f p μ


@[fun_prop, measurability]
theorem Measurable.pow_const (hf : Measurable f) (c : γ) : Measurable fun x => f x ^ c

{β : Type u_2}
{γ : Type u_3}
{α : Type u_4}
[MeasurableSpace β]
[MeasurableSpace γ]
[Pow β γ]
[MeasurablePow β γ]
{m : MeasurableSpace α}
{f : α → β}
(hf : Measurable f)
(c : γ)


theorem norm_le {t : ℝ} (ht : t ∈ Icc v.tMin v.tMax) {x : E} (hx : x ∈ closedBall v.x₀ v.R) :
    ‖v t x‖ ≤ v.C

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(v : PicardLindelof E)
{t : ℝ}
(ht : t ∈ Set.Icc v.tMin v.tMax)
{x : E}
(hx : x ∈ Metric.closedBall v.x₀ ↑v.R)


theorem SigmaFinite.of_map (μ : Measure α) {f : α → β} (hf : AEMeasurable f μ)
    (h : SigmaFinite (μ.map f)) : SigmaFinite μ

(h : MeasureTheory.SigmaFinite (MeasureTheory.Measure.map f μ))


theorem coeff_mul_of_natDegree_le (pm : p.natDegree ≤ m) (qn : q.natDegree ≤ n) :
    (p * q).coeff (m + n) = p.coeff m * q.coeff n

{R : Type u}
{m n : ℕ}
[Semiring R]
{p q : R[X]}
(pm : p.natDegree ≤ m)
(qn : q.natDegree ≤ n)


@[simp]
theorem mem_pairSelfAdjointMatricesSubmodule :
    A₁ ∈ pairSelfAdjointMatricesSubmodule J J₂ ↔ Matrix.IsAdjointPair J J₂ A₁ A₁

{R : Type u_1}
{n : Type u_12}
[CommRing R]
[Fintype n]
(J J₂ A₁ : Matrix n n R)
[DecidableEq n]

A₁ ∈ pairSelfAdjointMatricesSubmodule J J₂ ↔ J.IsAdjointPair J₂ A₁ A₁


/-- A structure carrying a diagram of cocones over the functors `F.obj j`.
-/
structure DiagramOfCocones where
  /-- For each object, a cocone. -/
  obj : ∀ j : J, Cocone (F.obj j)
  /-- For each map, a map of cocones. -/
  map : ∀ {j j' : J} (f : j ⟶ j'), (obj j) ⟶ (Cocones.precompose (F.map f)).obj (obj j')
  id : ∀ j : J, (map (𝟙 j)).hom = 𝟙 _ := by aesop_cat
  comp : ∀ {j₁ j₂ j₃ : J} (f : j₁ ⟶ j₂) (g : j₂ ⟶ j₃),
    (map (f ≫ g)).hom = (map f).hom ≫ (map g).hom := by aesop_cat

(self : CategoryTheory.Limits.DiagramOfCocones F)

(self.map (𝟙 j)).hom = 𝟙 (self.obj j).pt


/-- The identity lax braided monoidal functor. -/
@[simps!]
def id : LaxBraidedFunctor C C

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

(CategoryTheory.LaxBraidedFunctor.id C).μ X Y = 𝟙 (X ⊗ Y)


@[simp]
theorem coe_comp (φ₁ : B →ₐc[R] C) (φ₂ : A →ₐc[R] B) : ⇑(φ₁.comp φ₂) = φ₁ ∘ φ₂

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[Semiring C]
[Algebra R C]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
[CoalgebraStruct R C]
(φ₁ : B →ₐc[R] C)
(φ₂ : A →ₐc[R] B)

⇑(φ₁.comp φ₂) = ⇑φ₁ ∘ ⇑φ₂


/-- A ring is a principal ideal ring if all (left) ideals are principal. -/
@[mk_iff]
class IsPrincipalIdealRing (R : Type u) [Semiring R] : Prop where
  principal : ∀ S : Ideal R, S.IsPrincipal

IsPrincipalIdealRing R ↔ ∀ (S : Ideal R), Submodule.IsPrincipal S


/-- If `K` is a compact set in a nontrivial real normed space and `x ∈ K`, then there exists a point
`y` of the boundary of `K` at distance `Metric.infDist x Kᶜ` from `x`. See also
`exists_mem_frontier_infDist_compl_eq_dist`. -/
nonrec theorem IsCompact.exists_mem_frontier_infDist_compl_eq_dist {E : Type*}
    [NormedAddCommGroup E] [NormedSpace ℝ E] [Nontrivial E] {x : E} {K : Set E} (hK : IsCompact K)
    (hx : x ∈ K) :
    ∃ y ∈ frontier K, Metric.infDist x Kᶜ = dist x y

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[Nontrivial E]
{x : E}
{K : Set E}
(hK : IsCompact K)
(hx : x ∈ K)


theorem le_opNorm_of_le {c : ℝ} {x} (h : ‖x‖ ≤ c) : ‖f x‖ ≤ ‖f‖ * c

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(f : NormedAddGroupHom V₁ V₂)
{c : ℝ}
{x : V₁}
(h : ‖x‖ ≤ c)

‖f x‖ ≤ ‖f‖ * c


theorem nfp_eq_nfpFamily (f : Ordinal → Ordinal) : nfp f = nfpFamily fun _ : Unit => f

Ordinal.nfp f = Ordinal.nfpFamily fun x => f


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

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

Polynomial.eval₂ i (⅟x) (Polynomial.reflect N f) * x ^ N = Polynomial.eval₂ i x f


theorem HasStrongEpiMonoFactorisations.mk
    (d : ∀ {X Y : C} (f : X ⟶ Y), StrongEpiMonoFactorisation f) :
    HasStrongEpiMonoFactorisations C

(d : {X Y : C} → (f : X ⟶ Y) → CategoryTheory.Limits.StrongEpiMonoFactorisation f)


theorem dvd_prod_of_mem (f : α → β) {a : α} {s : Finset α} (ha : a ∈ s) : f a ∣ ∏ i ∈ s, f i

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
(f : α → β)
{a : α}
{s : Finset α}
(ha : a ∈ s)


theorem IsLindelof.elim_nhds_subcover' (hs : IsLindelof s) (U : ∀ x ∈ s, Set X)
    (hU : ∀ x (hx : x ∈ s), U x ‹x ∈ s› ∈ 𝓝 x) :
    ∃ t : Set s, t.Countable ∧ s ⊆ ⋃ x ∈ t, U (x : s) x.2

(hU : ∀ (x : X) (hx : x ∈ s), U x hx ∈ 𝓝 x)


@[to_additive]
theorem prod_product_right {s : Finset γ} {t : Finset α} {f : γ × α → β} :
    ∏ x ∈ s ×ˢ t, f x = ∏ y ∈ t, ∏ x ∈ s, f (x, y)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[CommMonoid β]
{s : Finset γ}
{t : Finset α}
{f : γ × α → β}


theorem mk_lt_mk (n k : ℕ) (hn : 0 < n) (hk : 0 < k) : (⟨n, hn⟩ : ℕ+) < ⟨k, hk⟩ ↔ n < k


@[to_additive]
theorem inv_mem_Icc_iff : a⁻¹ ∈ Set.Icc c d ↔ a ∈ Set.Icc d⁻¹ c⁻¹

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

-a ∈ Set.Icc c d ↔ a ∈ Set.Icc (-d) (-c)


@[measurability]
theorem Measurable.arctan : Measurable fun x => arctan (f x)

{α : Type u_1}
{m : MeasurableSpace α}
{f : α → ℝ}
(hf : Measurable f)


@[reassoc (attr := simp)]
lemma map_inv_hom_id_eval (e : X ≅ Y) (F : C ⥤ D) (j : J) :
    F.map (e.inv j) ≫ F.map (e.hom j) = 𝟙 _

{C : Type u_1}
{D : Type u_2}
{J : Type u_4}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Category.{u_6, u_2} D]
{X Y : CategoryTheory.GradedObject J C}
(e : X ≅ Y)
(F : CategoryTheory.Functor C D)
(j : J)

CategoryTheory.CategoryStruct.comp (F.map (e.inv j)) (F.map (e.hom j)) = CategoryTheory.CategoryStruct.id (F.obj (Y j))


lemma not_even_two_mul_add_one (n : ℕ) : ¬ Even (2 * n + 1)


theorem mem_append_left {s₁ s₂ : Seq α} {a : α} (h : a ∈ s₁) : a ∈ append s₁ s₂

{α : Type u}
{s₁ s₂ : Stream'.Seq α}
{a : α}
(h : a ∈ s₁)


theorem decode₂_is_partial_inv [Encodable α] : IsPartialInv encode (decode₂ α)

Function.IsPartialInv Encodable.encode (Encodable.decode₂ α)


@[simp]
theorem evenOddRec_zero {P : ℕ → Sort*} (h0 : P 0) (h_even : ∀ i, P i → P (2 * i))
    (h_odd : ∀ i, P i → P (2 * i + 1)) : evenOddRec h0 h_even h_odd 0 = h0

{P : ℕ → Sort u_1}
(h0 : P 0)
(h_even : (i : ℕ) → P i → P (2 * i))
(h_odd : (i : ℕ) → P i → P (2 * i + 1))


@[simp]
theorem sin_ofReal_im (x : ℝ) : (sin x).im = 0


@[to_additive (attr := simp, norm_cast)]
theorem mem_toOpens : g ∈ (U : Opens G) ↔ g ∈ U

{G : Type u_1}
[Group G]
[TopologicalSpace G]
{U : OpenSubgroup G}
{g : G}

g ∈ ↑U ↔ g ∈ U


/-- This can be used to prove
```lean
example [NonUnitalNonAssocSemiring α] (a₁₁ a₁₂ a₂₁ a₂₂ b₁ b₂ : α) :
  !![a₁₁, a₁₂;
     a₂₁, a₂₂] *ᵥ ![b₁, b₂] = ![a₁₁*b₁ + a₁₂*b₂, a₂₁*b₁ + a₂₂*b₂] :=
(mulVecᵣ_eq _ _).symm
```
-/
@[simp]
theorem mulVecᵣ_eq [NonUnitalNonAssocSemiring α] (A : Matrix (Fin l) (Fin m) α) (v : Fin m → α) :
    mulVecᵣ A v = A *ᵥ v

{l m : ℕ}
{α : Type u_1}
[NonUnitalNonAssocSemiring α]
(A : Matrix (Fin l) (Fin m) α)
(v : Fin m → α)


lemma ih₁₂ (ih' : ∀ a, ArgsRel a (Args.P24 x₁ x₂ y) → P124 a) : IH24 x₁ x₂ y

(ih' :
  ∀ (a : Surreal.Multiplication.Args),
    Surreal.Multiplication.ArgsRel a (Surreal.Multiplication.Args.P24 x₁ x₂ y) → Surreal.Multiplication.P124 a)


theorem eventually_le_atBot [Preorder α] (a : α) : ∀ᶠ x in atBot, x ≤ a


theorem le_of_dvd {m n : Nat} (h : 0 < n) : m ∣ n → m ≤ n


/-- The counit for the equivalence `Mon_ (C ⥤ D) ≌ C ⥤ Mon_ D`.
-/
@[simps!]
def counitIso : inverse ⋙ functor ≅ 𝟭 (C ⥤ Mon_ D)

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

∀ (X_1 : C), ((CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.counitIso.hom.app X).app X_1).hom = 𝟙 (X.obj X_1).X


@[simp]
theorem range_some_inter_none (α : Type*) : range (some : α → Option α) ∩ {none} = ∅


theorem wSameSide_lineMap_right {s : AffineSubspace R P} {x : P} (y : P) (h : x ∈ s) {t : R}
    (ht : 0 ≤ t) : s.WSameSide y (lineMap x y t)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x : P}
(y : P)
(h : x ∈ s)
{t : R}
(ht : 0 ≤ t)

s.WSameSide y ((AffineMap.lineMap x y) t)


lemma isOpen_sphere {r : ℝ} (hr : r ≠ 0) : IsOpen (sphere x r)

{X : Type u_1}
[PseudoMetricSpace X]
[IsUltrametricDist X]
(x : X)
{r : ℝ}
(hr : r ≠ 0)


theorem _root_.Set.exists_isOpen_lt_add [OuterRegular μ] (A : Set α) (hA : μ A ≠ ∞) {ε : ℝ≥0∞}
    (hε : ε ≠ 0) : ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < μ A + ε

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[μ.OuterRegular]
(A : Set α)
(hA : μ A ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)


theorem opow_log_le_self (b : Ordinal) {x : Ordinal} (hx : x ≠ 0) : b ^ log b x ≤ x

(b : Ordinal.{u_1})
{x : Ordinal.{u_1}}
(hx : x ≠ 0)


@[simp]
lemma liftBaseChangeEquiv_symm_apply (l : A ⊗[R] M →ₗ[A] N) (x) :
    (liftBaseChangeEquiv A).symm l x = l (1 ⊗ₜ x)

{R : Type u_4}
{M : Type u_2}
{N : Type u_3}
(A : Type u_1)
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
[Module A N]
[IsScalarTower R A N]
(l : A ⊗[R] M →ₗ[A] N)
(x : M)

((LinearMap.liftBaseChangeEquiv A).symm l) x = l (1 ⊗ₜ[R] x)


/-- If the multiplicative support of `f` is finite, then for every `x` in the domain of `f`, `f x`
divides `finprod f`.  -/
theorem finprod_mem_dvd {f : α → N} (a : α) (hf : (mulSupport f).Finite) : f a ∣ finprod f

{α : Type u_1}
{N : Type u_6}
[CommMonoid N]
{f : α → N}
(a : α)
(hf : (Function.mulSupport f).Finite)


@[to_additive]
theorem pairwise_disjoint_Ioc_mul_zpow :
    Pairwise (Disjoint on fun n : ℤ => Ioc (a * b ^ n) (a * b ^ (n + 1)))

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

Pairwise (Disjoint on fun n => Set.Ioc (a * b ^ n) (a * b ^ (n + 1)))


/-- Symmetric statement to `Option.map₂_map_left_comm`. -/
theorem map_map₂_distrib_left {g : γ → δ} {f' : α' → β → δ} {g' : α → α'}
    (h_distrib : ∀ a b, g (f a b) = f' (g' a) b) :
    (map₂ f a b).map g = map₂ f' (a.map g') b

{f : α → β → γ}

(h_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b)

Option.map g (Option.map₂ f a b) = Option.map₂ f' (Option.map g' a) b


@[to_additive]
theorem HasProd.tprod_eq (ha : HasProd f a) : ∏' b, f b = a

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a : α}
[T2Space α]
(ha : HasSum f a)


protected theorem monotoneOn (hf : LocallyBoundedVariationOn f s) {a : α} (as : a ∈ s) :
    MonotoneOn (variationOnFromTo f s a) s

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{f : α → E}
{s : Set α}
(hf : LocallyBoundedVariationOn f s)
{a : α}
(as : a ∈ s)


/-- Measurable equivalence between (dependent) functions on a type and pairs of functions on
`{i // p i}` and `{i // ¬p i}`. See also `Equiv.piEquivPiSubtypeProd`. -/
@[simps! (config := .asFn)]
def piEquivPiSubtypeProd (p : δ' → Prop) [DecidablePred p] :
    (∀ i, π i) ≃ᵐ (∀ i : Subtype p, π i) × ∀ i : { i // ¬p i }, π i

{δ' : Type u_5}
(π : δ' → Type u_6)
[(x : δ') → MeasurableSpace (π x)]
(p : δ' → Prop)
[DecidablePred p]

⇑(MeasurableEquiv.piEquivPiSubtypeProd π p) = fun f => (fun x => f ↑x, fun x => f ↑x)


lemma IsLeftCancelMulZero.to_isCancelMulZero [IsLeftCancelMulZero M₀] :
    IsCancelMulZero M₀

{M₀ : Type u_1}
[CommSemigroup M₀]
[Zero M₀]
[IsLeftCancelMulZero M₀]


theorem succNthVal_spec' (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k) (ha₁ : a₁.coeff 0 ≠ 0)
    (ha₂ : a₂.coeff 0 ≠ 0) :
    succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * a₁.coeff 0 ^ p ^ (n + 1) +
          a₁.coeff (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) +
        nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) =
      succNthVal p n a₁ a₂ bs ha₁ ha₂ * a₂.coeff 0 ^ p ^ (n + 1) +
          a₂.coeff (n + 1) * bs 0 ^ p ^ (n + 1) +
        nthRemainder p n bs (truncateFun (n + 1) a₂)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
{k : Type u_1}
[Field k]
[CharP k p]
[IsAlgClosed k]
(n : ℕ)
(a₁ a₂ : WittVector p k)
(bs : Fin (n + 1) → k)
(ha₁ : a₁.coeff 0 ≠ 0)
(ha₂ : a₂.coeff 0 ≠ 0)

WittVector.RecursionMain.succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * a₁.coeff 0 ^ p ^ (n + 1) +
      a₁.coeff (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) +
    WittVector.nthRemainder p n (fun v => bs v ^ p) (WittVector.truncateFun (n + 1) a₁) =
  WittVector.RecursionMain.succNthVal p n a₁ a₂ bs ha₁ ha₂ * a₂.coeff 0 ^ p ^ (n + 1) +
      a₂.coeff (n + 1) * bs 0 ^ p ^ (n + 1) +
    WittVector.nthRemainder p n bs (WittVector.truncateFun (n + 1) a₂)


lemma interior_subset_iff : interior s ⊆ t ↔ ∀ U, IsOpen U → U ⊆ s → U ⊆ t

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

interior s ⊆ t ↔ ∀ (U : Set X), IsOpen U → U ⊆ s → U ⊆ t


theorem integral_re {f : X → 𝕜} (hf : Integrable f μ) :
    ∫ x, RCLike.re (f x) ∂μ = RCLike.re (∫ x, f x ∂μ)

{X : Type u_1}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{𝕜 : Type u_5}
[RCLike 𝕜]
{f : X → 𝕜}
(hf : MeasureTheory.Integrable f μ)

∫ (x : X), RCLike.re (f x) ∂μ = RCLike.re (∫ (x : X), f x ∂μ)


/-- `centroidWeightsWithCircumcenter` sums to 1, if the `Finset` is nonempty. -/
@[simp]
theorem sum_centroidWeightsWithCircumcenter {n : ℕ} {fs : Finset (Fin (n + 1))} (h : fs.Nonempty) :
    ∑ i, centroidWeightsWithCircumcenter fs i = 1

∑ i : Affine.Simplex.PointsWithCircumcenterIndex n, Affine.Simplex.centroidWeightsWithCircumcenter fs i = 1


/-- The equivalence between cubic polynomials and polynomials of degree at most three. -/
@[simps]
def equiv : Cubic R ≃ { p : R[X] // p.degree ≤ 3 }

{R : Type u_1}
[Semiring R]
(P : Cubic R)


theorem id_c (X : SheafedSpace C) :
    (𝟙 X : X ⟶ X).c = eqToHom (Presheaf.Pushforward.id_eq X.presheaf).symm

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


theorem chartAt_apply {a : Rˣ} {b : Rˣ} : chartAt R a b = b

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
{a b : Rˣ}


protected theorem IntegrableAtFilter.add {f g : α → E}
    (hf : IntegrableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) :
    IntegrableAtFilter (f + g) l μ

(hf : MeasureTheory.IntegrableAtFilter f l μ)

(hg : MeasureTheory.IntegrableAtFilter g l μ)

MeasureTheory.IntegrableAtFilter (f + g) l μ


@[simp]
theorem linearization_obj_ρ (X : Action (Type u) (MonCat.of G)) (g : G) (x : X.V →₀ k) :
    ((linearization k G).obj X).ρ g x = Finsupp.lmapDomain k k (X.ρ g) x

{k G : Type u}
[CommRing k]
[Monoid G]
(X : Action (Type u) (MonCat.of G))
(g : G)
(x : X.V →₀ k)

(((Rep.linearization k G).obj X).ρ g) x = (Finsupp.lmapDomain k k (X.ρ g)) x


/-- The inner product of a nonzero vector with a nonzero multiple of
itself, divided by the product of their norms, has absolute value
1. -/
theorem norm_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_ne_zero_mul {x : E} {r : 𝕜} (hx : x ≠ 0)
    (hr : r ≠ 0) : ‖⟪x, r • x⟫‖ / (‖x‖ * ‖r • x‖) = 1

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{x : E}
{r : 𝕜}
(hx : x ≠ 0)
(hr : r ≠ 0)


@[to_additive]
theorem IsClosed.smul_left_of_isCompact (ht : IsClosed t) (hs : IsCompact s) :
    IsClosed (s • t)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[AddGroup α]
[AddAction α β]
[ContinuousNeg α]
[ContinuousVAdd α β]
{s : Set α}
{t : Set β}
(ht : IsClosed t)
(hs : IsCompact s)


/-- Convolution is associative. This has a weak but inconvenient integrability condition.
See also `convolution_assoc`. -/
theorem convolution_assoc' (hL : ∀ (x : E) (y : E') (z : E''), L₂ (L x y) z = L₃ x (L₄ y z))
    {x₀ : G} (hfg : ∀ᵐ y ∂μ, ConvolutionExistsAt f g y L ν)
    (hgk : ∀ᵐ x ∂ν, ConvolutionExistsAt g k x L₄ μ)
    (hi : Integrable (uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x)))) (μ.prod ν)) :
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = (f ⋆[L₃, ν] g ⋆[L₄, μ] k) x₀

(hfg : ∀ᵐ (y : G) ∂μ, MeasureTheory.ConvolutionExistsAt f g y L ν)

(hgk : ∀ᵐ (x : G) ∂ν, MeasureTheory.ConvolutionExistsAt g k x L₄ μ)

(hi : MeasureTheory.Integrable (Function.uncurry fun x y => (L₃ (f y)) ((L₄ (g (x - y))) (k (x₀ - x)))) (μ.prod ν))

MeasureTheory.convolution (MeasureTheory.convolution f g L ν) k L₂ μ x₀ =
  MeasureTheory.convolution f (MeasureTheory.convolution g k L₄ μ) L₃ ν x₀


@[reassoc (attr := simp)]
lemma δ_comp : δ T n₀ n₁ h ≫ (homologyFunctor C n₁).map T.mor₁ = 0

(T : CategoryTheory.Pretriangulated.Triangle (DerivedCategory C))

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

DerivedCategory.HomologySequence.δ T n₀ n₁ h ≫ (DerivedCategory.homologyFunctor C n₁).map T.mor₁ = 0


@[simp] theorem getD_cons_zero : getD (x :: xs) 0 d = x

∀ {α : Type u_1} {x : α} {xs : List α} {d : α}, (x :: xs).getD 0 d = x


@[reassoc (attr := simp)]
lemma snd_δ : (pullback.snd _ _ : S.P ⟶ _) ≫ S.δ = S.φ₁ ≫ S.v₂₃.τ₁

(S : CategoryTheory.ShortComplex.SnakeInput C)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullback.snd S.L₁.g S.v₀₁.τ₃) S.δ =
  CategoryTheory.CategoryStruct.comp S.φ₁ S.v₂₃.τ₁


@[simp]
theorem mk'_toAddSubgroup {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubgroup R}
    (ha : ↑sa = s) : (Subring.mk' s sm sa hm ha).toAddSubgroup = sa

{R : Type u}
[Ring R]
{s : Set R}
{sm : Submonoid R}
(hm : ↑sm = s)
{sa : AddSubgroup R}
(ha : ↑sa = s)


lemma FinitaryPreExtensive.sigma_desc_iso [FinitaryPreExtensive C] {α : Type} [Finite α] {X : C}
    {Z : α → C} (π : (a : α) → Z a ⟶ X) {Y : C} (f : Y ⟶ X) (hπ : IsIso (Sigma.desc π)) :
    IsIso (Sigma.desc ((fun _ ↦ pullback.fst _ _) : (a : α) → pullback f (π a) ⟶ _))

(hπ : CategoryTheory.IsIso (CategoryTheory.Limits.Sigma.desc π))

CategoryTheory.IsIso (CategoryTheory.Limits.Sigma.desc fun x => CategoryTheory.Limits.pullback.fst f (π x))


theorem coe_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → NonUnitalSubsemiring R}
    (hS : Directed (· ≤ ·) S) : ((⨆ i, S i : NonUnitalSubsemiring R) : Set R) = ⋃ i, S i

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


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

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(H : AddSubgroup G)
{f : G →+ N}
(hf : Function.Injective ⇑f)


theorem _root_.Dvd.dvd.modEq_zero_nat (h : n ∣ a) : a ≡ 0 [MOD n]


/-- Conjugation acting on fixed element of the group is continuous when both `mul` and
`inv` are continuous. -/
@[to_additive (attr := continuity)
  "Conjugation acting on fixed element of the additive group is continuous when both
    `add` and `neg` are continuous."]
theorem TopologicalGroup.continuous_conj' [ContinuousInv G] (h : G) :
    Continuous fun g : G => g * h * g⁻¹

{G : Type w}
[TopologicalSpace G]
[Neg G]
[Add G]
[ContinuousAdd G]
[ContinuousNeg G]
(h : G)


@[to_additive]
lemma Submonoid.units_mono : Monotone (Submonoid.units (M := M))


/-- The `insert` function preserves the ordering invariants. -/
protected theorem Ordered.insert (h : t.Ordered cmp) : (insert cmp t v).Ordered cmp

∀ {α : Type u_1} {cmp : α → α → Ordering} {t : Batteries.RBNode α} {v : α},
  Batteries.RBNode.Ordered cmp t → Batteries.RBNode.Ordered cmp (Batteries.RBNode.insert cmp t v)


/-- If `μ` is a primitive `n`th root of unity in `R`, then `(-1)^(n-1) * ∏(1≤k<n) (μ^k-1) = n`.
(Stated with `n+1` in place of `n` to avoid the condition `n ≠ 0`.) -/
lemma prod_pow_sub_one_eq_order {n : ℕ} {μ : R} (hμ : IsPrimitiveRoot μ (n + 1)) :
    (-1) ^ n * ∏ k ∈ range n, (μ ^ (k + 1) - 1) = n + 1

{R : Type u_1}
[CommRing R]
[IsDomain R]
{n : ℕ}
{μ : R}
(hμ : IsPrimitiveRoot μ (n + 1))

(-1) ^ n * ∏ k ∈ Finset.range n, (μ ^ (k + 1) - 1) = ↑n + 1


/-- Converting an augmented simplicial object to an augmented cosimplicial
object and back is isomorphic to the given object. -/
@[simps!]
def SimplicialObject.Augmented.rightOpLeftOpIso (X : SimplicialObject.Augmented C) :
    X.rightOp.leftOp ≅ X

(X : CategoryTheory.SimplicialObject.Augmented C)

X.rightOpLeftOpIso.hom.right = 𝟙 X.right


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

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

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


@[simp]
theorem degrees_one : degrees (1 : MvPolynomial σ R) = 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]


@[simp]
theorem mem_top {x : A} : x ∈ (⊤ : NonUnitalStarSubalgebra R A)

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
{x : A}


theorem colimit_exists_of_rep_eq [HasColimit F] {i j : J} (x : F.obj i) (y : F.obj j)
    (h : colimit.ι F _ x = colimit.ι F _ y) :
    ∃ (k : _) (f : i ⟶ k) (g : j ⟶ k), F.map f x = F.map g y

[CategoryTheory.Limits.PreservesColimit F (CategoryTheory.forget C)]

(x : (CategoryTheory.forget C).obj (F.obj i))

(y : (CategoryTheory.forget C).obj (F.obj j))

(h : (CategoryTheory.Limits.colimit.ι F i) x = (CategoryTheory.Limits.colimit.ι F j) y)


/-- A version of `List.get_rotate` that represents `List.get l` in terms of
`List.get (List.rotate l n)`, not vice versa. Can be used instead of rewriting `List.get_rotate`
from right to left. -/
theorem get_eq_get_rotate (l : List α) (n : ℕ) (k : Fin l.length) :
    l.get k = (l.rotate n).get ⟨(l.length - n % l.length + k) % l.length,
      (Nat.mod_lt _ (k.1.zero_le.trans_lt k.2)).trans_eq (length_rotate _ _).symm⟩

{α : Type u}
(l : List α)
(n : ℕ)
(k : Fin l.length)

l.get k = (l.rotate n).get ⟨(l.length - n % l.length + ↑k) % l.length, ⋯⟩


@[simp, norm_cast] lemma one_lt_coe : 1 < (r : ℝ) ↔ 1 < r


@[simp]
theorem compl₁₂_id_id (f : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ) : f.compl₁₂ LinearMap.id LinearMap.id = f

{R : Type u_1}
[CommSemiring R]
{Mₗ : Type u_9}
{Nₗ : Type u_10}
{Pₗ : Type u_11}
[AddCommMonoid Mₗ]
[AddCommMonoid Nₗ]
[AddCommMonoid Pₗ]
[Module R Mₗ]
[Module R Nₗ]
[Module R Pₗ]
(f : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ)


theorem prod_aux_cobounded_eq [PseudoMetricSpace α] [PseudoMetricSpace β] :
    cobounded (WithLp p (α × β)) = @cobounded _ Prod.instBornology

(p : ℝ≥0∞)
(α : Type u_2)
(β : Type u_3)
[hp : Fact (1 ≤ p)]
[PseudoMetricSpace α]
[PseudoMetricSpace β]

Bornology.cobounded (WithLp p (α × β)) = Bornology.cobounded (α × β)


@[simp] lemma d_one (X : Dᵒᵖ) : d.d (X := X) 1 = 0

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


@[to_additive]
theorem measure_mul_right_null (y : G) : μ ((fun x => x * y) ⁻¹' s) = 0 ↔ μ s = 0

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
{s : Set G}
[MeasurableNeg G]
[μ.IsAddLeftInvariant]
(y : G)

μ ((fun x => x + y) ⁻¹' s) = 0 ↔ μ s = 0


/-- The type of monoid homomorphisms satisfying the characteristic predicate: if `f : M →* N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends MonoidHom M N where
  map_units' : ∀ y : S, IsUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z * toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c * x = c * y

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(self : S.LocalizationMap N)
(z : N)

∃ x, z * (↑self.toMonoidHom).toFun ↑x.2 = (↑self.toMonoidHom).toFun x.1


@[simp]
theorem res_zero (x : ℕ → α) : res x 0 = @nil α


theorem product_self_eq_disjiUnion_perm_aux (hf : f.IsCycleOn s) :
    (range s.card : Set ℕ).PairwiseDisjoint fun k =>
      s.map ⟨fun i => (i, (f ^ k) i), fun i j => congr_arg Prod.fst⟩

{α : Type u_2}
{f : Equiv.Perm α}
{s : Finset α}
(hf : f.IsCycleOn ↑s)

(↑(Finset.range s.card)).PairwiseDisjoint fun k => Finset.map { toFun := fun i => (i, (f ^ k) i), inj' := ⋯ } s


/-- `eval` is an additive homomorphism except when a denominator evaluates to `0`.

Counterexample: `eval _ 1 (X / (X-1)) + eval _ 1 (-1 / (X-1)) = 0`
`... ≠ 1 = eval _ 1 ((X-1) / (X-1))`.

See also `RatFunc.eval₂_denom_ne_zero` to make the hypotheses simpler but less general.
-/
theorem eval_add {x y : RatFunc K} (hx : Polynomial.eval₂ f a (denom x) ≠ 0)
    (hy : Polynomial.eval₂ f a (denom y) ≠ 0) : eval f a (x + y) = eval f a x + eval f a y

{K : Type u}
[Field K]
{L : Type u}
[Field L]
(f : K →+* L)
(a : L)
{x y : RatFunc K}
(hx : Polynomial.eval₂ f a x.denom ≠ 0)
(hy : Polynomial.eval₂ f a y.denom ≠ 0)

RatFunc.eval f a (x + y) = RatFunc.eval f a x + RatFunc.eval f a y


@[simp]
theorem castLE_castLE {k m n} (km : k ≤ m) (mn : m ≤ n) (φ : L.BoundedFormula α k) :
    (φ.castLE km).castLE mn = φ.castLE (km.trans mn)

{L : FirstOrder.Language}
{α : Type u'}
{k m n : ℕ}
(km : k ≤ m)
(mn : m ≤ n)
(φ : L.BoundedFormula α k)

FirstOrder.Language.BoundedFormula.castLE mn (FirstOrder.Language.BoundedFormula.castLE km φ) =
  FirstOrder.Language.BoundedFormula.castLE ⋯ φ


theorem imp_or {a b c : Prop} : a → b ∨ c ↔ (a → b) ∨ (a → c)


theorem odd_sq_dvd_geom_sum₂_sub (hp : Odd p) :
    (p : R) ^ 2 ∣ (∑ i ∈ range p, (a + p * b) ^ i * a ^ (p - 1 - i)) - p * a ^ (p - 1)

{R : Type u_1}
[CommRing R]
(a b : R)
{p : ℕ}
(hp : Odd p)

↑p ^ 2 ∣ ∑ i ∈ Finset.range p, (a + ↑p * b) ^ i * a ^ (p - 1 - i) - ↑p * a ^ (p - 1)


/-- **Young's inequality**, a version for arbitrary real numbers. -/
theorem young_inequality (a b : ℝ) {p q : ℝ} (hpq : p.IsConjExponent q) :
    a * b ≤ |a| ^ p / p + |b| ^ q / q


theorem Adapted.stronglyMeasurable_stoppedProcess [MetrizableSpace ι] (hu : Adapted f u)
    (hu_cont : ∀ ω, Continuous fun i => u i ω) (hτ : IsStoppingTime f τ) (n : ι) :
    StronglyMeasurable (MeasureTheory.stoppedProcess u τ n)

{u : ι → Ω → β}

(hu_cont : ∀ (ω : Ω), Continuous fun i => u i ω)

MeasureTheory.StronglyMeasurable (MeasureTheory.stoppedProcess u τ n)


/-- If `f : 𝕜 → 𝕜` is concave on `s`, then for any point `x ∈ s` the slope of the secant line of `f`
through `x` is antitone on `s \ {x}`. -/
lemma ConcaveOn.slope_anti (hfc : ConcaveOn 𝕜 s f) (hx : x ∈ s) :
    AntitoneOn (slope f x) (s \ {x})

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}
{x : 𝕜}
(hfc : ConcaveOn 𝕜 s f)
(hx : x ∈ s)


theorem equicontinuousAt_unique [Unique ι] {F : ι → X → α} {x : X} :
    EquicontinuousAt F x ↔ ContinuousAt (F default) x

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
[Unique ι]
{F : ι → X → α}
{x : X}


@[simp]
lemma map_zero_hom_app (X : C) :
    F.map ((zero hF s i).hom.app X) =
      (i 0).hom.app X ≫ (shiftFunctorZero D A).hom.app (F.obj X)

(i : (i : A) → (s i).comp F ≅ F.comp (CategoryTheory.shiftFunctor D i))

F.map ((CategoryTheory.Functor.FullyFaithful.hasShift.zero hF s i).hom.app X) =
  CategoryTheory.CategoryStruct.comp ((i 0).hom.app X) ((CategoryTheory.shiftFunctorZero D A).hom.app (F.obj X))


@[reassoc (attr := simp)]
lemma liftHomotopyZeroOne_comp {Y Z : C} {P : ProjectiveResolution Y} {Q : ProjectiveResolution Z}
    (f : P.complex ⟶ Q.complex) (comm : f ≫ Q.π = 0) :
    liftHomotopyZeroOne f comm ≫ Q.complex.d 2 1 =
      f.f 1 - P.complex.d 1 0 ≫ liftHomotopyZeroZero f comm

{P : CategoryTheory.ProjectiveResolution Y}

{Q : CategoryTheory.ProjectiveResolution Z}

(comm : CategoryTheory.CategoryStruct.comp f Q.π = 0)

CategoryTheory.CategoryStruct.comp (CategoryTheory.ProjectiveResolution.liftHomotopyZeroOne f comm) (Q.complex.d 2 1) =
  f.f 1 -
    CategoryTheory.CategoryStruct.comp (P.complex.d 1 0)
      (CategoryTheory.ProjectiveResolution.liftHomotopyZeroZero f comm)


theorem add_eq_two_iff {n m : WithBot ℕ} :
    n + m = 2 ↔ n = 0 ∧ m = 2 ∨ n = 1 ∧ m = 1 ∨ n = 2 ∧ m = 0


@[to_additive]
theorem coe_iSup_of_directed {S : ι → Subsemigroup M} (hS : Directed (· ≤ ·) S) :
    ((⨆ i, S i : Subsemigroup M) : Set M) = ⋃ i, S i

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


theorem floor_add_ofNat (ha : 0 ≤ a) (n : ℕ) [n.AtLeastTwo] :
    ⌊a + (no_index (OfNat.ofNat n))⌋₊ = ⌊a⌋₊ + OfNat.ofNat n

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
(ha : 0 ≤ a)
(n : ℕ)
[n.AtLeastTwo]

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


theorem of_decide_eq_self_eq_true [inst : DecidableEq α] (a : α) : Eq (decide (Eq a a)) true

{α : Sort u_1}
[inst : DecidableEq α]
(a : α)


@[simp]
lemma δ_ofHom {p : ℤ} (φ : F ⟶ G) : δ 0 p (Cochain.ofHom φ) = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{F G : CochainComplex C ℤ}
{p : ℤ}
(φ : F ⟶ G)

CochainComplex.HomComplex.δ 0 p (CochainComplex.HomComplex.Cochain.ofHom φ) = 0


/-- If a function `f` is

- injective on a compact set `s`;
- continuous at every point of this set;
- injective on a neighborhood of each point of this set,

then it is injective on an open neighborhood of this set. -/
theorem Set.InjOn.exists_isOpen_superset {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]
    [T2Space Y] {f : X → Y} {s : Set X} (inj : InjOn f s) (sc : IsCompact s)
    (fc : ∀ x ∈ s, ContinuousAt f x) (loc : ∀ x ∈ s, ∃ u ∈ 𝓝 x, InjOn f u) :
    ∃ t, IsOpen t ∧ s ⊆ t ∧ InjOn f t

(loc : ∀ x ∈ s, ∃ u ∈ 𝓝 x, Set.InjOn f u)


@[simp]
theorem restrict_apply_self (s : Set α) : (μ.restrict s) s = μ s

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


/--
The underlying object of a condensed object in `C` is the condensed object evaluated at a point.
This can be viewed as a sort of forgetful functor from `Condensed C` to `C`
-/
@[simps!]
noncomputable def LightCondensed.underlying : LightCondensed.{u} C ⥤ C

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

∀ {X Y : CategoryTheory.Sheaf (CategoryTheory.coherentTopology LightProfinite) C} (f : X ⟶ Y),
  (LightCondensed.underlying C).map f = f.val.app (Opposite.op (LightProfinite.of PUnit.{u + 1}))


@[to_additive]
theorem nhds_one_hasBasis (B : GroupFilterBasis G) :
    HasBasis (@nhds G B.topology 1) (fun V : Set G ↦ V ∈ B) id

{G : Type u}
[AddGroup G]
(B : AddGroupFilterBasis G)


theorem volume_preserving_piFinSuccAbove {n : ℕ} (α : Fin (n + 1) → Type u)
    [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (i : Fin (n + 1)) :
    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i)

[(i : Fin (n + 1)) → MeasureTheory.MeasureSpace (α i)]

[∀ (i : Fin (n + 1)), MeasureTheory.SigmaFinite MeasureTheory.volume]

MeasureTheory.MeasurePreserving (⇑(MeasurableEquiv.piFinSuccAbove α i)) MeasureTheory.volume MeasureTheory.volume


theorem norm_nonneg (x : ℤ[i]) : 0 ≤ norm x


theorem isIso_prod_iff {P Q : C} {S T : D} {f : (P, S) ⟶ (Q, T)} :
    IsIso f ↔ IsIso f.1 ∧ IsIso f.2

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
(D : Type u₂)
[CategoryTheory.Category.{v₂, u₂} D]
{P Q : C}
{S T : D}
{f : (P, S) ⟶ (Q, T)}

CategoryTheory.IsIso f ↔ CategoryTheory.IsIso f.1 ∧ CategoryTheory.IsIso f.2


/-- The additive equivalence between morphisms in `CochainComplex C ℤ` and `0`-cocycles. -/
@[simps]
def equivHom : (F ⟶ G) ≃+ Cocycle F G 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(F G : CochainComplex C ℤ)
(φ : F ⟶ G)

(CochainComplex.HomComplex.Cocycle.equivHom F G) φ = CochainComplex.HomComplex.Cocycle.ofHom φ


theorem properDivisors.not_self_mem : ¬n ∈ properDivisors n


theorem sin_eq_sin_iff {x y : ℂ} :
    sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x

Complex.sin x = Complex.sin y ↔ ∃ k, y = 2 * ↑k * ↑Real.pi + x ∨ y = (2 * ↑k + 1) * ↑Real.pi - x


@[simp] theorem toBialgebraCatIso_trans (e : X ≃ₐc[R] Y) (f : Y ≃ₐc[R] Z) :
    toBialgebraCatIso (e.trans f) = toBialgebraCatIso e ≪≫ toBialgebraCatIso f

{R : Type u}
[CommRing R]
{X Y Z : Type v}
[Ring X]
[Ring Y]
[Ring Z]
[Bialgebra R X]
[Bialgebra R Y]
[Bialgebra R Z]
(e : X ≃ₐc[R] Y)
(f : Y ≃ₐc[R] Z)

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


@[simp] theorem comap_const {m} (b : β) : MeasurableSpace.comap (fun _a : α => b) m = ⊥

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace β}
(b : β)

MeasurableSpace.comap (fun _a => b) m = ⊥


theorem degree_add_le_of_degree_le {p q : R[X]} {n : ℕ} (hp : degree p ≤ n) (hq : degree q ≤ n) :
    degree (p + q) ≤ n

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


@[simp, mfld_simps]
theorem trans_transEquiv (e : PartialEquiv α β) (e' : PartialEquiv β γ) (f'' : γ ≃ δ) :
    (e.trans e').transEquiv f'' = e.trans (e'.transEquiv f'')

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(e : PartialEquiv α β)
(e' : PartialEquiv β γ)
(f'' : γ ≃ δ)


@[simp]
theorem trans_symm (α : X ≅ Y) (β : Y ≅ Z) : (α ≪≫ β).symm = β.symm ≪≫ α.symm

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


(starRingEnd ℂ) (-Complex.I) = Complex.I


@[simp] theorem lift_pure [Monad m] [LawfulMonad m] (a : α) : ExceptT.lift (pure a) = (pure a : ExceptT ε m α)

{m : Type u_1 → Type u_2}
{α ε : Type u_1}
[Monad m]
[LawfulMonad m]
(a : α)


lemma isClosed_biUnion_finset {s : Finset α} {f : α → Set X} (h : ∀ i ∈ s, IsClosed (f i)) :
    IsClosed (⋃ i ∈ s, f i)

{X : Type u}
{α : Type u_1}
[TopologicalSpace X]
{s : Finset α}
{f : α → Set X}
(h : ∀ i ∈ s, IsClosed (f i))


theorem tendsto_const_nhdsWithin {l : Filter β} {s : Set α} {a : α} (ha : a ∈ s) :
    Tendsto (fun _ : β => a) l (𝓝[s] a)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
{l : Filter β}
{s : Set α}
{a : α}
(ha : a ∈ s)


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


class LawfulGetElem (cont : Type u) (idx : Type v) (elem : outParam (Type w))
   (dom : outParam (cont → idx → Prop)) [ge : GetElem? cont idx elem dom] : Prop where

  getElem?_def (c : cont) (i : idx) [Decidable (dom c i)] :
      c[i]? = if h : dom c i then some (c[i]'h) else none := by
    intros
    try simp only [getElem?] <;> congr
  getElem!_def [Inhabited elem] (c : cont) (i : idx) :
      c[i]! = match c[i]? with | some e => e | none => default := by
    intros
    simp only [getElem!, getElem?, outOfBounds_eq_default]

[self : LawfulGetElem cont idx elem dom]

getElem? c i = if h : dom c i then some (getElem c i h) else none


theorem basicOpen_of_isUnit {f : Γ(X, U)} (hf : IsUnit f) : X.basicOpen f = U

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


@[to_additive]
theorem eq_mul_inv_of_mul_eq (h : a * c = b) : a = b * c⁻¹

{G : Type u_3}
[AddGroup G]
{a b c : G}
(h : a + c = b)


@[to_additive]
theorem eq_top_of_le_card [Finite G] (h : Nat.card G ≤ Nat.card H) : H = ⊤

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)
[Finite G]
(h : Nat.card G ≤ Nat.card ↥H)


/-- The projective spectrum of a graded commutative ring is the subtype of all homogenous ideals
that are prime and do not contain the irrelevant ideal. -/
@[ext]
structure ProjectiveSpectrum where
  asHomogeneousIdeal : HomogeneousIdeal 𝒜
  isPrime : asHomogeneousIdeal.toIdeal.IsPrime
  not_irrelevant_le : ¬HomogeneousIdeal.irrelevant 𝒜 ≤ asHomogeneousIdeal

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
{𝒜 : ℕ → Submodule R A}
[GradedAlgebra 𝒜]
(self : ProjectiveSpectrum 𝒜)

¬HomogeneousIdeal.irrelevant 𝒜 ≤ self.asHomogeneousIdeal


@[simp] lemma bddBelow_singleton : BddBelow ({a} : Set α)


@[simp]
theorem mem_inf : x ∈ I ⊓ J ↔ x ∈ I ∧ x ∈ J

{P : Type u_1}
[SemilatticeSup P]
[IsDirected P fun x x_1 => x ≥ x_1]
{x : P}
{I J : Order.Ideal P}


theorem hasCoproducts_of_finite_and_filtered [HasFiniteCoproducts C]
    [HasFilteredColimitsOfSize.{w, w} C] : HasCoproducts.{w} C

[CategoryTheory.Limits.HasFilteredColimitsOfSize.{w, w, v, u} C]


theorem restrict_extend_range (f : α → β) (g : α → γ) (g' : β → γ) :
    (range f).restrict (extend f g g') = fun x => g x.coe_prop.choose

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β)
(g : α → γ)
(g' : β → γ)

(Set.range f).restrict (Function.extend f g g') = fun x => g (Exists.choose ⋯)


/-- (Implementation Detail) The glue data associated to a disjoint union. -/
@[simps]
noncomputable
def disjointGlueData' : GlueData' Scheme

{ι : Type u}
(f : ι → AlgebraicGeometry.Scheme)

∀ (x x_1 : ι) (x_2 : x ≠ x_1), (AlgebraicGeometry.disjointGlueData' f).V x x_1 x_2 = ∅


@[simp]
lemma addOppositeEquiv_leadingCoeff (x : HahnSeries Γ (Rᵃᵒᵖ)) :
    (addOppositeEquiv x).unop.leadingCoeff = x.leadingCoeff.unop

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddMonoid R]
(x : HahnSeries Γ Rᵃᵒᵖ)

(AddOpposite.unop (HahnSeries.addOppositeEquiv x)).leadingCoeff = AddOpposite.unop x.leadingCoeff


/-- **Fubini's Theorem** for set integrals. -/
theorem setIntegral_prod (f : α × β → E) {s : Set α} {t : Set β}
    (hf : IntegrableOn f (s ×ˢ t) (μ.prod ν)) :
    ∫ z in s ×ˢ t, f z ∂μ.prod ν = ∫ x in s, ∫ y in t, f (x, y) ∂ν ∂μ

(hf : MeasureTheory.IntegrableOn f (s ×ˢ t) (μ.prod ν))

∫ (z : α × β) in s ×ˢ t, f z ∂μ.prod ν = ∫ (x : α) in s, ∫ (y : β) in t, f (x, y) ∂ν ∂μ


@[simp] lemma inter_eq_right : s ∩ t = t ↔ t ⊆ s


theorem conformalAt_id (x : X) : ConformalAt _root_.id x

{X : Type u_1}
[NormedAddCommGroup X]
[NormedSpace ℝ X]
(x : X)


@[to_additive]
lemma smul_iterate_apply [MulAction G H] {b : H} : (a • ·)^[n] b = a ^ n • b

{G : Type u_3}
{H : Type u_4}
[Monoid G]
(a : G)
(n : ℕ)
[MulAction G H]
{b : H}


@[simp] theorem not_decide_eq_true [h : Decidable p] : ((!decide p) = true) = ¬ p


theorem tendsto_atBot_principal [Nonempty β] [SemilatticeInf β] {f : β → α} {s : Set α} :
    Tendsto f atBot (𝓟 s) ↔ ∃ N, ∀ n ≤ N, f n ∈ s

{α : Type u_3}
{β : Type u_4}
[Nonempty β]
[SemilatticeInf β]
{f : β → α}
{s : Set α}

Filter.Tendsto f Filter.atBot (𝓟 s) ↔ ∃ N, ∀ n ≤ N, f n ∈ s


protected lemma refl (hr : ∀ a : α, r₁₁ a a) :
    BiTotal r₁₁

{α : Type u_5}
{r₁₁ : α → α → Prop}
(hr : ∀ (a : α), r₁₁ a a)


/-- Let `g : γ → β` be an injective function and `f : β → α` be a function from the codomain of `g`
to a commutative monoid. Suppose that `f x = 1` outside of the range of `g`. Then the filters
`atTop.map (fun s ↦ ∏ i ∈ s, f (g i))` and `atTop.map (fun s ↦ ∏ i ∈ s, f i)` coincide.

The additive version of this lemma is used to prove the equality `∑' x, f (g x) = ∑' y, f y` under
the same assumptions. -/
@[to_additive]
theorem Function.Injective.map_atTop_finset_prod_eq [CommMonoid α] {g : γ → β}
    (hg : Function.Injective g) {f : β → α} (hf : ∀ x, x ∉ Set.range g → f x = 1) :
    map (fun s => ∏ i ∈ s, f (g i)) atTop = map (fun s => ∏ i ∈ s, f i) atTop

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[CommMonoid α]
{g : γ → β}
(hg : Function.Injective g)
{f : β → α}
(hf : ∀ x ∉ Set.range g, f x = 1)

Filter.map (fun s => ∏ i ∈ s, f (g i)) Filter.atTop = Filter.map (fun s => ∏ i ∈ s, f i) Filter.atTop


@[simp, reassoc]
theorem inv_naturality {U V : (Opens X)ᵒᵖ} (i : U ⟶ V) :
    X.presheaf.map i ≫ H.invApp (unop V) =
      invApp f (unop U) ≫ Y.presheaf.map (opensFunctor f |>.op.map i)

{X Y : AlgebraicGeometry.PresheafedSpace C}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

X.presheaf.map i ≫ AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.invApp f (Opposite.unop V) =
  AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.invApp f (Opposite.unop U) ≫
    Y.presheaf.map ((AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.opensFunctor f).op.map i)


/-- If `E` is a strictly convex normed space and `f : α → E` is a function such that `‖f x‖ ≤ C`
a.e. on a set `t` of finite measure, then either this function is a.e. equal to its average value on
`t`, or the norm of its integral over `t` is strictly less than `(μ t).toReal * C`. -/
theorem ae_eq_const_or_norm_setIntegral_lt_of_norm_le_const [StrictConvexSpace ℝ E] (ht : μ t ≠ ∞)
    (h_le : ∀ᵐ x ∂μ.restrict t, ‖f x‖ ≤ C) :
    f =ᵐ[μ.restrict t] const α (⨍ x in t, f x ∂μ) ∨ ‖∫ x in t, f x ∂μ‖ < (μ t).toReal * C

(h_le : ∀ᵐ (x : α) ∂μ.restrict t, ‖f x‖ ≤ C)

f =ᵐ[μ.restrict t] Function.const α (⨍ (x : α) in t, f x ∂μ) ∨ ‖∫ (x : α) in t, f x ∂μ‖ < (μ t).toReal * C


@[simp]
theorem comp_right_eq_zero [IsIso g] : f ≫ g = 0 ↔ f = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{P Q R : C}
(f : P ⟶ Q)
(g : Q ⟶ R)
[CategoryTheory.IsIso g]


theorem LieAlgebra.non_trivial_center_of_isNilpotent [Nontrivial L] [IsNilpotent R L] :
    Nontrivial <| center R L

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[Nontrivial L]
[LieAlgebra.IsNilpotent R L]


@[to_additive (attr := simp)]
theorem one_le_mul_self_iff : 1 ≤ a * a ↔ 1 ≤ a

{α : Type u_1}
[LinearOrderedAddCommMonoid α]
{a : α}


theorem Balanced.dual : ∀ {t : Ordnode α}, Balanced t → Balanced (dual t)


theorem supported_iInter {ι : Type*} (s : ι → Set α) :
    supported M R (⋂ i, s i) = ⨅ i, supported M R (s i)

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

Finsupp.supported M R (⋂ i, s i) = ⨅ i, Finsupp.supported M R (s i)


protected theorem CompactT2.projective_iff_extremallyDisconnected [CompactSpace A] [T2Space A] :
    Projective A ↔ ExtremallyDisconnected A

{A : Type u}
[TopologicalSpace A]
[CompactSpace A]
[T2Space A]

CompactT2.Projective A ↔ ExtremallyDisconnected A


theorem strictAntiOn_arccos : StrictAntiOn arccos (Icc (-1) 1)

StrictAntiOn Real.arccos (Set.Icc (-1) 1)


@[local instance] lemma subtype_isMaximal_finite : Finite {I : Ideal R | I.IsMaximal}

(R : Type u_1)
[CommRing R]
[IsArtinianRing R]


@[simp]
theorem cos_two_pi : cos (2 * π) = 1


lemma shortExact_iff_unop (S : ShortComplex Cᵒᵖ) : S.ShortExact ↔ S.unop.ShortExact


theorem image_diag_union_image_offDiag :
    s.diag.image Sym2.mk ∪ s.offDiag.image Sym2.mk = s.sym2

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

Finset.image Sym2.mk s.diag ∪ Finset.image Sym2.mk s.offDiag = s.sym2


protected theorem Antiperiodic.eq [AddZeroClass α] [Neg β] (h : Antiperiodic f c) : f c = -f 0

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddZeroClass α]
[Neg β]
(h : Function.Antiperiodic f c)


theorem lowerSemicontinuousWithinAt_tsum {f : ι → α → ℝ≥0∞}
    (h : ∀ i, LowerSemicontinuousWithinAt (f i) s x) :
    LowerSemicontinuousWithinAt (fun x' => ∑' i, f i x') s x

{f : ι → α → ℝ≥0∞}

(h : ∀ (i : ι), LowerSemicontinuousWithinAt (f i) s x)

LowerSemicontinuousWithinAt (fun x' => ∑' (i : ι), f i x') s x


/-- A dependent version of `affineSpan_induction`. -/
@[elab_as_elim]
theorem affineSpan_induction' {s : Set P} {p : ∀ x, x ∈ affineSpan k s → Prop}
    (mem : ∀ (y) (hys : y ∈ s), p y (subset_affineSpan k _ hys))
    (smul_vsub_vadd :
      ∀ (c : k) (u hu v hv w hw),
        p u hu →
          p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) (AffineSubspace.smul_vsub_vadd_mem _ _ hu hv hw))
    {x : P} (h : x ∈ affineSpan k s) : p x h

{p : (x : P) → x ∈ affineSpan k s → Prop}

(smul_vsub_vadd :
  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),
    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) ⋯)


/-- If `f` and `g` are isomorphic arrows, then a mono factorisation of `f`
gives a mono factorisation of `g` -/
@[simps]
def ofArrowIso {f g : Arrow C} (F : MonoFactorisation f.hom) (sq : f ⟶ g) [IsIso sq] :
    MonoFactorisation g.hom

(F : CategoryTheory.Limits.MonoFactorisation f.hom)


@[simp]
theorem Equiv.Perm.decomposeFin_symm_of_one {n : ℕ} (p : Fin (n + 1)) :
    Equiv.Perm.decomposeFin.symm (p, 1) = swap 0 p

Equiv.Perm.decomposeFin.symm (p, 1) = Equiv.swap 0 p


protected theorem add_lt_add {a b c d : Int} (h₁ : a < b) (h₂ : c < d) : a + c < b + d


theorem div_le_div_right₀ (hc : c ≠ 0) : a / c ≤ b / c ↔ a ≤ b

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a b c : α}
(hc : c ≠ 0)


theorem nndist_set_exists : ∃ C, ∀ x : α, nndist (f x) (g x) ≤ C

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
{f g : BoundedContinuousFunction α β}


theorem frobenius_zero : frobenius R p 0 = 0

(R : Type u)
[CommSemiring R]
(p : ℕ)
[ExpChar R p]


@[simp]
theorem toFinsupp_smul [Monoid R] [AddMonoid M] [DistribMulAction R M] [∀ m : M, Decidable (m ≠ 0)]
    (r : R) (f : Π₀ _ : ι, M) : (toFinsupp (r • f) : ι →₀ M) = r • toFinsupp f

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
[DecidableEq ι]
[Monoid R]
[AddMonoid M]
[DistribMulAction R M]
[(m : M) → Decidable (m ≠ 0)]
(r : R)
(f : Π₀ (x : ι), M)


@[simp]
theorem map_inf : (m₁ ⊓ m₂).map f = m₁.map f ⊓ m₂.map f

{α : Type u_1}
{β : Type u_2}
{m₁ m₂ : MeasurableSpace α}
{f : α → β}

MeasurableSpace.map f (m₁ ⊓ m₂) = MeasurableSpace.map f m₁ ⊓ MeasurableSpace.map f m₂


theorem natDegree_C_mul_le (a : R) (f : R[X]) : (C a * f).natDegree ≤ f.natDegree

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

(Polynomial.C a * f).natDegree ≤ f.natDegree


@[simp]
theorem polyEquivTensor_apply (p : A[X]) :
    polyEquivTensor R A p =
      p.eval₂ (includeLeft : A →ₐ[R] A ⊗[R] R[X]) ((1 : A) ⊗ₜ[R] (X : R[X]))

(R : Type u_1)
(A : Type u_2)
[CommSemiring R]
[Semiring A]
[Algebra R A]
(p : A[X])

(polyEquivTensor R A) p = Polynomial.eval₂ (↑Algebra.TensorProduct.includeLeft) (1 ⊗ₜ[R] Polynomial.X) p


@[simp]
theorem wbtw_vsub_const_iff {x y z : P} (p : P) :
    Wbtw R (x -ᵥ p) (y -ᵥ p) (z -ᵥ p) ↔ Wbtw R x y z

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


@[simp]
theorem coe_toSpanNonzeroSingleton_symm {x : E} (h : x ≠ 0) :
    ⇑(toSpanNonzeroSingleton 𝕜 x h).symm = coord 𝕜 x h

(𝕜 : Type u_1)
{E : Type u_2}
[NormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
(h : x ≠ 0)

⇑(ContinuousLinearEquiv.toSpanNonzeroSingleton 𝕜 x h).symm = ⇑(ContinuousLinearEquiv.coord 𝕜 x h)


@[to_additive]
theorem div_def [Div β] (x y : α) :
    letI := Equiv.div e
    x / y = e.symm (e x / e y)

{α : Type u}
{β : Type v}
(e : α ≃ β)
[Sub β]
(x y : α)


theorem restrict_surjective [Fact (p.Splits (algebraMap F E))] [Normal F E] :
    Function.Surjective (restrict p E)

[Fact (Polynomial.Splits (algebraMap F E) p)]

Function.Surjective ⇑(Polynomial.Gal.restrict p E)


/-- This holds for all integral domains (see `Matrix.exists_mulVec_eq_zero_iff`),
not just fields, but it's easier to prove it for the field of fractions first. -/
theorem exists_mulVec_eq_zero_iff_aux {K : Type*} [DecidableEq n] [Field K] {M : Matrix n n K} :
    (∃ v ≠ 0, M *ᵥ v = 0) ↔ M.det = 0

{n : Type u_1}
[Fintype n]
{K : Type u_4}
[DecidableEq n]
[Field K]
{M : Matrix n n K}

(∃ v, v ≠ 0 ∧ M.mulVec v = 0) ↔ M.det = 0


theorem inv_le_one_iff : a⁻¹ ≤ 1 ↔ a ≤ 0 ∨ 1 ≤ a

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

a⁻¹ ≤ 1 ↔ a ≤ 0 ∨ 1 ≤ a


@[simp]
theorem _root_.IntervalIntegrable.log (hf : ContinuousOn f [[a, b]])
    (h : ∀ x : ℝ, x ∈ [[a, b]] → f x ≠ 0) :
    IntervalIntegrable (fun x => log (f x)) μ a b

IntervalIntegrable (fun x => Real.log (f x)) μ a b


/-- Group homomorphisms preserve inverse. -/
@[to_additive "Additive group homomorphisms preserve negation."]
protected theorem map_inv [Group α] [DivisionMonoid β] (f : α →* β) (a : α) : f a⁻¹ = (f a)⁻¹

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[SubtractionMonoid β]
(f : α →+ β)
(a : α)


@[simp]
theorem continuousMapOfUnique_symm_apply [Unique X] (f : C(X, Y)) :
    continuousMapOfUnique.symm f = f default

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[Unique X]
(f : C(X, Y))

Homeomorph.continuousMapOfUnique.symm f = f default


theorem subsingleton_quotient_iff_eq_top : Subsingleton (M ⧸ p) ↔ p = ⊤

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
{p : Submodule R M}


/-- Whisker a bicone with an equivalence between the indexing types. -/
@[simps]
def whisker {f : J → C} (c : Bicone f) (g : K ≃ J) : Bicone (f ∘ g)


@[simp]
theorem comp_neg (f : M →ₛₗ[σ₁₂] N₂) (g : N₂ →ₛₗ[σ₂₃] N₃) : g.comp (-f) = -g.comp f

{R₁ : Type u_2}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M : Type u_9}
{N₂ : Type u_14}
{N₃ : Type u_15}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M]
[AddCommGroup N₂]
[AddCommGroup N₃]
[Module R₁ M]
[Module R₂ N₂]
[Module R₃ N₃]
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
(f : M →ₛₗ[σ₁₂] N₂)
(g : N₂ →ₛₗ[σ₂₃] N₃)


theorem IsLittleO.const_mul_right' {g : α → R} {c : R} (hc : IsUnit c) (h : f =o[l] g) :
    f =o[l] fun x => c * g x

{α : Type u_1}
{E : Type u_3}
{R : Type u_13}
[Norm E]
[SeminormedRing R]
{f : α → E}
{l : Filter α}
{g : α → R}
{c : R}
(hc : IsUnit c)
(h : f =o[l] g)


/-- The coequalizer of `(f, g)`, where `f = g`, is an isomorphism. -/
theorem coequalizer.π_of_eq [HasCoequalizer f g] (h : f = g) : IsIso (coequalizer.π f g)

CategoryTheory.IsIso (CategoryTheory.Limits.coequalizer.π f g)


theorem size_filter_le (p : α → Bool) (l : Array α) :
    (l.filter p).size ≤ l.size

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


theorem zero_form_isBoundedAtImInfty {α : Type*} [NormedField α] :
    IsBoundedAtImInfty (0 : ℍ → α)


theorem WithBot.range_eq {α β} (f : WithBot α → β) :
    range f = insert (f ⊥) (range (f ∘ WithBot.some : α → β))

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

Set.range f = insert (f ⊥) (Set.range (f ∘ WithBot.some))


/-- See also `Monotone.map_bddBelow`. -/
protected theorem BddBelow.image2 (h₀ : ∀ b, Monotone (swap f b)) (h₁ : ∀ a, Monotone (f a)) :
    BddBelow s → BddBelow t → BddBelow (image2 f s t)

{f : α → β → γ}

(h₀ : ∀ (b : β), Monotone (Function.swap f b))

BddBelow s → BddBelow t → BddBelow (Set.image2 f s t)


/-- The terms of the formal multilinear series `p.changeOrigin` are continuously polynomial
as we vary the origin -/
theorem cPolynomialAt_changeOrigin_of_finite (p : FormalMultilinearSeries 𝕜 E F)
    {n : ℕ} (hn : ∀ (m : ℕ), n ≤ m → p m = 0) (k : ℕ) :
    CPolynomialAt 𝕜 (p.changeOrigin · k) 0

{𝕜 : 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)
(k : ℕ)

CPolynomialAt 𝕜 (fun x => p.changeOrigin x k) 0


theorem proj_of_mem {t : ℝ} (ht : t ∈ Icc v.tMin v.tMax) : ↑(v.proj t) = t

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(v : PicardLindelof E)
{t : ℝ}
(ht : t ∈ Set.Icc v.tMin v.tMax)


theorem reindexGroupEquiv_symm_apply_simple (i : B) :
    (M.reindexGroupEquiv e).symm (M.simple i) = (M.reindex e).simple (e i)

{B : Type u_1}
{B' : Type u_2}
(M : CoxeterMatrix B)
(e : B ≃ B')
(i : B)

(M.reindexGroupEquiv e).symm (M.simple i) = (CoxeterMatrix.reindex e M).simple (e i)


/-- Given a measure space with an action of a finite group `G`, the measure of any `G`-invariant set
is determined by the measure of its intersection with a fundamental domain for the action of `G`. -/
@[to_additive measure_eq_card_smul_of_vadd_ae_eq_self "Given a measure space with an action of a
  finite additive group `G`, the measure of any `G`-invariant set is determined by the measure of
  its intersection with a fundamental domain for the action of `G`."]
theorem measure_eq_card_smul_of_smul_ae_eq_self [Finite G] (h : IsFundamentalDomain G s μ)
    (t : Set α) (ht : ∀ g : G, (g • t : Set α) =ᵐ[μ] t) : μ t = Nat.card G • μ (t ∩ s)

[MeasureTheory.VAddInvariantMeasure G α μ]

(h : MeasureTheory.IsAddFundamentalDomain G s μ)


theorem differentiableAt_rpow_of_ne (p : ℝ × ℝ) (hp : p.1 ≠ 0) :
    DifferentiableAt ℝ (fun p : ℝ × ℝ => p.1 ^ p.2) p

DifferentiableAt ℝ (fun p => p.1 ^ p.2) p


theorem iUnion_univ_pi {ι : α → Type*} (t : (a : α) → ι a → Set (π a)) :
    ⋃ x : (a : α) → ι a, pi univ (fun a => t a (x a)) = pi univ fun a => ⋃ j : ι a, t a j

{α : Type u_1}
{π : α → Type u_11}
{ι : α → Type u_12}
(t : (a : α) → ι a → Set (π a))

(⋃ x, Set.univ.pi fun a => t a (x a)) = Set.univ.pi fun a => ⋃ j, t a j


@[simp, norm_cast]
theorem coe_eq_singleton {l : List α} {a : α} : (l : Multiset α) = {a} ↔ l = [a]


@[simp] theorem getElem_map (f : α → β) {l} {n : Nat} {h : n < (map f l).length} :
    (map f l)[n] = f (l[n]'(length_map l f ▸ h))

{α : Type u_1}
{β : Type u_2}
(f : α → β)
{l : List α}
{n : Nat}
{h : n < (List.map f l).length}


theorem SameCycle.mem_support_iff {f} [DecidableEq α] [Fintype α] (h : SameCycle f x y) :
    x ∈ support f ↔ y ∈ support f

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


/-- The function `fun x ↦ x⁻¹` is not integrable on any interval `[a, +∞)`. -/
theorem not_IntegrableOn_Ici_inv {a : ℝ} :
    ¬ IntegrableOn (fun x => x⁻¹) (Ici a)

¬MeasureTheory.IntegrableOn (fun x => x⁻¹) (Set.Ici a) MeasureTheory.volume


theorem coe_sort_false : (false : Prop) = False


@[simp]
theorem ceil_intCast {α : Type*} [LinearOrderedRing α] [FloorSemiring α] (z : ℤ) :
    ⌈(z : α)⌉₊ = z.toNat

{α : Type u_4}
[LinearOrderedRing α]
[FloorSemiring α]
(z : ℤ)


@[simp]
theorem map_iSup {ι : Sort*} (N : ι → LieSubmodule R L M) :
    (⨆ i, N i).map f = ⨆ i, (N i).map f

{R : Type u}
{L : Type v}
{M : Type w}
{M' : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[AddCommGroup M']
[Module R M']
[LieRingModule L M']
{f : M →ₗ⁅R,L⁆ M'}
{ι : Sort u_1}
(N : ι → LieSubmodule R L M)

LieSubmodule.map f (⨆ i, N i) = ⨆ i, LieSubmodule.map f (N i)


theorem restrict_union_le (s s' : Set α) : μ.restrict (s ∪ s') ≤ μ.restrict s + μ.restrict s'

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s s' : Set α)


/-- If `f₁` and `f₂` are ring homs out of the polynomial ring and `p₁` and `p₂` are polynomials,
  then `f₁ p₁ = f₂ p₂` if `p₁ = p₂` and `f₁` and `f₂` are equal on `R` and on the variables
  of `p₁`.  -/
theorem hom_congr_vars {f₁ f₂ : MvPolynomial σ R →+* S} {p₁ p₂ : MvPolynomial σ R}
    (hC : f₁.comp C = f₂.comp C) (hv : ∀ i, i ∈ p₁.vars → i ∈ p₂.vars → f₁ (X i) = f₂ (X i))
    (hp : p₁ = p₂) : f₁ p₁ = f₂ p₂

(hC : f₁.comp MvPolynomial.C = f₂.comp MvPolynomial.C)

(hv : ∀ i ∈ p₁.vars, i ∈ p₂.vars → f₁ (MvPolynomial.X i) = f₂ (MvPolynomial.X i))


theorem raised_iff {n m} : Raised n m ↔ n ≤ m ∧ m ≤ n + 1


/-- There exists a non-null vector with respect to any quadratic form `Q` whose associated
bilinear form is non-zero, i.e. there exists `x` such that `Q x ≠ 0`. -/
theorem exists_quadraticForm_ne_zero {Q : QuadraticForm R M}
    -- Porting note: added implicit argument
    (hB₁ : associated' (R := R) Q ≠ 0) :
    ∃ x, Q x ≠ 0

{R : Type u_3}
{M : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[Invertible 2]
{Q : QuadraticForm R M}
(hB₁ : QuadraticMap.associated' Q ≠ 0)


@[simp]
theorem equivOfEq_symm (S T : Subalgebra R A) (h : S = T) :
    (equivOfEq S T h).symm = equivOfEq T S h.symm

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S T : Subalgebra R A)
(h : S = T)

(S.equivOfEq T h).symm = T.equivOfEq S ⋯


@[to_additive (attr := simp)]
theorem map_one_eq_bot : K.map (1 : G →* N) = ⊥

{G : Type u_1}
[Group G]
(K : Subgroup G)
{N : Type u_5}
[Group N]


@[simp]
theorem sumCongr_mul {α β : Type*} (e : Perm α) (f : Perm β) (g : Perm α) (h : Perm β) :
    sumCongr e f * sumCongr g h = sumCongr (e * g) (f * h)

{α : Type u_1}
{β : Type u_2}
(e : Equiv.Perm α)
(f : Equiv.Perm β)
(g : Equiv.Perm α)
(h : Equiv.Perm β)

e.sumCongr f * g.sumCongr h = (e * g).sumCongr (f * h)


/-- A pair of an `Order.Ideal` and an `Order.PFilter` which form a partition of `P`.
-/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure PrimePair (P : Type*) [Preorder P] where
  I : Ideal P
  F : PFilter P
  isCompl_I_F : IsCompl (I : Set P) F

{P : Type u_2}
[Preorder P]
(self : Order.Ideal.PrimePair P)


@[simp]
lemma fiberBinaryProductEquiv_symm_snd_apply {X Y : C} (x : F.obj X) (y : F.obj Y) :
    F.map prod.snd ((fiberBinaryProductEquiv F X Y).symm (x, y)) = y

(F : CategoryTheory.Functor C FintypeCat)

F.map CategoryTheory.Limits.prod.snd ((CategoryTheory.PreGaloisCategory.fiberBinaryProductEquiv F X Y).symm (x, y)) = y


@[to_additive]
theorem finprod_mem_def (s : Set α) (f : α → M) : ∏ᶠ a ∈ s, f a = ∏ᶠ a, mulIndicator s f a

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

∏ᶠ (a : α) (_ : a ∈ s), f a = ∏ᶠ (a : α), s.mulIndicator f a


nonrec lemma Iic_injective : Injective (Iic : α → LowerSet α)


@[simp]
theorem derivCLM_apply (f : 𝓢(ℝ, F)) (x : ℝ) : derivCLM 𝕜 f x = deriv f x

(𝕜 : Type u_1)
{F : Type u_5}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[RCLike 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(f : SchwartzMap ℝ F)
(x : ℝ)

((SchwartzMap.derivCLM 𝕜) f) x = deriv (⇑f) x


/-- If a function `f` tends to infinity along a filter,
then `f` divided by a negative constant tends to negative infinity. -/
lemma Tendsto.atTop_div_const_of_neg (hr : r < 0) (hf : Tendsto f l atTop) :
    Tendsto (fun x ↦ f x / r) l atBot

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
(hr : r < 0)
(hf : Filter.Tendsto f l Filter.atTop)

Filter.Tendsto (fun x => f x / r) l Filter.atBot


nonrec lemma StrongConvexOn.strictConvexOn (hf : StrongConvexOn s m f) (hm : 0 < m) :
    StrictConvexOn ℝ s f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{s : Set E}
{f : E → ℝ}
{m : ℝ}
(hf : StrongConvexOn s m f)
(hm : 0 < m)


@[simp]
theorem DifferentiableAt.arctan (hc : DifferentiableAt ℝ f x) :
    DifferentiableAt ℝ (fun x => arctan (f x)) x

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

DifferentiableAt ℝ (fun x => Real.arctan (f x)) x


theorem equiv : Equivalence (@Homotopic N X _ x)

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}


/-- The equivalence of categories between `(A ⥤ B) × (A ⥤ C)` and `A ⥤ (B × C)` -/
@[simps]
def functorProdFunctorEquiv : (A ⥤ B) × (A ⥤ C) ≌ A ⥤ B × C

(A : Type u₁)
[CategoryTheory.Category.{v₁, u₁} A]
(B : Type u₂)
[CategoryTheory.Category.{v₂, u₂} B]
(C : Type u₃)
[CategoryTheory.Category.{v₃, u₃} C]

(CategoryTheory.functorProdFunctorEquiv A B C).unitIso = CategoryTheory.functorProdFunctorEquivUnitIso A B C


@[simp]
theorem frobenius_nnnorm_row (v : m → α) : ‖row ι v‖₊ = ‖(WithLp.equiv 2 _).symm v‖₊

{m : Type u_3}
{α : Type u_5}
{ι : Type u_7}
[Fintype m]
[Unique ι]
[SeminormedAddCommGroup α]
(v : m → α)

‖Matrix.row ι v‖₊ = ‖(WithLp.equiv 2 (m → α)).symm v‖₊


theorem and_left_comm : a ∧ b ∧ c ↔ b ∧ a ∧ c


@[simp]
theorem aequiv_aequiv {U : Type*} [CommRing U] [Algebra R U] (h : IsAdjoinRoot S f)
    (h' : IsAdjoinRoot T f) (h'' : IsAdjoinRoot U f) (x) :
    (h'.aequiv h'') (h.aequiv h' x) = h.aequiv h'' x

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{f : R[X]}
{T : Type u_1}
[CommRing T]
[Algebra R T]
{U : Type u_2}
[CommRing U]
[Algebra R U]
(h : IsAdjoinRoot S f)
(h' : IsAdjoinRoot T f)
(h'' : IsAdjoinRoot U f)
(x : S)

(h'.aequiv h'') ((h.aequiv h') x) = (h.aequiv h'') x


protected theorem ext_iff  {f g : X →ₑ[φ] Y} :
    f = g ↔ ∀ x, f x = g x

{M : Type u_2}
{N : Type u_3}
{φ : M → N}
{X : Type u_5}
[SMul M X]
{Y : Type u_6}
[SMul N Y]
{f g : X →ₑ[φ] Y}


lemma StrictMono.mapsTo_Ioc (h : StrictMono f) : MapsTo f (Ioc a b) (Ioc (f a) (f b))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[PartialOrder α]
[Preorder β]
{a b : α}
(h : StrictMono f)

Set.MapsTo f (Set.Ioc a b) (Set.Ioc (f a) (f b))


@[simp]
theorem upperClosure_image (f : α ≃o β) :
    upperClosure (f '' s) = UpperSet.map f (upperClosure s)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{s : Set α}
(f : α ≃o β)

upperClosure (⇑f '' s) = (UpperSet.map f) (upperClosure s)


@[trans]
protected theorem trans (h1 : μ₁ ≪ μ₂) (h2 : μ₂ ≪ μ₃) : μ₁ ≪ μ₃

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ₁ μ₂ μ₃ : MeasureTheory.Measure α}
(h1 : μ₁.AbsolutelyContinuous μ₂)
(h2 : μ₂.AbsolutelyContinuous μ₃)


theorem stepAux_move (d : Dir) (q : Stmt'₁) (v : σ) (T : Tape Bool) :
    stepAux (moveₙ d q) v T = stepAux q v ((Tape.move d)^[n] T)

(q : Turing.TM1.Stmt Bool Turing.TM1to1.Λ' σ)

Turing.TM1.stepAux (Turing.TM1to1.move d q) v T = Turing.TM1.stepAux q v ((Turing.Tape.move d)^[n] T)


lemma ext (F : Sheaf J A) {c : Cone F.1} (hc : IsLimit c) {X : A} {f g : X ⟶ c.pt}
    (h : ∀ (i : I), f ≫ c.π.app (Opposite.op (Y i)) =
      g ≫ c.π.app (Opposite.op (Y i))) :
    f = g

{J : CategoryTheory.GrothendieckTopology C}

(h :
  ∀ (i : I),
    CategoryTheory.CategoryStruct.comp f (c.π.app (Opposite.op (Y i))) =
      CategoryTheory.CategoryStruct.comp g (c.π.app (Opposite.op (Y i))))


/-- A ring `R` satisfies the Orzech property, if for any finitely generated `R`-module `M`,
any surjective homomorphism `f : N → M` from a submodule `N` of `M` to `M` is injective.

NOTE: In the definition we need to assume that `M` has the same universe level as `R`, but it
in fact implies the universe polymorphic versions
`OrzechProperty.injective_of_surjective_of_injective`
and `OrzechProperty.injective_of_surjective_of_submodule`. -/
@[mk_iff]
class OrzechProperty : Prop where
  injective_of_surjective_of_submodule' : ∀ {M : Type u} [AddCommMonoid M] [Module R M]
    [Module.Finite R M] {N : Submodule R M} (f : N →ₗ[R] M), Surjective f → Injective f

{R : Type u}
[Semiring R]
[self : OrzechProperty R]
{M : Type u}
[AddCommMonoid M]
[Module R M]
[Module.Finite R M]
{N : Submodule R M}
(f : ↥N →ₗ[R] M)

Function.Surjective ⇑f → Function.Injective ⇑f


lemma hasLeftResolutions_iff_op : Φ.HasLeftResolutions ↔ Φ.op.HasRightResolutions

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)


theorem toIcoMod_lt_right (a b : α) : toIcoMod hp a b < a + p

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


lemma sq_nonneg [IsRightCancelAdd α]
    [ZeroLEOneClass α] [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (· + ·) (· < ·)]
    (a : α) : 0 ≤ a ^ 2

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


lemma smul_lt_smul [PosSMulStrictMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : b₁ < b₂)
    (h₁ : 0 < a₁) (h₂ : 0 < b₂) : a₁ • b₁ < a₂ • b₂

{α : Type u_1}
{β : Type u_2}
{a₁ a₂ : α}
{b₁ b₂ : β}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero α]
[Zero β]
[PosSMulStrictMono α β]
[SMulPosStrictMono α β]
(ha : a₁ < a₂)
(hb : b₁ < b₂)
(h₁ : 0 < a₁)
(h₂ : 0 < b₂)

a₁ • b₁ < a₂ • b₂


lemma id_comp (C : VariableChange R) : comp id C = C

{R : Type u}
[CommRing R]
(C : WeierstrassCurve.VariableChange R)

WeierstrassCurve.VariableChange.id.comp C = C


theorem rev_addNat (k : Fin n) (m : Nat) : rev (addNat k m) = castAdd m (rev k)


lemma subst_into_smul_upcast {α} [AddCommGroup α]
    (l r tl zl tr t) (prl₁ : l = tl) (prl₂ : ↑tl = zl) (prr : r = tr)
    (prt : @smulg α _ zl tr = t) : smul l r = t

(prt : Mathlib.Tactic.Abel.smulg zl tr = t)


theorem WithSeminorms.hasBasis_zero_ball (hp : WithSeminorms p) :
    (𝓝 (0 : E)).HasBasis
    (fun sr : Finset ι × ℝ => 0 < sr.2) fun sr => (sr.1.sup p).ball 0 sr.2

{𝕜 : Type u_1}
{E : Type u_5}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[Nonempty ι]
[TopologicalSpace E]
{p : SeminormFamily 𝕜 E ι}
(hp : WithSeminorms p)

(𝓝 0).HasBasis (fun sr => 0 < sr.2) fun sr => (sr.1.sup p).ball 0 sr.2


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

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


theorem MeasurePreserving.lintegral_comp_emb {mb : MeasurableSpace β} {ν : Measure β} {g : α → β}
    (hg : MeasurePreserving g μ ν) (hge : MeasurableEmbedding g) (f : β → ℝ≥0∞) :
    ∫⁻ a, f (g a) ∂μ = ∫⁻ b, f b ∂ν

(hg : MeasureTheory.MeasurePreserving g μ ν)

(f : β → ℝ≥0∞)

∫⁻ (a : α), f (g a) ∂μ = ∫⁻ (b : β), f b ∂ν


lemma stableUnderGeneralization_iUnion {ι : Sort*} (S : ι → Set X)
    (H : ∀ i, StableUnderGeneralization (S i)) : StableUnderGeneralization (⋃ i, S i)

(H : ∀ (i : ι), StableUnderGeneralization (S i))


theorem scaleRoots_eval₂_mul {p : S[X]} (f : S →+* R) (r : R) (s : S) :
    eval₂ f (f s * r) (scaleRoots p s) = f s ^ p.natDegree * eval₂ f r p

{R : Type u_1}
{S : Type u_2}
[Semiring S]
[CommSemiring R]
{p : Polynomial S}
(f : S →+* R)
(r : R)
(s : S)

Polynomial.eval₂ f (f s * r) (p.scaleRoots s) = f s ^ p.natDegree * Polynomial.eval₂ f r p


/-- Taking the `unop` of morphisms is a natural isomorphism. -/
@[simps!]
def objOpOp (X : C) : coyoneda.obj (op (op X)) ≅ yoneda.obj X

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

∀ (X_1 : Cᵒᵖ) (a : (CategoryTheory.coyoneda.obj (Opposite.op (Opposite.op X))).obj X_1),
  (CategoryTheory.Coyoneda.objOpOp X).hom.app X_1 a = (CategoryTheory.opEquiv (Opposite.op X) X_1) a


/-- The prod of two morphisms is a morphism. -/
@[simps]
def prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : A →ₙₐ[R] B × C

{R : Type u}
[Monoid R]
{A : Type v}
{B : Type w}
{C : Type w₁}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[NonUnitalNonAssocSemiring C]
[DistribMulAction R B]
[DistribMulAction R C]
(f : A →ₙₐ[R] B)
(g : A →ₙₐ[R] C)
(i : A)


@[simp]
theorem vecMulVec_empty (v : m' → α) (w : Fin 0 → α) : vecMulVec v w = of fun _ => ![]

{α : Type u}
{m' : Type uₘ}
[NonUnitalNonAssocSemiring α]
(v : m' → α)
(w : Fin 0 → α)

Matrix.vecMulVec v w = Matrix.of fun x => ![]


@[simp]
theorem coe_mk {toFun invFun left_inv right_inv map_mul map_add commutes} :
    ⇑(⟨⟨toFun, invFun, left_inv, right_inv⟩, map_mul, map_add, commutes⟩ : A₁ ≃ₐ[R] A₂) = toFun

{left_inv : Function.LeftInverse invFun toFun}

{right_inv : Function.RightInverse invFun toFun}

{map_mul :
  ∀ (x y : A₁),
    { toFun := toFun, invFun := invFun, left_inv := left_inv, right_inv := right_inv }.toFun (x * y) =
      { toFun := toFun, invFun := invFun, left_inv := left_inv, right_inv := right_inv }.toFun x *
        { toFun := toFun, invFun := invFun, left_inv := left_inv, right_inv := right_inv }.toFun y}

{map_add :
  ∀ (x y : A₁),
    { toFun := toFun, invFun := invFun, left_inv := left_inv, right_inv := right_inv }.toFun (x + y) =
      { toFun := toFun, invFun := invFun, left_inv := left_inv, right_inv := right_inv }.toFun x +
        { toFun := toFun, invFun := invFun, left_inv := left_inv, right_inv := right_inv }.toFun y}

{commutes :
  ∀ (r : R),
    { toFun := toFun, invFun := invFun, left_inv := left_inv, right_inv := right_inv }.toFun ((algebraMap R A₁) r) =
      (algebraMap R A₂) r}

⇑{ toFun := toFun, invFun := invFun, left_inv := left_inv, right_inv := right_inv, map_mul' := map_mul,
      map_add' := map_add, commutes' := commutes } =
  toFun


/-- Functor composition induces a functor on truncated cosimplicial objects. -/
@[simps!]
def whiskering {n} (D : Type*) [Category D] : (C ⥤ D) ⥤ Truncated C n ⥤ Truncated D n

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{n : ℕ}
(D : Type u_1)
[CategoryTheory.Category.{u_2, u_1} D]
(H : C ⥤ D)
(F : SimplexCategory.Truncated n ⥤ C)
(X : SimplexCategory.Truncated n)

(((CategoryTheory.CosimplicialObject.Truncated.whiskering C D).obj H).obj F).obj X = H.obj (F.obj X)


lemma AffineIndependent.eq_zero_of_sum_eq_zero (hp : AffineIndependent k p)
    (hw₀ : ∑ i ∈ s, w i = 0) (hw₁ : ∑ i ∈ s, w i • p i = 0) : ∀ i ∈ s, w i = 0

{k : Type u_1}
{V : Type u_2}
[Ring k]
[AddCommGroup V]
[Module k V]
{ι : Type u_4}
{s : Finset ι}
{w : ι → k}
{p : ι → V}
(hp : AffineIndependent k p)
(hw₀ : ∑ i ∈ s, w i = 0)
(hw₁ : ∑ i ∈ s, w i • p i = 0)
(i : ι)


theorem IsHermitian.adjugate [Fintype m] [DecidableEq m] {A : Matrix m m α} (hA : A.IsHermitian) :
    A.adjugate.IsHermitian

{α : Type u_1}
{m : Type u_3}
[CommRing α]
[StarRing α]
[Fintype m]
[DecidableEq m]
{A : Matrix m m α}
(hA : A.IsHermitian)


/-- If `e : S₁ ≅ S₂` is an isomorphism of short complexes and `h₁ : HomologyData S₁`,
this is the homology data for `S₂` deduced from the isomorphism. -/
@[simps!]
noncomputable def ofIso (e : S₁ ≅ S₂) (h : HomologyData S₁)

(CategoryTheory.ShortComplex.HomologyData.ofIso e h).left.π = h.left.π


@[simp] lemma mk_sub_mk (x y : K) (hx hy) : (⟨x, hx⟩ : 𝓞 K) - ⟨y, hy⟩ = ⟨x - y, sub_mem hx hy⟩

{K : Type u_1}
[Field K]
(x y : K)
(hx : x ∈ integralClosure ℤ K)
(hy : y ∈ integralClosure ℤ K)


theorem self_mem_adjoin_singleton (x : A) : x ∈ adjoin R ({x} : Set A)

(R : Type u)
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
(x : A)


@[to_additive]
theorem image_closure [Group H] {f : G → H} (hf : IsGroupHom f) (s : Set G) :
    f '' closure s = closure (f '' s)

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{f : G → H}
(hf : IsGroupHom f)
(s : Set G)

f '' Group.closure s = Group.closure (f '' s)


theorem counit_surjective : Surjective (counit R)


/-- Pythagorean theorem, subtracting vectors, if-and-if vector inner product form using square
roots. -/
theorem norm_sub_eq_sqrt_iff_real_inner_eq_zero {x y : F} :
    ‖x - y‖ = √(‖x‖ * ‖x‖ + ‖y‖ * ‖y‖) ↔ ⟪x, y⟫_ℝ = 0

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


@[simp]
theorem abs_zero : (0 : EReal).abs = 0


/-- If a set `S` generates an additive monoid `M`, then the image of `M` generates, as algebra,
`R[M]`. -/
theorem mvPolynomial_aeval_of_surjective_of_closure [AddCommMonoid M] [CommSemiring R] {S : Set M}
    (hS : closure S = ⊤) :
    Function.Surjective
      (MvPolynomial.aeval fun s : S => of' R M ↑s : MvPolynomial S R → R[M])

{R : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
[CommSemiring R]
{S : Set M}
(hS : AddSubmonoid.closure S = ⊤)

Function.Surjective ⇑(MvPolynomial.aeval fun s => AddMonoidAlgebra.of' R M ↑s)


theorem Ioi_subset_Ici_self : Ioi a ⊆ Ici a


theorem lf_of_le_mk {xl xr xL xR y} : mk xl xr xL xR ≤ y → ∀ i, xL i ⧏ y

{xl xr : Type u_1}
{xL : xl → SetTheory.PGame}
{xR : xr → SetTheory.PGame}
{y : SetTheory.PGame}

SetTheory.PGame.mk xl xr xL xR ≤ y → ∀ (i : xl), (xL i).LF y


theorem Nonempty.snd : (s ×ˢ t).Nonempty → t.Nonempty

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


@[measurability]
protected theorem const_smul {𝕜} [TopologicalSpace 𝕜] [AddMonoid β] [Monoid 𝕜]
    [DistribMulAction 𝕜 β] [ContinuousSMul 𝕜 β] (hf : AEFinStronglyMeasurable f μ) (c : 𝕜) :
    AEFinStronglyMeasurable (c • f) μ

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)

MeasureTheory.AEFinStronglyMeasurable (c • f) μ


@[refl, simp]
protected theorem refl (a : ℤ) : a ≡ a [ZMOD n]


@[simp]
theorem FractionalIdeal.map_canonicalEquiv_mk0 [IsDedekindDomain R] (K' : Type*) [Field K']
    [Algebra R K'] [IsFractionRing R K'] (I : (Ideal R)⁰) :
    Units.map (↑(FractionalIdeal.canonicalEquiv R⁰ K K')) (FractionalIdeal.mk0 K I) =
      FractionalIdeal.mk0 K' I

{R : Type u_1}
(K : Type u_2)
[CommRing R]
[Field K]
[Algebra R K]
[IsFractionRing R K]
[IsDomain R]
[IsDedekindDomain R]
(K' : Type u_4)
[Field K']
[Algebra R K']
[IsFractionRing R K']
(I : ↥(Ideal R)⁰)

(Units.map ↑(FractionalIdeal.canonicalEquiv R⁰ K K')) ((FractionalIdeal.mk0 K) I) = (FractionalIdeal.mk0 K') I


@[simp]
theorem smul_le_self_of_tower {α : Type*} [Semiring α] [Module α R] [Module α M]
    [SMulCommClass α R M] [IsScalarTower α R M] (a : α) (S : Submodule R M) : a • S ≤ S

{R : Type u_2}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α : Type u_4}
[Semiring α]
[Module α R]
[Module α M]
[SMulCommClass α R M]
[IsScalarTower α R M]
(a : α)
(S : Submodule R M)


theorem Filter.HasBasis.equicontinuousAt_iff_left {p : κ → Prop} {s : κ → Set X}
    {F : ι → X → α} {x₀ : X} (hX : (𝓝 x₀).HasBasis p s) :
    EquicontinuousAt F x₀ ↔ ∀ U ∈ 𝓤 α, ∃ k, p k ∧ ∀ x ∈ s k, ∀ i, (F i x₀, F i x) ∈ U

{ι : Type u_1}
{κ : Type u_2}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{p : κ → Prop}
{s : κ → Set X}
{F : ι → X → α}
{x₀ : X}
(hX : (nhds x₀).HasBasis p s)

EquicontinuousAt F x₀ ↔ ∀ U ∈ uniformity α, ∃ k, p k ∧ ∀ x ∈ s k, ∀ (i : ι), (F i x₀, F i x) ∈ U


theorem image_neg_Icc : Neg.neg '' Icc a b = Icc (-b) (-a)

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

Neg.neg '' Set.Icc a b = Set.Icc (-b) (-a)


theorem continuousAt_rpow_of_ne (p : ℝ × ℝ) (hp : p.1 ≠ 0) :
    ContinuousAt (fun p : ℝ × ℝ => p.1 ^ p.2) p


theorem eq_of_inclusion_surjective {s t : Set α} {h : s ⊆ t}
    (h_surj : Function.Surjective (inclusion h)) : s = t

(h_surj : Function.Surjective (Set.inclusion h))


protected theorem map_add [Add α] [Add β] (f : α → β) (hf : ∀ a₁ a₂, f (a₁ + a₂) = f a₁ + f a₂)
    (M N : Matrix m n α) : (M + N).map f = M.map f + N.map f

(hf : ∀ (a₁ a₂ : α), f (a₁ + a₂) = f a₁ + f a₂)


@[simp]
theorem units_coe_mul_self (u : ℤˣ) : (u * u : ℤ) = 1


@[simp]
lemma star_apply [StarRing R'] (χ : MulChar R R') (a : R) : (star χ) a = star (χ a)

{R : Type u_1}
{R' : Type u_2}
[CommRing R]
[CommRing R']
[StarRing R']
(χ : MulChar R R')
(a : R)


theorem nmul_lt_nmul_of_pos_left (h₁ : a < b) (h₂ : 0 < c) : c ⨳ a < c ⨳ b

{a b c : Ordinal.{u}}
(h₁ : a < b)
(h₂ : 0 < c)


theorem IsPrime.prod_mem_iff_exists_mem {I : Ideal R} (hI : I.IsPrime) (s : Finset R) :
    s.prod (fun x ↦ x) ∈ I ↔ ∃ p ∈ s, p ∈ I

{R : Type u}
[CommSemiring R]
{I : Ideal R}
(hI : I.IsPrime)
(s : Finset R)


theorem pNilradical_eq_bot {R : Type*} [CommSemiring R] {p : ℕ} (hp : ¬ 1 < p) :
    pNilradical R p = ⊥

{R : Type u_1}
[CommSemiring R]
{p : ℕ}
(hp : ¬1 < p)


theorem join [FaithfulSMul M X] {P Q : M} (h₁ : IsLprojection X P) (h₂ : IsLprojection X Q) :
    IsLprojection X (P + Q - P * Q)

{X : Type u_1}
[NormedAddCommGroup X]
{M : Type u_2}
[Ring M]
[Module M X]
[FaithfulSMul M X]
{P Q : M}
(h₁ : IsLprojection X P)
(h₂ : IsLprojection X Q)


@[simp, norm_cast]
protected theorem coe_inv (a : { x : α // 0 ≤ x }) : ((a⁻¹ : { x : α // 0 ≤ x }) : α) = (a : α)⁻¹

{α : Type u_1}
[LinearOrderedSemifield α]
(a : { x // 0 ≤ x })

↑a⁻¹ = (↑a)⁻¹


theorem Fintype.univ_unit : @univ Unit _ = {()}


@[to_additive]
theorem mul_iUnion₂ (s : Set α) (t : ∀ i, κ i → Set α) :
    (s * ⋃ (i) (j), t i j) = ⋃ (i) (j), s * t i j

{α : Type u_2}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[Mul α]
(s : Set α)
(t : (i : ι) → κ i → Set α)

s * ⋃ i, ⋃ j, t i j = ⋃ i, ⋃ j, s * t i j


@[simp, mfld_simps]
theorem coe_trans_symm : ((e.trans e').symm : γ → α) = e.symm ∘ e'.symm

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


lemma minpolyDiv_eq_zero (hx : ¬IsIntegral R x) : minpolyDiv R x = 0

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]
{x : S}
(hx : ¬IsIntegral R x)


lemma NonUnitalStarAlgHom.ext_continuousMap [UniqueNonUnitalContinuousFunctionalCalculus R A]
    (a : A) (φ ψ : C(σₙ R a, R)₀ →⋆ₙₐ[R] A) (hφ : Continuous φ) (hψ : Continuous ψ)
    (h : φ ⟨.restrict (σₙ R a) <| .id R, rfl⟩ = ψ ⟨.restrict (σₙ R a) <| .id R, rfl⟩) :
    φ = ψ

(h :
  φ { toContinuousMap := ContinuousMap.restrict (σₙ R a) (ContinuousMap.id R), map_zero' := ⋯ } =
    ψ { toContinuousMap := ContinuousMap.restrict (σₙ R a) (ContinuousMap.id R), map_zero' := ⋯ })


@[simp]
theorem coe_map (S : StarSubalgebra R A) (f : A →⋆ₐ[R] B) : (S.map f : Set B) = f '' S

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[Semiring B]
[StarRing B]
[Algebra R B]
[StarModule R B]
(S : StarSubalgebra R A)
(f : A →⋆ₐ[R] B)


@[to_additive]
protected lemma div_eq_iff (h : IsUnit b) : a / b = c ↔ a = c * b

{α : Type u}
[DivisionMonoid α]
{a b c : α}
(h : IsUnit b)


/-- A measure is defined to be an outer measure that is countably additive on
measurable sets, with the additional assumption that the outer measure is the canonical
extension of the restricted measure. -/
structure Measure (α : Type*) [MeasurableSpace α] extends OuterMeasure α where
  m_iUnion ⦃f : ℕ → Set α⦄ : (∀ i, MeasurableSet (f i)) → Pairwise (Disjoint on f) →
    toOuterMeasure (⋃ i, f i) = ∑' i, toOuterMeasure (f i)
  trim_le : toOuterMeasure.trim ≤ toOuterMeasure

{α : Type u_6}
[MeasurableSpace α]
(self : MeasureTheory.Measure α)
⦃f : ℕ → Set α⦄

(∀ (i : ℕ), MeasurableSet (f i)) →
  Pairwise (Disjoint on f) → self.toOuterMeasure (⋃ i, f i) = ∑' (i : ℕ), self.toOuterMeasure (f i)


lemma map_posFittingComp_le :
    (posFittingComp R L M).map f ≤ posFittingComp R L M₂

{R : Type u_2}
{L : Type u_3}
{M : Type u_4}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{M₂ : Type u_5}
[AddCommGroup M₂]
[Module R M₂]
[LieRingModule L M₂]
[LieModule R L M₂]
(f : M →ₗ⁅R,L⁆ M₂)

LieSubmodule.map f (LieModule.posFittingComp R L M) ≤ LieModule.posFittingComp R L M₂