/-- Continuity of the measure of translates of a compact set:
Given a closed compact set `k` in a topological group,
the measure of `g • k \ k` tends to zero as `g` tends to `1`. -/
@[to_additive]
lemma tendsto_measure_smul_diff_isCompact_isClosed [LocallyCompactSpace G]
    [IsFiniteMeasureOnCompacts μ] [InnerRegularCompactLTTop μ] {k : Set G}
    (hk : IsCompact k) (h'k : IsClosed k) :
    Tendsto (fun g : G ↦ μ (g • k \ k)) (𝓝 1) (𝓝 0)

Filter.Tendsto (fun g => μ (g • k \ k)) (𝓝 1) (𝓝 0)


theorem ext {x y : StateT σ m α} (h : ∀ s, x.run s = y.run s) : x = y

{σ : Type u_1}
{m : Type u_1 → Type u_2}
{α : Type u_1}
{x y : StateT σ m α}
(h : ∀ (s : σ), x.run s = y.run s)


@[to_additive (attr := simp)]
theorem reduce.cons (x) :
    reduce (x :: L) =
      List.casesOn (reduce L) [x] fun hd tl =>
        if x.1 = hd.1 ∧ x.2 = not hd.2 then tl else x :: hd :: tl

{α : Type u}
{L : List (α × Bool)}
[DecidableEq α]
(x : α × Bool)

FreeAddGroup.reduce (x :: L) =
  List.casesOn (FreeAddGroup.reduce L) [x] fun hd tl => if x.1 = hd.1 ∧ x.2 = !hd.2 then tl else x :: hd :: tl


theorem comp_compQuasiMeasurePreserving [MeasurableSpace β] {ν} (g : γ → δ) (hg : Continuous g)
    (f : β →ₘ[ν] γ) {φ : α → β} (hφ : Measure.QuasiMeasurePreserving φ μ ν) :
    (comp g hg f).compQuasiMeasurePreserving φ hφ =
      comp g hg (f.compQuasiMeasurePreserving φ hφ)

(hφ : MeasureTheory.Measure.QuasiMeasurePreserving φ μ ν)

(MeasureTheory.AEEqFun.comp g hg f).compQuasiMeasurePreserving φ hφ =
  MeasureTheory.AEEqFun.comp g hg (f.compQuasiMeasurePreserving φ hφ)


/-- If `m₁ s = op (m₂ s) (m₃ s)` for all `s`, then the same is true for `m₁.trim`, `m₂.trim`,
and `m₃ s`. -/
theorem trim_binop {m₁ m₂ m₃ : OuterMeasure α} {op : ℝ≥0∞ → ℝ≥0∞ → ℝ≥0∞}
    (h : ∀ s, m₁ s = op (m₂ s) (m₃ s)) (s : Set α) : m₁.trim s = op (m₂.trim s) (m₃.trim s)

{m₁ m₂ m₃ : MeasureTheory.OuterMeasure α}

{op : ℝ≥0∞ → ℝ≥0∞ → ℝ≥0∞}

(h : ∀ (s : Set α), m₁ s = op (m₂ s) (m₃ s))


@[to_additive]
theorem IsOpen.smul {s : Set α} (hs : IsOpen s) (c : G) : IsOpen (c • s)

{α : Type u_2}
{G : Type u_4}
[TopologicalSpace α]
[AddGroup G]
[AddAction G α]
[ContinuousConstVAdd G α]
{s : Set α}
(hs : IsOpen s)
(c : G)


@[simp 1100]
theorem stabilizerIsoEnd_symm_apply (f : End _) : (stabilizerIsoEnd M x).symm f = f

(M : Type u_1)
[Monoid M]
{X : Type u}
[MulAction M X]
(x : X)
(f : CategoryTheory.End ⟨(), x⟩)

(CategoryTheory.ActionCategory.stabilizerIsoEnd M x).symm f = f


theorem map_commutatorElement : (f ⁅g₁, g₂⁆ : G') = ⁅f g₁, f g₂⁆

{G : Type u_1}
{G' : Type u_2}
{F : Type u_3}
[Group G]
[Group G']
[FunLike F G G']
[MonoidHomClass F G G']
(f : F)
(g₁ g₂ : G)


/-- The inclusion of each component into the direct sum as morphism of Lie algebras. -/
@[simps]
def lieAlgebraOf [DecidableEq ι] (j : ι) : L j →ₗ⁅R⁆ ⨁ i, L i

(R : Type u)
(ι : Type v)
[CommRing R]
(L : ι → Type w)
[(i : ι) → LieRing (L i)]
[(i : ι) → LieAlgebra R (L i)]
[DecidableEq ι]
(j : ι)
(a : L j)

(DirectSum.lieAlgebraOf R ι L j) a = (DirectSum.of L j) a


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


@[to_additive]
theorem image_div_product : ((s ×ˢ t).image fun x : α × α => x.fst / x.snd) = s / t

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

Finset.image (fun x => x.1 - x.2) (s ×ˢ t) = s - t


/-- This expresses the tail of the coefficient sequence of the `GenContFract.of` an element `v` of
`K` as the coefficient sequence of that of the inverse of the fractional part of `v`.
-/
theorem of_s_tail : (of v).s.tail = (of (fract v)⁻¹).s

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
(v : K)

(GenContFract.of v).s.tail = (GenContFract.of (Int.fract v)⁻¹).s


theorem isAlgClosure_iff (K : Type v) [Field K] [Algebra k K] :
    IsAlgClosure k K ↔ IsAlgClosed K ∧ Algebra.IsAlgebraic k K

(k : Type u)
[Field k]
(K : Type v)
[Field K]
[Algebra k K]


@[to_additive]
theorem BddBelow.mul {s t : Set M} (hs : BddBelow s) (ht : BddBelow t) : BddBelow (s * t)

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

[CovariantClass M M (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1]


theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
    hτ.measurableSpace ≤ hπ.measurableSpace

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
{f : MeasureTheory.Filtration ι m}
{τ π : Ω → ι}
(hτ : MeasureTheory.IsStoppingTime f τ)
(hπ : MeasureTheory.IsStoppingTime f π)
(hle : τ ≤ π)


theorem IsIntegral.of_finite [Module.Finite R B] (x : B) : IsIntegral R x

(R : Type u_1)
{B : Type u_3}
[CommRing R]
[Ring B]
[Algebra R B]
[Module.Finite R B]
(x : B)


lemma one_lt_two_pow' (n : ℕ) : 1 < 2 ^ (n + 1)


theorem Char.ext_iff {x y : Char} : x = y ↔ x.val = y.val


theorem denselyOrdered_iff_forall_not_covBy : DenselyOrdered α ↔ ∀ a b : α, ¬a ⋖ b


@[nolint unusedArguments]
theorem weightedSMul_union (s t : Set α) (_hs : MeasurableSet s) (ht : MeasurableSet t)
    (hs_finite : μ s ≠ ∞) (ht_finite : μ t ≠ ∞) (h_inter : s ∩ t = ∅) :
    (weightedSMul μ (s ∪ t) : F →L[ℝ] F) = weightedSMul μ s + weightedSMul μ t

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s t : Set α)
(_hs : MeasurableSet s)
(ht : MeasurableSet t)
(hs_finite : μ s ≠ ⊤)
(ht_finite : μ t ≠ ⊤)
(h_inter : s ∩ t = ∅)

MeasureTheory.weightedSMul μ (s ∪ t) = MeasureTheory.weightedSMul μ s + MeasureTheory.weightedSMul μ t


protected theorem one_mul (χ : MulChar R R') : (1 : MulChar R R') * χ = χ

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommMonoidWithZero R']
(χ : MulChar R R')


theorem convexHull_inter_convexHull (hs : s ∈ K.faces) (ht : t ∈ K.faces) :
    convexHull 𝕜 ↑s ∩ convexHull 𝕜 ↑t = convexHull 𝕜 (s ∩ t : Set E)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{K : Geometry.SimplicialComplex 𝕜 E}
{s t : Finset E}
(hs : s ∈ K.faces)
(ht : t ∈ K.faces)

(convexHull 𝕜) ↑s ∩ (convexHull 𝕜) ↑t = (convexHull 𝕜) (↑s ∩ ↑t)


/-- `Over.map f` is left adjoint to `Over.pullback f`. -/
@[simps! unit_app counit_app]
def mapPullbackAdj {X Y : C} (f : X ⟶ Y) : Over.map f ⊣ pullback f

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

∀ (X_1 : CategoryTheory.Over X),
  (CategoryTheory.Over.mapPullbackAdj f).unit.app X_1 =
    CategoryTheory.Over.homMk
      (CategoryTheory.Limits.pullback.lift (CategoryTheory.CategoryStruct.id X_1.left) X_1.hom ⋯) ⋯


@[fun_prop]
theorem DifferentiableOn.mul_const (ha : DifferentiableOn 𝕜 a s) (b : 𝔸) :
    DifferentiableOn 𝕜 (fun y => a y * b) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{𝔸 : Type u_6}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{a : E → 𝔸}
(ha : DifferentiableOn 𝕜 a s)
(b : 𝔸)


lemma conjTranspose_mul_self_mul_eq_zero (A : Matrix m n R) (B : Matrix n p R) :
    (Aᴴ * A) * B = 0 ↔ A * B = 0

{m : Type u_1}
{n : Type u_2}
{p : Type u_3}
{R : Type u_4}
[Fintype m]
[Fintype n]
[PartialOrder R]
[NonUnitalRing R]
[StarRing R]
[StarOrderedRing R]
[NoZeroDivisors R]
(A : Matrix m n R)
(B : Matrix n p R)


/-- **Phragmen-Lindelöf principle** in the right half-plane. Let `f : ℂ → E` be a function such that

* `f` is differentiable in the open right half-plane and is continuous on its closure;
* `‖f z‖` is bounded from above by `A * exp(B * (abs z) ^ c)` on the open right half-plane
  for some `c < 2`;
* `‖f z‖` is bounded from above by a constant `C` on the imaginary axis;
* `‖f x‖` is bounded from above by a constant for large real values of `x`.

Then `‖f z‖` is bounded from above by `C` on the closed right half-plane.
See also `PhragmenLindelof.right_half_plane_of_tendsto_zero_on_real` for a weaker version. -/
theorem right_half_plane_of_bounded_on_real (hd : DiffContOnCl ℂ f {z | 0 < z.re})
    (hexp : ∃ c < (2 : ℝ), ∃ B,
      f =O[cobounded ℂ ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * abs z ^ c))
    (hre : IsBoundedUnder (· ≤ ·) atTop fun x : ℝ => ‖f x‖) (him : ∀ x : ℝ, ‖f (x * I)‖ ≤ C)
    (hz : 0 ≤ z.re) : ‖f z‖ ≤ C

(hexp : ∃ c < 2, ∃ B, f =O[Bornology.cobounded ℂ ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * Complex.abs z ^ c))

(hre : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) Filter.atTop fun x => ‖f ↑x‖)

(him : ∀ (x : ℝ), ‖f (↑x * Complex.I)‖ ≤ C)


theorem set_support_apply_mem {p : Perm α} {a : α} :
    p a ∈ { x | p x ≠ x } ↔ a ∈ { x | p x ≠ x }

{α : Type u_1}
{p : Equiv.Perm α}
{a : α}


/-- If two derivations agree on `X i`, `i ∈ s`, then they agree on all polynomials from
`MvPolynomial.supported R s`. -/
theorem derivation_eqOn_supported {D₁ D₂ : Derivation R (MvPolynomial σ R) A} {s : Set σ}
    (h : Set.EqOn (D₁ ∘ X) (D₂ ∘ X) s) {f : MvPolynomial σ R} (hf : f ∈ supported R s) :
    D₁ f = D₂ f

(h : Set.EqOn (⇑D₁ ∘ MvPolynomial.X) (⇑D₂ ∘ MvPolynomial.X) s)


theorem measurable_of_isClosed' {f : δ → γ}
    (hf : ∀ s, IsClosed s → s.Nonempty → s ≠ univ → MeasurableSet (f ⁻¹' s)) : Measurable f

(hf : ∀ (s : Set γ), IsClosed s → s.Nonempty → s ≠ Set.univ → MeasurableSet (f ⁻¹' s))


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

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

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

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

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

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

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

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

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

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

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

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


theorem minimum_of_length_pos_le_getElem {i : ℕ} (w : i < l.length) (h := (Nat.zero_lt_of_lt w)) :
    l.minimum_of_length_pos h ≤ l[i]

{α : Type u_1}
[LinearOrder α]
{l : List α}
{i : ℕ}
(w : i < l.length)
(h : 0 < l.length := ⋯)


@[simp]
theorem compl_range_inl : (range (Sum.inl : α → α ⊕ β))ᶜ = range (Sum.inr : β → α ⊕ β)

(Set.range Sum.inl)ᶜ = Set.range Sum.inr


@[simp]
theorem coe_mul (f g : Poly α) : ⇑(f * g) = f * g


lemma slope_lt_of_hasDerivAt (hfc : StrictConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : HasDerivAt f f' x) :
    slope f x y < f'

{S : Set ℝ}
{f : ℝ → ℝ}
{x y f' : ℝ}
(hfc : StrictConcaveOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hfd : HasDerivAt f f' x)


theorem EqOn.congr_strictMonoOn (h : s.EqOn f₁ f₂) : StrictMonoOn f₁ s ↔ StrictMonoOn f₂ s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f₁ f₂ : α → β}
[Preorder α]
[Preorder β]
(h : Set.EqOn f₁ f₂ s)


@[to_additive normal_iff_eq_addCosets]
theorem normal_iff_eq_cosets : s.Normal ↔ ∀ g : α, g • (s : Set α) = op g • s

{α : Type u_1}
[Group α]
(s : Subgroup α)

s.Normal ↔ ∀ (g : α), g • ↑s = MulOpposite.op g • ↑s


/-- The real exponential function tends to `0` at `-∞` or, equivalently, `exp(-x)` tends to `0`
at `+∞` -/
theorem tendsto_exp_neg_atTop_nhds_zero : Tendsto (fun x => exp (-x)) atTop (𝓝 0)

Filter.Tendsto (fun x => Real.exp (-x)) Filter.atTop (𝓝 0)


@[simp]
theorem coe_eq_coe {l₁ l₂ : List α} : (l₁ : Cycle α) = (l₂ : Cycle α) ↔ l₁ ~r l₂

↑l₁ = ↑l₂ ↔ l₁ ~r l₂


/-- Construct limit data for a product in `AddCommGrp`, using
`AddCommGrp.of (∀ j, F.obj j)`.
-/
@[simps]
def productLimitCone : Limits.LimitCone (Discrete.functor f)

(AddCommGrp.HasLimit.productLimitCone f).cone.pt = AddCommGrp.of ((j : J) → ↑(f j))


/-- The `n`-th coefficient of `f*g` may be calculated
from the truncations of `f` and `g`. -/
theorem coeff_mul_eq_coeff_trunc_mul_trunc₂ {n a b} (f g) (ha : n < a) (hb : n < b) :
    coeff R n (f * g) = coeff R n (trunc a f * trunc b g)

{R : Type u_2}
[CommSemiring R]
{n a b : ℕ}
(f g : PowerSeries R)
(ha : n < a)
(hb : n < b)

(PowerSeries.coeff R n) (f * g) = (PowerSeries.coeff R n) (↑(PowerSeries.trunc a f) * ↑(PowerSeries.trunc b g))


theorem map' {α β} [MeasurableSpace α] [MeasurableSpace β] {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) (f : α ≃ᵐ β) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K)) :
    InnerRegularWRT (map f μ) pb qb

(f : α ≃ᵐ β)

(hAB : ∀ (U : Set β), qb U → qa (⇑f ⁻¹' U))

(hAB' : ∀ (K : Set α), pa K → pb (⇑f '' K))

(MeasureTheory.Measure.map (⇑f) μ).InnerRegularWRT pb qb


/-- This lemma allows the computation of the connecting homomorphism
`D.δ` when `D : SnakeInput C` and `C` is a concrete category. -/
lemma δ_apply (x₃ : D.L₀.X₃) (x₂ : D.L₁.X₂) (x₁ : D.L₂.X₁)
    (h₂ : D.L₁.g x₂ = D.v₀₁.τ₃ x₃) (h₁ : D.L₂.f x₁ = D.v₁₂.τ₂ x₂) :
    D.δ x₃ = D.v₂₃.τ₁ x₁

(D : CategoryTheory.ShortComplex.SnakeInput C)

(x₃ : (CategoryTheory.forget C).obj D.L₀.X₃)

(x₂ : (CategoryTheory.forget C).obj D.L₁.X₂)

(x₁ : (CategoryTheory.forget C).obj D.L₂.X₁)


theorem ContDiff.arsinh (h : ContDiff ℝ n f) : ContDiff ℝ n fun x => arsinh (f x)

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


@[continuity]
lemma continuous_sumCoeffsExp : Continuous (fun (p : ℝ) => ∑ i, a i * (b i) ^ p)

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(R : AkraBazziRecurrence T g a b r)

Continuous fun p => ∑ i : α, a i * b i ^ p


@[simp]
theorem exp_eps : exp 𝕜 (eps : DualNumber R) = 1 + eps

(𝕜 : Type u_1)
{R : Type u_2}
[Field 𝕜]
[CharZero 𝕜]
[CommRing R]
[Algebra 𝕜 R]
[UniformSpace R]
[TopologicalRing R]
[T2Space R]

NormedSpace.exp 𝕜 DualNumber.eps = 1 + DualNumber.eps


theorem coeff_zero_eq_eval_zero (p : R[X]) : coeff p 0 = p.eval 0


@[simp]
theorem sub_apply (f g : ModularForm Γ k) (z : ℍ) : (f - g) z = f z - g z

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(f g : ModularForm Γ k)
(z : ℍ)


theorem IsCycle.isConj_iff (hσ : IsCycle σ) (hτ : IsCycle τ) :
    IsConj σ τ ↔ σ.support.card = τ.support.card

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


@[to_additive]
theorem _root_.measurableEmbedding_mulRight (g : G) : MeasurableEmbedding fun x => x * g

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd G]
(g : G)


/-- **Fundamental theorem of calculus-1**: if `f : ℝ → E` is integrable on `a..b` and `f x` has
finite limits `ca` and `cb` almost surely as `x` tends to `a` and `b`, respectively, then
`(u, v) ↦ ∫ x in u..v, f x` has derivative `(u, v) ↦ v • cb - u • ca` at `(a, b)`. -/
theorem integral_hasFDerivAt_of_tendsto_ae (hf : IntervalIntegrable f volume a b)
    (hmeas_a : StronglyMeasurableAtFilter f (𝓝 a)) (hmeas_b : StronglyMeasurableAtFilter f (𝓝 b))
    (ha : Tendsto f (𝓝 a ⊓ ae volume) (𝓝 ca)) (hb : Tendsto f (𝓝 b ⊓ ae volume) (𝓝 cb)) :
    HasFDerivAt (fun p : ℝ × ℝ => ∫ x in p.1..p.2, f x)
      ((snd ℝ ℝ ℝ).smulRight cb - (fst ℝ ℝ ℝ).smulRight ca) (a, b)

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas_a : StronglyMeasurableAtFilter f (𝓝 a) MeasureTheory.volume)

(hmeas_b : StronglyMeasurableAtFilter f (𝓝 b) MeasureTheory.volume)

(ha : Filter.Tendsto f (𝓝 a ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 ca))

(hb : Filter.Tendsto f (𝓝 b ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 cb))

HasFDerivAt (fun p => ∫ (x : ℝ) in p.1 ..p.2, f x)
  ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight cb - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight ca) (a, b)


/-- Polar form of trivial-square-zero extension. -/
theorem eq_smul_exp_of_invertible (x : tsze R M) [Invertible x.fst] :
    x = x.fst • exp 𝕜 (⅟ x.fst • inr x.snd)

(𝕜 : Type u_1)
{R : Type u_3}
{M : Type u_4}
[Field 𝕜]
[CharZero 𝕜]
[CommRing R]
[AddCommGroup M]
[Algebra 𝕜 R]
[Module 𝕜 M]
[Module R M]
[Module Rᵐᵒᵖ M]
[IsCentralScalar R M]
[IsScalarTower 𝕜 R M]
[TopologicalSpace R]
[TopologicalSpace M]
[TopologicalRing R]
[TopologicalAddGroup M]
[ContinuousSMul R M]
[ContinuousSMul Rᵐᵒᵖ M]
[T2Space R]
[T2Space M]
(x : tsze R M)
[Invertible x.fst]

x = x.fst • NormedSpace.exp 𝕜 (⅟x.fst • TrivSqZeroExt.inr x.snd)


theorem Pullback.continuous_lift (f : B' → B) : Continuous (@Pullback.lift B F E B' f)

[TopologicalSpace (Bundle.TotalSpace F E)]


lemma nhdsWithin_right_sup_nhds_singleton (a : α) :
    𝓝[>] a ⊔ 𝓝[{a}] a = 𝓝[≥] a

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


/-- A refinement of `Perfect.splitting` for metric spaces, where we also control
the diameter of the new perfect sets. -/
theorem Perfect.small_diam_splitting (ε_pos : 0 < ε) :
    ∃ C₀ C₁ : Set α, (Perfect C₀ ∧ C₀.Nonempty ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
    (Perfect C₁ ∧ C₁.Nonempty ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁

{α : Type u_1}
[MetricSpace α]
{C : Set α}
(hC : Perfect C)
{ε : ENNReal}
(hnonempty : C.Nonempty)
(ε_pos : 0 < ε)

∃ C₀ C₁,
  (Perfect C₀ ∧ C₀.Nonempty ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
    (Perfect C₁ ∧ C₁.Nonempty ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁


/-- Adjoins a `⊥` to the domain and codomain of a `LatticeHom`. -/
@[simps]
def withBot' [OrderBot β] (f : LatticeHom α β) : LatticeHom (WithBot α) β

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


/-- Paste two pullback squares "horizontally" to obtain another pullback square.

The objects in the statement fit into the following diagram:
```
X₁₁ - h₁₁ -> X₁₂ - h₁₂ -> X₁₃
|            |            |
v₁₁          v₁₂          v₁₃
↓            ↓            ↓
X₂₁ - h₂₁ -> X₂₂ - h₂₂ -> X₂₃
```
-/
theorem paste_horiz {X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C} {h₁₁ : X₁₁ ⟶ X₁₂} {h₁₂ : X₁₂ ⟶ X₁₃}
    {h₂₁ : X₂₁ ⟶ X₂₂} {h₂₂ : X₂₂ ⟶ X₂₃} {v₁₁ : X₁₁ ⟶ X₂₁} {v₁₂ : X₁₂ ⟶ X₂₂} {v₁₃ : X₁₃ ⟶ X₂₃}
    (s : IsPullback h₁₁ v₁₁ v₁₂ h₂₁) (t : IsPullback h₁₂ v₁₂ v₁₃ h₂₂) :
    IsPullback (h₁₁ ≫ h₁₂) v₁₁ v₁₃ (h₂₁ ≫ h₂₂)

{X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C}

{h₁₁ : X₁₁ ⟶ X₁₂}

{h₁₂ : X₁₂ ⟶ X₁₃}

{h₂₁ : X₂₁ ⟶ X₂₂}

{h₂₂ : X₂₂ ⟶ X₂₃}

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

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

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

(s : CategoryTheory.IsPullback h₁₁ v₁₁ v₁₂ h₂₁)

(t : CategoryTheory.IsPullback h₁₂ v₁₂ v₁₃ h₂₂)

CategoryTheory.IsPullback (h₁₁ ≫ h₁₂) v₁₁ v₁₃ (h₂₁ ≫ h₂₂)


theorem cancel_right_of_respectsIso (P : MorphismProperty C) [hP : RespectsIso P] {X Y Z : C}
    (f : X ⟶ Y) (g : Y ⟶ Z) [IsIso g] : P (f ≫ g) ↔ P f

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


theorem isClosed_setOf_specializes : IsClosed { p : X × X | p.1 ⤳ p.2 }

{X : Type u_1}
[TopologicalSpace X]
[R1Space X]


protected theorem bijOn : BijOn e e.source e.target

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


theorem Filter.EventuallyEq.contMDiffWithinAt_iff (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) :
    ContMDiffWithinAt I I' n f₁ s x ↔ ContMDiffWithinAt I I' n f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f f₁ : M → M'}
{s : Set M}
{x : M}
{n : ℕ∞}
(h₁ : f₁ =ᶠ[𝓝[s] x] f)
(hx : f₁ x = f x)


/-- The Yoneda embedding for preadditive categories sends an object `Y` to the presheaf sending an
object `X` to the `End Y`-module of morphisms `X ⟶ Y`.
-/
@[simps]
def preadditiveYonedaObj (Y : C) : Cᵒᵖ ⥤ ModuleCat.{v} (End Y)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(Y : C)
(X : Cᵒᵖ)

(CategoryTheory.preadditiveYonedaObj Y).obj X = ModuleCat.of (CategoryTheory.End Y) (Opposite.unop X ⟶ Y)


@[simp] theorem false_beq : ∀b, (false == b) = !b


/-- If two points lie in the affine span of two points, those four points are collinear. -/
theorem collinear_insert_insert_of_mem_affineSpan_pair {p₁ p₂ p₃ p₄ : P} (h₁ : p₁ ∈ line[k, p₃, p₄])
    (h₂ : p₂ ∈ line[k, p₃, p₄]) : Collinear k ({p₁, p₂, p₃, p₄} : Set P)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ p₃ p₄ : P}
(h₁ : p₁ ∈ affineSpan k {p₃, p₄})
(h₂ : p₂ ∈ affineSpan k {p₃, p₄})


theorem multiplicity_le : multiplicity E ≤ 5 ^ finrank ℝ E

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]

Besicovitch.multiplicity E ≤ 5 ^ FiniteDimensional.finrank ℝ E


theorem adjoin_adjoin_of_tower (s : Set A) : adjoin S (adjoin R s : Set A) = adjoin S s

(R : Type uR)
{S : Type uS}
{A : Type uA}
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Algebra R S]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
(s : Set A)

Algebra.adjoin S ↑(Algebra.adjoin R s) = Algebra.adjoin S s


theorem Valid'.eraseMax_aux {s l x r o₁ o₂} (H : Valid' o₁ (.node s l x r) o₂) :
    Valid' o₁ (@eraseMax α (.node' l x r)) ↑(findMax' x r) ∧
      size (.node' l x r) = size (eraseMax (.node' l x r)) + 1

(H : Ordnode.Valid' o₁ (Ordnode.node s l x r) o₂)

Ordnode.Valid' o₁ (l.node' x r).eraseMax ↑(Ordnode.findMax' x r) ∧ (l.node' x r).size = (l.node' x r).eraseMax.size + 1


theorem const_lt {x y : α} : const x < const y ↔ x < y

{α : Type u_1}
[LinearOrderedField α]
{x y : α}

CauSeq.const abs x < CauSeq.const abs y ↔ x < y


@[simp]
theorem content_X_pow {k : ℕ} : content ((X : R[X]) ^ k) = 1

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
{k : ℕ}


theorem linearIndependent_option' :
    LinearIndependent K (fun o => Option.casesOn' o x v : Option ι → V) ↔
      LinearIndependent K v ∧ x ∉ Submodule.span K (range v)

{ι : Type u'}
{K : Type u_3}
{V : Type u}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{v : ι → V}
{x : V}

(LinearIndependent K fun o => o.casesOn' x v) ↔ LinearIndependent K v ∧ x ∉ Submodule.span K (Set.range v)


@[simp] theorem RingHom.id_semiringCat_comp
    {G : Type u} [Semiring G] {H : SemiRingCat.{u}} (f : G →+* H) : RingHom.comp (𝟙 H) f = f

{G : Type u}
[Semiring G]
{H : SemiRingCat}
(f : G →+* ↑H)


theorem mem_sUnion_of_mem {x : α} {t : Set α} {S : Set (Set α)} (hx : x ∈ t) (ht : t ∈ S) :
    x ∈ ⋃₀S

{α : Type u_1}
{x : α}
{t : Set α}
{S : Set (Set α)}
(hx : x ∈ t)
(ht : t ∈ S)


@[simp]
theorem compl_compl (p : { p : R // IsIdempotentElem p }) : pᶜᶜ = p

{R : Type u_6}
[NonAssocRing R]
(p : { p // IsIdempotentElem p })


theorem fst_sInf [InfSet α] [InfSet β] (s : Set (α × β)) : (sInf s).fst = sInf (Prod.fst '' s)

{α : Type u_1}
{β : Type u_2}
[InfSet α]
[InfSet β]
(s : Set (α × β))


@[simp]
theorem range_subtype (s : Subring R) : s.subtype.range = s


theorem image_preimage_inter (f : α → β) (s : Set α) (t : Set β) :
    f '' (f ⁻¹' t ∩ s) = t ∩ f '' s

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


theorem viaEmbedding_apply_of_not_mem (x : β) (hx : x ∉ Set.range ι) : e.viaEmbedding ι x = x

{α : Type u_1}
{β : Type u_2}
(e : Equiv.Perm α)
(ι : α ↪ β)
(x : β)
(hx : x ∉ Set.range ⇑ι)


theorem Matrix.isRepresentation.toEnd_represents (A : Matrix.isRepresentation R b) :
    (A : Matrix ι ι R).Represents b (Matrix.isRepresentation.toEnd R b hb A)

(hb : Submodule.span R (Set.range b) = ⊤)

Matrix.Represents b (↑A) ((Matrix.isRepresentation.toEnd R b hb) A)


/-- A monoid homomorphism `f: M → End X` into the endomorphisms of an object `X` of a category `C`
induces a functor `SingleObj M ⥤ C`. -/
@[simps]
def functor {X : C} (f : M →* End X) : SingleObj M ⥤ C

{M : Type u}
[Monoid M]
{C : Type v}
[CategoryTheory.Category.{w, v} C]
{X : C}
(f : M →* CategoryTheory.End X)

∀ {X_1 Y : CategoryTheory.SingleObj M} (a : X_1 ⟶ Y), (CategoryTheory.SingleObj.functor f).map a = f a


theorem and_right_comm : ∀ (x y z : Bool), ((x && y) && z) = ((x && z) && y)


theorem HasImage.of_arrow_iso {f g : Arrow C} [h : HasImage f.hom] (sq : f ⟶ g) [IsIso sq] :
    HasImage g.hom

[h : CategoryTheory.Limits.HasImage f.hom]


@[simp]
theorem piecewise_same : s.piecewise f f = f

{α : Type u_1}
{δ : α → Sort u_6}
(s : Set α)
(f : (i : α) → δ i)
[(j : α) → Decidable (j ∈ s)]


@[simp]
lemma measure_const (c : ℝ) : (StieltjesFunction.const c).measure = 0


theorem ball_comp (p : Seminorm 𝕜₂ E₂) (f : E →ₛₗ[σ₁₂] E₂) (x : E) (r : ℝ) :
    (p.comp f).ball x r = f ⁻¹' p.ball (f x) r

{𝕜 : Type u_3}
{𝕜₂ : Type u_4}
{E : Type u_7}
{E₂ : Type u_8}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[SeminormedRing 𝕜₂]
[AddCommGroup E₂]
[Module 𝕜₂ E₂]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(p : Seminorm 𝕜₂ E₂)
(f : E →ₛₗ[σ₁₂] E₂)
(x : E)
(r : ℝ)

(p.comp f).ball x r = ⇑f ⁻¹' p.ball (f x) r


theorem setLIntegral_compProd (κ : Kernel α β) [IsSFiniteKernel κ] (η : Kernel (α × β) γ)
    [IsSFiniteKernel η] (a : α) {f : β × γ → ℝ≥0∞} (hf : Measurable f) {s : Set β} {t : Set γ}
    (hs : MeasurableSet s) (ht : MeasurableSet t) :
    ∫⁻ z in s ×ˢ t, f z ∂(κ ⊗ₖ η) a = ∫⁻ x in s, ∫⁻ y in t, f (x, y) ∂η (a, x) ∂κ a

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

{f : β × γ → ℝ≥0∞}

∫⁻ (z : β × γ) in s ×ˢ t, f z ∂(κ.compProd η) a = ∫⁻ (x : β) in s, ∫⁻ (y : γ) in t, f (x, y) ∂η (a, x) ∂κ a


lemma zeroLocus_ideal_mem_irreducibleComponents {I : Ideal R} :
    zeroLocus I ∈ irreducibleComponents (PrimeSpectrum R) ↔ I.radical ∈ minimalPrimes R

{R : Type u}
[CommSemiring R]
{I : Ideal R}

PrimeSpectrum.zeroLocus ↑I ∈ irreducibleComponents (PrimeSpectrum R) ↔ I.radical ∈ minimalPrimes R


theorem integrable_snd [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν)
    (hf : Integrable f μ) : Integrable g ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)


protected theorem dvd_trans : ∀ {a b c : Int}, a ∣ b → b ∣ c → a ∣ c


theorem compare_uc_symm : UniformContinuous compareEquiv.symm


theorem tendsto_coe' {f : Filter α} [NeBot f] {m : α → ℝ≥0} {x : ℝ} :
    Tendsto (fun a => m a : α → ℝ) f (𝓝 x) ↔ ∃ hx : 0 ≤ x, Tendsto m f (𝓝 ⟨x, hx⟩)

{α : Type u_1}
{f : Filter α}
[f.NeBot]
{m : α → NNReal}
{x : ℝ}

Filter.Tendsto (fun a => ↑(m a)) f (𝓝 x) ↔ ∃ (hx : 0 ≤ x), Filter.Tendsto m f (𝓝 ⟨x, hx⟩)


/-- If $x ≤ f x$ for all $x$ (we write this as `id ≤ f`), then the same is true for any iterate
`f^[n]` of `f`. -/
theorem id_le_iterate_of_id_le (h : id ≤ f) (n : ℕ) : id ≤ f^[n]

{α : Type u_1}
[Preorder α]
{f : α → α}
(h : id ≤ f)
(n : ℕ)


/-- The anti-equivalence between simplicial objects and cosimplicial objects. -/
@[simps!]
def simplicialCosimplicialEquiv : (SimplicialObject C)ᵒᵖ ≌ CosimplicialObject Cᵒᵖ

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(X : SimplexCategory ⥤ Cᵒᵖ)

∀ (X_1 : SimplexCategory), ((CategoryTheory.simplicialCosimplicialEquiv C).counitIso.inv.app X).app X_1 = 𝟙 (X.obj X_1)


protected theorem le_sub_iff_add_le' {n : Nat} (h : k ≤ m) : n ≤ m - k ↔ k + n ≤ m


@[simp]
theorem insertNth_last' (x : β) (p : Fin n → β) :
    @insertNth _ (fun _ ↦ β) (last n) x p = snoc p x

{n : ℕ}
{β : Type v}
(x : β)
(p : Fin n → β)

(Fin.last n).insertNth x p = Fin.snoc p x


theorem AffineBasis.centroid_mem_interior_convexHull {ι} [Fintype ι] (b : AffineBasis ι ℝ V) :
    Finset.univ.centroid ℝ b ∈ interior (convexHull ℝ (range b))

{V : Type u_1}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
{ι : Type u_3}
[Fintype ι]
(b : AffineBasis ι ℝ V)

Finset.centroid ℝ Finset.univ ⇑b ∈ interior ((convexHull ℝ) (Set.range ⇑b))


@[norm_cast]
theorem coe_int_ofDigits (b : ℕ) (L : List ℕ) : ((ofDigits b L : ℕ) : ℤ) = ofDigits (b : ℤ) L

↑(Nat.ofDigits b L) = Nat.ofDigits (↑b) L


theorem exists_min_image (s : Finset β) (f : β → α) (h : s.Nonempty) :
    ∃ x ∈ s, ∀ x' ∈ s, f x ≤ f x'

{α : Type u_2}
{β : Type u_3}
[LinearOrder α]
(s : Finset β)
(f : β → α)
(h : s.Nonempty)


/-- Let `f` be a measurable function integrable on `a..b`. Choose `s ∈ {Iic a, Ici a, univ}`
and `t ∈ {Iic b, Ici b, univ}`. Suppose that `f` tends to `ca` and `cb` almost surely at the filters
`la` and `lb` from the table below. Then `fderivWithin ℝ (fun p ↦ ∫ x in p.1..p.2, f x) (s ×ˢ t)`
is equal to `(u, v) ↦ u • cb - v • ca`.

| `s`     | `la`     | `t`     | `lb`     |
| ------- | ----     | ---     | ----     |
| `Iic a` | `𝓝[≤] a` | `Iic b` | `𝓝[≤] b` |
| `Ici a` | `𝓝[>] a` | `Ici b` | `𝓝[>] b` |
| `{a}`   | `⊥`      | `{b}`   | `⊥`      |
| `univ`  | `𝓝 a`    | `univ`  | `𝓝 b`    |
-/
theorem fderivWithin_integral_of_tendsto_ae (hf : IntervalIntegrable f volume a b)
    (hmeas_a : StronglyMeasurableAtFilter f la) (hmeas_b : StronglyMeasurableAtFilter f lb)
    {s t : Set ℝ} [FTCFilter a (𝓝[s] a) la] [FTCFilter b (𝓝[t] b) lb]
    (ha : Tendsto f (la ⊓ ae volume) (𝓝 ca)) (hb : Tendsto f (lb ⊓ ae volume) (𝓝 cb))
    (hs : UniqueDiffWithinAt ℝ s a := by uniqueDiffWithinAt_Ici_Iic_univ)
    (ht : UniqueDiffWithinAt ℝ t b := by uniqueDiffWithinAt_Ici_Iic_univ) :
    fderivWithin ℝ (fun p : ℝ × ℝ => ∫ x in p.1..p.2, f x) (s ×ˢ t) (a, b) =
      (snd ℝ ℝ ℝ).smulRight cb - (fst ℝ ℝ ℝ).smulRight ca

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas_a : StronglyMeasurableAtFilter f la MeasureTheory.volume)

(hmeas_b : StronglyMeasurableAtFilter f lb MeasureTheory.volume)

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

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

(ha : Filter.Tendsto f (la ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 ca))

(hb : Filter.Tendsto f (lb ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 cb))

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


@[simp]
theorem ord_univ : ord univ.{u, v} = Ordinal.univ.{u, v}

Cardinal.univ.{u, v}.ord = Ordinal.univ.{u, v}


@[to_additive max_neg_neg]
theorem max_inv_inv' (a b : α) : max a⁻¹ b⁻¹ = (min a b)⁻¹

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


theorem diff_self {s : Set α} : s \ s = ∅


@[simp]
theorem lTensor_add (f g : N →ₗ[R] P) : (f + g).lTensor M = f.lTensor M + g.lTensor M

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f g : N →ₗ[R] P)

LinearMap.lTensor M (f + g) = LinearMap.lTensor M f + LinearMap.lTensor M g


@[simp] theorem of_zero : of R (0 : HahnSeries Γ V) = 0

{Γ : Type u_1}
{R : Type u_3}
{V : Type u_4}
[PartialOrder Γ]
[AddCommMonoid V]
[SMul R V]


@[simp]
theorem toAntisymmetrization_le_toAntisymmetrization_iff :
    @toAntisymmetrization α (· ≤ ·) _ a ≤ @toAntisymmetrization α (· ≤ ·) _ b ↔ a ≤ b

toAntisymmetrization (fun x x_1 => x ≤ x_1) a ≤ toAntisymmetrization (fun x x_1 => x ≤ x_1) b ↔ a ≤ b


/-- `AddHom M N` is the type of functions `M → N` that preserve addition.

When possible, instead of parametrizing results over `(f : AddHom M N)`,
you should parametrize over `(F : Type*) [AddHomClass F M N] (f : F)`.

When you extend this structure, make sure to extend `AddHomClass`.
-/
structure AddHom (M : Type*) (N : Type*) [Add M] [Add N] where
  /-- The underlying function -/
  protected toFun : M → N
  /-- The proposition that the function preserves addition -/
  protected map_add' : ∀ x y, toFun (x + y) = toFun x + toFun y

{M : Type u_10}
{N : Type u_11}
[Add M]
[Add N]
(self : AddHom M N)
(x y : M)

self.toFun (x + y) = self.toFun x + self.toFun y


/-- Quantifying over a set is antitone in the set -/
theorem antitone_bforall {P : α → Prop} : Antitone fun s : Set α => ∀ x ∈ s, P x


theorem inf_symmDiff_distrib_left : a ⊓ b ∆ c = (a ⊓ b) ∆ (a ⊓ c)

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


@[simp]
theorem K'.elim_update_rev {a b c d b'} : update (K'.elim a b c d) rev b' = K'.elim a b' c d

{a b c d b' : List Turing.PartrecToTM2.Γ'}

Function.update (Turing.PartrecToTM2.K'.elim a b c d) Turing.PartrecToTM2.K'.rev b' =
  Turing.PartrecToTM2.K'.elim a b' c d


@[simp]
theorem closure_univ : closure (Set.univ : Set R) = ⊤


theorem lt_cof_power {a b : Cardinal} (ha : ℵ₀ ≤ a) (b1 : 1 < b) : a < cof (b^a).ord

{a b : Cardinal.{u_2}}
(ha : ℵ₀ ≤ a)
(b1 : 1 < b)


theorem image₂_union_inter_subset_union :
    image₂ f (s ∪ s') (t ∩ t') ⊆ image₂ f s t ∪ image₂ f s' t'

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{s s' : Finset α}
{t t' : Finset β}
[DecidableEq α]
[DecidableEq β]

Finset.image₂ f (s ∪ s') (t ∩ t') ⊆ Finset.image₂ f s t ∪ Finset.image₂ f s' t'


@[simp]
theorem Prod.mk_dvd_mk {x₁ y₁ : G₁} {x₂ y₂ : G₂} :
    (x₁, x₂) ∣ (y₁, y₂) ↔ x₁ ∣ y₁ ∧ x₂ ∣ y₂

{G₁ : Type u_2}
{G₂ : Type u_3}
[Semigroup G₁]
[Semigroup G₂]
{x₁ y₁ : G₁}
{x₂ y₂ : G₂}


theorem coe_inj {C D : G.ComponentCompl K} : (C : Set V) = (D : Set V) ↔ C = D

{V : Type u}
{G : SimpleGraph V}
{K : Set V}
{C D : G.ComponentCompl K}


theorem coe_injective : @Function.Injective (A →ₛₙₐ[φ] B) (A → B) (↑)

{R : Type u}
{S : Type u₁}
[Monoid R]
[Monoid S]
{φ : R →* S}
{A : Type v}
{B : Type w}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction S B]


/-- The cartesian product of two natural isomorphisms. -/
@[simps]
def prod {F F' : A ⥤ B} {G G' : C ⥤ D} (e₁ : F ≅ F') (e₂ : G ≅ G') :
    F.prod G ≅ F'.prod G'

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

(CategoryTheory.NatIso.prod e₁ e₂).hom = CategoryTheory.NatTrans.prod e₁.hom e₂.hom


@[to_additive]
lemma BddBelow.range_mul {α : Type*} {f g : α → M} (hf : BddBelow (range f))
    (hg : BddBelow (range g)) : BddBelow (range (fun x => f x * g x))

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

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


theorem nadd_le_iff : b ♯ c ≤ a ↔ (∀ b' < b, b' ♯ c < a) ∧ ∀ c' < c, b ♯ c' < a


theorem lowerCrossingTime_lt_of_lt_upcrossingsBefore (hN : 0 < N) (hab : a < b)
    (hn : n < upcrossingsBefore a b f N ω) : lowerCrossingTime a b f N n ω < N

{f : ℕ → Ω → ℝ}

(hn : n < MeasureTheory.upcrossingsBefore a b f N ω)

MeasureTheory.lowerCrossingTime a b f N n ω < N


@[elab_as_elim]
theorem Sized.induction {t} (hl : @Sized α t) {C : Ordnode α → Prop} (H0 : C nil)
    (H1 : ∀ l x r, C l → C r → C (.node' l x r)) : C t

(H1 : ∀ (l : Ordnode α) (x : α) (r : Ordnode α), C l → C r → C (l.node' x r))


theorem comp3_mem_uniformity {s : Set (α × α)} (hs : s ∈ 𝓤 α) : ∃ t ∈ 𝓤 α, t ○ (t ○ t) ⊆ s

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


theorem strictConcaveOn_iff_div {f : E → β} :
    StrictConcaveOn 𝕜 s f ↔
      Convex 𝕜 s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → x ≠ y → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b →
        (a / (a + b)) • f x + (b / (a + b)) • f y < f ((a / (a + b)) • x + (b / (a + b)) • y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[LinearOrderedField 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[SMul 𝕜 β]
{s : Set E}
{f : E → β}

StrictConcaveOn 𝕜 s f ↔
  Convex 𝕜 s ∧
    ∀ ⦃x : E⦄,
      x ∈ s →
        ∀ ⦃y : E⦄,
          y ∈ s →
            x ≠ y →
              ∀ ⦃a b : 𝕜⦄,
                0 < a → 0 < b → (a / (a + b)) • f x + (b / (a + b)) • f y < f ((a / (a + b)) • x + (b / (a + b)) • y)


lemma ofCauchy_nnratCast (q : ℚ≥0) : (⟨q⟩ : ℝ) = q


/-- A regular element of a `Nontrivial` `MulZeroClass` is non-zero. -/
theorem IsRegular.ne_zero [Nontrivial R] (la : IsRegular a) : a ≠ 0

{R : Type u_1}
[MulZeroClass R]
{a : R}
[Nontrivial R]
(la : IsRegular a)


theorem Finite.of_equiv (α : Sort*) [h : Finite α] (f : α ≃ β) : Finite β

{β : Sort u_2}
(α : Sort u_3)
[h : Finite α]
(f : α ≃ β)


theorem measurable_smul_const {f : α → 𝕜} {c : E} (hc : c ≠ 0) :
    (Measurable fun x => f x • c) ↔ Measurable f

{α : Type u_1}
[MeasurableSpace α]
{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
[MeasurableSpace 𝕜]
[BorelSpace 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[MeasurableSpace E]
[BorelSpace E]
{f : α → 𝕜}
{c : E}
(hc : c ≠ 0)


@[simp]
theorem neighborSet_singletonSubgraph (v w : V) : (G.singletonSubgraph v).neighborSet w = ∅

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


theorem Basis.transfer (hIX : M.Basis I X) (hJX : M.Basis J X) (hXY : X ⊆ Y) (hJY : M.Basis J Y) :
    M.Basis I Y

{α : Type u_1}
{M : Matroid α}
{I X Y J : Set α}
(hIX : M.Basis I X)
(hJX : M.Basis J X)
(hXY : X ⊆ Y)
(hJY : M.Basis J Y)


theorem HasBasis.inf_principal (hl : l.HasBasis p s) (s' : Set α) :
    (l ⊓ 𝓟 s').HasBasis p fun i => s i ∩ s'

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


/-- The normal closure in `E/F` of the separable closure of `F` in `E` is equal to itself. -/
theorem separableClosure.normalClosure_eq_self :
    normalClosure F (separableClosure F E) E = separableClosure F E

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]

normalClosure F (↥(separableClosure F E)) E = separableClosure F E


/-- Reformulation of well founded induction on ordinals as a lemma that works with the
`induction` tactic, as in `induction i using Ordinal.induction with | h i IH => ?_`. -/
theorem induction {p : Ordinal.{u} → Prop} (i : Ordinal.{u}) (h : ∀ j, (∀ k, k < j → p k) → p j) :
    p i

(h : ∀ (j : Ordinal.{u}), (∀ k < j, p k) → p j)


@[simp]
theorem cancel_left {g : β →ₙ+* γ} {f₁ f₂ : α →ₙ+* β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[NonUnitalNonAssocSemiring α]
[NonUnitalNonAssocSemiring β]
[NonUnitalNonAssocSemiring γ]
{g : β →ₙ+* γ}
{f₁ f₂ : α →ₙ+* β}
(hg : Function.Injective ⇑g)


lemma div_lt_iff_lt_mul' (hb : 0 < b) : a / b < c ↔ a < c * b


@[simp]
theorem mem_canonicalEquiv_apply {I : FractionalIdeal S P} {x : P'} :
    x ∈ canonicalEquiv S P P' I ↔
      ∃ y ∈ I,
        IsLocalization.map P' (RingHom.id R) (fun y (hy : y ∈ S) => show RingHom.id R y ∈ S from hy)
            (y : P) =
          x

{R : Type u_1}
[CommRing R]
(S : Submonoid R)
(P : Type u_2)
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
(P' : Type u_3)
[CommRing P']
[Algebra R P']
[loc' : IsLocalization S P']
{I : FractionalIdeal S P}
{x : P'}

x ∈ (FractionalIdeal.canonicalEquiv S P P') I ↔ ∃ y ∈ I, (IsLocalization.map P' (RingHom.id R) ⋯) y = x


/-- A predictable martingale is a.e. equal to its initial state. -/
theorem Martingale.eq_zero_of_predictable [SigmaFiniteFiltration μ 𝒢] {f : ℕ → Ω → E}
    (hfmgle : Martingale f 𝒢 μ) (hfadp : Adapted 𝒢 fun n => f (n + 1)) (n : ℕ) : f n =ᵐ[μ] f 0

(hfmgle : MeasureTheory.Martingale f 𝒢 μ)

(hfadp : MeasureTheory.Adapted 𝒢 fun n => f (n + 1))


lemma schnirelmannDensity_setOf_Odd : schnirelmannDensity (setOf Odd) = 2⁻¹


theorem nth_zero_of_exists [DecidablePred p] (h : ∃ n, p n) : nth p 0 = Nat.find h

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


theorem trop_add_def (x y : Tropical R) : x + y = trop (min (untrop x) (untrop y))

{R : Type u}
[LinearOrder R]
(x y : Tropical R)

x + y = Tropical.trop (min (Tropical.untrop x) (Tropical.untrop y))


@[simp]
theorem smul_mem_iff' [Group G] [MulAction G M] [SMul G R] [IsScalarTower G R M] (g : G) :
    g • x ∈ p ↔ x ∈ p

{G : Type u''}
{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
(p : Submodule R M)
{x : M}
[Group G]
[MulAction G M]
[SMul G R]
[IsScalarTower G R M]
(g : G)


/-- Any morphism from a terminal object is mono. -/
theorem IsTerminal.mono_from {X Y : C} (t : IsTerminal X) (f : X ⟶ Y) : Mono f

(t : CategoryTheory.Limits.IsTerminal X)


theorem injective : Function.Injective (eval C)

{I : Type u}
[LinearOrder I]
(C : Set (I → Bool))


/-- A sequence `[r₁, …, rₙ]` is weakly regular on `M` iff `rᵢ` is regular on
`M⧸(r₁, …, rᵢ₋₁)M` for all `1 ≤ i ≤ n`. -/
@[mk_iff]
structure IsWeaklyRegular (rs : List R) : Prop where
  regular_mod_prev : ∀ i (h : i < rs.length),
    IsSMulRegular (M ⧸ (ofList (rs.take i) • ⊤ : Submodule R M)) rs[i]

(self : RingTheory.Sequence.IsWeaklyRegular M rs)

IsSMulRegular (M ⧸ Ideal.ofList (List.take i rs) • ⊤) rs[i]


theorem hausdorffMeasure_preimage (hf : Isometry f) (hd : 0 ≤ d ∨ Surjective f) (s : Set Y) :
    μH[d] (f ⁻¹' s) = μH[d] (s ∩ range f)

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
[MeasurableSpace X]
[BorelSpace X]
[MeasurableSpace Y]
[BorelSpace Y]
{f : X → Y}
{d : ℝ}
(hf : Isometry f)
(hd : 0 ≤ d ∨ Function.Surjective f)
(s : Set Y)

μH[d] (f ⁻¹' s) = μH[d] (s ∩ Set.range f)


theorem flip (h : IsPullback fst snd f g) : IsPullback snd fst g f

(h : CategoryTheory.IsPullback fst snd f g)


@[to_additive (attr := simp)]
theorem MonoidHom.mulSingle_apply [∀ i, MulOneClass <| f i] (i : I) (x : f i) :
    mulSingle f i x = Pi.mulSingle i x

{I : Type u}
(f : I → Type v)
[DecidableEq I]
[(i : I) → MulOneClass (f i)]
(i : I)
(x : f i)

(MonoidHom.mulSingle f i) x = Pi.mulSingle i x


/-- If the sign of the angle between two vectors is positive, the second vector is nonzero. -/
theorem right_ne_zero_of_oangle_sign_eq_one {x y : V} (h : (o.oangle x y).sign = 1) : y ≠ 0

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


@[simp]
theorem disjoint_union_left [DecidableEq α] {s t u : Multiset α} :
    Disjoint (s ∪ t) u ↔ Disjoint s u ∧ Disjoint t u

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

(s ∪ t).Disjoint u ↔ s.Disjoint u ∧ t.Disjoint u


theorem rpow_neg_one (x : ℝ≥0∞) : x ^ (-1 : ℝ) = x⁻¹


@[simp]
theorem app_units_zsmul (X : C) (α : F ⟶ G) (n : ℤˣ) : (n • α).app X = n • α.app X

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_3, u_2} D]
[CategoryTheory.Preadditive D]
{F G : CategoryTheory.Functor C D}
(X : C)
(α : F ⟶ G)
(n : ℤˣ)


protected theorem Smooth.coordChange (hf : Smooth IM IB f)
    (hg : Smooth IM 𝓘(𝕜, F) g) (he : ∀ x, f x ∈ e.baseSet) (he' : ∀ x, f x ∈ e'.baseSet) :
    Smooth IM 𝓘(𝕜, F) (fun y ↦ e.coordChange e' (f y) (g y))

[TopologicalSpace (Bundle.TotalSpace F E)]

{e e' : Trivialization F Bundle.TotalSpace.proj}

Smooth IM 𝓘(𝕜, F) fun y => e.coordChange e' (f y) (g y)


/-- Given a homology map data for a morphism `φ`, this is the induced homology
map data for `-φ`. -/
@[simps]
def neg : HomologyMapData (-φ) h₁ h₂

(γ : CategoryTheory.ShortComplex.HomologyMapData φ h₁ h₂)


theorem toSubMulAction_eq : p.toSubMulAction = q.toSubMulAction ↔ p = q

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p q : Submodule R M}


protected lemma zpow [DecidableEq n] {M : Matrix n n R} (hM : M.PosSemidef) (z : ℤ) :
    (M ^ z).PosSemidef

{n : Type u_2}
{R : Type u_3}
[Fintype n]
[CommRing R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
[DecidableEq n]
{M : Matrix n n R}
(hM : M.PosSemidef)
(z : ℤ)


/-- The morphism between augmented Čech nerve associated to a morphism of arrows. -/
@[simps]
def mapAugmentedCechNerve {f g : Arrow C}
    [∀ n : ℕ, HasWidePullback f.right (fun _ : Fin (n + 1) => f.left) fun _ => f.hom]
    [∀ n : ℕ, HasWidePullback g.right (fun _ : Fin (n + 1) => g.left) fun _ => g.hom] (F : f ⟶ g) :
    f.augmentedCechNerve ⟶ g.augmentedCechNerve

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

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

(CategoryTheory.Arrow.mapAugmentedCechNerve F).left = CategoryTheory.Arrow.mapCechNerve F


/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise scalar multiplication of
`f` and `g`, which monovary together, is strictly decreased by a permutation if and only if
`f ∘ σ` and `g` do not monovary together. Stated by permuting the entries of `f`. -/
theorem MonovaryOn.sum_comp_perm_smul_lt_sum_smul_iff (hfg : MonovaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f (σ i) • g i < ∑ i ∈ s, f i • g i ↔ ¬MonovaryOn (f ∘ σ) g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{s : Finset ι}
{σ : Equiv.Perm ι}
{f : ι → α}
{g : ι → β}
(hfg : MonovaryOn f g ↑s)
(hσ : {x | σ x ≠ x} ⊆ ↑s)

∑ i ∈ s, f (σ i) • g i < ∑ i ∈ s, f i • g i ↔ ¬MonovaryOn (f ∘ ⇑σ) g ↑s


@[symm]
theorem Rel.symm {x y : α × α} : Rel α x y → Rel α y x


/-- The bijection on the indexing set induced by reflection. -/
@[simps]
protected def equiv_of_mapsTo :
    ι ≃ ι

(h :
  ∀ (i : ι),
    Set.MapsTo (⇑(Module.preReflection (root i) (p.toLin.flip (coroot i)))) (Set.range ⇑root) (Set.range ⇑root))

(hp : ∀ (i : ι), (p.toLin (root i)) (coroot i) = 2)

(RootPairing.equiv_of_mapsTo p root coroot i h hp).symm j = ⋯.choose


lemma compl_mem_comk {p : Set α → Prop} {he hmono hunion s} :
    sᶜ ∈ comk p he hmono hunion ↔ p s

{hmono : ∀ (t : Set α), p t → ∀ s ⊆ t, p s}

{hunion : ∀ (s : Set α), p s → ∀ (t : Set α), p t → p (s ∪ t)}

sᶜ ∈ Filter.comk p he hmono hunion ↔ p s


protected theorem lt_of_mul_lt_mul_left {a b c : Nat} (h : a * b < a * c) : b < c


@[simp]
theorem horizontal_apply {α ι ι'} (l : Line α ι) (v : ι' → α) (x : α) :
    l.horizontal v x = Sum.elim (l x) v

{α : Type u_5}
{ι : Type u_6}
{ι' : Type u_7}
(l : Combinatorics.Line α ι)
(v : ι' → α)
(x : α)

(fun x i => ((l.horizontal v).idxFun i).getD x) x = Sum.elim ((fun x i => (l.idxFun i).getD x) x) v


@[to_additive]
theorem le_iff_exists_mul' : a ≤ b ↔ ∃ c, b = c * a

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


@[norm_cast, simp]
theorem coe_maxTrivEquiv_apply (e : M ≃ₗ⁅R,L⁆ N) (m : maxTrivSubmodule R L M) :
    (maxTrivEquiv e m : N) = e ↑m

(m : ↥(LieModule.maxTrivSubmodule R L M))


theorem tsub_tsub_tsub_le_tsub : c - a - (c - b) ≤ b - a

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


/-- The algebra of sets generated by `𝒜` contains `𝒜`. -/
theorem self_subset_generateSetAlgebra : 𝒜 ⊆ generateSetAlgebra 𝒜


theorem Decidable.imp_or [h : Decidable a] : (a → b ∨ c) ↔ (a → b) ∨ (a → c)


theorem pure_vsub_pure : (pure a : Filter β) -ᵥ pure b = (pure (a -ᵥ b) : Filter α)

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


@[to_additive]
lemma mem_of_mem_val_ofUnits (S : Subgroup Mˣ) {y : Mˣ} (hy : (y : M) ∈ S.ofUnits) : y ∈ S

{M : Type u_1}
[AddMonoid M]
(S : AddSubgroup (AddUnits M))
{y : AddUnits M}
(hy : ↑y ∈ S.ofAddUnits)


theorem IsGLB.inter_Iic_of_mem [LinearOrder γ] {s : Set γ} {a b : γ} (ha : IsGLB s a) (hb : b ∈ s) :
    IsGLB (s ∩ Iic b) a

{γ : Type w}
[LinearOrder γ]
{s : Set γ}
{a b : γ}
(ha : IsGLB s a)
(hb : b ∈ s)


lemma contDiffOn_restrContDiff_target (f : PartialHomeomorph E F) (n : ℕ) :
    ContDiffOn 𝕜 n f.symm (f.restrContDiff 𝕜 n).target

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

ContDiffOn 𝕜 (↑n) (↑f.symm) (PartialHomeomorph.restrContDiff 𝕜 f n).target


theorem foldrIdxSpec_cons (f : ℕ → α → β → β) (b a as start) :
    foldrIdxSpec f b (a :: as) start = f start a (foldrIdxSpec f b as (start + 1))

{α : Type u}
{β : Type v}
(f : ℕ → α → β → β)
(b : β)
(a : α)
(as : List α)
(start : ℕ)

List.foldrIdxSpec f b (a :: as) start = f start a (List.foldrIdxSpec f b as (start + 1))


theorem exists_mem_closure_infDist_eq_dist [ProperSpace α] (hne : s.Nonempty) (x : α) :
    ∃ y ∈ closure s, infDist x s = dist x y

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
[ProperSpace α]
(hne : s.Nonempty)
(x : α)

∃ y ∈ closure s, Metric.infDist x s = dist x y


theorem exists_bool' {p : Bool → Prop} (b : Bool) : (∃ x, p x) ↔ p b ∨ p !b


/-- If two points `x, y` coincide up to length `n`, and the longest common prefix of `x` with `s`
is strictly shorter than `n`, then the longest common prefix of `y` with `s` is the same, and both
cylinders of this length based at `x` and `y` coincide. -/
theorem cylinder_longestPrefix_eq_of_longestPrefix_lt_firstDiff {x y : ∀ n, E n}
    {s : Set (∀ n, E n)} (hs : IsClosed s) (hne : s.Nonempty)
    (H : longestPrefix x s < firstDiff x y) (xs : x ∉ s) (ys : y ∉ s) :
    cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)

(H : PiNat.longestPrefix x s < PiNat.firstDiff x y)

PiNat.cylinder x (PiNat.longestPrefix x s) = PiNat.cylinder y (PiNat.longestPrefix y s)


protected theorem smul [SMul ℝ β] [ContinuousSMul ℝ β] (c : ℝ) (hu : Adapted f u) :
    Adapted f (c • u)

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[TopologicalSpace β]
[Preorder ι]
{u : ι → Ω → β}
{f : MeasureTheory.Filtration ι m}
[SMul ℝ β]
[ContinuousSMul ℝ β]
(c : ℝ)
(hu : MeasureTheory.Adapted f u)


/-- The multiplicity of `v` in `∏_v v^(val_v(I))` equals `val_v(I)`. -/
theorem finprod_count (I : Ideal R) (hI : I ≠ 0) : (Associates.mk v.asIdeal).count
    (Associates.mk (∏ᶠ v : HeightOneSpectrum R, v.maxPowDividing I)).factors =
    (Associates.mk v.asIdeal).count (Associates.mk I).factors

(Associates.mk v.asIdeal).count
    (Associates.mk (∏ᶠ (v : IsDedekindDomain.HeightOneSpectrum R), v.maxPowDividing I)).factors =
  (Associates.mk v.asIdeal).count (Associates.mk I).factors


theorem Chain'.prefix (h : Chain' R l) (h' : l₁ <+: l) : Chain' R l₁

{α : Type u}
{R : α → α → Prop}
{l l₁ : List α}
(h : List.Chain' R l)
(h' : l₁ <+: l)


lemma map_add_left_Icc (a b c : α) : (Icc a b).map (c + ·) = Icc (c + a) (c + b)

{α : Type u_1}
[OrderedCancelAddCommMonoid α]
[ExistsAddOfLE α]
[LocallyFiniteOrder α]
(a b c : α)

Multiset.map (fun x => c + x) (Multiset.Icc a b) = Multiset.Icc (c + a) (c + b)


/-- The uniform norm of the Fourier transform of `f` is bounded by the `L¹` norm of `f`. -/
theorem norm_fourierIntegral_le_integral_norm (e : AddChar 𝕜 𝕊) (μ : Measure 𝕜)
    (f : 𝕜 → E) (w : 𝕜) : ‖fourierIntegral e μ f w‖ ≤ ∫ x : 𝕜, ‖f x‖ ∂μ

{𝕜 : Type u_1}
[CommRing 𝕜]
[MeasurableSpace 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(e : AddChar 𝕜 ↥𝕊)
(μ : MeasureTheory.Measure 𝕜)
(f : 𝕜 → E)
(w : 𝕜)

‖Fourier.fourierIntegral e μ f w‖ ≤ ∫ (x : 𝕜), ‖f x‖ ∂μ


@[simp] theorem succ_eq_add_one (n : Nat) : succ n = n + 1


@[simp]
theorem dirac_caratheodory (a : α) : (dirac a).caratheodory = ⊤

(MeasureTheory.OuterMeasure.dirac a).caratheodory = ⊤


protected theorem ext_iff {s t : AList β} : s = t ↔ s.entries = t.entries

{α : Type u}
{β : α → Type v}
{s t : AList β}


@[simp] lemma mem_top (a : α) : a ∈ (⊤ : Sublattice α)


@[simp]
theorem mem_maxGenEigenspace (f : End R M) (μ : R) (m : M) :
    m ∈ f.maxGenEigenspace μ ↔ ∃ k : ℕ, ((f - μ • (1 : End R M)) ^ k) m = 0

{R : Type v}
{M : Type w}
[CommRing R]
[AddCommGroup M]
[Module R M]
(f : Module.End R M)
(μ : R)
(m : M)

m ∈ f.maxGenEigenspace μ ↔ ∃ k, ((f - μ • 1) ^ k) m = 0


theorem ContinuousLinearEquiv.homothety_inverse (a : ℝ) (ha : 0 < a) (f : E ≃ₛₗ[σ] F) :
    (∀ x : E, ‖f x‖ = a * ‖x‖) → ∀ y : F, ‖f.symm y‖ = a⁻¹ * ‖y‖

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_3}
{F : Type u_4}
[Ring 𝕜]
[Ring 𝕜₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[Module 𝕜 E]
[Module 𝕜₂ F]
{σ : 𝕜 →+* 𝕜₂}
{σ₂₁ : 𝕜₂ →+* 𝕜}
[RingHomInvPair σ σ₂₁]
[RingHomInvPair σ₂₁ σ]
(a : ℝ)
(ha : 0 < a)
(f : E ≃ₛₗ[σ] F)

(∀ (x : E), ‖f x‖ = a * ‖x‖) → ∀ (y : F), ‖f.symm y‖ = a⁻¹ * ‖y‖


/-- If we view `M` as a submodule of `N` via the injective linear map `i : M ↪ N`, then a submodule
between `M` and `N` is a submodule `N'` of `N`. To prove Baer's criterion, we need to consider
pairs of `(N', f')` such that `M ≤ N' ≤ N` and `f'` extends `f`. -/
structure ExtensionOf extends LinearPMap R N Q where
  le : LinearMap.range i ≤ domain
  is_extension : ∀ m : M, f m = toLinearPMap ⟨i m, le ⟨m, rfl⟩⟩

{R : Type u}
[Ring R]
{Q : Type v}
[AddCommGroup Q]
[Module R Q]
{M : Type u_1}
{N : Type u_2}
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
{i : M →ₗ[R] N}
{f : M →ₗ[R] Q}
(self : Module.Baer.ExtensionOf i f)


@[simp]
lemma ι_appLE (V W e) :
    U.ι.appLE V W e =
      X.presheaf.map (homOfLE (x := U.ι ''ᵁ W) (Set.image_subset_iff.mpr ‹_›)).op

(e : W ≤ (TopologicalSpace.Opens.map U.ι.val.base).obj V)

AlgebraicGeometry.Scheme.Hom.appLE U.ι V W e = X.presheaf.map (CategoryTheory.homOfLE ⋯).op


@[simp low]
theorem curry_apply_succ {n : ℕ} {p : Fin (n + 1) → Type u} {τ : Type u}
    (f : ((i : Fin (n + 1)) → p i) → τ) (a : p 0) :
    curry f a = curry (f ∘ Fin.cons a)

Function.FromTypes.curry f a = Function.FromTypes.curry (f ∘ Fin.cons a)


theorem isMaximal_iff_isCoatom : IsMaximal I ↔ IsCoatom I

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


/-- Construct an augmented cosimplicial object in the opposite
category from an augmented simplicial object. -/
@[simps!]
def SimplicialObject.Augmented.rightOp (X : SimplicialObject.Augmented C) :
    CosimplicialObject.Augmented Cᵒᵖ

(X : CategoryTheory.SimplicialObject.Augmented C)

∀ (X_1 : SimplexCategory), X.rightOp.hom.app X_1 = (X.hom.app (Opposite.op X_1)).op


@[to_additive (attr := simp)]
lemma UniformFun.toFun_one [One β] : toFun (1 : α →ᵤ β) = 1


@[simp]
theorem finset_iUnion_right_iff {ι : Type*} {I : Finset ι} {s : Set X} {t : ι → Set X} :
    IsMetricSeparated s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, IsMetricSeparated s (t i)

{X : Type u_1}
[EMetricSpace X]
{ι : Type u_2}
{I : Finset ι}
{s : Set X}
{t : ι → Set X}


theorem eq_of_mem_support_single {b : Γ} (h : b ∈ support (single a r)) : b = a

(h : b ∈ ((HahnSeries.single a) r).support)


theorem mem_extChartAt_target (x : M) : extChartAt I x x ∈ (extChartAt I x).target

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

↑(extChartAt I x) x ∈ (extChartAt I x).target


lemma ab_exact_iff_ker_le_range : S.Exact ↔ S.g.ker ≤ S.f.range

S.Exact ↔ AddMonoidHom.ker S.g ≤ AddMonoidHom.range S.f


@[simp]
theorem coe_coeHom : (coeHom : NonemptyInterval α → Set α) = ((↑) : NonemptyInterval α → Set α)


theorem supermartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
    (hf : ∀ i, 0 ≤ᵐ[μ] μ[f i - f (i + 1)|𝒢 i]) : Supermartingale f 𝒢 μ

{f : ℕ → Ω → ℝ}

(hint : ∀ (i : ℕ), MeasureTheory.Integrable (f i) μ)


lemma toMvPolynomial_add (M N : Matrix m n R) :
    (M + N).toMvPolynomial = M.toMvPolynomial + N.toMvPolynomial

{m : Type u_1}
{n : Type u_2}
{R : Type u_4}
[Fintype n]
[CommSemiring R]
(M N : Matrix m n R)


theorem one_div_mul_add_mul_one_div_eq_one_div_add_one_div (ha : a ≠ 0) (hb : b ≠ 0) :
    1 / a * (a + b) * (1 / b) = 1 / a + 1 / b

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


theorem algebraMap_eq_smul_one (r : R) : algebraMap R A r = r • (1 : A)

{R : Type u}
{A : Type w}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(r : R)


/-- Lists are equivalent to the sigma type of tuples of a given length. -/
@[simps]
def equivSigmaTuple : List α ≃ Σn, Fin n → α

{α : Type u}
(f : (n : ℕ) × (Fin n → α))

List.equivSigmaTuple.symm f = List.ofFn f.snd


/-- The symbol `J(1 | b)` has the value `1`. -/
@[simp]
theorem one_left (b : ℕ) : J(1 | b) = 1


/-- If a presieve `R` on `X` has a subsieve `S` such that:

* `P` is a sheaf for `S`.
* For every `f` in `R`, `P` is separated for the pullback of `S` along `f`,

then `P` is a sheaf for `R`.

This is closely related to [Elephant] C2.1.6(i).
-/
theorem isSheafFor_subsieve_aux (P : Cᵒᵖ ⥤ Type w) {S : Sieve X} {R : Presieve X}
    (h : (S : Presieve X) ≤ R) (hS : IsSheafFor P (S : Presieve X))
    (trans : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, R f → IsSeparatedFor P (S.pullback f : Presieve Y)) :
    IsSheafFor P R

(P : CategoryTheory.Functor Cᵒᵖ (Type w))

(hS : CategoryTheory.Presieve.IsSheafFor P S.arrows)

(trans :
  ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄, R f → CategoryTheory.Presieve.IsSeparatedFor P (CategoryTheory.Sieve.pullback f S).arrows)


@[simp] theorem and_self_left  : a ∧ (a ∧ b) ↔ a ∧ b


/-- Being integrally closed is preserved under algebra isomorphisms. -/
theorem AlgEquiv.isIntegrallyClosedIn (e : A ≃ₐ[R] B) :
    IsIntegrallyClosedIn R A ↔ IsIntegrallyClosedIn R B

{R : Type u_1}
[CommRing R]
{A : Type u_2}
{B : Type u_3}
[CommRing A]
[CommRing B]
[Algebra R A]
[Algebra R B]
(e : A ≃ₐ[R] B)


@[simp, reassoc]
theorem limitUncurryIsoLimitCompLim_inv_π {j} {k} :
    (limitUncurryIsoLimitCompLim F).inv ≫ limit.π _ (j, k) =
      (limit.π _ j ≫ limit.π _ k : limit (_ ⋙ lim) ⟶ _)

[CategoryTheory.Limits.HasLimit (F ⋙ CategoryTheory.Limits.lim)]

(CategoryTheory.Limits.limitUncurryIsoLimitCompLim F).inv ≫
    CategoryTheory.Limits.limit.π (CategoryTheory.uncurry.obj F) (j, k) =
  CategoryTheory.Limits.limit.π (F ⋙ CategoryTheory.Limits.lim) j ≫ CategoryTheory.Limits.limit.π (F.obj j) k


/-- `sinh` is strictly monotone. -/
theorem sinh_strictMono : StrictMono sinh


theorem twoCoboundariesOfMemRange_apply {f : G × G → A} (h : f ∈ LinearMap.range (dOne A)) :
    (twoCoboundariesOfMemRange h).1.1 = f

(h : f ∈ LinearMap.range (groupCohomology.dOne A))

↑↑(groupCohomology.twoCoboundariesOfMemRange h) = f


@[simp]
lemma sigmaMk_mk (i) (x : f i) :
    sigmaMk f (.mk i x) = (Sigma.ι f i).1.base x

{ι : Type u}
(f : ι → AlgebraicGeometry.Scheme)
(i : ι)
(x : ↑↑(f i).toPresheafedSpace)

(AlgebraicGeometry.sigmaMk f) ⟨i, x⟩ = (CategoryTheory.Limits.Sigma.ι f i).val.base x


@[to_additive nndist_nnnorm_nnnorm_le]
theorem nndist_nnnorm_nnnorm_le' (a b : E) : nndist ‖a‖₊ ‖b‖₊ ≤ ‖a / b‖₊

{E : Type u_6}
[SeminormedGroup E]
(a b : E)


protected theorem mul_dvd_mul {a b c d : Nat} : a ∣ b → c ∣ d → a * c ∣ b * d


/-- For maps between vector spaces, `mfderivWithin` and `fderivWithin` coincide -/
@[simp]
theorem mfderivWithin_eq_fderivWithin :
    mfderivWithin 𝓘(𝕜, E) 𝓘(𝕜, E') f s x = fderivWithin 𝕜 f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{f : E → E'}
{s : Set E}
{x : E}


@[simp]
theorem aemeasurable_inv_iff₀ {G₀ : Type*} [GroupWithZero G₀] [MeasurableSpace G₀]
    [MeasurableInv G₀] {f : α → G₀} : AEMeasurable (fun x => (f x)⁻¹) μ ↔ AEMeasurable f μ

{α : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{G₀ : Type u_4}
[GroupWithZero G₀]
[MeasurableSpace G₀]
[MeasurableInv G₀]
{f : α → G₀}


theorem mem_filterAt_iff {x : α} {s : Set (Set α)} :
    s ∈ v.filterAt x ↔ ∃ ε > (0 : ℝ), ∀ a ∈ v.setsAt x, a ⊆ closedBall x ε → a ∈ s

{α : Type u_1}
[MetricSpace α]
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(v : VitaliFamily μ)
{x : α}
{s : Set (Set α)}

s ∈ v.filterAt x ↔ ∃ ε > 0, ∀ a ∈ v.setsAt x, a ⊆ Metric.closedBall x ε → a ∈ s


/--
The obvious triangle induced by `QuotientMap.lift` commutes:
```
     g
  X --→ Z
  |   ↗
f |  / hf.lift g h
  v /
  Y
```
-/
@[simp]
theorem lift_comp : (hf.lift g h).comp f = g

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : C(X, Y)}
(hf : QuotientMap ⇑f)
(g : C(X, Z))
(h : Function.FactorsThrough ⇑g ⇑f)


@[reassoc]
theorem biproduct.map_matrix {f : J → C} {g : J → C} {h : K → C} (m : ∀ k, f k ⟶ g k)
    (n : ∀ j k, g j ⟶ h k) :
    biproduct.map m ≫ biproduct.matrix n = biproduct.matrix fun j k => m j ≫ n j k

CategoryTheory.Limits.biproduct.map m ≫ CategoryTheory.Limits.biproduct.matrix n =
  CategoryTheory.Limits.biproduct.matrix fun j k => m j ≫ n j k


@[to_additive Nat.Coprime.nsmul_right_bijective]
lemma Nat.Coprime.pow_left_bijective (hn : (Nat.card G).Coprime n) : Bijective (· ^ n : G → G)

{G : Type u_1}
[AddGroup G]
{n : ℕ}
(hn : (Nat.card G).Coprime n)


theorem inr_strictMono : StrictMono (toLex ∘ inr : β → α ⊕ₗ β)

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


@[simp] theorem UInt16.val_val_eq_toNat (x : UInt16) : x.val.val = x.toNat


theorem cos_nonneg_of_neg_pi_div_two_le_of_le {x : ℝ} (hl : -(π / 2) ≤ x) (hu : x ≤ π / 2) :
    0 ≤ cos x

{x : ℝ}
(hl : -(Real.pi / 2) ≤ x)
(hu : x ≤ Real.pi / 2)


theorem antitone_iff_forall_lt : Antitone f ↔ ∀ ⦃a b⦄, a < b → f b ≤ f a

{α : Type u}
{β : Type v}
[PartialOrder α]
[Preorder β]
{f : α → β}

Antitone f ↔ ∀ ⦃a b : α⦄, a < b → f b ≤ f a


/-- The natural transformation from `leftFunc` to `rightFunc`, given by the arrow itself. -/
@[simps]
def leftToRight : (leftFunc : Arrow C ⥤ C) ⟶ rightFunc

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

CategoryTheory.Arrow.leftToRight.app f = f.hom


theorem eLpNormEssSup_le_of_ae_nnnorm_bound {f : α → F} {C : ℝ≥0} (hfC : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ C) :
    eLpNormEssSup f μ ≤ C

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


/-- Taking the multiequalizer over the multicospan index is equivalent to taking the equalizer over
the two morphisms `∏ᶜ I.left ⇉ ∏ᶜ I.right`. This is the diagram of the latter.
-/
@[simps!]
protected noncomputable def parallelPairDiagram

(I : CategoryTheory.Limits.MulticospanIndex C)

I.parallelPairDiagram.obj x =
  match x with
  | CategoryTheory.Limits.WalkingParallelPair.zero => ∏ᶜ I.left
  | CategoryTheory.Limits.WalkingParallelPair.one => ∏ᶜ I.right


@[to_additive (attr := simp)]
theorem fst_one [One M] [One N] : (1 : M × N).1 = 1

{M : Type u_5}
{N : Type u_6}
[One M]
[One N]


@[measurability, fun_prop]
theorem Measurable.ennreal_ofReal {f : α → ℝ} (hf : Measurable f) :
    Measurable fun x => ENNReal.ofReal (f x)

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


@[to_additive Ici_add_Ioi_subset]
theorem Ici_mul_Ioi_subset' (a b : α) : Ici a * Ioi b ⊆ Ioi (a * b)

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

[CovariantClass α α (Function.swap HAdd.hAdd) LT.lt]


@[simp]
theorem map_vsub (p1 p2 : P) : f.linearIsometry (p1 -ᵥ p2) = f p1 -ᵥ f p2

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(f : P →ᵃⁱ[𝕜] P₂)
(p1 p2 : P)


@[simp, norm_cast] lemma coe_add (f g : α →₀ M) : ⇑(f + g) = f + g

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


lemma Y_eq_of_Y_ne {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q)
    (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 ≠ Q y * P z ^ 3) :
    P y * Q z ^ 3 = W.negY Q * P z ^ 3

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P Q : Fin 3 → F}
(hP : W.Equation P)
(hQ : W.Equation Q)
(hx : P x * Q z ^ 2 = Q x * P z ^ 2)
(hy : P y * Q z ^ 3 ≠ Q y * P z ^ 3)


/-- Vertical composition of 2-commutative squares -/
@[simps! iso'_hom_app iso'_inv_app]
def vComp (L₁ : C₁ ⥤ C₂) (L₂ : C₂ ⥤ C₃) (H₁ : C₁ ⥤ C₄) (H₂ : C₂ ⥤ C₅) (H₃ : C₃ ⥤ C₆)
    (R₁ : C₄ ⥤ C₅) (R₂ : C₅ ⥤ C₆) [CatCommSq H₁ L₁ R₁ H₂] [CatCommSq H₂ L₂ R₂ H₃] :
    CatCommSq H₁ (L₁ ⋙ L₂) (R₁ ⋙ R₂) H₃

CategoryTheory.CatCommSq.iso'.hom.app X =
  CategoryTheory.CategoryStruct.comp (R₂.map ((CategoryTheory.CatCommSq.iso H₁ L₁ R₁ H₂).hom.app X))
    ((CategoryTheory.CatCommSq.iso H₂ L₂ R₂ H₃).hom.app (L₁.obj X))


theorem one_eq : (1 : Conv M N) = M.counit ≫ N.one

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{M : Comon_ C}
{N : Mon_ C}

1 = CategoryTheory.CategoryStruct.comp M.counit N.one


/-- On non-dependent functions, `Pi.mulSingle` can be expressed as an `ite` -/
@[to_additive "On non-dependent functions, `Pi.single` can be expressed as an `ite`"]
theorem mulSingle_apply [One β] (i : I) (x : β) (i' : I) :
    (mulSingle i x : I → β) i' = if i' = i then x else 1

{I : Type u}
{β : Type u_2}
[DecidableEq I]
[One β]
(i : I)
(x : β)
(i' : I)

Pi.mulSingle i x i' = if i' = i then x else 1


theorem AEMeasurable.restrict (hfm : AEMeasurable f μ) {s} : AEMeasurable f (μ.restrict s)

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
(hfm : AEMeasurable f μ)
{s : Set α}


@[simp]
theorem toSignedMeasure_smul (μ : Measure α) [IsFiniteMeasure μ] (r : ℝ≥0) :
    (r • μ).toSignedMeasure = r • μ.toSignedMeasure

{α : Type u_1}
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure μ]
(r : ℝ≥0)


@[simp] lemma mkDerivationEquiv_symm_apply (D : Derivation R R[X] A) :
    (mkDerivationEquiv R).symm D = D X

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Module (Polynomial R) A]
[IsScalarTower R (Polynomial R) A]
(D : Derivation R (Polynomial R) A)

(Polynomial.mkDerivationEquiv R).symm D = D Polynomial.X


@[to_additive (attr := simp)]
theorem mem_inf {p p' : Subsemigroup M} {x : M} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'

{M : Type u_1}
[Add M]
{p p' : AddSubsemigroup M}
{x : M}


@[simp]
theorem circleMap_zero_radius (c : ℂ) : circleMap c 0 = const ℝ c


@[gcongr]
theorem diff_subset_diff_left {s₁ s₂ t : Set α} (h : s₁ ⊆ s₂) : s₁ \ t ⊆ s₂ \ t

{α : Type u}
{s₁ s₂ t : Set α}
(h : s₁ ⊆ s₂)


@[simp]
theorem preimage_eq_univ_iff {f : α → β} {s} : f ⁻¹' s = univ ↔ range f ⊆ s

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{s : Set β}


@[to_additive (attr := simp)]
theorem Units.val_mkOfMulEqOne [CommMonoid α] {a b : α} (h : a * b = 1) :
    (Units.mkOfMulEqOne a b h : α) = a

{α : Type u}
[AddCommMonoid α]
{a b : α}
(h : a + b = 0)


/-- Consider a series of smooth functions, with summable uniform bounds on the successive
derivatives. Then the iterated derivative of the sum is the sum of the iterated derivative. -/
theorem iteratedFDeriv_tsum (hf : ∀ i, ContDiff 𝕜 N (f i))
    (hv : ∀ k : ℕ, (k : ℕ∞) ≤ N → Summable (v k))
    (h'f : ∀ (k : ℕ) (i : α) (x : E), (k : ℕ∞) ≤ N → ‖iteratedFDeriv 𝕜 k (f i) x‖ ≤ v k i) {k : ℕ}
    (hk : (k : ℕ∞) ≤ N) :
    (iteratedFDeriv 𝕜 k fun y => ∑' n, f n y) = fun x => ∑' n, iteratedFDeriv 𝕜 k (f n) x

{v : ℕ → α → ℝ}

(hv : ∀ (k : ℕ), ↑k ≤ N → Summable (v k))

(h'f : ∀ (k : ℕ) (i : α) (x : E), ↑k ≤ N → ‖iteratedFDeriv 𝕜 k (f i) x‖ ≤ v k i)

(iteratedFDeriv 𝕜 k fun y => ∑' (n : α), f n y) = fun x => ∑' (n : α), iteratedFDeriv 𝕜 k (f n) x


lemma card_mod_card_parts_le : s.card % P.parts.card ≤ P.parts.card

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


@[to_additive (attr := simp)]
theorem nndist_div_right [DivInvMonoid M] [PseudoMetricSpace M] [IsometricSMul Mᵐᵒᵖ M]
    (a b c : M) : nndist (a / c) (b / c) = nndist a b

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


theorem mem_map_of_mem (f : α → β) {a : α} {s : Multiset α} (h : a ∈ s) : f a ∈ map f s

{α : Type u_1}
{β : Type v}
(f : α → β)
{a : α}
{s : Multiset α}
(h : a ∈ s)


lemma div_lt_div_right_of_pos {a a' b : EReal} (h₁ : 0 < b) (h₂ : b ≠ ⊤)
    (h₃ : a < a') : a / b < a' / b


lemma F_int_eq_of_mem_Icc (k : ℕ) {a : ℝ} (ha : a ∈ Icc 0 1) {t : ℝ} (ht : 0 < t) :
    F_int k a t = (F_nat k a t) + (F_nat k (1 - a) t)

HurwitzKernelBounds.F_int k (↑a) t = HurwitzKernelBounds.F_nat k a t + HurwitzKernelBounds.F_nat k (1 - a) t


/-- Naturality of the coprod_comparison morphism in both arguments. -/
@[reassoc]
theorem coprodComparison_natural (f : A ⟶ A') (g : B ⟶ B') :
    coprodComparison F A B ≫ F.map (coprod.map f g) =
      coprod.map (F.map f) (F.map g) ≫ coprodComparison F A' B'

[CategoryTheory.Limits.HasBinaryCoproduct (F.obj A) (F.obj B)]

[CategoryTheory.Limits.HasBinaryCoproduct (F.obj A') (F.obj B')]

CategoryTheory.Limits.coprodComparison F A B ≫ F.map (CategoryTheory.Limits.coprod.map f g) =
  CategoryTheory.Limits.coprod.map (F.map f) (F.map g) ≫ CategoryTheory.Limits.coprodComparison F A' B'


@[simp] theorem isPrefixOf_self {n : Name} : n.isPrefixOf n


theorem balanced_iUnion₂ {f : ∀ i, κ i → Set E} (h : ∀ i j, Balanced 𝕜 (f i j)) :
    Balanced 𝕜 (⋃ (i) (j), f i j)

(h : ∀ (i : ι) (j : κ i), Balanced 𝕜 (f i j))


@[to_additive]
theorem contMDiffWithinAt_finset_prod' (h : ∀ i ∈ t, ContMDiffWithinAt I' I n (f i) s x) :
    ContMDiffWithinAt I' I n (∏ i ∈ t, f i) s x

ContMDiffWithinAt I' I n (∑ i ∈ t, f i) s x


theorem cons_injective2 : Function.Injective2 (cons : α → Stream' α → Stream' α)


lemma cfc_predicate_algebraMap (r : R) : p (algebraMap R A r)

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
(r : R)


theorem union_comm (s₁ s₂ : Finset α) : s₁ ∪ s₂ = s₂ ∪ s₁

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

s₁ ∪ s₂ = s₂ ∪ s₁


lemma groupCohomologyπ_comp_isoH1_hom  :
    groupCohomologyπ A 1 ≫ (isoH1 A).hom =
      (isoOneCocycles A).hom ≫ (shortComplexH1 A).moduleCatHomologyπ

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)

groupCohomologyπ A 1 ≫ (groupCohomology.isoH1 A).hom =
  (groupCohomology.isoOneCocycles A).hom ≫ (groupCohomology.shortComplexH1 A).moduleCatHomologyπ


/-- The decomposition of elements of a star module into their self- and skew-adjoint parts,
as a linear equivalence. -/
-- Porting note: This attribute causes a `timeout at 'whnf'`.
@[simps!]
def StarModule.decomposeProdAdjoint : A ≃ₗ[R] selfAdjoint A × skewAdjoint A

(R : Type u_1)
(A : Type u_2)
[Semiring R]
[StarMul R]
[TrivialStar R]
[AddCommGroup A]
[Module R A]
[StarAddMonoid A]
[StarModule R A]
[Invertible 2]
(i : A)

(StarModule.decomposeProdAdjoint R A) i = ((selfAdjointPart R) i, (skewAdjointPart R) i)


@[to_additive]
theorem iInter_div_subset (s : ι → Set α) (t : Set α) : (⋂ i, s i) / t ⊆ ⋂ i, s i / t

{α : Type u_2}
{ι : Sort u_5}
[Div α]
(s : ι → Set α)
(t : Set α)


@[simp]
theorem intCast_apply [TopologicalAddGroup M] (z : ℤ) (m : M) : (↑z : M →L[R] M) m = z • m

{R : Type u_1}
[Ring R]
{M : Type u_4}
[TopologicalSpace M]
[AddCommGroup M]
[Module R M]
[TopologicalAddGroup M]
(z : ℤ)
(m : M)


@[to_additive]
theorem StrictAntiOn.inv (hf : StrictAntiOn f s) : StrictMonoOn (fun x => (f x)⁻¹) s

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

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


@[simp]
theorem mk'_eq_mk (v : { v : V // v ≠ 0 }) : mk' K v = mk K ↑v v.2

(K : Type u_1)
{V : Type u_2}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(v : { v // v ≠ 0 })

Projectivization.mk' K v = Projectivization.mk K ↑v ⋯


lemma comp₂ {g : α → γ} (hf : EventuallyConst f l) (op : β → γ → δ) (hg : EventuallyConst g l) :
    EventuallyConst (fun x ↦ op (f x) (g x)) l

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{l : Filter α}
{f : α → β}
{g : α → γ}
(hf : Filter.EventuallyConst f l)
(op : β → γ → δ)
(hg : Filter.EventuallyConst g l)

Filter.EventuallyConst (fun x => op (f x) (g x)) l


theorem add_absorp {a b c : Ordinal} (h₁ : a < (omega^b)) (h₂ : (omega^b) ≤ c) : a + c = c

{a b c : Ordinal.{u_1}}
(h₁ : a < Ordinal.omega ^ b)
(h₂ : Ordinal.omega ^ b ≤ c)


@[simp]
theorem map_proj (cond : LEComap f A B) (x : X) : map f cond (A.proj x) = B.proj (f x)

{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : C(X, Y)}
{A : DiscreteQuotient X}
{B : DiscreteQuotient Y}
(cond : DiscreteQuotient.LEComap f A B)
(x : X)

DiscreteQuotient.map f cond (A.proj x) = B.proj (f x)


@[reassoc (attr := simp)]
lemma inrX_π (i : ι) :
    inrX K i ≫ (π K).f i = (biprod.desc (𝟙 _) (𝟙 K)).f i

[∀ (i : ι), CategoryTheory.Limits.HasBinaryBiproduct (K.X i) (K.X i)]

[HomologicalComplex.HasHomotopyCofiber (CategoryTheory.Limits.biprod.lift (𝟙 K) (-𝟙 K))]

HomologicalComplex.cylinder.inrX K i ≫ (HomologicalComplex.cylinder.π K).f i =
  (CategoryTheory.Limits.biprod.desc (𝟙 K) (𝟙 K)).f i


theorem op_inf (S₁ S₂ : Subring R) : (S₁ ⊓ S₂).op = S₁.op ⊓ S₂.op

{R : Type u_2}
[Ring R]
(S₁ S₂ : Subring R)


@[simp]
theorem permutationsAux_nil (is : List α) : permutationsAux [] is = []


theorem openSegment_subset_segment (x y : E) : openSegment 𝕜 x y ⊆ [x -[𝕜] y]

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


theorem mem_segment_iff_div :
    x ∈ [y -[𝕜] z] ↔
      ∃ a b : 𝕜, 0 ≤ a ∧ 0 ≤ b ∧ 0 < a + b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedSemifield 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{x y z : E}

x ∈ [y-[𝕜]z] ↔ ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ 0 < a + b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x


lemma epi_iff_isIso_inr (hc : IsColimit c) : Epi f ↔ IsIso c.inr

{c : CategoryTheory.Limits.PushoutCocone f f}

(hc : CategoryTheory.Limits.IsColimit c)

CategoryTheory.Epi f ↔ CategoryTheory.IsIso c.inr


theorem measurableSet_swap_iff {s : Set (α × β)} :
    MeasurableSet (Prod.swap ⁻¹' s) ↔ MeasurableSet s

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{s : Set (α × β)}


theorem finRotate_last : finRotate (n + 1) (Fin.last _) = 0


@[simp] theorem msb_or {x y : BitVec w} : (x ||| y).msb = (x.msb || y.msb)


theorem ae_le_trim_iff [LinearOrder γ] [TopologicalSpace γ] [OrderClosedTopology γ]
    [PseudoMetrizableSpace γ] (hm : m ≤ m0) {f g : β → γ} (hf : StronglyMeasurable[m] f)
    (hg : StronglyMeasurable[m] g) : f ≤ᵐ[μ.trim hm] g ↔ f ≤ᵐ[μ] g

(hf : MeasureTheory.StronglyMeasurable f)

(hg : MeasureTheory.StronglyMeasurable g)


/-- Auxiliary definition for `functorCategoryEquivalence`. -/
@[simps!]
def unitIso : 𝟭 (Action V G) ≅ functor ⋙ inverse

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
(X : Action V G)

(Action.FunctorCategoryEquivalence.unitIso.inv.app X).hom = 𝟙 X.V


theorem matPolyEquiv_coeff_apply_aux_1 (i j : n) (k : ℕ) (x : R) :
    matPolyEquiv (stdBasisMatrix i j <| monomial k x) = monomial k (stdBasisMatrix i j x)

{R : Type u_1}
[CommSemiring R]
{n : Type w}
[DecidableEq n]
[Fintype n]
(i j : n)
(k : ℕ)
(x : R)

matPolyEquiv (Matrix.stdBasisMatrix i j ((Polynomial.monomial k) x)) =
  (Polynomial.monomial k) (Matrix.stdBasisMatrix i j x)


/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step0 : N ≠ ⊥

(h3 : ∀ (H : Subgroup G), ¬N.IsComplement' H)


theorem isBounded_prod_self : IsBounded (s ×ˢ s) ↔ IsBounded s

{α : Type u_1}
[Bornology α]
{s : Set α}

Bornology.IsBounded (s ×ˢ s) ↔ Bornology.IsBounded s


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

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

(h : ∀ (i : ι), LowerSemicontinuousOn (f i) s)

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


theorem uniqueBaseOn_inter_basis (hI : I ⊆ E) (hX : X ⊆ E) :
    (uniqueBaseOn I E).Basis (X ∩ I) X

{α : Type u_1}
{E I X : Set α}
(hI : I ⊆ E)
(hX : X ⊆ E)

(Matroid.uniqueBaseOn I E).Basis (X ∩ I) X


theorem modifyNthTail_length (f : List α → List α) (H : ∀ l, length (f l) = length l) :
    ∀ n l, length (modifyNthTail f n l) = length l

(H : ∀ (l : List α), (f l).length = l.length)

(List.modifyNthTail f n l).length = l.length


theorem denseEmbedding_coe [NoncompactSpace X] : DenseEmbedding ((↑) : X → OnePoint X)

{X : Type u_1}
[TopologicalSpace X]
[NoncompactSpace X]


@[to_additive (attr := simp)]
theorem Prime.prod_properDivisors {α : Type*} [CommMonoid α] {p : ℕ} {f : ℕ → α} (h : p.Prime) :
    ∏ x ∈ p.properDivisors, f x = f 1

{α : Type u_1}
[CommMonoid α]
{p : ℕ}
{f : ℕ → α}
(h : Nat.Prime p)


theorem opow_def (a b : Ordinal) :
    a ^ b = if a = 0 then 1 - b else limitRecOn b 1 (fun _ IH => IH * a) fun b _ => bsup.{u, u} b

a ^ b = if a = 0 then 1 - b else b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup


/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
    ContinuousOn f (EMetric.ball x r)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{r : ℝ≥0∞}
(hf : HasFPowerSeriesOnBall f p x r)


/-- The Schnirelmann density of a set not containing `1` is `0`. -/
lemma schnirelmannDensity_eq_zero_of_one_not_mem (h : 1 ∉ A) : schnirelmannDensity A = 0

{A : Set ℕ}
[DecidablePred fun x => x ∈ A]
(h : 1 ∉ A)


theorem natDegree_le_iff_coeff_eq_zero : p.natDegree ≤ n ↔ ∀ N : ℕ, n < N → p.coeff N = 0

{R : Type u}
{n : ℕ}
[Semiring R]
{p : R[X]}

p.natDegree ≤ n ↔ ∀ (N : ℕ), n < N → p.coeff N = 0


/-- The homotopy equivalence from a short complex to itself that is induced
by the identity. -/
@[simps]
def refl (S : ShortComplex C) : HomotopyEquiv S S

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(S : CategoryTheory.ShortComplex C)

(CategoryTheory.ShortComplex.HomotopyEquiv.refl S).hom = CategoryTheory.CategoryStruct.id S


/-- The original list `L` can be recovered by joining the lists produced by `splitOnP p L`,
interspersed with the elements `L.filter p`. -/
theorem splitOnP_spec (as : List α) :
    join (zipWith (· ++ ·) (splitOnP p as) (((as.filter p).map fun x => [x]) ++ [[]])) = as

{α : Type u}
{xs ys : List (List α)}
{a : α}
(hxs : xs ≠ [])
(hys : ys ≠ [])

(List.zipWith (fun x x_1 => x ++ x_1) (List.modifyHead (List.cons a) xs) ys).join =
  a :: (List.zipWith (fun x x_1 => x ++ x_1) xs ys).join


theorem Symmetric.swap_eq : Symmetric r → swap r = r


/-- The infimum edistance of a point to a set is positive if and only if the point is not in the
closure of the set. -/
theorem infEdist_pos_iff_not_mem_closure {x : α} {E : Set α} :
    0 < infEdist x E ↔ x ∉ closure E

{α : Type u}
[PseudoEMetricSpace α]
{x : α}
{E : Set α}

0 < EMetric.infEdist x E ↔ x ∉ closure E


@[ext] theorem Char.ext : {a b : Char} → a.val = b.val → a = b


/-- An isometry from a complete emetric space is a closed embedding -/
theorem closedEmbedding [CompleteSpace α] [EMetricSpace γ] {f : α → γ} (hf : Isometry f) :
    ClosedEmbedding f

{α : Type u}
{γ : Type w}
[EMetricSpace α]
[CompleteSpace α]
[EMetricSpace γ]
{f : α → γ}
(hf : Isometry f)


protected lemma «forall» {p : OnePoint X → Prop} :
    (∀ (x : OnePoint X), p x) ↔ p ∞ ∧ ∀ (x : X), p x

(∀ (x : OnePoint X), p x) ↔ p OnePoint.infty ∧ ∀ (x : X), p ↑x


theorem toList_foldr_inf_mem {p : T.CompleteType α} {t : Finset (L[[α]]).Sentence} :
    t.toList.foldr (· ⊓ ·) ⊤ ∈ p ↔ (t : L[[α]].Theory) ⊆ ↑p

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
{p : T.CompleteType α}
{t : Finset L[[α]].Sentence}

List.foldr (fun x x_1 => x ⊓ x_1) ⊤ t.toList ∈ p ↔ ↑t ⊆ ↑p


theorem exists_memBaseSet_le_iUnion_eq (l : IntegrationParams) (π₀ : Prepartition I)
    (hc₁ : π₀.distortion ≤ c) (hc₂ : π₀.compl.distortion ≤ c) (r : (ι → ℝ) → Ioi (0 : ℝ)) :
    ∃ π, l.MemBaseSet I c r π ∧ π.toPrepartition ≤ π₀ ∧ π.iUnion = π₀.iUnion

{ι : Type u_1}
[Fintype ι]
{I : BoxIntegral.Box ι}
{c : ℝ≥0}
(l : BoxIntegral.IntegrationParams)
(π₀ : BoxIntegral.Prepartition I)
(hc₁ : π₀.distortion ≤ c)
(hc₂ : π₀.compl.distortion ≤ c)
(r : (ι → ℝ) → ↑(Set.Ioi 0))


lemma measurableSet_memPartitionSet [MeasurableSpace α] {t : ℕ → Set α}
    (ht : ∀ n, MeasurableSet (t n)) (n : ℕ) (a : α) :
    MeasurableSet (memPartitionSet t n a)

{α : Type u_1}
[MeasurableSpace α]
{t : ℕ → Set α}
(ht : ∀ (n : ℕ), MeasurableSet (t n))
(n : ℕ)
(a : α)


@[simp]
theorem bindOnSupport_apply (b : β) :
    p.bindOnSupport f b = ∑' a, p a * if h : p a = 0 then 0 else f a h b

{α : Type u_1}
{β : Type u_2}
{p : PMF α}
(f : (a : α) → a ∈ p.support → PMF β)
(b : β)

(p.bindOnSupport f) b = ∑' (a : α), p a * if h : p a = 0 then 0 else (f a h) b


@[simp]
theorem hasFDerivWithinAt_univ : HasFDerivWithinAt f f' univ x ↔ HasFDerivAt f f' x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}

HasFDerivWithinAt f f' Set.univ x ↔ HasFDerivAt f f' x


theorem map_pbind (f : β → γ) (x : Option α) (g : ∀ a, a ∈ x → Option β) :
    Option.map f (x.pbind g) = x.pbind fun a H ↦ Option.map f (g a H)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : β → γ)
(x : Option α)
(g : (a : α) → a ∈ x → Option β)

Option.map f (x.pbind g) = x.pbind fun a H => Option.map f (g a H)


@[to_additive (attr := simp)]
theorem pow_pow (h : Commute a b) (m n : ℕ) : Commute (a ^ m) (b ^ n)

{M : Type u_2}
[Monoid M]
{a b : M}
(h : Commute a b)
(m n : ℕ)


@[to_additive]
lemma prod_lt_prod_of_ne_nil [Preorder M] [CovariantClass M M (· * ·) (· < ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] [CovariantClass M M (Function.swap (· * ·)) (· < ·)]
    [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)] {l : List ι} (hl : l ≠ []) (f g : ι → M)
    (hlt : ∀ i ∈ l, f i < g i) : (l.map f).prod < (l.map g).prod

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

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

[CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1]

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

(List.map f l).prod < (List.map g l).prod


@[to_additive (attr := simp)]
theorem coe_singletonMulHom : (singletonMulHom : α → Finset α) = singleton


/-- Same as `get?_zero_mul_tail_prod`, but avoiding the `List.headI` garbage complication by
  requiring the list to be nonempty. -/
@[to_additive "Same as `get?_zero_add_tail_sum`, but avoiding the `List.headI` garbage complication
  by requiring the list to be nonempty."]
theorem headI_mul_tail_prod_of_ne_nil [Inhabited M] (l : List M) (h : l ≠ []) :
    l.headI * l.tail.prod = l.prod

{M : Type u_4}
[Monoid M]
[Inhabited M]
(l : List M)
(h : l ≠ [])


/-- Three points are coplanar. -/
theorem coplanar_triple (p₁ p₂ p₃ : P) : Coplanar k ({p₁, p₂, p₃} : Set P)

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


@[to_additive (attr := simp) norm_eq_zero]
theorem norm_eq_zero'' : ‖a‖ = 0 ↔ a = 1


@[to_additive] lemma IsSquare.pow (n : ℕ) : IsSquare a → IsSquare (a ^ n)

{α : Type u_2}
[Monoid α]
{a : α}
(n : ℕ)


/-- `pb.equivOfRoot pb' h₁ h₂` is an equivalence of algebras with the same power basis,
where "the same" means that `pb` is a root of `pb'`s minimal polynomial and vice versa.

See also `PowerBasis.equivOfMinpoly` which takes the hypothesis that the
minimal polynomials are identical.
-/
@[simps! (config := .lemmasOnly) apply]
noncomputable def equivOfRoot (pb : PowerBasis A S) (pb' : PowerBasis A S')
    (h₁ : aeval pb.gen (minpoly A pb'.gen) = 0) (h₂ : aeval pb'.gen (minpoly A pb.gen) = 0) :
    S ≃ₐ[A] S'

(h₁ : (Polynomial.aeval pb.gen) (minpoly A pb'.gen) = 0)

(h₂ : (Polynomial.aeval pb'.gen) (minpoly A pb.gen) = 0)

(pb.equivOfRoot pb' h₁ h₂) a = (pb.lift pb'.gen h₂) a


theorem HasAntitoneBasis.comp_strictMono {l : Filter α} {s : ℕ → Set α} (hs : l.HasAntitoneBasis s)
    {φ : ℕ → ℕ} (hφ : StrictMono φ) : l.HasAntitoneBasis (s ∘ φ)

{α : Type u_3}
{l : Filter α}
{s : ℕ → Set α}
(hs : l.HasAntitoneBasis s)
{φ : ℕ → ℕ}
(hφ : StrictMono φ)


@[to_additive]
theorem coe_pi (I : Set η) (H : ∀ i, Subgroup (f i)) :
    (pi I H : Set (∀ i, f i)) = Set.pi I fun i => (H i : Set (f i))

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

↑(Subgroup.pi I H) = I.pi fun i => ↑(H i)


protected theorem mul_add [Fintype n] (L : Matrix m n α) (M N : Matrix n o α) :
    L * (M + N) = L * M + L * N

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
[NonUnitalNonAssocSemiring α]
[Fintype n]
(L : Matrix m n α)
(M N : Matrix n o α)


theorem imp_congr_ctx (h₁ : a ↔ c) (h₂ : c → (b ↔ d)) : (a → b) ↔ (c → d)

{a b c d : Prop}
(h₁ : a ↔ c)
(h₂ : c → (b ↔ d))


@[simp]
theorem factorization_one_right (n : ℕ) : n.factorization 1 = 0


@[to_additive]
theorem Nonempty.smul_finset (hs : s.Nonempty) : (a • s).Nonempty

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{s : Finset β}
{a : α}
(hs : s.Nonempty)


@[to_additive (attr := simp)]
theorem _root_.MulEquiv.withOneCongr_symm (e : α ≃* β) :
    e.withOneCongr.symm = e.symm.withOneCongr

{α : Type u}
{β : Type v}
[Add α]
[Add β]
(e : α ≃+ β)


theorem IsPure.min {s t : Semiquot α} (h : IsPure t) : s ≤ t ↔ s = t

{α : Type u_1}
{s t : Semiquot α}
(h : t.IsPure)


@[simp]
theorem mem_empty_iff_false (x : α) : x ∈ (∅ : Set α) ↔ False


@[to_additive]
theorem swap_mem_mulAntidiagonal :
    x.swap ∈ Finset.mulAntidiagonal hs ht a ↔ x ∈ Finset.mulAntidiagonal ht hs a

{α : Type u_1}
[OrderedCancelCommMonoid α]
{s t : Set α}
{hs : s.IsPWO}
{ht : t.IsPWO}
{a : α}
{x : α × α}


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

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


@[simp] lemma map_id : G.map (Function.Embedding.refl _) = G

SimpleGraph.map (Function.Embedding.refl V) G = G


@[simp]
theorem prod_inf : s ×ˢ (t₁ ⊓ t₂) = s ×ˢ t₁ ⊓ s ×ˢ t₂

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

s ×ˢ (t₁ ⊓ t₂) = s ×ˢ t₁ ⊓ s ×ˢ t₂


theorem Rat.RingOfIntegers.isUnit_iff {x : 𝓞 ℚ} : IsUnit x ↔ (x : ℚ) = 1 ∨ (x : ℚ) = -1


@[measurability]
theorem Measurable.const_inner {_ : MeasurableSpace α} [MeasurableSpace E] [OpensMeasurableSpace E]
    [SecondCountableTopology E] {c : E} {f : α → E} (hf : Measurable f) :
    Measurable fun t => ⟪c, f t⟫

{α : Type u_1}
{𝕜 : Type u_2}
{E : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]

∀ {x : MeasurableSpace α} [inst : MeasurableSpace E] [inst_1 : OpensMeasurableSpace E]
  [inst_2 : SecondCountableTopology E] {c : E} {f : α → E}, Measurable f → Measurable fun t => ⟪c, f t⟫_𝕜


lemma eventually_atTop_ge_nat {b : ℝ} (hb : b ∈ Set.Ioo 0 1) (hf : GrowsPolynomially f) :
    ∃ c > 0, ∀ᶠ (n : ℕ) in atTop, ∀ u ∈ Set.Icc (b * n) n, c * f n ≤ f u

(hf : AkraBazziRecurrence.GrowsPolynomially f)

∃ c > 0, ∀ᶠ (n : ℕ) in Filter.atTop, ∀ u ∈ Set.Icc (b * ↑n) ↑n, c * f ↑n ≤ f u


lemma growsPolynomially_zpow (p : ℤ) : GrowsPolynomially fun x => x ^ p

AkraBazziRecurrence.GrowsPolynomially fun x => x ^ p


/-- `zero_le_one` with the type argument explicit. -/
lemma zero_le_one' (α) [Zero α] [One α] [LE α] [ZeroLEOneClass α] : (0 : α) ≤ 1

(α : Type u_2)
[Zero α]
[One α]
[LE α]
[ZeroLEOneClass α]


theorem inv_logb_mul_base {a b : ℝ} (h₁ : a ≠ 0) (h₂ : b ≠ 0) (c : ℝ) :
    (logb (a * b) c)⁻¹ = (logb a c)⁻¹ + (logb b c)⁻¹

(Real.logb (a * b) c)⁻¹ = (Real.logb a c)⁻¹ + (Real.logb b c)⁻¹


/-- If two points on the same ray have the same norm, then they are equal. -/
theorem SameRay.eq_of_norm_eq (h : SameRay ℝ x y) (hn : ‖x‖ = ‖y‖) : x = y

{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{x y : F}
(h : SameRay ℝ x y)
(hn : ‖x‖ = ‖y‖)


@[simp] theorem tailD_map (f : α → β) (l : List α) (l' : List α) :
    tailD (map f l) (map f l') = map f (tailD l l')

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

(List.map f l).tailD (List.map f l') = List.map f (l.tailD l')


theorem IsCoprime.mul_left (H1 : IsCoprime x z) (H2 : IsCoprime y z) : IsCoprime (x * y) z

{R : Type u}
[CommSemiring R]
{x y z : R}
(H1 : IsCoprime x z)
(H2 : IsCoprime y z)


@[simp]
theorem lift_comp_of (F : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A) : lift R (F ∘ of R) = F

(FreeNonUnitalNonAssocAlgebra.lift R) (⇑F ∘ FreeNonUnitalNonAssocAlgebra.of R) = F


@[to_additive existing]
theorem eval_prod {ι : Type*} (s : Finset ι) (f : ι → MvPolynomial σ R) (g : σ → R) :
    eval g (∏ i ∈ s, f i) = ∏ i ∈ s, eval g (f i)

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{ι : Type u_2}
(s : Finset ι)
(f : ι → MvPolynomial σ R)
(g : σ → R)

(MvPolynomial.eval g) (∏ i ∈ s, f i) = ∏ i ∈ s, (MvPolynomial.eval g) (f i)


@[simp]
theorem compl_le_compl : s.compl ≤ t.compl ↔ s ≤ t

{α : Type u_1}
[LE α]
{s t : LowerSet α}


theorem mem_center_iff {a : A} : a ∈ center R A ↔ ∀ b : A, b * a = a * b

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

a ∈ NonUnitalStarSubalgebra.center R A ↔ ∀ (b : A), b * a = a * b


theorem inf_congr_right (h1 : b ⊓ c ≤ a) (h2 : a ⊓ c ≤ b) : a ⊓ c = b ⊓ c

{α : Type u}
[SemilatticeInf α]
{a b c : α}
(h1 : b ⊓ c ≤ a)
(h2 : a ⊓ c ≤ b)


lemma completeSpace_continuousLinearMap_iff :
    CompleteSpace (E →L[𝕜] F) ↔ CompleteSpace F

(𝕜 : Type u_3)
(E : Type u_4)
(F : Type u_5)
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[SeparatingDual 𝕜 E]
[Nontrivial E]


theorem C_injective (σ : Type*) (R : Type*) [CommSemiring R] :
    Function.Injective (C : R → MvPolynomial σ R)

(σ : Type u_2)
(R : Type u_3)
[CommSemiring R]


theorem get_eq_iff_mem {o : Part α} {a : α} (h : o.Dom) : o.get h = a ↔ a ∈ o

{α : Type u_1}
{o : Part α}
{a : α}
(h : o.Dom)


theorem snd_diag {α : TypeVec n} : TypeVec.prod.snd ⊚ (prod.diag : α ⟹ _) = id

TypeVec.comp TypeVec.prod.snd TypeVec.prod.diag = TypeVec.id


theorem length_toList {t : Ordnode α} (h : Sized t) : (toList t).length = t.size

{α : Type u_1}
{t : Ordnode α}
(h : t.Sized)


theorem MDifferentiableAt.comp (hg : MDifferentiableAt I' I'' g (f x))
    (hf : MDifferentiableAt I I' f x) : MDifferentiableAt I I'' (g ∘ f) x

[I''s : SmoothManifoldWithCorners I'' M'']


@[simp, norm_cast]
lemma ofReal_nnqsmul (q : ℚ≥0) (r : ℝ) : ofReal' (q • r) = q • r


theorem image_vsub_image {s t : Set P1} (f : P1 →ᵃ[k] P2) :
    f '' s -ᵥ f '' t = f.linear '' (s -ᵥ t)

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]
{s t : Set P1}
(f : P1 →ᵃ[k] P2)

⇑f '' s -ᵥ ⇑f '' t = ⇑f.linear '' (s -ᵥ t)


/-- See `zero_lt_three` for a version with the type implicit. -/
lemma zero_lt_three' : (0 : α) < 3

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


/-- A structure induced by a bijection. -/
@[simps!]
def inducedStructure (e : M ≃ N) : L.Structure N

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

∀ {n : ℕ} (f : L.Functions n) (x : Fin n → N),
  FirstOrder.Language.Structure.funMap f x = e (FirstOrder.Language.Structure.funMap f (⇑e.symm ∘ x))


@[to_additive QuotientAddGroup.mk_out'_eq_mul]
theorem mk_out'_eq_mul (g : α) : ∃ h : s, (mk g : α ⧸ s).out' = g * h

{α : Type u_1}
[Group α]
(s : Subgroup α)
(g : α)


@[to_additive] lemma MonovaryOn.mul_right (h₁ : MonovaryOn f g₁ s) (h₂ : MonovaryOn f g₂ s) :
    MonovaryOn f (g₁ * g₂) s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[LinearOrderedCommGroup β]
{s : Set ι}
{f : ι → α}
{g₁ g₂ : ι → β}
(h₁ : MonovaryOn f g₁ s)
(h₂ : MonovaryOn f g₂ s)


/-- Split a `Prop` in characteristic zero into equal and mixed characteristic. -/
theorem split_equalCharZero_mixedCharZero [CharZero R] (h_equal : Algebra ℚ R → P)
    (h_mixed : ∀ p : ℕ, Nat.Prime p → MixedCharZero R p → P) : P

(h_mixed : ∀ (p : ℕ), Nat.Prime p → MixedCharZero R p → P)


@[simp]
theorem trans_refl (f : α ≃. β) : f.trans (PEquiv.refl β) = f


private lemma pairwiseDisjoint_distinctPairs :
    (P.parts.offDiag.attach : Set {x // x ∈ P.parts.offDiag}).PairwiseDisjoint
      (distinctPairs hP G ε)

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{P : Finpartition Finset.univ}
{hP : P.IsEquipartition}
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε : ℝ}

(↑P.parts.offDiag.attach).PairwiseDisjoint (SzemerediRegularity.distinctPairs hP G ε)


@[simp, deprecated coe_lt_coe "Don't mix Option and WithBot" (since := "2024-05-27")]
theorem some_lt_some : @LT.lt (WithBot α) _ (Option.some a) (Option.some b) ↔ a < b


theorem _root_.Matrix.Nondegenerate.toBilin' {M : Matrix ι ι R₃} (h : M.Nondegenerate) :
    M.toBilin'.Nondegenerate

{R₃ : Type u_7}
[CommRing R₃]
{ι : Type u_12}
[DecidableEq ι]
[Fintype ι]
{M : Matrix ι ι R₃}
(h : M.Nondegenerate)


theorem hasProducts_of_opposite [HasCoproducts.{v₂} Cᵒᵖ] : HasProducts.{v₂} C


theorem Duplicate.mono_sublist {l' : List α} (hx : x ∈+ l) (h : l <+ l') : x ∈+ l'

{α : Type u_1}
{l : List α}
{x : α}
{l' : List α}
(hx : List.Duplicate x l)
(h : l.Sublist l')


protected theorem indBeta {α : Sort u} {r : α → α → Prop} {motive : Quot r → Prop}
    (p : (a : α) → motive (Quot.mk r a))
    (a : α)
    : (ind p (Quot.mk r a) : motive (Quot.mk r a)) = p a

{α : Sort u}
{r : α → α → Prop}
{motive : Quot r → Prop}
(p : ∀ (a : α), motive (Quot.mk r a))
(a : α)


lemma absolutelyContinuous_map (hf : MeasurableEmbedding f) (hμν : μ ≪ ν) :
    μ.map f ≪ ν.map f

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
{m1 : MeasurableSpace β}
{f : α → β}
{μ ν : MeasureTheory.Measure α}
(hf : MeasurableEmbedding f)
(hμν : μ.AbsolutelyContinuous ν)

(MeasureTheory.Measure.map f μ).AbsolutelyContinuous (MeasureTheory.Measure.map f ν)


lemma sup'_univ_eq_ciSup (f : ι → α) : univ.sup' univ_nonempty f = ⨆ i, f i

{ι : Type u_1}
{α : Type u_2}
[ConditionallyCompleteLattice α]
[Fintype ι]
[Nonempty ι]
(f : ι → α)


theorem prod_uniformContinuous_equiv_symm : UniformContinuous (WithLp.equiv p (α × β)).symm

(p : ℝ≥0∞)
(α : Type u_2)
(β : Type u_3)
[UniformSpace α]
[UniformSpace β]

UniformContinuous ⇑(WithLp.equiv p (α × β)).symm


@[simp]
theorem isLittleO_top : f'' =o[⊤] g' ↔ ∀ x, f'' x = 0

{α : Type u_1}
{F' : Type u_7}
{E'' : Type u_9}
[SeminormedAddCommGroup F']
[NormedAddCommGroup E'']
{g' : α → F'}
{f'' : α → E''}


theorem ascFactorial_pos (n k : ℕ) : 0 < (n + 1).ascFactorial k


@[simp]
theorem ListBlank.head_map {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : PointedMap Γ Γ')
    (l : ListBlank Γ) : (l.map f).head = f l.head

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Turing.PointedMap Γ Γ')
(l : Turing.ListBlank Γ)

(Turing.ListBlank.map f l).head = f.f l.head


theorem initial_of_natIso {F F' : C ⥤ D} [Initial F] (i : F ≅ F') : Initial F'

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F F' : CategoryTheory.Functor C D}
[F.Initial]
(i : F ≅ F')


theorem of'_mul_divOf (a : G) (x : k[G]) : of' k G a * x /ᵒᶠ a = x

{k : Type u_1}
{G : Type u_2}
[Semiring k]
[AddCancelCommMonoid G]
(a : G)
(x : AddMonoidAlgebra k G)

(AddMonoidAlgebra.of' k G a * x).divOf a = x


theorem WriterT.goto_mkLabel' {α β ω : Type _} [Monoid ω] (x : Label (α × ω) m β) (i : α) :
    goto (WriterT.mkLabel' x) i = monadLift (goto x (i, 1))

{m : Type u → Type v}
[Monad m]
{α : Type u_1}
{β ω : Type u}
[Monoid ω]
(x : ContT.Label (α × ω) m β)
(i : α)

ContT.goto (WriterT.mkLabel' x) i = monadLift (ContT.goto x (i, 1))


@[simp]
theorem Icc_eq_empty_of_lt (h : b < a) : Icc a b = ∅

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}
(h : b < a)


theorem equivalence_counitIso :
    DoldKan.equivalence.counitIso = (η : Γ ⋙ N ≅ 𝟭 (ChainComplex C ℕ))


@[simp] theorem ofIso_trans (e : Q₁.IsometryEquiv Q₂) (f : Q₂.IsometryEquiv Q₃) :
    ofIso (e.trans f) = ofIso e ≪≫ ofIso f

{R : Type u}
[CommRing R]
{X Y Z : Type v}
[AddCommGroup X]
[Module R X]
[AddCommGroup Y]
[Module R Y]
[AddCommGroup Z]
[Module R Z]
{Q₁ : QuadraticForm R X}
{Q₂ : QuadraticForm R Y}
{Q₃ : QuadraticForm R Z}
(e : QuadraticMap.IsometryEquiv Q₁ Q₂)
(f : QuadraticMap.IsometryEquiv Q₂ Q₃)

QuadraticModuleCat.ofIso (e.trans f) = QuadraticModuleCat.ofIso e ≪≫ QuadraticModuleCat.ofIso f


/-- If `i` is an `F`-algebra homomorphism from `E` to `K`, then the image of `perfectClosure F E`
under the map `i` is contained in `perfectClosure F K`. -/
theorem perfectClosure.map_le_of_algHom (i : E →ₐ[F] K) :
    (perfectClosure F E).map i ≤ perfectClosure F K

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
{K : Type w}
[Field K]
[Algebra F K]
(i : E →ₐ[F] K)

IntermediateField.map i (perfectClosure F E) ≤ perfectClosure F K


theorem map_le_iff_le_comap {f : F} {s : NonUnitalSubsemiring R} {t : NonUnitalSubsemiring S} :
    s.map f ≤ t ↔ s ≤ t.comap f

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{F : Type u_1}
[FunLike F R S]
[NonUnitalRingHomClass F R S]
{f : F}
{s : NonUnitalSubsemiring R}
{t : NonUnitalSubsemiring S}

NonUnitalSubsemiring.map f s ≤ t ↔ s ≤ NonUnitalSubsemiring.comap f t


theorem Prod.edist_eq [PseudoEMetricSpace β] (x y : α × β) :
    edist x y = max (edist x.1 y.1) (edist x.2 y.2)

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(x y : α × β)


@[simp] theorem castLE_mk (i n m : Nat) (hn : i < n) (h : n ≤ m) :
    castLE h ⟨i, hn⟩ = ⟨i, Nat.lt_of_lt_of_le hn h⟩


theorem symm_apply_eq (e : α ≃o β) {x : α} {y : β} : e.symm y = x ↔ y = e x

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
(e : α ≃o β)
{x : α}
{y : β}


{α : Type u}
[SemilatticeSup α]
[OrderBot α]
(a : α)


theorem le_mul_iInf {a : ℝ≥0} {g : ℝ≥0} {h : ι → ℝ≥0} (H : ∀ j, a ≤ g * h j) : a ≤ g * iInf h

{ι : Sort u_1}
[Nonempty ι]
{a g : ℝ≥0}
{h : ι → ℝ≥0}
(H : ∀ (j : ι), a ≤ g * h j)


/-- The reverse inclusion does not hold for e.g. `I := fun n : ℕ ↦ Ideal.span {(2 ^ n : ℤ)}`. -/
theorem radical_iInf_le {ι} (I : ι → Ideal R) : radical (⨅ i, I i) ≤ ⨅ i, radical (I i)

{R : Type u}
[CommSemiring R]
{ι : Sort u_2}
(I : ι → Ideal R)


/-- To check whether two maps are equalized by both maps of a trident, it suffices to check it for
the first map -/
theorem Trident.equalizer_ext [Nonempty J] (s : Trident f) {W : C} {k l : W ⟶ s.pt}
    (h : k ≫ s.ι = l ≫ s.ι) : ∀ j : WalkingParallelFamily J, k ≫ s.π.app j = l ≫ s.π.app j

(h : CategoryTheory.CategoryStruct.comp k s.ι = CategoryTheory.CategoryStruct.comp l s.ι)

(j : CategoryTheory.Limits.WalkingParallelFamily J)

CategoryTheory.CategoryStruct.comp k (s.π.app j) = CategoryTheory.CategoryStruct.comp l (s.π.app j)


@[simp]
theorem reindexFinsetRange_repr (x : M) (i : ι)
    (h := Finset.mem_image_of_mem b (Finset.mem_univ i)) :
    b.reindexFinsetRange.repr x ⟨b i, h⟩ = b.repr x i

(h : b i ∈ Finset.image (⇑b) Finset.univ := ⋯)

(b.reindexFinsetRange.repr x) ⟨b i, h⟩ = (b.repr x) i