/-- Write out `B x y` as a sum over `B (b i) (b j)` if `b` is a basis.

Version for bilinear maps, see `sum_repr_mul_repr_mulₛₗ` for the semi-bilinear version. -/
theorem sum_repr_mul_repr_mul {B : Mₗ →ₗ[Rₗ] Nₗ →ₗ[Rₗ] Pₗ} (x y) :
    ((b₁'.repr x).sum fun i xi => (b₂'.repr y).sum fun j yj => xi • yj • B (b₁' i) (b₂' j)) =
      B x y

{ι₁ : Type u_1}
{ι₂ : Type u_2}
{Rₗ : Type u_10}
{Mₗ : Type u_11}
{Nₗ : Type u_12}
{Pₗ : Type u_13}
[CommSemiring Rₗ]
[AddCommMonoid Mₗ]
[AddCommMonoid Nₗ]
[AddCommMonoid Pₗ]
[Module Rₗ Mₗ]
[Module Rₗ Nₗ]
[Module Rₗ Pₗ]
(b₁' : Basis ι₁ Rₗ Mₗ)
(b₂' : Basis ι₂ Rₗ Nₗ)
{B : Mₗ →ₗ[Rₗ] Nₗ →ₗ[Rₗ] Pₗ}
(x : Mₗ)
(y : Nₗ)

((b₁'.repr x).sum fun i xi => (b₂'.repr y).sum fun j yj => xi • yj • (B (b₁' i)) (b₂' j)) = (B x) y


theorem IsPreconnected.intermediate_value_Ico {s : Set X} (hs : IsPreconnected s) {a : X}
    {l : Filter X} (ha : a ∈ s) [NeBot l] (hl : l ≤ 𝓟 s) {f : X → α} (hf : ContinuousOn f s) {v : α}
    (ht : Tendsto f l (𝓝 v)) : Ico (f a) v ⊆ f '' s

{X : Type u}
{α : Type v}
[TopologicalSpace X]
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{s : Set X}
(hs : IsPreconnected s)
{a : X}
{l : Filter X}
(ha : a ∈ s)
[l.NeBot]
(hl : l ≤ 𝓟 s)
{f : X → α}
(hf : ContinuousOn f s)
{v : α}
(ht : Filter.Tendsto f l (𝓝 v))


theorem SeminormFamily.withSeminorms_of_hasBasis [TopologicalAddGroup E] (p : SeminormFamily 𝕜 E ι)
    (h : (𝓝 (0 : E)).HasBasis (fun s : Set E => s ∈ p.basisSets) id) : WithSeminorms p

(h : (𝓝 0).HasBasis (fun s => s ∈ p.basisSets) id)


theorem atom_pf (a : R) : a = a ^ (nat_lit 1).rawCast * (nat_lit 1).rawCast + 0

a = a ^ Nat.rawCast 1 * Nat.rawCast 1 + 0


theorem isAlgebraic_algebraMap_iff {a : S} (h : Function.Injective (algebraMap S A)) :
    IsAlgebraic R (algebraMap S A a) ↔ IsAlgebraic R a

(h : Function.Injective ⇑(algebraMap S A))

IsAlgebraic R ((algebraMap S A) a) ↔ IsAlgebraic R a


/-- We have that `λ ^ (3*S.multiplicity-2)` divides `S.a + S.b`. -/
private lemma lambda_pow_dvd_a_add_b : λ ^ (3 * S.multiplicity - 2) ∣ S.a + S.b

(S : FermatLastTheoremForThreeGen.Solution hζ)

(hζ.toInteger - 1) ^ (3 * S.multiplicity - 2) ∣ S.a + S.b


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

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{f : G → H}
(hf : IsGroupHom f)
{a b : G}
(h : f (a⁻¹ * b) = 1)


theorem natAdd_castSucc {m n : Nat} {i : Fin m} : natAdd n (castSucc i) = castSucc (natAdd n i)

Fin.natAdd n i.castSucc = (Fin.natAdd n i).castSucc


/-- `M` is a scalar matrix if it commutes with every nontrivial transvection (elementary matrix). -/
theorem _root_.Matrix.mem_range_scalar_of_commute_transvectionStruct {M : Matrix n n R}
    (hM : ∀ t : TransvectionStruct n R, Commute t.toMatrix M) :
    M ∈ Set.range (Matrix.scalar n)

(hM : ∀ (t : Matrix.TransvectionStruct n R), Commute t.toMatrix M)


/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
nonrec theorem tendsto_tsum_compl_atTop_zero {α : Type*} (f : α → ℝ≥0) :
    Tendsto (fun s : Finset α => ∑' b : { x // x ∉ s }, f b) atTop (𝓝 0)

Filter.Tendsto (fun s => ∑' (b : { x // x ∉ s }), f ↑b) Filter.atTop (𝓝 0)


theorem eventually_nhds_norm_smul_sub_lt (c : 𝕜) (x : E) {ε : ℝ} (h : 0 < ε) :
    ∀ᶠ y in 𝓝 x, ‖c • (y - x)‖ < ε

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
(c : 𝕜)
(x : E)
{ε : ℝ}
(h : 0 < ε)


@[simp]
theorem zero_right [MulZeroClass G₀] (a : G₀) : SemiconjBy a 0 0

{G₀ : Type u_3}
[MulZeroClass G₀]
(a : G₀)


@[reassoc (attr := simp)]
theorem prodComparison_fst : prodComparison F A B ≫ prod.fst = F.map prod.fst

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

CategoryTheory.Limits.prodComparison F A B ≫ CategoryTheory.Limits.prod.fst = F.map CategoryTheory.Limits.prod.fst


@[simp]
theorem «forall» {p : (Σa, β a) → Prop} : (∀ x, p x) ↔ ∀ a b, p ⟨a, b⟩

{α : Type u_1}
{β : α → Type u_4}
{p : (a : α) × β a → Prop}

(∀ (x : (a : α) × β a), p x) ↔ ∀ (a : α) (b : β a), p ⟨a, b⟩


@[to_additive (attr := simp)]
theorem equivQuotientZPowOfEquiv_symm :
    (equivQuotientZPowOfEquiv e n).symm = equivQuotientZPowOfEquiv e.symm n

{A B : Type u}
[CommGroup A]
[CommGroup B]
(e : A ≃* B)
(n : ℤ)

(QuotientGroup.equivQuotientZPowOfEquiv e n).symm = QuotientGroup.equivQuotientZPowOfEquiv e.symm n


/-- If `x` is an element of a submodule `s` of a normed group `E`, its norm in `E` is equal to its
norm in `s`.

This is a reversed version of the `simp` lemma `Submodule.coe_norm` for use by `norm_cast`. -/
@[norm_cast]
theorem norm_coe [Ring 𝕜] [SeminormedAddCommGroup E] [Module 𝕜 E] {s : Submodule 𝕜 E}
    (x : s) : ‖(x : E)‖ = ‖x‖

{𝕜 : Type u_1}
{E : Type u_2}
[Ring 𝕜]
[SeminormedAddCommGroup E]
[Module 𝕜 E]
{s : Submodule 𝕜 E}
(x : ↥s)


/-- If `f : R → ℝ` is a nonnegative, multiplicatively bounded, subadditive function, then
  `seminormFromBounded' f` is subadditive. -/
theorem seminormFromBounded_add (f_nonneg : 0 ≤ f)
    (f_mul : ∀ x y : R, f (x * y) ≤ c * f x * f y)
    (f_add : ∀ a b, f (a + b) ≤ f a + f b) (x y : R) :
    seminormFromBounded' f (x + y) ≤ seminormFromBounded' f x + seminormFromBounded' f y

(f_mul : ∀ (x y : R), f (x * y) ≤ c * f x * f y)

(f_add : ∀ (a b : R), f (a + b) ≤ f a + f b)


private theorem hIterateFrom_elim {P : Nat → Sort _}(Q : ∀(i : Nat), P i → Prop)
    {n  : Nat}
    (f : ∀(i : Fin n), P i.val → P (i.val+1))
    {i : Nat} (ubnd : i ≤ n)
    (s : P i)
    (init : Q i s)
    (step : ∀(k : Fin n) (s : P k.val), Q k.val s → Q (k.val+1) (f k s)) :
    Q n (hIterateFrom P f i ubnd s)

(step : ∀ (k : Fin n) (s : P ↑k), Q (↑k) s → Q (↑k + 1) (f k s))


/-- Predicate for ring homomorphisms (deprecated -- use the bundled `RingHom` version). -/
structure IsRingHom {α : Type u} {β : Type v} [Ring α] [Ring β] (f : α → β) : Prop where
  /-- The proposition that `f` preserves the multiplicative identity. -/
  map_one : f 1 = 1
  /-- The proposition that `f` preserves multiplication. -/
  map_mul : ∀ x y, f (x * y) = f x * f y
  /-- The proposition that `f` preserves addition. -/
  map_add : ∀ x y, f (x + y) = f x + f y

{α : Type u}
{β : Type v}
[Ring α]
[Ring β]
{f : α → β}
(self : IsRingHom f)
(x y : α)


theorem iInf_lt_succ' (u : ℕ → α) (n : ℕ) : ⨅ k < n + 1, u k = u 0 ⊓ ⨅ k < n, u (k + 1)

{α : Type u_1}
[CompleteLattice α]
(u : ℕ → α)
(n : ℕ)


@[simp]
theorem eval₂_eta (p : MvPolynomial σ R) : eval₂ C X p = p

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

MvPolynomial.eval₂ MvPolynomial.C MvPolynomial.X p = p


theorem card_fintypeIoc : Fintype.card (Set.Ioc a b) = b - a


@[simp]
theorem smul_eval (n : ℕ) (r : AdicCompletion I R) (x : AdicCompletion I M) :
    (r • x).val n = r.val n • x.val n

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(n : ℕ)
(r : AdicCompletion I R)
(x : AdicCompletion I M)


theorem Pairwise.imp_of_mem {S : α → α → Prop}
    (H : ∀ {a b}, a ∈ l → b ∈ l → R a b → S a b) (p : Pairwise R l) : Pairwise S l

(H : ∀ {a b : α}, a ∈ l → b ∈ l → R a b → S a b)


lemma Antitone.isCoboundedUnder_le_of_isCobounded {f : R → S} (f_decr : Antitone f)
    [NeBot F] (cobdd : IsCobounded (· ≥ ·) F) :
    F.IsCoboundedUnder (· ≤ ·) f

(cobdd : Filter.IsCobounded (fun x x_1 => x ≥ x_1) F)

Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) F f


@[simp]
theorem norm_apply_eq_norm_coef : ‖p n‖ = ‖coeff p n‖

{𝕜 : Type u}
{E : Type v}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{p : FormalMultilinearSeries 𝕜 𝕜 E}
{n : ℕ}


@[simp]
lemma coe_mk {f : C(X, R)} {h0 : f 0 = 0} : ⇑(mk f h0) = f

{X : Type u_1}
{R : Type u_3}
[Zero X]
[Zero R]
[TopologicalSpace X]
[TopologicalSpace R]
{f : C(X, R)}
{h0 : f 0 = 0}

⇑{ toContinuousMap := f, map_zero' := h0 } = ⇑f


theorem Nat.decreasing_induction_of_not_bddAbove (hP : ¬BddAbove { x | P x }) (n : ℕ) : P n

{P : ℕ → Prop}
(h : ∀ (n : ℕ), P (n + 1) → P n)
(hP : ¬BddAbove {x | P x})
(n : ℕ)


theorem tr_ret_cons₁ (fs k) : tr (Λ'.ret (Cont'.cons₁ fs k)) = goto fun _ =>
    move₂ (fun _ => false) main aux <|
      move₂ (fun s => s = Γ'.consₗ) stack main <|
        move₂ (fun _ => false) aux stack <| trNormal fs (Cont'.cons₂ k)

(fs : Turing.ToPartrec.Code)
(k : Turing.PartrecToTM2.Cont')

Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.ret (Turing.PartrecToTM2.Cont'.cons₁ fs k)) =
  Turing.TM2.Stmt.goto fun x =>
    Turing.PartrecToTM2.move₂ (fun x => false) Turing.PartrecToTM2.K'.main Turing.PartrecToTM2.K'.aux
      (Turing.PartrecToTM2.move₂ (fun s => decide (s = Turing.PartrecToTM2.Γ'.consₗ)) Turing.PartrecToTM2.K'.stack
        Turing.PartrecToTM2.K'.main
        (Turing.PartrecToTM2.move₂ (fun x => false) Turing.PartrecToTM2.K'.aux Turing.PartrecToTM2.K'.stack
          (Turing.PartrecToTM2.trNormal fs k.cons₂)))


/-- The equivalence of functor categories given by currying/uncurrying.
-/
@[simps!]
def currying : C ⥤ D ⥤ E ≌ C × D ⥤ E

(X : CategoryTheory.Functor C (CategoryTheory.Functor D E))

∀ (X_1 : C) (X_2 : D),
  ((CategoryTheory.currying.unitIso.hom.app X).app X_1).app X_2 = CategoryTheory.CategoryStruct.id ((X.obj X_1).obj X_2)


theorem AlgebraicIndependent.mvPolynomialOptionEquivPolynomialAdjoin_X_none
    (hx : AlgebraicIndependent R x) :
    hx.mvPolynomialOptionEquivPolynomialAdjoin (X none) = Polynomial.X

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

hx.mvPolynomialOptionEquivPolynomialAdjoin (MvPolynomial.X none) = Polynomial.X


theorem IsCycleOn.pow_apply_eq_pow_apply {s : Finset α} (hf : f.IsCycleOn s) (ha : a ∈ s)
    {m n : ℕ} : (f ^ m) a = (f ^ n) a ↔ m ≡ n [MOD s.card]

{α : Type u_2}
{f : Equiv.Perm α}
{a : α}
{s : Finset α}
(hf : f.IsCycleOn ↑s)
(ha : a ∈ s)
{m n : ℕ}


/-- The sum defining the Eisenstein series (of weight `k` and level `Γ(N)` with congruence
condition `a : Fin 2 → ZMod N`) converges locally uniformly on `ℍ`. -/
theorem eisensteinSeries_tendstoLocallyUniformly {k : ℤ} (hk : 3 ≤ k) {N : ℕ} (a : Fin 2 → ZMod N) :
    TendstoLocallyUniformly (fun (s : Finset (gammaSet N a)) ↦ (∑ x ∈ s, eisSummand k x ·))
      (eisensteinSeries a k ·) Filter.atTop

TendstoLocallyUniformly (fun s x => ∑ x_1 ∈ s, EisensteinSeries.eisSummand k (↑x_1) x) (fun x => eisensteinSeries a k x)
  Filter.atTop


theorem uIcc_toDual (a b : α) : [[toDual a, toDual b]] = [[a, b]].map toDual.toEmbedding

{α : Type u_2}
[Lattice α]
[LocallyFiniteOrder α]
(a b : α)

[[OrderDual.toDual a, OrderDual.toDual b]] = Finset.map OrderDual.toDual.toEmbedding [[a, b]]


theorem essSup_le_of_ae_le {f : α → β} (c : β) (hf : f ≤ᵐ[μ] fun _ => c) : essSup f μ ≤ c

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[CompleteLattice β]
{f : α → β}
(c : β)
(hf : f ≤ᵐ[μ] fun x => c)


/-- Functor translating a commutative monoid object in a functor category
to a functor into the category of commutative monoid objects.
-/
@[simps!]
def functor : CommMon_ (C ⥤ D) ⥤ C ⥤ CommMon_ D

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

((CategoryTheory.Monoidal.CommMonFunctorCategoryEquivalence.functor.obj A).obj X).X = A.X.obj X


@[to_additive] lemma MonovaryOn.div_right (h₁ : MonovaryOn f g₁ s) (h₂ : AntivaryOn 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₂ : AntivaryOn f g₂ s)


theorem diag_preimage_prod_self (s : Set α) : (fun x => (x, x)) ⁻¹' s ×ˢ s = s


theorem rightLim_le_leftLim (h : x < y) : rightLim f x ≤ leftLim f y

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : Monotone f)
{x y : α}
(h : x < y)

Function.rightLim f x ≤ Function.leftLim f y


/-- If `α₁` is equivalent to `α₂` and `β₁` is equivalent to `β₂`, then the type of maps `α₁ → β₁`
is equivalent to the type of maps `α₂ → β₂`. -/
-- Porting note: removing `congr` attribute
@[simps apply]
def arrowCongr {α₁ β₁ α₂ β₂ : Sort*} (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) : (α₁ → β₁) ≃ (α₂ → β₂)

{α₁ : Sort u_1}
{β₁ : Sort u_2}
{α₂ : Sort u_3}
{β₂ : Sort u_4}
(e₁ : α₁ ≃ α₂)
(e₂ : β₁ ≃ β₂)
(f : α₁ → β₁)

∀ (a : α₂), (e₁.arrowCongr e₂) f a = (⇑e₂ ∘ f ∘ ⇑e₁.symm) a


/-- A sugroupoid of `C` consists of a choice of arrows for each pair of vertices, closed
under composition and inverses.
-/
@[ext]
structure Subgroupoid (C : Type u) [Groupoid C] where
  arrows : ∀ c d : C, Set (c ⟶ d)
  protected inv : ∀ {c d} {p : c ⟶ d}, p ∈ arrows c d → Groupoid.inv p ∈ arrows d c
  protected mul : ∀ {c d e} {p}, p ∈ arrows c d → ∀ {q}, q ∈ arrows d e → p ≫ q ∈ arrows c e

{C : Type u}
[CategoryTheory.Groupoid C]
(self : CategoryTheory.Subgroupoid C)
{c d : C}
{p : c ⟶ d}

p ∈ self.arrows c d → CategoryTheory.Groupoid.inv p ∈ self.arrows d c


theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α) (b : Sigma β)
    (x : Sigma γ) :
    x ∈ sigmaLift f a b ↔ ∃ (ha : a.1 = x.1) (hb : b.1 = x.1), x.2 ∈ f (ha ▸ a.2) (hb ▸ b.2)

(f : ⦃i : ι⦄ → α i → β i → Finset (γ i))

x ∈ Finset.sigmaLift f a b ↔ ∃ (ha : a.fst = x.fst) (hb : b.fst = x.fst), x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)


theorem IsBigOWith.const_mul_left {f : α → R} (h : IsBigOWith c l f g) (c' : R) :
    IsBigOWith (‖c'‖ * c) l (fun x => c' * f x) g

{α : Type u_1}
{F : Type u_4}
{R : Type u_13}
[Norm F]
[SeminormedRing R]
{c : ℝ}
{g : α → F}
{l : Filter α}
{f : α → R}
(h : Asymptotics.IsBigOWith c l f g)
(c' : R)

Asymptotics.IsBigOWith (‖c'‖ * c) l (fun x => c' * f x) g


theorem condexp_finset_sum {ι : Type*} {s : Finset ι} {f : ι → α → F'}
    (hf : ∀ i ∈ s, Integrable (f i) μ) : μ[∑ i ∈ s, f i|m] =ᵐ[μ] ∑ i ∈ s, μ[f i|m]

(hf : ∀ i ∈ s, MeasureTheory.Integrable (f i) μ)


theorem powerlt_min {a b c : Cardinal} : a ^< min b c = min (a ^< b) (a ^< c)


theorem closure_inter_subset_inter_closure (s t : Set X) :
    closure (s ∩ t) ⊆ closure s ∩ closure t

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


@[simp]
theorem PreservesCoproduct.inv_hom : (PreservesCoproduct.iso G f).inv = sigmaComparison G f

[CategoryTheory.Limits.HasCoproduct fun j => G.obj (f j)]

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Discrete.functor f) G]

(CategoryTheory.Limits.PreservesCoproduct.iso G f).inv = CategoryTheory.Limits.sigmaComparison G f


theorem eLpNorm'_lim_eq_lintegral_liminf {ι} [Nonempty ι] [LinearOrder ι] {f : ι → α → G} {p : ℝ}
    (hp_nonneg : 0 ≤ p) {f_lim : α → G}
    (h_lim : ∀ᵐ x : α ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))) :
    eLpNorm' f_lim p μ = (∫⁻ a, atTop.liminf fun m => (‖f m a‖₊ : ℝ≥0∞) ^ p ∂μ) ^ (1 / p)

(h_lim : ∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 (f_lim x)))

MeasureTheory.eLpNorm' f_lim p μ = (∫⁻ (a : α), Filter.liminf (fun m => ↑‖f m a‖₊ ^ p) Filter.atTop ∂μ) ^ (1 / p)


@[norm_cast]
theorem coe_inv_two : ((2⁻¹ : ℝ≥0) : ℝ≥0∞) = 2⁻¹


protected theorem Tendsto.eventually_le_atBot [Preorder β] {f : α → β} {l : Filter α}
    (hf : Tendsto f l atBot) (c : β) : ∀ᶠ x in l, f x ≤ c

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


/-- If two functions have equal Fréchet derivatives at every point of a convex set, and are equal at
one point in that set, then they are equal on that set. -/
theorem eqOn_of_fderivWithin_eq (hs : Convex ℝ s) (hf : DifferentiableOn 𝕜 f s)
    (hg : DifferentiableOn 𝕜 g s) (hs' : UniqueDiffOn 𝕜 s)
    (hf' : ∀ x ∈ s, fderivWithin 𝕜 f s x = fderivWithin 𝕜 g s x) (hx : x ∈ s) (hfgx : f x = g x) :
    s.EqOn f g


theorem image_Icc (hab : a ≤ b) (h : ContinuousOn f <| Icc a b) :
    f '' Icc a b = Icc (sInf <| f '' Icc a b) (sSup <| f '' Icc a b)

{α : Type u_2}
{β : Type u_3}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[TopologicalSpace β]
[DenselyOrdered α]
[ConditionallyCompleteLinearOrder β]
[OrderTopology β]
{f : α → β}
{a b : α}
(hab : a ≤ b)
(h : ContinuousOn f (Set.Icc a b))

f '' Set.Icc a b = Set.Icc (sInf (f '' Set.Icc a b)) (sSup (f '' Set.Icc a b))


theorem finrank_quotient_eq_sum {ι} [Fintype ι] (b : Basis ι R S) [Nontrivial F]
    [∀ i, Module.Free F (R ⧸ span ({I.smithCoeffs b hI i} : Set R))]
    [∀ i, Module.Finite F (R ⧸ span ({I.smithCoeffs b hI i} : Set R))] :
    FiniteDimensional.finrank F (S ⧸ I) =
      ∑ i, FiniteDimensional.finrank F (R ⧸ span ({I.smithCoeffs b hI i} : Set R))

[∀ (i : ι), Module.Free F (R ⧸ Ideal.span {Ideal.smithCoeffs b I hI i})]

[∀ (i : ι), Module.Finite F (R ⧸ Ideal.span {Ideal.smithCoeffs b I hI i})]

FiniteDimensional.finrank F (S ⧸ I) = ∑ i : ι, FiniteDimensional.finrank F (R ⧸ Ideal.span {Ideal.smithCoeffs b I hI i})


theorem setLIntegral_congr {f : α → ℝ≥0∞} {s t : Set α} (h : s =ᵐ[μ] t) :
    ∫⁻ x in s, f x ∂μ = ∫⁻ x in t, f x ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
{s t : Set α}
(h : s =ᵐ[μ] t)

∫⁻ (x : α) in s, f x ∂μ = ∫⁻ (x : α) in t, f x ∂μ


/-- We verify that an enriched functor between `Type v` enriched categories
is just the same thing as an honest functor.
-/
@[simps]
def enrichedFunctorTypeEquivFunctor {C : Type u₁} [𝒞 : EnrichedCategory (Type v) C] {D : Type u₂}
    [𝒟 : EnrichedCategory (Type v) D] : EnrichedFunctor (Type v) C D ≃ C ⥤ D

[𝒞 : CategoryTheory.EnrichedCategory (Type v) C]

[𝒟 : CategoryTheory.EnrichedCategory (Type v) D]

(F : CategoryTheory.EnrichedFunctor (Type v) C D)

(CategoryTheory.enrichedFunctorTypeEquivFunctor F).obj X = F.obj X


lemma countP_attach (s : Multiset α) : s.attach.countP (fun a : {a // a ∈ s} ↦ p a) = s.countP p

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

Multiset.countP (fun a => p ↑a) s.attach = Multiset.countP p s


theorem snd_surjective : Function.Surjective (snd R M M₂)

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

Function.Surjective ⇑(LinearMap.snd R M M₂)


/-- The functor from a category to its double-opposite.  -/
@[simps]
def opOp : C ⥤ Cᵒᵖᵒᵖ

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

∀ {X Y : C} (f : X ⟶ Y), (CategoryTheory.opOp C).map f = f.op.op


/-- A functor `F : J ⥤ CommGrp.{u}` has a limit iff `(F ⋙ forget CommGrp).sections` is
`u`-small.  -/
@[to_additive "A functor `F : J ⥤ AddCommGrp.{u}` has a limit iff
`(F ⋙ forget AddCommGrp).sections` is `u`-small."]
lemma hasLimit_iff_small_sections :
    HasLimit F ↔ Small.{u} (F ⋙ forget CommGrp).sections

{J : Type v}
[CategoryTheory.Category.{w, v} J]
(F : J ⥤ CommGrp)

CategoryTheory.Limits.HasLimit F ↔ Small.{u, max u v} ↑(F ⋙ CategoryTheory.forget CommGrp).sections


/-- A term in a valued CSP instance over the template `Γ`. -/
structure ValuedCSP.Term (Γ : ValuedCSP D C) (ι : Type*) where
  /-- Arity of the function -/
  n : ℕ
  /-- Which cost function is instantiated -/
  f : (Fin n → D) → C
  /-- The cost function comes from the template -/
  inΓ : ⟨n, f⟩ ∈ Γ
  /-- Which variables are plugged as arguments to the cost function -/
  app : Fin n → ι

{D : Type u_1}
{C : Type u_2}
[OrderedAddCommMonoid C]
{Γ : ValuedCSP D C}
{ι : Type u_3}
(self : Γ.Term ι)


@[simp]
theorem MultilinearMap.uncurryRight_apply
    (f : MultilinearMap R (fun i : Fin n => M (castSucc i)) (M (last n) →ₗ[R] M₂))
    (m : ∀ i, M i) : f.uncurryRight m = f (init m) (m (last n))

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

(f : MultilinearMap R (fun i => M i.castSucc) (M (Fin.last n) →ₗ[R] M₂))

f.uncurryRight m = (f (Fin.init m)) (m (Fin.last n))


/--
Given a `HomotopyWith f₀ f₁ P`, we can define a `HomotopyWith f₁ f₀ P` by reversing the homotopy.
-/
@[simps!]
def symm {f₀ f₁ : C(X, Y)} (F : HomotopyWith f₀ f₁ P) : HomotopyWith f₁ f₀ P

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


lemma ne_succAbove (p : Fin (n + 1)) (i : Fin n) : p ≠ p.succAbove i


@[to_additive] lemma lt_mabs : a < |b|ₘ ↔ a < b ∨ a < b⁻¹

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


@[simp, elementwise]
theorem piIsoPi_hom_ker_subtype (i : ι) :
    (piIsoPi Z).hom ≫ (LinearMap.proj i : (∀ i : ι, Z i) →ₗ[R] Z i) = Pi.π Z i

{R : Type u}
[Ring R]
{ι : Type v}
(Z : ι → ModuleCatMax R)
[CategoryTheory.Limits.HasProduct Z]
(i : ι)

(ModuleCat.piIsoPi Z).hom ≫ LinearMap.proj i = CategoryTheory.Limits.Pi.π Z i


@[simp]
theorem coe_mkNormedAddGroupHom' (f : V₁ →+ V₂) (C) (hC) : ⇑(f.mkNormedAddGroupHom' C hC) = f

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(f : V₁ →+ V₂)
(C : ℝ≥0)
(hC : ∀ (x : V₁), ‖f x‖₊ ≤ C * ‖x‖₊)


theorem appendFun_comp_id {α : TypeVec n} {β₀ β₁ β₂ : Type u} (g₀ : β₀ → β₁) (g₁ : β₁ → β₂) :
    (@id _ α ::: g₁ ∘ g₀) = (id ::: g₁) ⊚ (id ::: g₀)

{n : ℕ}
{α : TypeVec.{u} n}
{β₀ β₁ β₂ : Type u}
(g₀ : β₀ → β₁)
(g₁ : β₁ → β₂)

(TypeVec.id ::: g₁ ∘ g₀) = TypeVec.comp (TypeVec.id ::: g₁) (TypeVec.id ::: g₀)


/-- A set `s` is not bounded below if and only if for each `x` there exists `y ∈ s` that is less
than `x`. A version for preorders is called `not_bddBelow_iff'`. -/
theorem not_bddBelow_iff {α : Type*} [LinearOrder α] {s : Set α} :
    ¬BddBelow s ↔ ∀ x, ∃ y ∈ s, y < x

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


@[simp]
theorem full_empty : full ∅ = (⊥ : Subgroupoid C)

{C : Type u}
[CategoryTheory.Groupoid C]


/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
as a product of monomials in the supports of `f` and `g` is a product. -/
theorem mul_apply_add_eq_mul_of_uniqueAdd [Add A] {f g : R[A]} {a0 b0 : A}
    (h : UniqueAdd f.support g.support a0 b0) :
    (f * g) (a0 + b0) = f a0 * g b0


theorem isUnit_norm_of_isGalois [IsGalois K L] {x : 𝓞 L} : IsUnit (norm K x) ↔ IsUnit x

{L : Type u_1}
(K : Type u_2)
[Field K]
[Field L]
[Algebra K L]
[FiniteDimensional K L]
[IsGalois K L]
{x : 𝓞 L}

IsUnit ((RingOfIntegers.norm K) x) ↔ IsUnit x


@[simp] theorem add_ofNat' (x : Fin n) (y : Nat) (lt : 0 < n) :
    x + Fin.ofNat' y lt = Fin.ofNat' (x.val + y) lt

{n : Nat}
(x : Fin n)
(y : Nat)
(lt : 0 < n)

x + Fin.ofNat' y lt = Fin.ofNat' (↑x + y) lt


/-- A function `ψ` on a `SuccOrder` is strictly monotone before some `n` if for all `m` such that
`m < n`, we have `ψ m < ψ (succ m)`. -/
theorem strictMonoOn_Iic_of_lt_succ [SuccOrder α] [IsSuccArchimedean α] {n : α}
    (hψ : ∀ m, m < n → ψ m < ψ (succ m)) : StrictMonoOn ψ (Set.Iic n)

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[Preorder β]
{ψ : α → β}
[SuccOrder α]
[IsSuccArchimedean α]
{n : α}
(hψ : ∀ m < n, ψ m < ψ (Order.succ m))


theorem Coloring.mem_colorClass (v : V) : v ∈ C.colorClass (C v)

{V : Type u}
{G : SimpleGraph V}
{α : Type u_1}
(C : G.Coloring α)
(v : V)


lemma lTensor.inverse_apply (y : Q ⊗[R] N) :
    (lTensor.inverse Q hfg hg) ((lTensor Q g) y) =
      Submodule.Quotient.mk (p := (LinearMap.range (lTensor Q f))) y

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

(lTensor.inverse Q hfg hg) ((LinearMap.lTensor Q g) y) = Submodule.Quotient.mk y


/--
A constructor for lax monoidal functors whose axioms are described by `tensorHom` instead of
`whiskerLeft` and `whiskerRight`.
-/
@[simps]
def LaxMonoidalFunctor.ofTensorHom (F : C ⥤ D)
    /- unit morphism -/
    (ε : 𝟙_ D ⟶ F.obj (𝟙_ C))
    /- tensorator -/
    (μ : ∀ X Y : C, F.obj X ⊗ F.obj Y ⟶ F.obj (X ⊗ Y))
    (μ_natural :
      ∀ {X Y X' Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y'),
        (F.map f ⊗ F.map g) ≫ μ Y Y' = μ X X' ≫ F.map (f ⊗ g) := by
      aesop_cat)
    /- associativity of the tensorator -/
    (associativity :
      ∀ X Y Z : C,
        (μ X Y ⊗ 𝟙 (F.obj Z)) ≫ μ (X ⊗ Y) Z ≫ F.map (α_ X Y Z).hom =
          (α_ (F.obj X) (F.obj Y) (F.obj Z)).hom ≫ (𝟙 (F.obj X) ⊗ μ Y Z) ≫ μ X (Y ⊗ Z) := by
      aesop_cat)
    /- unitality -/
    (left_unitality :
      ∀ X : C, (λ_ (F.obj X)).hom = (ε ⊗ 𝟙 (F.obj X)) ≫ μ (𝟙_ C) X ≫ F.map (λ_ X).hom := by
        aesop_cat)
    (right_unitality :
      ∀ X : C, (ρ_ (F.obj X)).hom = (𝟙 (F.obj X) ⊗ ε) ≫ μ X (𝟙_ C) ≫ F.map (ρ_ X).hom := by
        aesop_cat) :
        LaxMonoidalFunctor C D

(μ :
  (X Y : C) →
    CategoryTheory.MonoidalCategory.tensorObj (F.obj X) (F.obj Y) ⟶
      F.obj (CategoryTheory.MonoidalCategory.tensorObj X Y))

(μ_natural :
  ∀ {X Y X' Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y'),
    CategoryTheory.MonoidalCategory.tensorHom (F.map f) (F.map g) ≫ μ Y Y' =
      μ X X' ≫ F.map (CategoryTheory.MonoidalCategory.tensorHom f g) := by
  aesop_cat)

(associativity :
  ∀ (X Y Z : C),
    CategoryTheory.MonoidalCategory.tensorHom (μ X Y) (𝟙 (F.obj Z)) ≫
        μ (CategoryTheory.MonoidalCategory.tensorObj X Y) Z ≫
          F.map (CategoryTheory.MonoidalCategory.associator X Y Z).hom =
      (CategoryTheory.MonoidalCategory.associator (F.obj X) (F.obj Y) (F.obj Z)).hom ≫
        CategoryTheory.MonoidalCategory.tensorHom (𝟙 (F.obj X)) (μ Y Z) ≫
          μ X (CategoryTheory.MonoidalCategory.tensorObj Y Z) := by
  aesop_cat)

(left_unitality :
  ∀ (X : C),
    (CategoryTheory.MonoidalCategory.leftUnitor (F.obj X)).hom =
      CategoryTheory.MonoidalCategory.tensorHom ε (𝟙 (F.obj X)) ≫
        μ (𝟙_ C) X ≫ F.map (CategoryTheory.MonoidalCategory.leftUnitor X).hom := by
  aesop_cat)

(right_unitality :
  ∀ (X : C),
    (CategoryTheory.MonoidalCategory.rightUnitor (F.obj X)).hom =
      CategoryTheory.MonoidalCategory.tensorHom (𝟙 (F.obj X)) ε ≫
        μ X (𝟙_ C) ≫ F.map (CategoryTheory.MonoidalCategory.rightUnitor X).hom := by
  aesop_cat)

(CategoryTheory.LaxMonoidalFunctor.ofTensorHom F ε μ μ_natural associativity left_unitality right_unitality).ε = ε


lemma stalkMap_germ_apply (U : Y.Opens) (x : f ⁻¹ᵁ U) (y) :
    f.stalkMap x.val (Y.presheaf.germ ⟨f.val.base x.val, x.property⟩ y) =
      X.presheaf.germ x (f.val.c.app (op U) y)

(x : ↥((TopologicalSpace.Opens.map f.val.base).obj U))

(AlgebraicGeometry.Scheme.Hom.stalkMap f ↑x) ((Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩) y) =
  (X.presheaf.germ x) ((f.val.c.app (Opposite.op U)) y)


/-- If `P` imples `P'`, then there is a functor from `CompHausLike P` to `CompHausLike P'`. -/
@[simps]
def toCompHausLike {P P' : TopCat → Prop} (h : ∀ (X : CompHausLike P), P X.toTop → P' X.toTop) :
    CompHausLike P ⥤ CompHausLike P'

(CompHausLike.toCompHausLike h).obj X =
  let_fun this := ⋯;
  CompHausLike.of P' ↑X.toTop


theorem derivWithin_subset (st : s ⊆ t) (ht : UniqueDiffWithinAt 𝕜 s x)
    (h : DifferentiableWithinAt 𝕜 f t x) : derivWithin f s x = derivWithin f t x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s t : Set 𝕜}
(st : s ⊆ t)
(ht : UniqueDiffWithinAt 𝕜 s x)
(h : DifferentiableWithinAt 𝕜 f t x)


theorem le_inv_of_neg (ha : a < 0) (hb : b < 0) : a ≤ b⁻¹ ↔ b ≤ a⁻¹

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(ha : a < 0)
(hb : b < 0)

a ≤ b⁻¹ ↔ b ≤ a⁻¹


@[simps]
instance hasForgetToLat : HasForget₂ HeytAlg BddDistLat

(CategoryTheory.HasForget₂.forget₂.map f).toSupHom a = f a


theorem IsGδ.biInter_of_isOpen {I : Set ι} (hI : I.Countable) {f : ι → Set X}
    (hf : ∀ i ∈ I, IsOpen (f i)) : IsGδ (⋂ i ∈ I, f i)

{X : Type u_1}
{ι : Type u_3}
[TopologicalSpace X]
{I : Set ι}
(hI : I.Countable)
{f : ι → Set X}
(hf : ∀ i ∈ I, IsOpen (f i))


/-- The sine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
opposite side. -/
theorem sin_oangle_add_left_mul_norm_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : Real.Angle.sin (o.oangle (x + y) y) * ‖x + y‖ = ‖x‖

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

(o.oangle (x + y) y).sin * ‖x + y‖ = ‖x‖


theorem count_succ' (n : ℕ) :
    count p (n + 1) = count (fun k ↦ p (k + 1)) n + if p 0 then 1 else 0

(p : ℕ → Prop)
[DecidablePred p]
(n : ℕ)

Nat.count p (n + 1) = Nat.count (fun k => p (k + 1)) n + if p 0 then 1 else 0


@[simp] theorem infinitePos_abs_iff_infinite {x : ℝ*} : InfinitePos |x| ↔ Infinite x


theorem isOpen_setOf_mem_nhds_and_isMaxOn_norm {f : E → F} {s : Set E}
    (hd : DifferentiableOn ℂ f s) : IsOpen {z | s ∈ 𝓝 z ∧ IsMaxOn (norm ∘ f) s z}

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace ℂ F]
{f : E → F}
{s : Set E}
(hd : DifferentiableOn ℂ f s)


@[simp]
theorem equiv_trans {ι'' : Type*} (b'' : Basis ι'' R M'') (e : ι ≃ ι') (e' : ι' ≃ ι'') :
    (b.equiv b' e).trans (b'.equiv b'' e') = b.equiv b'' (e.trans e')

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
{M'' : Type u_8}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(b' : Basis ι' R M')
[AddCommMonoid M'']
[Module R M'']
{ι'' : Type u_10}
(b'' : Basis ι'' R M'')
(e : ι ≃ ι')
(e' : ι' ≃ ι'')

b.equiv b' e ≪≫ₗ b'.equiv b'' e' = b.equiv b'' (e.trans e')


theorem map_eq_singleton {f : α → β} {s : Multiset α} {b : β} :
    map f s = {b} ↔ ∃ a : α, s = {a} ∧ f a = b

{α : Type u_1}
{β : Type v}
{f : α → β}
{s : Multiset α}
{b : β}

Multiset.map f s = {b} ↔ ∃ a, s = {a} ∧ f a = b


@[to_additive const_add]
theorem StrictMonoOn.const_mul' (hf : StrictMonoOn f s) (c : α) :
    StrictMonoOn (fun x => c * f x) s

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


theorem coeff_charpoly_mem_ideal_pow {I : Ideal R} (h : ∀ i j, M i j ∈ I) (k : ℕ) :
    M.charpoly.coeff k ∈ I ^ (Fintype.card n - k)

{R : Type u}
[CommRing R]
{n : Type v}
[DecidableEq n]
[Fintype n]
{M : Matrix n n R}
{I : Ideal R}
(h : ∀ (i j : n), M i j ∈ I)
(k : ℕ)


/-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
{G : CategoryTheory.Functor D C}
(iso : e.inverse ≅ G)
(X : C)

(e.changeInverse iso).unitIso.inv.app X =
  CategoryTheory.CategoryStruct.comp (iso.inv.app (e.functor.obj X)) (e.unitIso.inv.app X)


theorem has_smallest_coproducts_of_hasCoproducts [HasCoproducts.{w} C] : HasCoproducts.{0} C

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


lemma conductor_mul_differentIdeal [NoZeroSMulDivisors A B]
    (x : B) (hx : Algebra.adjoin K {algebraMap B L x} = ⊤) :
    (conductor A x) * differentIdeal A B = Ideal.span {aeval x (derivative (minpoly A x))}

(hx : Algebra.adjoin K {(algebraMap B L) x} = ⊤)

conductor A x * differentIdeal A B = Ideal.span {(Polynomial.aeval x) (Polynomial.derivative (minpoly A x))}


theorem shiftLeft'_tt_ne_zero (m) : ∀ {n}, (n ≠ 0) → shiftLeft' true m n ≠ 0


theorem filter_append_perm (p : α → Bool) (l : List α) :
    filter p l ++ filter (fun x => !p x) l ~ l

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

List.filter p l ++ List.filter (fun x => !p x) l ~ l


@[simp]
theorem toNNReal_pos {r : ℝ} : 0 < Real.toNNReal r ↔ 0 < r


@[symm]
protected theorem symm (h : IsCompl x y) : IsCompl y x

{α : Type u_1}
[PartialOrder α]
[BoundedOrder α]
{x y : α}
(h : IsCompl x y)


@[to_additive (attr := simp, norm_cast)]
theorem coe_sup : ⇑(p ⊔ q) = ⇑p ⊔ ⇑q

{E : Type u_4}
[Group E]
(p q : GroupSeminorm E)


@[simp] lemma coe_eq_zero_iff (χ : Weight R L M) : (χ : L → R) = 0 ↔ χ.IsZero

{R : Type u_2}
{L : Type u_3}
{M : Type u_4}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(χ : LieModule.Weight R L M)


@[simp]
lemma freeHomEquiv_freeMap :
    (freeHomEquiv _ (freeMap (R := R) f)) = freeSection.comp f

{J : CategoryTheory.GrothendieckTopology C}

[J.HasSheafCompose (CategoryTheory.forget₂ RingCat AddCommGrp)]

∀ {J_1 : Type u} (f : I → J_1),
  (SheafOfModules.free J_1).freeHomEquiv (SheafOfModules.freeMap f) = SheafOfModules.freeSection ∘ f


@[simp]
theorem withDensity_const (c : ℝ≥0∞) : μ.withDensity (fun _ ↦ c) = c • μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(c : ℝ≥0∞)


@[to_additive tendsto_norm_cocompact_atTop]
lemma tendsto_norm_cocompact_atTop' [ProperSpace E] : Tendsto norm (cocompact E) atTop

{E : Type u_3}
[SeminormedAddGroup E]
[ProperSpace E]

Filter.Tendsto norm (Filter.cocompact E) Filter.atTop


@[simp]
protected theorem IsGδ.empty : IsGδ (∅ : Set X)


theorem map_id'' {f : α → α} (h : ∀ x, f x = x) (l : List α) : map f l = l

{α : Type u_1}
{f : α → α}
(h : ∀ (x : α), f x = x)
(l : List α)


@[to_additive]
theorem mulIndicator_const_iff_of_ne (hc : c ≠ 1) :
    EventuallyConst (s.mulIndicator fun _ ↦ c) l ↔ EventuallyConst s l

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
[One β]
{s : Set α}
{c : β}
(hc : c ≠ 1)

Filter.EventuallyConst (s.mulIndicator fun x => c) l ↔ Filter.EventuallyConst s l


theorem mul_basis_toMatrix [DecidableEq ι] [DecidableEq ι'] (b₁ : Basis ι R M) (b₂ : Basis ι' R M)
    (b₃ : Basis κ R N) (A : Matrix κ ι R) :
    A * b₁.toMatrix b₂ = LinearMap.toMatrix b₂ b₃ (toLin b₁ b₃ A)

{ι : Type u_1}
{ι' : Type u_2}
{κ : Type u_3}
{R : Type u_5}
{M : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{N : Type u_9}
[AddCommMonoid N]
[Module R N]
[Fintype ι']
[Finite κ]
[Fintype ι]
[DecidableEq ι]
[DecidableEq ι']
(b₁ : Basis ι R M)
(b₂ : Basis ι' R M)
(b₃ : Basis κ R N)
(A : Matrix κ ι R)

A * b₁.toMatrix ⇑b₂ = (LinearMap.toMatrix b₂ b₃) ((Matrix.toLin b₁ b₃) A)


/-- If a monic polynomial over a field `F` of exponential characteristic `q` has separable degree
one, then it is of the form `(X ^ (q ^ n) - C y) ^ m` for some non-zero natural number `m`,
some natural number `n`, and some element `y` of `F`, such that either `n = 0` or `y` has no
`q`-th root in `F`. -/
theorem eq_X_pow_char_pow_sub_C_pow_of_natSepDegree_eq_one (q : ℕ) [ExpChar F q] (hm : f.Monic)
    (h : f.natSepDegree = 1) : ∃ (m n : ℕ) (y : F),
      m ≠ 0 ∧ (n = 0 ∨ y ∉ (frobenius F q).range) ∧ f = (X ^ q ^ n - C y) ^ m

{F : Type u}
[Field F]
{f : F[X]}
(q : ℕ)
[ExpChar F q]
(hm : f.Monic)
(h : f.natSepDegree = 1)

∃ m n y, m ≠ 0 ∧ (n = 0 ∨ y ∉ (frobenius F q).range) ∧ f = (Polynomial.X ^ q ^ n - Polynomial.C y) ^ m


@[simp]
theorem fract_ofNat (n : ℕ) [n.AtLeastTwo] :
    fract ((no_index (OfNat.ofNat n)) : α) = 0

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


@[mono]
theorem toAddSubgroup_strictMono : StrictMono (toAddSubgroup : Submodule R M → AddSubgroup M)

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
{module_M : Module R M}


lemma dvd_mul_sub_mul_mul_gcd_of_dvd {p a b c d x y : R} [IsDomain R] [GCDMonoid R]
    (h1 : p ∣ a * x + b * y) (h2 : p ∣ c * x + d * y) : p ∣ (a * d - b * c) * gcd x y

{R : Type u_1}
[CommRing R]
{p a b c d x y : R}
[IsDomain R]
[GCDMonoid R]
(h1 : p ∣ a * x + b * y)
(h2 : p ∣ c * x + d * y)


@[simp]
theorem mul_apply (φ ψ : A →ₐ[R] A) (x : A) : (φ * ψ) x = φ (ψ x)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(φ ψ : A →ₐ[R] A)
(x : A)


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

∀ {X Y : PartOrd} (a : ↑X →o ↑Y), PartOrd.dual.map a = OrderHom.dual a


@[to_additive (attr := simp)] lemma image_coe : ((↑) : G → Q) '' N = 1

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]


theorem le_update_iff : x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j

{ι : Type u_1}
{π : ι → Type u_4}
[DecidableEq ι]
[(i : ι) → Preorder (π i)]
{x y : (i : ι) → π i}
{i : ι}
{a : π i}

x ≤ Function.update y i a ↔ x i ≤ a ∧ ∀ (j : ι), j ≠ i → x j ≤ y j


@[simp]
theorem comp_mk (g : β → γ) (hg : Continuous g) (f : α → β) (hf) :
    comp g hg (mk f hf : α →ₘ[μ] β) = mk (g ∘ f) (hg.comp_aestronglyMeasurable hf)

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEEqFun.comp g hg (MeasureTheory.AEEqFun.mk f hf) = MeasureTheory.AEEqFun.mk (g ∘ f) ⋯


@[simp]
theorem subtypeQuotientEquivQuotientSubtype_symm_mk (p₁ : α → Prop)
    [s₁ : Setoid α] [s₂ : Setoid (Subtype p₁)] (p₂ : Quotient s₁ → Prop) (hp₂ : ∀ a, p₁ a ↔ p₂ ⟦a⟧)
    (h : ∀ x y : Subtype p₁, @Setoid.r _ s₂ x y ↔ (x : α) ≈ y) (x) :
    (subtypeQuotientEquivQuotientSubtype p₁ p₂ hp₂ h).symm ⟦x⟧ = ⟨⟦x⟧, (hp₂ _).1 x.property⟩

(h : ∀ (x y : Subtype p₁), Setoid.r x y ↔ ↑x ≈ ↑y)

(Equiv.subtypeQuotientEquivQuotientSubtype p₁ p₂ hp₂ h).symm ⟦x⟧ = ⟨⟦↑x⟧, ⋯⟩


theorem tsum_comp_le_tsum_of_inj {β : Type*} {f : α → ℝ≥0} (hf : Summable f) {i : β → α}
    (hi : Function.Injective i) : (∑' x, f (i x)) ≤ ∑' x, f x

{α : Type u_1}
{β : Type u_4}
{f : α → ℝ≥0}
(hf : Summable f)
{i : β → α}
(hi : Function.Injective i)


theorem USize.toNat_lt (x : USize) : x.toNat < 2 ^ System.Platform.numBits


theorem Integrable.simpleFunc_mul (g : SimpleFunc X ℝ) (hf : Integrable f μ) :
    Integrable (⇑g * f) μ

{X : Type u_1}
{f : X → ℝ}
{m0 : MeasurableSpace X}
{μ : MeasureTheory.Measure X}
(g : MeasureTheory.SimpleFunc X ℝ)
(hf : MeasureTheory.Integrable f μ)


theorem map_comp_map (hf : ψ.comp f₁ = f₂.comp φ) (hg : ψ.comp g₁ = g₂.comp φ)
    (hf' : ψ'.comp f₂ = f₃.comp φ') (hg' : ψ'.comp g₂ = g₃.comp φ') :
    (map φ' ψ' hf' hg').comp (map φ ψ hf hg) =
      map (φ'.comp φ) (ψ'.comp ψ) (comm_sq₂ hf hf') (comm_sq₂ hg hg')

{V₁ : Type u_3}
{V₂ : Type u_4}
{V₃ : Type u_5}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
[SeminormedAddCommGroup V₃]
{W₁ : Type u_6}
{W₂ : Type u_7}
{W₃ : Type u_8}
[SeminormedAddCommGroup W₁]
[SeminormedAddCommGroup W₂]
[SeminormedAddCommGroup W₃]
{f₁ g₁ : NormedAddGroupHom V₁ W₁}
{f₂ g₂ : NormedAddGroupHom V₂ W₂}
{f₃ g₃ : NormedAddGroupHom V₃ W₃}
{φ : NormedAddGroupHom V₁ V₂}
{ψ : NormedAddGroupHom W₁ W₂}
{φ' : NormedAddGroupHom V₂ V₃}
{ψ' : NormedAddGroupHom W₂ W₃}
(hf : ψ.comp f₁ = f₂.comp φ)
(hg : ψ.comp g₁ = g₂.comp φ)
(hf' : ψ'.comp f₂ = f₃.comp φ')
(hg' : ψ'.comp g₂ = g₃.comp φ')

(NormedAddGroupHom.Equalizer.map φ' ψ' hf' hg').comp (NormedAddGroupHom.Equalizer.map φ ψ hf hg) =
  NormedAddGroupHom.Equalizer.map (φ'.comp φ) (ψ'.comp ψ) ⋯ ⋯


protected lemma Even.add_pow_le (hn : Even n) :
    (a + b) ^ n ≤ 2 ^ (n - 1) * (a ^ n + b ^ n)

{R : Type u_3}
[LinearOrderedSemiring R]
{a b : R}
{n : ℕ}
[ExistsAddOfLE R]
(hn : Even n)


theorem Prime.associated_of_dvd [CancelCommMonoidWithZero α] {p q : α} (p_prime : Prime p)
    (q_prime : Prime q) (dvd : p ∣ q) : Associated p q

{α : Type u_1}
[CancelCommMonoidWithZero α]
{p q : α}
(p_prime : Prime p)
(q_prime : Prime q)
(dvd : p ∣ q)


/-- If `‖β‖ < ‖α‖` there are no embeddings `α ↪ β`.
This is a formulation of the pigeonhole principle.

Note this cannot be an instance as it needs `h`. -/
@[simp]
theorem isEmpty_of_card_lt [Fintype α] [Fintype β] (h : Fintype.card β < Fintype.card α) :
    IsEmpty (α ↪ β)

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]
(h : Fintype.card β < Fintype.card α)


/-- An isometry from a metric space is a uniform continuous map -/
protected theorem uniformContinuous (hf : Isometry f) : UniformContinuous f

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
(hf : Isometry f)


/-- The canonical `LeftHomologyData` of a short complex `S` in an abelian category, for
which the `H` field is `Abelian.coimage (kernel.ι S.g ≫ cokernel.π S.f)`. -/
@[simps]
noncomputable def ofAbelian : S.LeftHomologyData

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

(CategoryTheory.ShortComplex.LeftHomologyData.ofAbelian S).π =
  CategoryTheory.Limits.cokernel.π
    (CategoryTheory.Limits.kernel.ι
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.kernel.ι S.g) (CategoryTheory.Limits.cokernel.π S.f)))


@[simp]
theorem compContinuousLinearMap_apply (g : ContinuousMultilinearMap R M₁' M₄)
    (f : ∀ i : ι, M₁ i →L[R] M₁' i) (m : ∀ i, M₁ i) :
    g.compContinuousLinearMap f m = g fun i => f i <| m i

{R : Type u}
{ι : Type v}
{M₁ : ι → Type w₁}
{M₁' : ι → Type w₁'}
{M₄ : Type w₄}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[(i : ι) → AddCommMonoid (M₁' i)]
[AddCommMonoid M₄]
[(i : ι) → Module R (M₁ i)]
[(i : ι) → Module R (M₁' i)]
[Module R M₄]
[(i : ι) → TopologicalSpace (M₁ i)]
[(i : ι) → TopologicalSpace (M₁' i)]
[TopologicalSpace M₄]
(g : ContinuousMultilinearMap R M₁' M₄)
(f : (i : ι) → M₁ i →L[R] M₁' i)
(m : (i : ι) → M₁ i)

(g.compContinuousLinearMap f) m = g fun i => (f i) (m i)


/-- See `Polynomial.mul_right_modByMonic` for the other multiplication order. This version, unlike
that one, requires commutativity. -/
@[simp]
lemma mul_self_modByMonic (hq : q.Monic) : (p * q) %ₘ q = 0

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


/-- A point in the antidiagonal is determined by its first coordinate.

See also `Finset.antidiagonal_congr'`. -/
theorem antidiagonal_congr (hp : p ∈ antidiagonal n) (hq : q ∈ antidiagonal n) :
    p = q ↔ p.1 = q.1

{A : Type u_1}
[AddCancelMonoid A]
[Finset.HasAntidiagonal A]
{p q : A × A}
{n : A}
(hp : p ∈ Finset.antidiagonal n)
(hq : q ∈ Finset.antidiagonal n)


@[simp]
theorem splitOn_nil [DecidableEq α] (a : α) : [].splitOn a = [[]]


/-- A category "has zero morphisms" if there is a designated "zero morphism" in each morphism space,
and compositions of zero morphisms with anything give the zero morphism. -/
class HasZeroMorphisms where
  /-- Every morphism space has zero -/
  [zero : ∀ X Y : C, Zero (X ⟶ Y)]
  /-- `f` composed with `0` is `0` -/
  comp_zero : ∀ {X Y : C} (f : X ⟶ Y) (Z : C), f ≫ (0 : Y ⟶ Z) = (0 : X ⟶ Z) := by aesop_cat
  /-- `0` composed with `f` is `0` -/
  zero_comp : ∀ (X : C) {Y Z : C} (f : Y ⟶ Z), (0 : X ⟶ Y) ≫ f = (0 : X ⟶ Z) := by aesop_cat

[self : CategoryTheory.Limits.HasZeroMorphisms C]


theorem eq_or_edist_eq_top_of_fixedPoints (hf : ContractingWith K f) {x y} (hx : IsFixedPt f x)
    (hy : IsFixedPt f y) : x = y ∨ edist x y = ∞

{α : Type u_1}
[EMetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
{x y : α}
(hx : Function.IsFixedPt f x)
(hy : Function.IsFixedPt f y)


@[simp] theorem run_pure [Monad m] (a : α) (ctx : ρ) : (pure a : ReaderT ρ m α).run ctx = pure a

{m : Type u_1 → Type u_2}
{α ρ : Type u_1}
[Monad m]
(a : α)
(ctx : ρ)


/-- Typeclass characterising splitting fields. -/
class IsSplittingField (f : K[X]) : Prop where
  splits' : Splits (algebraMap K L) f
  adjoin_rootSet' : Algebra.adjoin K (f.rootSet L : Set L) = ⊤

[self : Polynomial.IsSplittingField K L f]


@[refl]
theorem refl (f : C(X, Y)) : Homotopic f f

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(f : C(X, Y))


/-- Any morphism of compacta is continuous. -/
theorem continuous_of_hom {X Y : Compactum} (f : X ⟶ Y) : Continuous f


/-- A pair `(t₁, t₂)` of multisets is contained in `antidiagonal s`
    if and only if `t₁ + t₂ = s`. -/
@[simp]
theorem mem_antidiagonal {s : Multiset α} {x : Multiset α × Multiset α} :
    x ∈ antidiagonal s ↔ x.1 + x.2 = s

{α : Type u_1}
{s : Multiset α}
{x : Multiset α × Multiset α}


theorem StrictAntiOn.injOn [LinearOrder α] [Preorder β] {f : α → β} {s : Set α}
    (H : StrictAntiOn f s) : s.InjOn f

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[Preorder β]
{f : α → β}
{s : Set α}
(H : StrictAntiOn f s)


@[ext]
theorem ext {v₁ v₂ : AddValuation R Γ₀} (h : ∀ r, v₁ r = v₂ r) : v₁ = v₂

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
{v₁ v₂ : AddValuation R Γ₀}
(h : ∀ (r : R), v₁ r = v₂ r)


lemma log_nz_of_isRat_neg {n : ℤ} : (NormNum.IsRat e n d) → (decide (n / d < (0 : ℚ)))
    → (decide ((-1 : ℚ) < n / d)) → (Real.log (e : ℝ) ≠ 0)

Mathlib.Meta.NormNum.IsRat e n d → decide (↑n / ↑d < 0) = true → decide (-1 < ↑n / ↑d) = true → Real.log e ≠ 0


@[simp] theorem smul_mk'_one (x : R) (m : M) : x • mk' S 1 m = mk' S x m

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(x : R)
(m : ↥M)

x • IsLocalization.mk' S 1 m = IsLocalization.mk' S x m


theorem continuous_negPart [Fact (1 ≤ p)] : Continuous fun f : Lp ℝ p μ => negPart f

{α : Type u_1}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[Fact (1 ≤ p)]

Continuous fun f => MeasureTheory.Lp.negPart f


theorem ker_eq_bot : f.ker = ⊥ ↔ Function.Injective f

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


theorem mem_union_right (l₁ : List α) (h : a ∈ l₂) : a ∈ l₁ ∪ l₂

{α : Type u_1}
{l₂ : List α}
{a : α}
[DecidableEq α]
(l₁ : List α)
(h : a ∈ l₂)


theorem biUnion_le_succ (u : ℕ → Set α) (n : ℕ) : ⋃ k ≤ n + 1, u k = (⋃ k ≤ n, u k) ∪ u (n + 1)


theorem isClosed (x : A) : IsClosed (elementalStarAlgebra R x : Set A)

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[TopologicalSpace A]
[Semiring A]
[StarRing A]
[TopologicalSemiring A]
[ContinuousStar A]
[Algebra R A]
[StarModule R A]
(x : A)


theorem principal_opow_omega : Principal (·^·) omega

Ordinal.Principal (fun x x_1 => x ^ x_1) Ordinal.omega


@[simp]
protected theorem Orientation.map_neg {ι : Type*} (f : M ≃ₗ[R] N) (x : Orientation R M ι) :
    Orientation.map ι f (-x) = -Orientation.map ι f x

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
{N : Type u_3}
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
{ι : Type u_4}
(f : M ≃ₗ[R] N)
(x : Orientation R M ι)

(Orientation.map ι f) (-x) = -(Orientation.map ι f) x


theorem RightInverse.leftInverse {f : α → β} {g : β → α} (h : RightInverse g f) : LeftInverse f g

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
{g : β → α}
(h : Function.RightInverse g f)


theorem isTorsionBySet_iff_subseteq_ker_lsmul :
    IsTorsionBySet R M s ↔ s ⊆ LinearMap.ker (LinearMap.lsmul R M)

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

Module.IsTorsionBySet R M s ↔ s ⊆ ↑(LinearMap.ker (LinearMap.lsmul R M))


/-- If `H` is a `p`-subgroup but not a Sylow `p`-subgroup of cardinality `p ^ n`,
  then `p ^ (n + 1)` divides the cardinality of the normalizer of `H`. -/
theorem prime_pow_dvd_card_normalizer [Finite G] {p : ℕ} {n : ℕ} [_hp : Fact p.Prime]
    (hdvd : p ^ (n + 1) ∣ Nat.card G) {H : Subgroup G} (hH : Nat.card H = p ^ n) :
    p ^ (n + 1) ∣ Nat.card (normalizer H)

{G : Type u}
[Group G]
[Finite G]
{p n : ℕ}
[_hp : Fact (Nat.Prime p)]
(hdvd : p ^ (n + 1) ∣ Nat.card G)
{H : Subgroup G}
(hH : Nat.card ↥H = p ^ n)


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


theorem hasEigenvector_eigenvectorBasis (i : Fin n) :
    HasEigenvector T (hT.eigenvalues hn i) (hT.eigenvectorBasis hn i)

(hn : FiniteDimensional.finrank 𝕜 E = n)

Module.End.HasEigenvector T (↑(hT.eigenvalues hn i)) ((hT.eigenvectorBasis hn) i)


@[simp]
theorem lcurry_apply (f : M ⊗[R] N →ₗ[R] P) (m : M) (n : N) : lcurry R M N P f m n = f (m ⊗ₜ n)

{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 : TensorProduct R M N →ₗ[R] P)
(m : M)
(n : N)

(((TensorProduct.lcurry R M N P) f) m) n = f (m ⊗ₜ[R] n)


theorem comap_inf_principal_range : comap m (g ⊓ 𝓟 (range m)) = comap m g

{α : Type u}
{β : Type v}
{g : Filter β}
{m : α → β}

Filter.comap m (g ⊓ 𝓟 (Set.range m)) = Filter.comap m g


@[simp]
theorem sumLexAssoc_symm_apply_inl : (sumLexAssoc α β γ).symm (inl a) = inl (inl a)

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

(OrderIso.sumLexAssoc α β γ).symm (Sum.inl a) = Sum.inl (Sum.inl a)


/-- A type `α` is uncountable if it is not countable. -/
@[mk_iff uncountable_iff_not_countable]
class Uncountable (α : Sort*) : Prop where
  /-- A type `α` is uncountable if it is not countable. -/
  not_countable : ¬Countable α


@[simp]
theorem sub_one_lt_floor (a : α) : a - 1 < ⌊a⌋

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)


@[fun_prop]
theorem DifferentiableWithinAt.continuousMultilinear_apply_const
    (hc : DifferentiableWithinAt 𝕜 c s x) (u : ∀ i, M i) :
    DifferentiableWithinAt 𝕜 (fun y ↦ (c y) u) s x

{c : E → ContinuousMultilinearMap 𝕜 M H}

DifferentiableWithinAt 𝕜 (fun y => (c y) u) s x


{α : Type u_3}
[CommMonoid α]
{s : Multiset α}
{a : α}


theorem pairwise_lt_finRange (n : ℕ) : Pairwise (· < ·) (finRange n)

List.Pairwise (fun x x_1 => x < x_1) (List.finRange n)


lemma ChainComplex.exactAt_succ_single_obj (A : C) (n : ℕ) :
    ExactAt ((single₀ C).obj A) (n + 1)

HomologicalComplex.ExactAt ((ChainComplex.single₀ C).obj A) (n + 1)


theorem card_sylow_dvd_index [Fact p.Prime] [Finite (Sylow p G)] (P : Sylow p G) :
    Nat.card (Sylow p G) ∣ (P : Subgroup G).index

{p : ℕ}
{G : Type u_1}
[Group G]
[Fact (Nat.Prime p)]
[Finite (Sylow p G)]
(P : Sylow p G)


@[simp]
theorem iSup_Prop_eq {p : ι → Prop} : ⨆ i, p i = ∃ i, p i


theorem isAtom_iff_le_of_ge : IsAtom a ↔ a ≠ ⊥ ∧ ∀ b ≠ ⊥, b ≤ a → a ≤ b

{α : Type u_2}
[Preorder α]
[OrderBot α]
{a : α}

IsAtom a ↔ a ≠ ⊥ ∧ ∀ (b : α), b ≠ ⊥ → b ≤ a → a ≤ b


@[to_additive (attr := simp)]
theorem comp_one [One β] (x : β → γ) : x ∘ (1 : α → β) = const α (x 1)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[One β]
(x : β → γ)


@[simp]
theorem mkContinuous₂_apply (f : E →ₛₗ[σ₁₃] F →ₛₗ[σ₂₃] G) {C : ℝ}
    (hC : ∀ x y, ‖f x y‖ ≤ C * ‖x‖ * ‖y‖) (x : E) (y : F) : f.mkContinuous₂ C hC x y = f x y

{σ₂₃ : 𝕜₂ →+* 𝕜₃}

{σ₁₃ : 𝕜 →+* 𝕜₃}

(f : E →ₛₗ[σ₁₃] F →ₛₗ[σ₂₃] G)

(hC : ∀ (x : E) (y : F), ‖(f x) y‖ ≤ C * ‖x‖ * ‖y‖)


/-- We call a category `NonPreadditiveAbelian` if it has a zero object, kernels, cokernels, binary
    products and coproducts, and every monomorphism and every epimorphism is normal. -/
class NonPreadditiveAbelian extends HasZeroMorphisms C, NormalMonoCategory C,
    NormalEpiCategory C where
  [has_zero_object : HasZeroObject C]
  [has_kernels : HasKernels C]
  [has_cokernels : HasCokernels C]
  [has_finite_products : HasFiniteProducts C]
  [has_finite_coproducts : HasFiniteCoproducts C]

[self : CategoryTheory.NonPreadditiveAbelian C]


lemma nonempty_oreSet_iff_of_noZeroDivisors {R : Type*} [Ring R] [NoZeroDivisors R]
    {S : Submonoid R} :
    Nonempty (OreSet S) ↔ ∀ (r : R) (s : S), ∃ (r' : R) (s' : S), s' * r = r' * s

{R : Type u_1}
[Ring R]
[NoZeroDivisors R]
{S : Submonoid R}

Nonempty (OreLocalization.OreSet S) ↔ ∀ (r : R) (s : ↥S), ∃ r' s', ↑s' * r = r' * ↑s


/-- Seminorm-balls at the origin are balanced. -/
theorem balanced_ball_zero (r : ℝ) : Balanced 𝕜 (ball p 0 r)

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : Seminorm 𝕜 E)
(r : ℝ)


lemma quasiIso_iff_isIso_liftCycles (φ : S₁ ⟶ S₂)
    (hf₁ : S₁.f = 0) (hg₁ : S₁.g = 0) (hf₂ : S₂.f = 0) :
    QuasiIso φ ↔ IsIso (S₂.liftCycles φ.τ₂ (by rw [φ.comm₂₃, hg₁, zero_comp]))

CategoryTheory.ShortComplex.QuasiIso φ ↔ CategoryTheory.IsIso (S₂.liftCycles φ.τ₂ ⋯)


/-- The 1-hypercover of `D.glued` in the big Zariski site that is given by the
open cover `D.U` from the glue data `D`.
The "covering of the intersection of two such open subsets" is the trivial
covering given by `D.V`. -/
@[simps]
noncomputable def oneHypercover : Scheme.zariskiTopology.OneHypercover D.glued

∀ (a : D.J), D.oneHypercover.X a = D.U a


theorem digits.injective (b : ℕ) : Function.Injective b.digits


@[simp]
theorem BilinForm.toMatrix'_apply (B : BilinForm R₂ (n → R₂)) (i j : n) :
    BilinForm.toMatrix' B i j = B (stdBasis R₂ (fun _ => R₂) i 1) (stdBasis R₂ (fun _ => R₂) j 1)

{R₂ : Type u_5}
[CommSemiring R₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]
(B : LinearMap.BilinForm R₂ (n → R₂))
(i j : n)

LinearMap.BilinForm.toMatrix' B i j =
  (B ((LinearMap.stdBasis R₂ (fun x => R₂) i) 1)) ((LinearMap.stdBasis R₂ (fun x => R₂) j) 1)


theorem tsum_geometric_two' (a : ℝ) : ∑' n : ℕ, a / 2 / 2 ^ n = a


/-- The span of a finite subset is compact in the lattice of submodules. -/
theorem finite_span_isCompactElement (S : Set M) (h : S.Finite) :
    CompleteLattice.IsCompactElement (span R S : Submodule R M)

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(S : Set M)
(h : S.Finite)

CompleteLattice.IsCompactElement (Submodule.span R S)


/-- If `s` has a least upper bound, then it is bounded above. -/
theorem IsLUB.bddAbove (h : IsLUB s a) : BddAbove s

{α : Type u}
[Preorder α]
{s : Set α}
{a : α}
(h : IsLUB s a)


lemma not_tendsto_diracProba_of_not_tendsto [CompletelyRegularSpace X] {x : X} (L : Filter X)
    (h : ¬ Tendsto id L (𝓝 x)) :
    ¬ Tendsto diracProba L (𝓝 (diracProba x))

{X : Type u_1}
[MeasurableSpace X]
[TopologicalSpace X]
[OpensMeasurableSpace X]
[CompletelyRegularSpace X]
{x : X}
(L : Filter X)
(h : ¬Filter.Tendsto id L (𝓝 x))

¬Filter.Tendsto MeasureTheory.diracProba L (𝓝 (MeasureTheory.diracProba x))


/-- `Equiv.mulLeft` as an `OrderIso`. See also `OrderEmbedding.mulLeft`. -/
@[to_additive (attr := simps! (config := { simpRhs := true }) toEquiv apply)
  "`Equiv.addLeft` as an `OrderIso`. See also `OrderEmbedding.addLeft`."]
def OrderIso.mulLeft (a : α) : α ≃o α

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


@[simp, norm_cast]
theorem natCast_re (n : ℕ) : (n : ℍ[R,c₁,c₂]).re = n

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(n : ℕ)


@[simp]
lemma div2_succ (n : ℕ) : div2 (succ n) = cond (bodd n) (succ (div2 n)) (div2 n)

n.succ.div2 = bif n.bodd then n.div2.succ else n.div2


theorem integrableOn_condexpL2_of_measure_ne_top (hm : m ≤ m0) (hμs : μ s ≠ ∞) (f : α →₂[μ] E) :
    IntegrableOn (E := E) (condexpL2 E 𝕜 hm f) s μ

{α : Type u_1}
{E : Type u_2}
{𝕜 : Type u_7}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hm : m ≤ m0)
(hμs : μ s ≠ ⊤)
(f : ↥(MeasureTheory.Lp E 2 μ))

MeasureTheory.IntegrableOn (↑↑↑((MeasureTheory.condexpL2 E 𝕜 hm) f)) s μ


/-- Special case of the **Plünnecke-Ruzsa inequality**. Multiplication version. -/
@[to_additive "Special case of the **Plünnecke-Ruzsa inequality**. Addition version."]
theorem pluennecke_ruzsa_inequality_pow_mul (hA : A.Nonempty) (B : Finset α) (n : ℕ) :
    (B ^ n).card ≤ ((A * B).card / A.card : ℚ≥0) ^ n * A.card

{α : Type u_1}
[AddCommGroup α]
[DecidableEq α]
{A : Finset α}
(hA : A.Nonempty)
(B : Finset α)
(n : ℕ)

↑(n • B).card ≤ (↑(A + B).card / ↑A.card) ^ n * ↑A.card


lemma Y_eq_of_X_eq {x₁ x₂ y₁ y₂ : F} (h₁ : W.Equation x₁ y₁) (h₂ : W.Equation x₂ y₂)
    (hx : x₁ = x₂) : y₁ = y₂ ∨ y₁ = W.negY x₂ y₂

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


/-- The fundamental property of the adjoint. -/
theorem adjoint_inner_right (A : E →ₗ[𝕜] F) (x : E) (y : F) : ⟪x, adjoint A y⟫ = ⟪A x, y⟫

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[FiniteDimensional 𝕜 E]
[FiniteDimensional 𝕜 F]
(A : E →ₗ[𝕜] F)
(x : E)
(y : F)

⟪x, (LinearMap.adjoint A) y⟫_𝕜 = ⟪A x, y⟫_𝕜


theorem norm_iteratedFDeriv_clm_apply {f : E → F →L[𝕜] G} {g : E → F} {N : ℕ∞} {n : ℕ}
    (hf : ContDiff 𝕜 N f) (hg : ContDiff 𝕜 N g) (x : E) (hn : ↑n ≤ N) :
    ‖iteratedFDeriv 𝕜 n (fun y : E => (f y) (g y)) x‖ ≤ ∑ i ∈ Finset.range (n + 1),
      ↑(n.choose i) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F →L[𝕜] G}
{g : E → F}
{N : ℕ∞}
{n : ℕ}
(hf : ContDiff 𝕜 N f)
(hg : ContDiff 𝕜 N g)
(x : E)
(hn : ↑n ≤ N)

‖iteratedFDeriv 𝕜 n (fun y => (f y) (g y)) x‖ ≤
  ∑ i ∈ Finset.range (n + 1), ↑(n.choose i) * ‖iteratedFDeriv 𝕜 i f x‖ * ‖iteratedFDeriv 𝕜 (n - i) g x‖


/-- Augment a simplicial object with an object. -/
@[simps]
def augment (X : SimplicialObject C) (X₀ : C) (f : X _[0] ⟶ X₀)
    (w : ∀ (i : SimplexCategory) (g₁ g₂ : ([0] : SimplexCategory) ⟶ i),
      X.map g₁.op ≫ f = X.map g₂.op ≫ f) :
    SimplicialObject.Augmented C

(f : X.obj (Opposite.op (SimplexCategory.mk 0)) ⟶ X₀)

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


@[simp]
theorem toFunBilinear_apply (a : A) (m : Matrix n n R) :
    toFunBilinear R A n a m = a • m.map (algebraMap R A)

(R : Type u)
[CommSemiring R]
(A : Type v)
[Semiring A]
[Algebra R A]
(n : Type w)
(a : A)
(m : Matrix n n R)

((MatrixEquivTensor.toFunBilinear R A n) a) m = a • m.map ⇑(algebraMap R A)


/-- Every terminating continued fraction corresponds to a rational number. -/
theorem exists_rat_eq_of_terminates (terminates : (of v).Terminates) : ∃ q : ℚ, v = ↑q

(terminates : (GenContFract.of v).Terminates)


@[simp]
theorem apply_apply (v : E) (f : E →L[𝕜] Fₗ) : apply 𝕜 Fₗ v f = f v

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

((ContinuousLinearMap.apply 𝕜 Fₗ) v) f = f v


theorem isUnit_or_isUnit_of_isUnit_add {a b : R} (h : IsUnit (a + b)) : IsUnit a ∨ IsUnit b

{R : Type u_1}
[CommSemiring R]
[LocalRing R]
{a b : R}
(h : IsUnit (a + b))


@[simp]
theorem diagonal_zero [Zero α] : (diagonal fun _ => 0 : Matrix n n α) = 0

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]


theorem HasFDerivAt.inner (hf : HasFDerivAt f f' x) (hg : HasFDerivAt g g' x) :
    HasFDerivAt (fun t => ⟪f t, g t⟫) ((fderivInnerCLM 𝕜 (f x, g x)).comp <| f'.prod g') x

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f g : G → E}
{f' g' : G →L[ℝ] E}
{x : G}
(hf : HasFDerivAt f f' x)
(hg : HasFDerivAt g g' x)

HasFDerivAt (fun t => ⟪f t, g t⟫_𝕜) ((fderivInnerCLM 𝕜 (f x, g x)).comp (f'.prod g')) x


@[to_additive]
theorem norm_div_le_of_le {r₁ r₂ : ℝ} (H₁ : ‖a₁‖ ≤ r₁) (H₂ : ‖a₂‖ ≤ r₂) : ‖a₁ / a₂‖ ≤ r₁ + r₂

{E : Type u_6}
[SeminormedGroup E]
{a₁ a₂ : E}
{r₁ r₂ : ℝ}
(H₁ : ‖a₁‖ ≤ r₁)
(H₂ : ‖a₂‖ ≤ r₂)

‖a₁ / a₂‖ ≤ r₁ + r₂


theorem sum_inl : Primrec (@Sum.inl α β)

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


protected theorem lt_of_sub_eq_sub_one (h : m - n = l + 1) : n < m


/-- If `F.cones` is represented by `X`, the cone corresponding to a morphism `f : Y ⟶ X` is
the limit cone extended by `f`. -/
theorem coneOfHom_fac {Y : C} (f : Y ⟶ X) : coneOfHom h f = (limitCone h).extend f

(h : CategoryTheory.yoneda.obj X ⋙ CategoryTheory.uliftFunctor.{u₁, v₃} ≅ F.cones)

CategoryTheory.Limits.IsLimit.OfNatIso.coneOfHom h f = (CategoryTheory.Limits.IsLimit.OfNatIso.limitCone h).extend f


theorem mul_inverse_rev {M₀} [CommMonoidWithZero M₀] (a b : M₀) :
    Ring.inverse (a * b) = inverse b * inverse a

{M₀ : Type u_8}
[CommMonoidWithZero M₀]
(a b : M₀)

Ring.inverse (a * b) = Ring.inverse b * Ring.inverse a


@[simp]
lemma natCast_mul_left (h : SemiconjBy a x y) (n : ℕ) : SemiconjBy (n * a) x y

{α : Type u_1}
[Semiring α]
{a x y : α}
(h : SemiconjBy a x y)
(n : ℕ)


@[simp]
theorem coe_comp (f : LocallyBoundedMap β γ) (g : LocallyBoundedMap α β) : ⇑(f.comp g) = f ∘ g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Bornology α]
[Bornology β]
[Bornology γ]
(f : LocallyBoundedMap β γ)
(g : LocallyBoundedMap α β)


@[simp] theorem comp_id (f : InfTopHom α β) : f.comp (InfTopHom.id α) = f

{α : Type u_3}
{β : Type u_4}
[Inf α]
[Top α]
[Inf β]
[Top β]
(f : InfTopHom α β)


theorem pairwise_append_comm {R : α → α → Prop} (s : ∀ {x y}, R x y → R y x) {l₁ l₂ : List α} :
    Pairwise R (l₁ ++ l₂) ↔ Pairwise R (l₂ ++ l₁)

{α : Type u_1}
{R : α → α → Prop}
(s : ∀ {x y : α}, R x y → R y x)
{l₁ l₂ : List α}

List.Pairwise R (l₁ ++ l₂) ↔ List.Pairwise R (l₂ ++ l₁)


theorem count_mul_of_coprime' [DecidableEq (Associates α)] {a b : Associates α} {p : Associates α}
    (hp : Irreducible p) (hab : ∀ d, d ∣ a → d ∣ b → ¬Prime d) :
    count p (a * b).factors = count p a.factors ∨ count p (a * b).factors = count p b.factors

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

(hab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d)

p.count (a * b).factors = p.count a.factors ∨ p.count (a * b).factors = p.count b.factors


@[simp, reassoc]
theorem colimitIsoColimitCurryCompColim_ι_hom {j} {k} :
    colimit.ι _ (j, k) ≫ (colimitIsoColimitCurryCompColim G).hom =
      (colimit.ι (_) k ≫ colimit.ι (curry.obj G ⋙ colim) j : _ ⟶ colimit (_ ⋙ colim))

[CategoryTheory.Limits.HasColimit (CategoryTheory.curry.obj G ⋙ CategoryTheory.Limits.colim)]

CategoryTheory.Limits.colimit.ι G (j, k) ≫ (CategoryTheory.Limits.colimitIsoColimitCurryCompColim G).hom =
  CategoryTheory.Limits.colimit.ι ((CategoryTheory.curry.obj G).obj j) k ≫
    CategoryTheory.Limits.colimit.ι (CategoryTheory.curry.obj G ⋙ CategoryTheory.Limits.colim) j


/-- `OfScientific.ofScientific` is the simp-normal form. -/
@[simp]
theorem Rat.ofScientific_eq_ofScientific (m : ℕ) (s : Bool) (e : ℕ) :
    Rat.ofScientific (OfNat.ofNat m) s (OfNat.ofNat e) = OfScientific.ofScientific m s e


@[simp]
theorem filter_length_eq_length {l} : (filter p l).length = l.length ↔ ∀ a ∈ l, p a

∀ {α : Type u_1} {p : α → Bool} {l : List α}, (List.filter p l).length = l.length ↔ ∀ (a : α), a ∈ l → p a = true


theorem embedding_coe_real : Embedding ((↑) : ℚ → ℝ)


{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a : α}


theorem one_eq_span_one_set : (1 : Submodule R A) = span R 1

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


theorem card_rootsOfUnity' {n : ℕ+} (h : IsPrimitiveRoot ζ n) :
    Fintype.card (rootsOfUnity n R) = n

{R : Type u_4}
[CommRing R]
{ζ : Rˣ}
[IsDomain R]
{n : ℕ+}
(h : IsPrimitiveRoot ζ ↑n)


/-- A commutative additive magma is a type with an addition which commutes. -/
@[ext]
class AddCommMagma (G : Type u) extends Add G where
  /-- Addition is commutative in an commutative additive magma. -/
  protected add_comm : ∀ a b : G, a + b = b + a

{G : Type u}
[self : AddCommMagma G]
(a b : G)


theorem AnalyticOn.eval_linearMap' (f : σ → E →ₗ[𝕜] B) (p : MvPolynomial σ B) :
    AnalyticOn 𝕜 (fun x ↦ eval (f · x) p) Set.univ

{𝕜 : Type u_1}
{E : Type u_2}
{B : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedCommRing B]
[NormedAlgebra 𝕜 B]
{σ : Type u_5}
[CompleteSpace 𝕜]
[T2Space E]
[FiniteDimensional 𝕜 E]
(f : σ → E →ₗ[𝕜] B)
(p : MvPolynomial σ B)

AnalyticOn 𝕜 (fun x => (MvPolynomial.eval fun x_1 => (f x_1) x) p) Set.univ


theorem Filter.EventuallyEq.lineDifferentiableWithinAt_iff
    (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : f₀ x = f₁ x) :
    LineDifferentiableWithinAt 𝕜 f₀ s x v ↔ LineDifferentiableWithinAt 𝕜 f₁ s x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f₀ f₁ : E → F}
{s : Set E}
{x v : E}
(h : f₀ =ᶠ[𝓝[s] x] f₁)
(hx : f₀ x = f₁ x)


@[to_additive (attr := simp)]
theorem mulIndicator_of_not_mem (h : a ∉ s) (f : α → M) : mulIndicator s f a = 1

{α : Type u_1}
{M : Type u_4}
[Zero M]
{s : Set α}
{a : α}
(h : a ∉ s)
(f : α → M)


theorem cauchyFilter_eq {α : Type*} [UniformSpace α] [CompleteSpace α] [T0Space α]
    {f g : CauchyFilter α} :
    haveI := f.2.1.nonempty; lim f.1 = lim g.1 ↔ Inseparable f g

{α : Type u_1}
[UniformSpace α]
[CompleteSpace α]
[T0Space α]
{f g : CauchyFilter α}


protected theorem comp {f : X → Y} (hf : IsLocallyConstant f) (g : Y → Z) :
    IsLocallyConstant (g ∘ f)

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
{f : X → Y}
(hf : IsLocallyConstant f)
(g : Y → Z)


protected theorem sub_add_comm {n m k : Nat} (h : k ≤ n) : n + m - k = n - k + m


theorem cardinal_lift_mk_le_max {σ : Type u} {R : Type v} [CommSemiring R] : #(MvPolynomial σ R) ≤
    max (max (Cardinal.lift.{u} #R) <| Cardinal.lift.{v} #σ) ℵ₀

#(MvPolynomial σ R) ≤ max (max (Cardinal.lift.{u, v} #R) (Cardinal.lift.{v, u} #σ)) ℵ₀


theorem inf_le_of_right_le (h : b ≤ c) : a ⊓ b ≤ c

{α : Type u}
[SemilatticeInf α]
{a b c : α}
(h : b ≤ c)


theorem sInf_eq_bot : sInf s = ⊥ ↔ ∀ b > ⊥, ∃ a ∈ s, a < b

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


theorem logb_injOn_pos_of_base_lt_one : Set.InjOn (logb b) (Set.Ioi 0)


@[simp]
theorem bit_negSucc (b) (n : ℕ) : bit b -[n+1] = -[Nat.bit (not b) n+1]

Int.bit b (Int.negSucc n) = Int.negSucc (Nat.bit (!b) n)


@[to_additive]
lemma IsMulFreimanHom.inv (hf : IsMulFreimanHom n A B f) : IsMulFreimanHom n A B⁻¹ f⁻¹

{α : Type u_2}
{β : Type u_3}
[CommMonoid α]
[DivisionCommMonoid β]
{A : Set α}
{B : Set β}
{f : α → β}
{n : ℕ}
(hf : IsMulFreimanHom n A B f)


/-- `LocallyConstant.congrLeft` as a `RingEquiv`. -/
@[simps!]
def congrLeftRingEquiv [Semiring Z] (e : X ≃ₜ Y) :
    LocallyConstant X Z ≃+* LocallyConstant Y Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{Z : Type u_6}
[Semiring Z]
(e : X ≃ₜ Y)
(g : LocallyConstant X Z)

∀ (a : Y), ((LocallyConstant.congrLeftRingEquiv e) g) a = g (e.symm a)


@[simp]
theorem mul_of_ne {k l : n} (h : j ≠ k) (d : α) :
    stdBasisMatrix i j c * stdBasisMatrix k l d = 0

{n : Type u_3}
{α : Type u_5}
[DecidableEq n]
[Semiring α]
(i j : n)
(c : α)
[Fintype n]
{k l : n}
(h : j ≠ k)
(d : α)

Matrix.stdBasisMatrix i j c * Matrix.stdBasisMatrix k l d = 0


@[to_additive]
theorem FP.singleton {M} [Semigroup M] (a : Stream' M) (i : ℕ) : a.get i ∈ FP a

{M : Type u_1}
[AddSemigroup M]
(a : Stream' M)
(i : ℕ)


/-- If a monotone function is continuous at the indexed supremum of a bounded function on
a nonempty `Sort`, then it sends this supremum to the supremum of the composition. -/
theorem Monotone.map_ciSup_of_continuousAt {f : α → β} {g : γ → α} (Cf : ContinuousAt f (⨆ i, g i))
    (Mf : Monotone f) (H : BddAbove (range g)) : f (⨆ i, g i) = ⨆ i, f (g i)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
[Nonempty γ]
{f : α → β}
{g : γ → α}
(Cf : ContinuousAt f (⨆ i, g i))
(Mf : Monotone f)
(H : BddAbove (Set.range g))


@[simp]
theorem wellFoundedOn_bUnion [IsStrictOrder α r] (s : Finset ι) {f : ι → Set α} :
    (⋃ i ∈ s, f i).WellFoundedOn r ↔ ∀ i ∈ s, (f i).WellFoundedOn r

{ι : Type u_1}
{α : Type u_2}
{r : α → α → Prop}
[IsStrictOrder α r]
(s : Finset ι)
{f : ι → Set α}


theorem Sphere.ne_iff {s₁ s₂ : Sphere P} :
    s₁ ≠ s₂ ↔ s₁.center ≠ s₂.center ∨ s₁.radius ≠ s₂.radius

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


@[reassoc]
theorem associator_inv_naturality_left {X X' : C} (f : X ⟶ X') (Y Z : C) :
    f ▷ (Y ⊗ Z) ≫ (α_ X' Y Z).inv = (α_ X Y Z).inv ≫ f ▷ Y ▷ Z

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

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerRight f (CategoryTheory.MonoidalCategory.tensorObj Y Z))
    (CategoryTheory.MonoidalCategory.associator X' Y Z).inv =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).inv
    (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.MonoidalCategory.whiskerRight f Y) Z)


/-- A `SemilatticeInf` is a meet-semilattice, that is, a partial order
  with a meet (a.k.a. glb / greatest lower bound, inf / infimum) operation
  `⊓` which is the greatest element smaller than both factors. -/
class SemilatticeInf (α : Type u) extends Inf α, PartialOrder α where
  /-- The infimum is a lower bound on the first argument -/
  protected inf_le_left : ∀ a b : α, a ⊓ b ≤ a
  /-- The infimum is a lower bound on the second argument -/
  protected inf_le_right : ∀ a b : α, a ⊓ b ≤ b
  /-- The infimum is the *greatest* lower bound -/
  protected le_inf : ∀ a b c : α, a ≤ b → a ≤ c → a ≤ b ⊓ c

{α : Type u}
[self : SemilatticeInf α]
(a b : α)


@[simp]
theorem mapEquiv_symm_apply (h : α ≃ β) (y : f β) :
    (mapEquiv f h : f α ≃ f β).symm y = map h.symm y

{α β : Type u}
(f : Type u → Type v)
[Functor f]
[LawfulFunctor f]
(h : α ≃ β)
(y : f β)

(Functor.mapEquiv f h).symm y = ⇑h.symm <$> y


theorem card_roots_le_map [IsDomain A] [IsDomain B] {p : A[X]} {f : A →+* B} (h : p.map f ≠ 0) :
    Multiset.card p.roots ≤ Multiset.card (p.map f).roots

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
[IsDomain A]
[IsDomain B]
{p : Polynomial A}
{f : A →+* B}
(h : Polynomial.map f p ≠ 0)

Multiset.card p.roots ≤ Multiset.card (Polynomial.map f p).roots


@[simp, norm_cast]
theorem coe_subset_coe : (I : Set (ι → ℝ)) ⊆ J ↔ I ≤ J

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

↑I ⊆ ↑J ↔ I ≤ J


/-- A finite group of prime order is cyclic. -/
@[to_additive "A finite group of prime order is cyclic."]
theorem isCyclic_of_prime_card {α : Type u} [Group α] [Fintype α] {p : ℕ} [hp : Fact p.Prime]
    (h : Fintype.card α = p) : IsCyclic α

{α : Type u}
[Group α]
[Fintype α]
{p : ℕ}
[hp : Fact (Nat.Prime p)]
(h : Fintype.card α = p)


@[to_additive contMDiffWithinAt_of_not_mem]
theorem contMDiffWithinAt_of_not_mem_mulTSupport {f : M → M'} [One M'] {x : M}
    (hx : x ∉ mulTSupport f) (n : ℕ∞) (s : Set M) : 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 : M → M'}
[Zero M']
{x : M}
(hx : x ∉ tsupport f)
(n : ℕ∞)
(s : Set M)


@[to_additive]
theorem smooth_finprod (h : ∀ i, Smooth I' I (f i))
    (hfin : LocallyFinite fun i => mulSupport (f i)) : Smooth I' I fun x => ∏ᶠ i, f i x

(hfin : LocallyFinite fun i => Function.mulSupport (f i))


@[simp]
theorem natDegree_hermite {n : ℕ} : (hermite n).natDegree = n


lemma degreeOf_le_iff {n : σ} {f : MvPolynomial σ R} {d : ℕ} :
    degreeOf n f ≤ d ↔ ∀ m ∈ support f, m n ≤ d

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{n : σ}
{f : MvPolynomial σ R}
{d : ℕ}

MvPolynomial.degreeOf n f ≤ d ↔ ∀ m ∈ f.support, m n ≤ d


theorem Ioo_eq_empty_iff [DenselyOrdered α] : Ioo a b = ∅ ↔ ¬a < b

{α : Type u_1}
[Preorder α]
{a b : α}
[DenselyOrdered α]


@[simp] theorem mod_div_self (m n : Nat) : m % n / n = 0


protected lemma min_le_iff : min (a : WithZero α) b ≤ c ↔ min a b ≤ c

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


@[simp]
theorem weightedSumSquares_apply [Monoid S] [DistribMulAction S R] [SMulCommClass S R R]
    (w : ι → S) (v : ι → R) :
    weightedSumSquares R w v = ∑ i : ι, w i • (v i * v i)

{S : Type u_1}
{R : Type u_3}
[CommSemiring R]
{ι : Type u_8}
[Fintype ι]
[Monoid S]
[DistribMulAction S R]
[SMulCommClass S R R]
(w : ι → S)
(v : ι → R)

(QuadraticMap.weightedSumSquares R w) v = ∑ i : ι, w i • (v i * v i)


protected theorem sub_one_mul  (n m : Nat) : (n - 1) * m = n * m - m


theorem isInt_jacobiSymNat : {a na : ℕ} → {b nb : ℕ} → {r : ℤ} →
    IsNat a na → IsNat b nb → jacobiSymNat na nb = r → IsInt (jacobiSymNat a b) r

Mathlib.Meta.NormNum.IsNat a na →
  Mathlib.Meta.NormNum.IsNat b nb →
    Mathlib.Meta.NormNum.jacobiSymNat na nb = r → Mathlib.Meta.NormNum.IsInt (Mathlib.Meta.NormNum.jacobiSymNat a b) r


theorem Hereditarily.empty : Hereditarily p x → p ∅


lemma iff_eq_eq {a b : Prop} : (a ↔ b) = (a = b)


protected theorem partial_sups [Preorder ι] [LocallyFiniteOrderBot ι] {p : SeminormFamily 𝕜 E ι}
    [TopologicalSpace E] (hp : WithSeminorms p) : WithSeminorms (fun i ↦ (Finset.Iic i).sup p)

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

WithSeminorms fun i => (Finset.Iic i).sup p


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


/-- The identity lax monoidal functor. -/
@[simps]
def id : OplaxMonoidalFunctor.{v₁, v₁} C C

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

(CategoryTheory.OplaxMonoidalFunctor.id C).δ X Y = 𝟙 ((𝟭 C).obj (CategoryTheory.MonoidalCategory.tensorObj X Y))


@[simp]
theorem coe_map (s : Sym α n) (f : α → β) : ↑(s.map f) = Multiset.map f s

{α : Type u_1}
{β : Type u_2}
{n : ℕ}
(s : Sym α n)
(f : α → β)


@[simp] lemma sups_eq_self : s ⊻ s = s ↔ SupClosed s

{α : Type u_2}
[SemilatticeSup α]
{s : Set α}


@[simp] theorem msb_shiftLeftZeroExtend (x : BitVec w) (i : Nat) :
    (shiftLeftZeroExtend x i).msb = x.msb


theorem isClosed_preimage_ofLawson {S : Set α} :
    IsClosed (ofLawson ⁻¹' S) ↔ IsClosed[lawson α] S

IsClosed (⇑Topology.WithLawson.ofLawson ⁻¹' S) ↔ IsClosed S


/-- To prove inclusion of a *subgroup* in a stabilizer, it is enough to prove inclusions.-/
theorem le_stabilizer_iff_smul_le (s : Set α) (H : Subgroup G) :
    H ≤ stabilizer G s ↔ ∀ g ∈ H, g • s ⊆ s

{G : Type u_1}
[Group G]
{α : Type u_2}
[MulAction G α]
(s : Set α)
(H : Subgroup G)

H ≤ MulAction.stabilizer G s ↔ ∀ g ∈ H, g • s ⊆ s


@[to_additive (attr := simp)]
theorem mker_inr : mker (inr M N) = ⊥

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]


@[gcongr]
theorem _root_.GCongr.natCast_le_natCast {a b : ℕ} (h : a ≤ b) : (a : α) ≤ b

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


/-- If a monotone function is continuous at the supremum of a nonempty bounded above set `s`,
then it sends this supremum to the supremum of the image of `s`. -/
theorem Monotone.map_csSup_of_continuousAt {f : α → β} {s : Set α} (Cf : ContinuousAt f (sSup s))
    (Mf : Monotone f) (ne : s.Nonempty) (H : BddAbove s) : f (sSup s) = sSup (f '' s)

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
{f : α → β}
{s : Set α}
(Cf : ContinuousAt f (sSup s))
(Mf : Monotone f)
(ne : s.Nonempty)
(H : BddAbove s)


/-- The canonical map from `𝓞 K` to `K` is injective.

This is a convenient abbreviation for `NoZeroSMulDivisors.algebraMap_injective`.
-/
lemma coe_injective : Function.Injective (algebraMap (𝓞 K) K)

Function.Injective ⇑(algebraMap (NumberField.RingOfIntegers K) K)


theorem eq_of_forall_symmetric {α : Type*} [UniformSpace α] [T0Space α] {x y : α}
    (h : ∀ {V}, V ∈ 𝓤 α → SymmetricRel V → (x, y) ∈ V) : x = y

(h : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → SymmetricRel V → (x, y) ∈ V)


@[simp]
theorem mem_add {K₁ K₂ : ConvexCone 𝕜 E} {a : E} :
    a ∈ K₁ + K₂ ↔ ∃ x ∈ K₁, ∃ y ∈ K₂, x + y = a

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{K₁ K₂ : ConvexCone 𝕜 E}
{a : E}


theorem AlgebraicIndependent.aeval_comp_mvPolynomialOptionEquivPolynomialAdjoin
    (hx : AlgebraicIndependent R x) (a : A) :
    RingHom.comp
        (↑(Polynomial.aeval a : Polynomial (adjoin R (Set.range x)) →ₐ[_] A) :
          Polynomial (adjoin R (Set.range x)) →+* A)
        hx.mvPolynomialOptionEquivPolynomialAdjoin.toRingHom =
      ↑(MvPolynomial.aeval fun o : Option ι => o.elim a x : MvPolynomial (Option ι) R →ₐ[R] A)

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
(hx : AlgebraicIndependent R x)
(a : A)

(↑(Polynomial.aeval a)).comp hx.mvPolynomialOptionEquivPolynomialAdjoin.toRingHom =
  ↑(MvPolynomial.aeval fun o => o.elim a x)


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

{α : Type u_2}
{β : Type u_3}
[InfSet α]
[InfSet β]
(f : sInfHom α β)


theorem Equiv.iSup_comp {g : ι' → α} (e : ι ≃ ι') : ⨆ x, g (e x) = ⨆ y, g y

{α : Type u_1}
{ι : Sort u_5}
{ι' : Sort u_6}
[SupSet α]
{g : ι' → α}
(e : ι ≃ ι')


@[ext]
theorem ext (a b : SimplexCategory) : a.len = b.len → a = b


@[simp]
theorem of_d (j : α) : (of X d sq).d j (j + 1) = d j

(CochainComplex.of X d sq).d j (j + 1) = d j


/-- Promote an isomorphism in `SemiNormedGrp` to an isomorphism in `SemiNormedGrp₁`. -/
@[simps]
def mkIso {M N : SemiNormedGrp} (f : M ≅ N) (i : f.hom.NormNoninc) (i' : f.inv.NormNoninc) :
    SemiNormedGrp₁.of M ≅ SemiNormedGrp₁.of N

(i : NormedAddGroupHom.NormNoninc f.hom)

(i' : NormedAddGroupHom.NormNoninc f.inv)

(SemiNormedGrp₁.mkIso f i i').hom = SemiNormedGrp₁.mkHom f.hom i


/-- Adic completion preserves surjectivity -/
theorem map_surjective : Function.Surjective (map I f)

{R : Type u}
[CommRing R]
(I : Ideal R)
{M : Type v}
[AddCommGroup M]
[Module R M]
{N : Type w}
[AddCommGroup N]
[Module R N]
{f : M →ₗ[R] N}
(hf : Function.Surjective ⇑f)

Function.Surjective ⇑(AdicCompletion.map I f)


@[simp, norm_cast]
theorem coe_to_distribMulActionHom (f : A →ₛₙₐ[φ] B) : ⇑(f : A →ₑ+[φ] B) = f

{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]
(f : A →ₛₙₐ[φ] B)


/-- Two partial homeomorphisms are equal when they have equal `toFun`, `invFun` and `source`.
It is not sufficient to have equal `toFun` and `source`, as this only determines `invFun` on
the target. This would only be true for a weaker notion of equality, arguably the right one,
called `EqOnSource`. -/
@[ext]
protected theorem ext (e' : PartialHomeomorph X Y) (h : ∀ x, e x = e' x)
    (hinv : ∀ x, e.symm x = e'.symm x) (hs : e.source = e'.source) : e = e'

(hinv : ∀ (x : Y), ↑e.symm x = ↑e'.symm x)


/-- **First moment method**. The maximum of an integrable function is greater than its mean. -/
theorem exists_setAverage_le (hμ : μ s ≠ 0) (hμ₁ : μ s ≠ ∞) (hf : IntegrableOn f s μ) :
    ∃ x ∈ s, ⨍ a in s, f a ∂μ ≤ f x

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{f : α → ℝ}
(hμ : μ s ≠ 0)
(hμ₁ : μ s ≠ ⊤)
(hf : MeasureTheory.IntegrableOn f s μ)


private lemma continuousAt_mul_top_ne_zero {a : ℝ} (h : a ≠ 0) :
    ContinuousAt (fun p : EReal × EReal ↦ p.1 * p.2) (⊤, a)

ContinuousAt (fun p => p.1 * p.2) (⊤, ↑a)


theorem radius_eq_top_of_forall_nnreal_isBigO
    (h : ∀ r : ℝ≥0, (fun n => ‖p n‖ * (r : ℝ) ^ n) =O[atTop] fun _ => (1 : ℝ)) : p.radius = ∞

(h : ∀ (r : ℝ≥0), (fun n => ‖p n‖ * ↑r ^ n) =O[Filter.atTop] fun x => 1)


lemma stableUnderSpecialization_iInter {ι : Sort*} (S : ι → Set X)
    (H : ∀ i, StableUnderSpecialization (S i)) : StableUnderSpecialization (⋂ i, S i)

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


@[to_additive]
theorem isUnit_comp (j : N →* P) (y : S) : IsUnit (j.comp f.toMap y)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
(j : N →* P)
(y : ↥S)


theorem of_decide_eq_false [inst : Decidable p] : Eq (decide p) false → Not p


theorem isBounded_iff_subset_smul_closedBall {s : Set E} :
    Bornology.IsBounded s ↔ ∃ a : 𝕜, s ⊆ a • Metric.closedBall (0 : E) 1

(𝕜 : Type u_1)
{E : Type u_3}
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}

Bornology.IsBounded s ↔ ∃ a, s ⊆ a • Metric.closedBall 0 1


@[simp] lemma Even.neg_pow : Even n → ∀ a : α, (-a) ^ n = a ^ n

{α : Type u_2}
[Monoid α]
[HasDistribNeg α]
{n : ℕ}


@[simp]
theorem toBlocks_fromBlocks₁₂ (A : Matrix n l α) (B : Matrix n m α) (C : Matrix o l α)
    (D : Matrix o m α) : (fromBlocks A B C D).toBlocks₁₂ = B

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
(A : Matrix n l α)
(B : Matrix n m α)
(C : Matrix o l α)
(D : Matrix o m α)

(Matrix.fromBlocks A B C D).toBlocks₁₂ = B


theorem setIntegral_compProd_univ_left (f : β × γ → E) {t : Set γ} (ht : MeasurableSet t)
    (hf : IntegrableOn f (univ ×ˢ t) ((κ ⊗ₖ η) a)) :
    ∫ z in univ ×ˢ t, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y in t, f (x, y) ∂η (a, x) ∂κ a

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

(hf : MeasureTheory.IntegrableOn f (Set.univ ×ˢ t) ((κ ⊗ₖ η) a))

∫ (z : β × γ) in Set.univ ×ˢ t, f z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ) in t, f (x, y) ∂η (a, x) ∂κ a


lemma le_collapse_of_mem (ha : a ∉ s) (hf : 0 ≤ f) (hts : t = s) (ht : t ∈ 𝒜) :
    f t ≤ collapse 𝒜 a f s

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[LinearOrderedCommSemiring β]
{𝒜 : Finset (Finset α)}
{a : α}
{f : Finset α → β}
{s t : Finset α}
(ha : a ∉ s)
(hf : 0 ≤ f)
(hts : t = s)
(ht : t ∈ 𝒜)


@[to_additive (attr := simp)]
theorem coe_subtype : (SubmonoidClass.subtype S' : S' → M) = Subtype.val

{M : Type u_1}
[MulOneClass M]
{A : Type u_4}
[SetLike A M]
[hA : SubmonoidClass A M]
(S' : A)

⇑(SubmonoidClass.subtype S') = Subtype.val


lemma dual_mul_self :
    dual A K I * I = dual A K 1

(A : Type u_1)
(K : Type u_2)
{L : Type u}
{B : Type u_3}
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
[IsDomain A]
[IsFractionRing A K]
[IsIntegralClosure B A L]
[IsFractionRing B L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
[IsIntegrallyClosed A]
[IsDedekindDomain B]
{I : FractionalIdeal B⁰ L}
(hI : I ≠ 0)

FractionalIdeal.dual A K I * I = FractionalIdeal.dual A K 1


theorem Bijective.prodMap (hf : Bijective f) (hg : Bijective g) : Bijective (map f g)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f : α → γ}
{g : β → δ}
(hf : Function.Bijective f)
(hg : Function.Bijective g)


@[simp] theorem Prod.map_snd (f : α → β) (g : γ → δ) (x) : (Prod.map f g x).2 = g x.2

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(f : α → β)
(g : γ → δ)
(x : α × γ)


@[simp] theorem cond_true_left   : ∀(c f : Bool), cond c true f  = ( c || f)


theorem fmod_eq_mod {a b : Int} (Ha : 0 ≤ a) (Hb : 0 ≤ b) : fmod a b = mod a b


/-- Down-compressing a family is idempotent. -/
@[simp]
theorem compression_idem (a : α) (𝒜 : Finset (Finset α)) : 𝓓 a (𝓓 a 𝒜) = 𝓓 a 𝒜

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

Down.compression a (Down.compression a 𝒜) = Down.compression a 𝒜


@[to_additive]
theorem cauchySeq_finset_iff_prod_vanishing :
    (CauchySeq fun s : Finset β ↦ ∏ b ∈ s, f b) ↔
      ∀ e ∈ 𝓝 (1 : α), ∃ s : Finset β, ∀ t, Disjoint t s → (∏ b ∈ t, f b) ∈ e

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[UniformSpace α]
[UniformGroup α]
{f : β → α}

(CauchySeq fun s => ∏ b ∈ s, f b) ↔ ∀ e ∈ 𝓝 1, ∃ s, ∀ (t : Finset β), Disjoint t s → ∏ b ∈ t, f b ∈ e


@[simp]
theorem equiv_refl : b.equiv b (Equiv.refl ι) = LinearEquiv.refl R M

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)


/-- The `S`-torsion submodule is an `S`-torsion module. -/
theorem torsion'_isTorsion' : IsTorsion' (torsion' R M S) S

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(S : Type u_3)
[CommMonoid S]
[DistribMulAction S M]
[SMulCommClass S R M]

Module.IsTorsion' (↥(Submodule.torsion' R M S)) S


theorem seq_eq_bind {α β : Type u} [Monad m] [LawfulMonad m] (mf : m (α → β)) (x : m α) : mf <*> x = mf >>= fun f => f <$> x

{m : Type u → Type u_1}
{α β : Type u}
[Monad m]
[LawfulMonad m]
(mf : m (α → β))
(x : m α)

(Seq.seq mf fun x_1 => x) = do
  let f ← mf
  f <$> x


@[simp]
theorem smul_mk0 {α : Type*} [SMul G₀ α] {g : G₀} (hg : g ≠ 0) (a : α) : mk0 g hg • a = g • a

{G₀ : Type u_3}
[GroupWithZero G₀]
{α : Type u_8}
[SMul G₀ α]
{g : G₀}
(hg : g ≠ 0)
(a : α)


theorem lintegral_withDensity_eq_lintegral_mul_non_measurable₀ (μ : Measure α) {f : α → ℝ≥0∞}
    (hf : AEMeasurable f μ) (h'f : ∀ᵐ x ∂μ, f x < ∞) (g : α → ℝ≥0∞) :
    ∫⁻ a, g a ∂μ.withDensity f = ∫⁻ a, (f * g) a ∂μ

{α : Type u_1}
{m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
{f : α → ℝ≥0∞}
(hf : AEMeasurable f μ)
(h'f : ∀ᵐ (x : α) ∂μ, f x < ⊤)
(g : α → ℝ≥0∞)

∫⁻ (a : α), g a ∂μ.withDensity f = ∫⁻ (a : α), (f * g) a ∂μ


@[to_additive]
lemma prod_map_le_prod (f : α → α) (h : ∀ x, x ∈ s → f x ≤ x) : (s.map f).prod ≤ s.prod

{α : Type u_2}
[OrderedCommMonoid α]
{s : Multiset α}
(f : α → α)
(h : ∀ x ∈ s, f x ≤ x)


@[to_additive]
theorem leftCoset_cover_filter_FiniteIndex_aux
    [DecidablePred (FiniteIndex : Subgroup G → Prop)] :
    (⋃ k ∈ s.filter (fun i => (H i).FiniteIndex), g k • (H k : Set G) = Set.univ) ∧
      (1 ≤ ∑ i ∈ s, ((H i).index : ℚ)⁻¹) ∧
      (∑ i ∈ s, ((H i).index : ℚ)⁻¹ = 1 → Set.PairwiseDisjoint
        (s.filter (fun i => (H i).FiniteIndex)) (fun i ↦ g i • (H i : Set G)))

(hcovers : ⋃ i ∈ s, g i +ᵥ ↑(H i) = Set.univ)

⋃ k ∈ Finset.filter (fun i => (H i).FiniteIndex) s, g k +ᵥ ↑(H k) = Set.univ ∧
  1 ≤ ∑ i ∈ s, (↑(H i).index)⁻¹ ∧
    (∑ i ∈ s, (↑(H i).index)⁻¹ = 1 →
      (↑(Finset.filter (fun i => (H i).FiniteIndex) s)).PairwiseDisjoint fun i => g i +ᵥ ↑(H i))


/-- We can turn any colimit cocone over a discrete collection of objects into a bicone. -/
@[simps]
def ofColimitCocone {f : J → C} {t : Cocone (Discrete.functor f)} (ht : IsColimit t) :
    Bicone f

{t : CategoryTheory.Limits.Cocone (CategoryTheory.Discrete.functor f)}

(ht : CategoryTheory.Limits.IsColimit t)

(CategoryTheory.Limits.Bicone.ofColimitCocone ht).π j =
  ht.desc (CategoryTheory.Limits.Cofan.mk (f j) fun j' => if h : j' = j then CategoryTheory.eqToHom ⋯ else 0)


@[simp] theorem getLeft?_inl : (inl x : α ⊕ β).getLeft? = some x


@[ext high]
protected theorem bot_ext (x y : (⊥ : Submodule R M)) : x = y

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(x y : ↥⊥)


/-- The type of ordinals in universe `u` is not `Small.{u}`. This is the type-theoretic analog of
the Burali-Forti paradox. -/
theorem not_small_ordinal : ¬Small.{u} Ordinal.{max u v}

¬Small.{u, max (u + 1) (v + 1)} Ordinal.{max u v}


protected theorem eq : a ≡ b [ZMOD n] → a % n = b % n


theorem cocycle_fst_fst_fst (i j k : 𝒰.J) :
    t' 𝒰 f g i j k ≫ t' 𝒰 f g j k i ≫ t' 𝒰 f g k i j ≫ pullback.fst _ _ ≫ pullback.fst _ _ ≫
      pullback.fst _ _ = pullback.fst _ _ ≫ pullback.fst _ _ ≫ pullback.fst _ _

[∀ (i : 𝒰.J), CategoryTheory.Limits.HasPullback (𝒰.map i ≫ f) g]

AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g i j k ≫
    AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g j k i ≫
      AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g k i j ≫
        CategoryTheory.Limits.pullback.fst (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i j)
            (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i k) ≫
          CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map j) ≫
            CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g =
  CategoryTheory.Limits.pullback.fst (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i j)
      (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i k) ≫
    CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map j) ≫
      CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g


/-- A monoid object internal to a monoidal category.

When the monoidal category is preadditive, this is also sometimes called an "algebra object".
-/
structure Mon_ where
  X : C
  one : 𝟙_ C ⟶ X
  mul : X ⊗ X ⟶ X
  one_mul : (one ▷ X) ≫ mul = (λ_ X).hom := by aesop_cat
  mul_one : (X ◁ one) ≫ mul = (ρ_ X).hom := by aesop_cat
  -- Obviously there is some flexibility stating this axiom.
  -- This one has left- and right-hand sides matching the statement of `Monoid.mul_assoc`,
  -- and chooses to place the associator on the right-hand side.
  -- The heuristic is that unitors and associators "don't have much weight".
  mul_assoc : (mul ▷ X) ≫ mul = (α_ X X X).hom ≫ (X ◁ mul) ≫ mul := by aesop_cat

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

self.mul ▷ self.X ≫ self.mul = (α_ self.X self.X self.X).hom ≫ self.X ◁ self.mul ≫ self.mul


theorem scalar_commute_iff {r : α} {M : Matrix n n α} :
    Commute (scalar n r) M ↔ r • M = MulOpposite.op r • M

{n : Type u_3}
{α : Type v}
[Semiring α]
[DecidableEq n]
[Fintype n]
{r : α}
{M : Matrix n n α}

Commute ((Matrix.scalar n) r) M ↔ r • M = MulOpposite.op r • M


@[simp] lemma reciprocalFactors_zero : reciprocalFactors 0 = [0]


/-- Given a collection of functors `F i : C i ⥤ D`, we can produce a functor `(Σ i, C i) ⥤ D`.

The produced functor `desc F` satisfies: `incl i ⋙ desc F ≅ F i`, i.e. restricted to just the
subcategory `C i`, `desc F` agrees with `F i`, and it is unique (up to natural isomorphism) with
this property.

This witnesses that the sigma-type is the coproduct in Cat.
-/
@[simps obj]
def desc : (Σi, C i) ⥤ D

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

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

(CategoryTheory.Sigma.desc F).obj X = (F X.fst).obj X.snd


theorem map_le_iff_le_comap {f : R →+* S} {s : Subring R} {t : Subring S} :
    s.map f ≤ t ↔ s ≤ t.comap f

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
{f : R →+* S}
{s : Subring R}
{t : Subring S}

Subring.map f s ≤ t ↔ s ≤ Subring.comap f t


/-- Given an element `a` of the submonoid of a monoid `M` generated by a set `s`, there exists
a list of elements of `s` whose product is `a`. -/
@[to_additive
      "Given an element `a` of the `AddSubmonoid` of an `AddMonoid M` generated by
      a set `s`, there exists a list of elements of `s` whose sum is `a`."]
theorem exists_list_of_mem_closure {s : Set M} {a : M} (h : a ∈ Closure s) :
    ∃ l : List M, (∀ x ∈ l, x ∈ s) ∧ l.prod = a

{M : Type u_1}
[AddMonoid M]
{s : Set M}
{a : M}
(h : a ∈ AddMonoid.Closure s)


theorem mem_fromRel_irrefl_other_ne {sym : Symmetric r} (irrefl : Irreflexive r) {a : α}
    {z : Sym2 α} (hz : z ∈ fromRel sym) (h : a ∈ z) : Mem.other h ≠ a

{α : Type u_1}
{r : α → α → Prop}
{sym : Symmetric r}
(irrefl : Irreflexive r)
{a : α}
{z : Sym2 α}
(hz : z ∈ Sym2.fromRel sym)
(h : a ∈ z)


@[ext]
theorem ext {p q : RingNorm R} : (∀ x, p x = q x) → p = q

{R : Type u_2}
[NonUnitalRing R]
{p q : RingNorm R}


@[simp]
lemma Γ₂N₂ToKaroubiIso_inv_app (X : SimplicialObject C) :
    Γ₂N₂ToKaroubiIso.inv.app X = Γ₂.map (toKaroubiCompN₂IsoN₁.inv.app X)

AlgebraicTopology.DoldKan.Γ₂N₂ToKaroubiIso.inv.app X =
  AlgebraicTopology.DoldKan.Γ₂.map (AlgebraicTopology.DoldKan.toKaroubiCompN₂IsoN₁.inv.app X)


lemma isCondKernelCDF_condKernelCDF (κ : Kernel α (γ × ℝ)) [IsFiniteKernel κ] :
    IsCondKernelCDF (condKernelCDF κ) κ (fst κ)

(κ : ProbabilityTheory.Kernel α (γ × ℝ))

ProbabilityTheory.IsCondKernelCDF κ.condKernelCDF κ κ.fst


lemma IsOrthogonal.symm : IsOrthogonal P i j ↔ IsOrthogonal P j i

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(P : RootPairing ι R M N)
(i j : ι)


@[to_additive]
theorem infEdist_inv (x : E) (s : Set E) : infEdist x⁻¹ s = infEdist x s⁻¹

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

EMetric.infEdist (-x) s = EMetric.infEdist x (-s)


theorem succ_ne_self {α : Type*} [NonAssocRing α] [Nontrivial α] (a : α) : a + 1 ≠ a

{α : Type u_2}
[NonAssocRing α]
[Nontrivial α]
(a : α)


/-- The functor `Sigma.map C g` restricted to the subcategory `C j` acts as the inclusion of `g j`.
-/
@[simps!]
def inclCompMap (j : J) : incl j ⋙ map C g ≅ incl (g j)

(CategoryTheory.Sigma.inclCompMap C g j).hom.app X = CategoryTheory.CategoryStruct.id ⟨g j, X⟩


theorem isThin_iff : Quiver.IsThin C ↔ ∀ c : C, Subsingleton (c ⟶ c)

(C : Type u_1)
[CategoryTheory.Groupoid C]

Quiver.IsThin C ↔ ∀ (c : C), Subsingleton (c ⟶ c)


@[simp] lemma nnnorm_ofMul (x : E) : ‖ofMul x‖₊ = ‖x‖₊


@[simp] theorem head_map (f : α → β) (l : List α) (w) :
    head (map f l) w = f (head l (by simpa using w))

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(l : List α)
(w : List.map f l ≠ [])


@[simp]
theorem frequently_and_distrib_left {f : Filter α} {p : Prop} {q : α → Prop} :
    (∃ᶠ x in f, p ∧ q x) ↔ p ∧ ∃ᶠ x in f, q x

{α : Type u}
{f : Filter α}
{p : Prop}
{q : α → Prop}

(∃ᶠ (x : α) in f, p ∧ q x) ↔ p ∧ ∃ᶠ (x : α) in f, q x


@[simp]
theorem const_apply (n) (x : α → ℕ) : const n x = n


theorem IsPrimitive.Int.dvd_iff_map_cast_dvd_map_cast (p q : ℤ[X]) (hp : p.IsPrimitive)
    (hq : q.IsPrimitive) : p ∣ q ↔ p.map (Int.castRingHom ℚ) ∣ q.map (Int.castRingHom ℚ)

p ∣ q ↔ Polynomial.map (Int.castRingHom ℚ) p ∣ Polynomial.map (Int.castRingHom ℚ) q


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


/-- A basis on `M` can be lifted to a basis on `TensorAlgebra R M` -/
@[simps! repr_apply]
noncomputable def _root_.Basis.tensorAlgebra (b : Basis κ R M) :
    Basis (FreeMonoid κ) R (TensorAlgebra R M)

{κ : Type uκ}
{R : Type uR}
{M : Type uM}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis κ R M)

∀ (a : TensorAlgebra R M),
  b.tensorAlgebra.repr a = (FreeAlgebra.basisFreeMonoid R κ).repr ((TensorAlgebra.equivFreeAlgebra b) a)


theorem image.factor_map :
    factorThruImage f.hom ≫ image.map sq = sq.left ≫ factorThruImage g.hom

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{f g : CategoryTheory.Arrow C}
[CategoryTheory.Limits.HasImage f.hom]
[CategoryTheory.Limits.HasImage g.hom]
(sq : f ⟶ g)
[CategoryTheory.Limits.HasImageMap sq]

CategoryTheory.Limits.factorThruImage f.hom ≫ CategoryTheory.Limits.image.map sq =
  sq.left ≫ CategoryTheory.Limits.factorThruImage g.hom


@[simp] theorem mem_toArray {a : α} {l : List α} : a ∈ l.toArray ↔ a ∈ l


/-- If the Lebesgue integral of a function is bounded by some constant on all sets with finite
measure and the measure is σ-finite, then the integral over the whole space is bounded by that same
constant. -/
theorem lintegral_le_of_forall_fin_meas_le [MeasurableSpace α] {μ : Measure α} [SigmaFinite μ]
    (C : ℝ≥0∞) {f : α → ℝ≥0∞}
    (hf : ∀ s, MeasurableSet s → μ s ≠ ∞ → ∫⁻ x in s, f x ∂μ ≤ C) : ∫⁻ x, f x ∂μ ≤ C

{f : α → ℝ≥0∞}

(hf : ∀ (s : Set α), MeasurableSet s → μ s ≠ ⊤ → ∫⁻ (x : α) in s, f x ∂μ ≤ C)


/-- The exponential in a Banach algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ` has Fréchet derivative
`1 : 𝔸 →L[𝕂] 𝔸` at zero. -/
theorem hasFDerivAt_exp_zero : HasFDerivAt (exp 𝕂) (1 : 𝔸 →L[𝕂] 𝔸) 0

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]


theorem eLpNorm_indicator_le (f : α → E) : eLpNorm (s.indicator f) p μ ≤ eLpNorm f p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{s : Set α}
(f : α → E)

MeasureTheory.eLpNorm (s.indicator f) p μ ≤ MeasureTheory.eLpNorm f p μ


theorem toFinsupp_injective : Function.Injective (toFinsupp : R[X] → AddMonoidAlgebra _ _)


theorem InvImage.trans (f : α → β) (h : Transitive r) : Transitive (InvImage r f)

{α : Sort u}
{β : Sort v}
(r : β → β → Prop)
(f : α → β)
(h : Transitive r)


theorem mem_Iic_of_Iio (h : x ∈ Iio a) : x ∈ Iic a

{α : Type u_1}
[Preorder α]
{a x : α}
(h : x ∈ Set.Iio a)


theorem contDiff_cosh {n} : ContDiff ℂ n cosh


theorem ι_injective [Nontrivial R] : Function.Injective (ι R : X → FreeAlgebra R X)

{R : Type u_1}
[CommSemiring R]
{X : Type u_2}
[Nontrivial R]


theorem biUnion_range {f : ι → α} {g : α → Set β} : ⋃ x ∈ range f, g x = ⋃ y, g (f y)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
{f : ι → α}
{g : α → Set β}


theorem toAddSubmonoid_injective :
    Function.Injective (toAddSubmonoid : NonUnitalSubsemiring R → AddSubmonoid R)

{R : Type u}
[NonUnitalNonAssocSemiring R]


@[simp]
lemma ofReal_mem_slitPlane {x : ℝ} : ↑x ∈ slitPlane ↔ 0 < x


/-- For any function `f` from a normed vector space to a Banach space, the set of points `x` such
that `f` is analytic at `x` is open. -/
theorem isOpen_analyticAt : IsOpen { x | AnalyticAt 𝕜 f x }

(𝕜 : Type u_1)
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
(f : E → F)


@[to_additive (attr := simp)]
theorem iterate_map_inv {M F : Type*} [Group M] [FunLike F M M] [MonoidHomClass F M M]
    (f : F) (n : ℕ) (x : M) :
    f^[n] x⁻¹ = (f^[n] x)⁻¹

{M : Type u_5}
{F : Type u_6}
[Group M]
[FunLike F M M]
[MonoidHomClass F M M]
(f : F)
(n : ℕ)
(x : M)


theorem inv_eq_inv (f g : X ≅ Y) : f.inv = g.inv ↔ f.hom = g.hom

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


@[to_additive]
theorem Commute.pi {x y : ∀ i, f i} (h : ∀ i, Commute (x i) (y i)) : Commute x y

{I : Type u}
{f : I → Type v}
[(i : I) → Add (f i)]
{x y : (i : I) → f i}
(h : ∀ (i : I), AddCommute (x i) (y i))


theorem aestronglyMeasurable'_condexpL1CLM (f : α →₁[μ] F') :
    AEStronglyMeasurable' m (condexpL1CLM F' hm μ f) μ

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

MeasureTheory.AEStronglyMeasurable' m (↑↑((MeasureTheory.condexpL1CLM F' hm μ) f)) μ


theorem eq_spanSingleton_mul {x : P} {I J : FractionalIdeal S P} :
    I = spanSingleton _ x * J ↔ (∀ zI ∈ I, ∃ zJ ∈ J, x * zJ = zI) ∧ ∀ z ∈ J, x * z ∈ I

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
{x : P}
{I J : FractionalIdeal S P}

I = FractionalIdeal.spanSingleton S x * J ↔ (∀ zI ∈ I, ∃ zJ ∈ J, x * zJ = zI) ∧ ∀ z ∈ J, x * z ∈ I


theorem isInteger_of_isUnit_den {x : K} (h : IsUnit (den A x : A)) : IsInteger A x

{A : Type u_4}
[CommRing A]
[IsDomain A]
[UniqueFactorizationMonoid A]
{K : Type u_5}
[Field K]
[Algebra A K]
[IsFractionRing A K]
{x : K}
(h : IsUnit ↑(IsFractionRing.den A x))


theorem monotoneOn_rpow_Ici_of_exponent_nonneg {r : ℝ} (hr : 0 ≤ r) :
    MonotoneOn (fun (x : ℝ) => x ^ r) (Set.Ici 0)


@[simp]
theorem inv_mul_cancel_left_of_invertible (B : Matrix n m α) [Invertible A] : A⁻¹ * (A * B) = B

{m : Type u}
{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
(B : Matrix n m α)
[Invertible A]


/-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N

{M : Type u}
{N : Type v}
[Monoid M]
[Monoid N]
(e : M ≃* N)
(a : CategoryTheory.SingleObj N)


/-- In a linear order, the predicates `Set.IsWF` and `Set.IsPWO` are equivalent. -/
theorem isWF_iff_isPWO : s.IsWF ↔ s.IsPWO

{α : Type u_2}
[LinearOrder α]
{s : Set α}


lemma tendsto_nat_floor_mul_atTop {α : Type _} [LinearOrderedSemifield α] [FloorSemiring α]
    [Archimedean α] (a : α) (ha : 0 < a) : Tendsto (fun (x : ℕ) => ⌊a * x⌋₊) atTop atTop

{α : Type u_4}
[LinearOrderedSemifield α]
[FloorSemiring α]
[Archimedean α]
(a : α)
(ha : 0 < a)

Filter.Tendsto (fun x => ⌊a * ↑x⌋₊) Filter.atTop Filter.atTop


theorem fac (x : J) : lift F hc s ≫ (F.mapCone c).π.app x = s.π.app x

(s : CategoryTheory.Limits.Cone (K ⋙ F))

CategoryTheory.PreservesFiniteLimitsOfFlat.lift F hc s ≫ (F.mapCone c).π.app x = s.π.app x


theorem AnalyticAt.aeval_mvPolynomial (hf : ∀ i, AnalyticAt 𝕜 (f · i) z) (p : MvPolynomial σ A) :
    AnalyticAt 𝕜 (fun x ↦ aeval (f x) p) z

(hf : ∀ (i : σ), AnalyticAt 𝕜 (fun x => f x i) z)

AnalyticAt 𝕜 (fun x => (MvPolynomial.aeval (f x)) p) z


theorem abs_im_le_norm (z : K) : |im z| ≤ ‖z‖


@[simp]
theorem specializes_iff_le {l₁ l₂ : Filter α} : l₁ ⤳ l₂ ↔ l₁ ≤ l₂

l₁ ⤳ l₂ ↔ l₁ ≤ l₂