theorem DifferentiableOn.norm (hf : DifferentiableOn ℝ f s) (h0 : ∀ x ∈ s, f x ≠ 0) :
    DifferentiableOn ℝ (fun y => ‖f y‖) s

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f : G → E}
{s : Set G}
(hf : DifferentiableOn ℝ f s)
(h0 : ∀ x ∈ s, f x ≠ 0)


/-- Relation between `Algebra.discr A ι b` and
`Algebra.discr A (b ᵥ* P.map (algebraMap A B))`. -/
theorem discr_of_matrix_vecMul (b : ι → B) (P : Matrix ι ι A) :
    discr A (b ᵥ* P.map (algebraMap A B)) = P.det ^ 2 * discr A b

{A : Type u}
{B : Type v}
{ι : Type w}
[DecidableEq ι]
[CommRing A]
[CommRing B]
[Algebra A B]
[Fintype ι]
(b : ι → B)
(P : Matrix ι ι A)

Algebra.discr A (b ᵥ* P.map ⇑(algebraMap A B)) = P.det ^ 2 * Algebra.discr A b


@[to_additive]
theorem mul_ne_mul_right (a : G) {b c : G} : a * b ≠ a * c ↔ b ≠ c

{G : Type u_3}
[Mul G]
[IsLeftCancelMul G]
(a : G)
{b c : G}


theorem tendsto_intCast_atBot_iff [StrictOrderedRing R] [Archimedean R] {f : α → ℤ}
    {l : Filter α} : Tendsto (fun n => (f n : R)) l atBot ↔ Tendsto f l atBot

{α : Type u_1}
{R : Type u_2}
[StrictOrderedRing R]
[Archimedean R]
{f : α → ℤ}
{l : Filter α}

Filter.Tendsto (fun n => ↑(f n)) l Filter.atBot ↔ Filter.Tendsto f l Filter.atBot


/-- Polarization identity: The real inner product, in terms of the norm. -/
theorem real_inner_eq_norm_add_mul_self_sub_norm_mul_self_sub_norm_mul_self_div_two (x y : F) :
    ⟪x, y⟫_ℝ = (‖x + y‖ * ‖x + y‖ - ‖x‖ * ‖x‖ - ‖y‖ * ‖y‖) / 2

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


/-- For any functor `F : C ⥤ D`, this is the obvious isomorphism
`shiftFunctor C (0 : A) ⋙ F ≅ F ⋙ shiftFunctor D (0 : A)` deduced from the
isomorphisms `shiftFunctorZero` on both categories `C` and `D`. -/
@[simps!]
noncomputable def isoZero : shiftFunctor C (0 : A) ⋙ F ≅ F ⋙ shiftFunctor D (0 : A)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_6, u_1} C]
[CategoryTheory.Category.{u_7, u_2} D]
(F : CategoryTheory.Functor C D)
(A : Type u_4)
[AddMonoid A]
[CategoryTheory.HasShift C A]
[CategoryTheory.HasShift D A]
(X : C)

(CategoryTheory.Functor.CommShift.isoZero F A).inv.app X =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorZero D A).hom.app (F.obj X))
    (F.map ((CategoryTheory.shiftFunctorZero C A).inv.app X))


theorem mod_add_div' (m k : Int) : mod m k + m.div k * k = m


@[simp] lemma mop_tensorObj (X Y : C) : mop (X ⊗ Y) = mop Y ⊗ mop X

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

{ unmop := CategoryTheory.MonoidalCategory.tensorObj X Y } =
  CategoryTheory.MonoidalCategory.tensorObj { unmop := Y } { unmop := X }


theorem toRingHom_op (f : A →ₐ[R] B) : f.op.toRingHom = RingHom.op f.toRingHom

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

(AlgHom.op f).toRingHom = RingHom.op f.toRingHom


lemma isUnit_mul_self (hu : IsUnit u) : u * u = 1


@[simp] theorem getMsb_cons_zero : (cons a x).getMsb 0 = a

∀ {w : Nat} {x : BitVec w}, (BitVec.cons a x).getMsb 0 = a


@[to_additive]
theorem relindex_le_of_le_left (hHK : H ≤ K) (hHL : H.relindex L ≠ 0) :
    K.relindex L ≤ H.relindex L

{G : Type u_1}
[Group G]
{H K L : Subgroup G}
(hHK : H ≤ K)
(hHL : H.relindex L ≠ 0)


theorem Intersecting.card_le [Fintype α] {s : Finset α} (hs : (s : Set α).Intersecting) :
    2 * s.card ≤ Fintype.card α

{α : Type u_1}
[BooleanAlgebra α]
[Fintype α]
{s : Finset α}
(hs : (↑s).Intersecting)


@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
theorem attach_nonempty_iff {s : Finset α} : s.attach.Nonempty ↔ s.Nonempty


theorem tendsto_ceil_right_pure_floor_add_one (x : α) :
    Tendsto (ceil : α → ℤ) (𝓝[>] x) (pure (⌊x⌋ + 1))

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

Filter.Tendsto Int.ceil (𝓝[>] x) (pure (⌊x⌋ + 1))


@[to_additive]
theorem coe_sSup_of_directedOn {S : Set (Submonoid M)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) : (↑(sSup S) : Set M) = ⋃ s ∈ S, ↑s

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


theorem bot_lt_iff_ne_bot : ⊥ < a ↔ a ≠ ⊥

{α : Type u}
[PartialOrder α]
[OrderBot α]
{a : α}

⊥ < a ↔ a ≠ ⊥


lemma pow_lt_pow_right₀ (ha : 1 < a) (hmn : m < n) : a ^ m < a ^ n

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a : α}
{m n : ℕ}
(ha : 1 < a)
(hmn : m < n)


theorem map_nat [AddMonoidWithOne G] [AddMonoidWithOne H] [AddConstMapClass F G H 1 1]
    (f : F) (n : ℕ) : f n = f 0 + n

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
[AddMonoidWithOne G]
[AddMonoidWithOne H]
[AddConstMapClass F G H 1 1]
(f : F)
(n : ℕ)


@[simp]
theorem dist_pos {x y : γ} : 0 < dist x y ↔ x ≠ y


lemma IsCornerFree.mono (hAB : A ⊆ B) (hB : IsCornerFree B) : IsCornerFree A

{G : Type u_1}
[AddCommMonoid G]
{A B : Set (G × G)}
(hAB : A ⊆ B)
(hB : IsCornerFree B)


theorem IsMinOn.localize (hf : IsMinOn f s a) : IsLocalMinOn f s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsMinOn f s a)


private lemma antisymm_aux (hst : toColex s ≤ toColex t) (hts : toColex t ≤ toColex s) : s ⊆ t

(hst : { ofColex := s } ≤ { ofColex := t })

(hts : { ofColex := t } ≤ { ofColex := s })


/-- If an additive subgroup of a linear ordered additive commutative group is disjoint with the
interval `Set.Ioo 0 a` for some positive `a`, then this is a cyclic subgroup. -/
theorem AddSubgroup.cyclic_of_isolated_zero {H : AddSubgroup G} {a : G} (h₀ : 0 < a)
    (hd : Disjoint (H : Set G) (Ioo 0 a)) : ∃ b, H = closure {b}

{G : Type u_1}
[LinearOrderedAddCommGroup G]
[Archimedean G]
{H : AddSubgroup G}
{a : G}
(h₀ : 0 < a)
(hd : Disjoint (↑H) (Set.Ioo 0 a))


@[to_additive (attr := simp)]
theorem coe_one [One Y] : ⇑(1 : LocallyConstant X Y) = (1 : X → Y)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[Zero Y]


theorem HasDerivAt.comp_hasFDerivWithinAt_of_eq {f : E → 𝕜'} {f' : E →L[𝕜] 𝕜'} {s} (x)
    (hh : HasDerivAt h₂ h₂' y) (hf : HasFDerivWithinAt f f' s x) (hy : y = f x) :
    HasFDerivWithinAt (h₂ ∘ f) (h₂' • f') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{h₂ : 𝕜' → 𝕜'}
{h₂' y : 𝕜'}
{f : E → 𝕜'}
{f' : E →L[𝕜] 𝕜'}
{s : Set E}
(x : E)
(hh : HasDerivAt h₂ h₂' y)
(hf : HasFDerivWithinAt f f' s x)
(hy : y = f x)


lemma even_add' : Even (m + n) ↔ (Odd m ↔ Odd n)


@[to_additive]
theorem diff_self : diff ϕ T T = 1

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

AddSubgroup.leftTransversals.diff ϕ T T = 0


@[norm_cast]
theorem coe_sub : ((f' - g' : PowerSeries R') : LaurentSeries R') = f' - g'

{R' : Type u_2}
[Ring R']
(f' g' : PowerSeries R')

(HahnSeries.ofPowerSeries ℤ R') (f' - g') = (HahnSeries.ofPowerSeries ℤ R') f' - (HahnSeries.ofPowerSeries ℤ R') g'


(h : FirstOrder.Language.Structure.FG L M)


theorem norm_sub_modPart_aux (r : ℚ) (h : ‖(r : ℚ_[p])‖ ≤ 1) :
    ↑p ∣ r.num - r.num * r.den.gcdA p % p * ↑r.den

{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
(r : ℚ)
(h : ‖↑r‖ ≤ 1)

↑p ∣ r.num - r.num * r.den.gcdA p % ↑p * ↑r.den


theorem corec_eq (f : α → β) (g : α → α) (a : α) : corec f g a = f a::corec f g (g a)

{α : Type u}
{β : Type v}
(f : α → β)
(g : α → α)
(a : α)

Stream'.corec f g a = Stream'.cons (f a) (Stream'.corec f g (g a))


theorem disjoint_filter_filter_neg (s t : Finset α) (p : α → Prop)
    [DecidablePred p] [∀ x, Decidable (¬p x)] :
    Disjoint (s.filter p) (t.filter fun a => ¬p a)

{α : Type u_1}
(s t : Finset α)
(p : α → Prop)
[DecidablePred p]
[(x : α) → Decidable ¬p x]

Disjoint (Finset.filter p s) (Finset.filter (fun a => ¬p a) t)


theorem ker_toZModPow (n : ℕ) :
    RingHom.ker (toZModPow n : ℤ_[p] →+* ZMod (p ^ n)) = Ideal.span {(p : ℤ_[p]) ^ n}

{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
(n : ℕ)

RingHom.ker (PadicInt.toZModPow n) = Ideal.span {↑p ^ n}


@[simp]
theorem image_top {s : Set α} (h : Set.Nonempty s) :
    (⊤ : Rel α β).image s = Set.univ

{α : Type u_1}
{β : Type u_2}
{s : Set α}
(h : s.Nonempty)


@[simp]
theorem iSup_adj {f : ι → SimpleGraph V} : (⨆ i, f i).Adj a b ↔ ∃ i, (f i).Adj a b

{ι : Sort u_1}
{V : Type u}
{a b : V}
{f : ι → SimpleGraph V}


theorem nat_mul_iff (hn : n ≠ 0) : LiouvilleWith p (n * x) ↔ LiouvilleWith p x

LiouvilleWith p (↑n * x) ↔ LiouvilleWith p x


theorem HasConstantSpeedOnWith.ratio {l' : ℝ≥0} (hl' : l' ≠ 0) {φ : ℝ → ℝ} (φm : MonotoneOn φ s)
    (hfφ : HasConstantSpeedOnWith (f ∘ φ) s l) (hf : HasConstantSpeedOnWith f (φ '' s) l') ⦃x : ℝ⦄
    (xs : x ∈ s) : EqOn φ (fun y => l / l' * (y - x) + φ x) s

Set.EqOn φ (fun y => ↑l / ↑l' * (y - x) + φ x) s


theorem map_comap_subtype_coe {m0 : MeasurableSpace α} {s : Set α} (hs : MeasurableSet s)
    (μ : Measure α) : (comap (↑) μ).map ((↑) : s → α) = μ.restrict s

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

MeasureTheory.Measure.map Subtype.val (MeasureTheory.Measure.comap Subtype.val μ) = μ.restrict s


theorem stoppedValue_eq_of_mem_finset [AddCommMonoid E] {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
    stoppedValue u τ = ∑ i ∈ s, Set.indicator {ω | τ ω = i} (u i)

{Ω : Type u_1}
{ι : Type u_3}
{τ : Ω → ι}
{E : Type u_4}
{u : ι → Ω → E}
[AddCommMonoid E]
{s : Finset ι}
(hbdd : ∀ (ω : Ω), τ ω ∈ s)

MeasureTheory.stoppedValue u τ = ∑ i ∈ s, {ω | τ ω = i}.indicator (u i)


/--
A family `{ eᵢ }` of idempotent elements is complete orthogonal if
1. (orthogonal) `eᵢ * eⱼ = 0` for all `i ≠ j`.
2. (complete) `∑ eᵢ = 1`
-/
@[mk_iff]
structure CompleteOrthogonalIdempotents (e : I → R) extends OrthogonalIdempotents e : Prop where
  complete : ∑ i, e i = 1

{R : Type u_1}
[Ring R]
{I : Type u_3}
[Fintype I]
(e : I → R)

CompleteOrthogonalIdempotents e ↔ OrthogonalIdempotents e ∧ ∑ i : I, e i = 1


/-- The functor `AddGroup ⥤ Group` by sending `X ↦ multiplicative Y` and `f ↦ f`.
-/
@[simps]
def toGrp : AddGrp ⥤ Grp

AddGrp.toGrp.map a = AddMonoidHom.toMultiplicative a


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

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

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


theorem mod_eq_self_iff (hq0 : q ≠ 0) : p % q = p ↔ degree p < degree q

{R : Type u}
[Field R]
{p q : R[X]}
(hq0 : q ≠ 0)


theorem cantorFunction_le (h1 : 0 ≤ c) (h2 : c < 1) (h3 : ∀ n, f n → g n) :
    cantorFunction c f ≤ cantorFunction c g

(h3 : ∀ (n : ℕ), f n = true → g n = true)

Cardinal.cantorFunction c f ≤ Cardinal.cantorFunction c g


theorem map_one_add_of_lt (h : v x < 1) : v (1 + x) = 1

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedCommGroupWithZero Γ₀]
(v : Valuation R Γ₀)
{x : R}
(h : v x < 1)


@[to_additive (attr := simp)]
theorem kerLift_mk' (g : G) : (kerLift φ) (mk g) = φ g

{G : Type u}
[Group G]
{H : Type v}
[Group H]
(φ : G →* H)
(g : G)


@[reassoc (attr := simp)]
theorem HasLimit.lift_isoOfNatIso_inv {F G : J ⥤ C} [HasLimit F] [HasLimit G] (t : Cone G)
    (w : F ≅ G) :
    limit.lift G t ≫ (HasLimit.isoOfNatIso w).inv =
      limit.lift F ((Cones.postcompose w.inv).obj _)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : J ⥤ C}
[CategoryTheory.Limits.HasLimit F]
[CategoryTheory.Limits.HasLimit G]
(t : CategoryTheory.Limits.Cone G)
(w : F ≅ G)

CategoryTheory.Limits.limit.lift G t ≫ (CategoryTheory.Limits.HasLimit.isoOfNatIso w).inv =
  CategoryTheory.Limits.limit.lift F ((CategoryTheory.Limits.Cones.postcompose w.inv).obj t)


/-- `s ×ˢ t` is homeomorphic to `s × t`. -/
@[simps!]
def Set.prod (s : Set X) (t : Set Y) : ↥(s ×ˢ t) ≃ₜ s × t

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(s : Set X)
(t : Set Y)
(x : { a // s a } × { b // t b })

↑((Homeomorph.Set.prod s t).symm x) = (↑x.1, ↑x.2)


/-- If `f` is strictly monotone both on `s` and `t`, with `s` to the left of `t` and the center
point belonging to both `s` and `t`, then `f` is strictly monotone on `s ∪ t` -/
protected theorem StrictMonoOn.union {s t : Set α} {c : α} (h₁ : StrictMonoOn f s)
    (h₂ : StrictMonoOn f t) (hs : IsGreatest s c) (ht : IsLeast t c) : StrictMonoOn f (s ∪ t)

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[Preorder β]
{f : α → β}
{s t : Set α}
{c : α}
(h₁ : StrictMonoOn f s)
(h₂ : StrictMonoOn f t)
(hs : IsGreatest s c)
(ht : IsLeast t c)


/-- A more general version of `finprod_mem_mul_distrib` that only requires `s ∩ mulSupport f` and
`s ∩ mulSupport g` rather than `s` to be finite. -/
@[to_additive
      "A more general version of `finsum_mem_add_distrib` that only requires `s ∩ support f`
      and `s ∩ support g` rather than `s` to be finite."]
theorem finprod_mem_mul_distrib' (hf : (s ∩ mulSupport f).Finite) (hg : (s ∩ mulSupport g).Finite) :
    ∏ᶠ i ∈ s, f i * g i = (∏ᶠ i ∈ s, f i) * ∏ᶠ i ∈ s, g i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f g : α → M}
{s : Set α}
(hf : (s ∩ Function.support f).Finite)
(hg : (s ∩ Function.support g).Finite)

∑ᶠ (i : α) (_ : i ∈ s), (f i + g i) = ∑ᶠ (i : α) (_ : i ∈ s), f i + ∑ᶠ (i : α) (_ : i ∈ s), g i


@[to_additive rightAddCoset_assoc]
theorem rightCoset_assoc (s : Set α) (a b : α) : op b • op a • s = op (a * b) • s

{α : Type u_1}
[AddSemigroup α]
(s : Set α)
(a b : α)

AddOpposite.op b +ᵥ (AddOpposite.op a +ᵥ s) = AddOpposite.op (a + b) +ᵥ s


theorem infs_union_right : s ⊼ (t₁ ∪ t₂) = s ⊼ t₁ ∪ s ⊼ t₂

{α : Type u_2}
[SemilatticeInf α]
{s t₁ t₂ : Set α}


theorem mul_sup : M * (N ⊔ P) = M * N ⊔ M * P

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(M N P : Submodule R A)


theorem le_biUnion_iff {πi : ∀ J, Prepartition J} {π' : Prepartition I} :
    π' ≤ π.biUnion πi ↔ π' ≤ π ∧ ∀ J ∈ π, π'.restrict J ≤ πi J

{πi : (J : BoxIntegral.Box ι) → BoxIntegral.Prepartition J}


theorem deriv.comp (hh₂ : DifferentiableAt 𝕜' h₂ (h x)) (hh : DifferentiableAt 𝕜 h x) :
    deriv (h₂ ∘ h) x = deriv h₂ (h x) * deriv h x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(x : 𝕜)
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{h : 𝕜 → 𝕜'}
{h₂ : 𝕜' → 𝕜'}
(hh₂ : DifferentiableAt 𝕜' h₂ (h x))
(hh : DifferentiableAt 𝕜 h x)


/-- Given a functor `F : J ⥤ K ⥤ C`, with all needed colimits,
we can construct a diagram consisting of the colimit cocone over each functor `F.obj j`,
and the universal cocone morphisms between these.
-/
@[simps]
noncomputable def DiagramOfCocones.mkOfHasColimits : DiagramOfCocones F

∀ {j j' : J} (f : j ⟶ j'),
  ((CategoryTheory.Limits.DiagramOfCocones.mkOfHasColimits F).map f).hom = CategoryTheory.Limits.colim.map (F.map f)


theorem integral_truncation_le_integral_of_nonneg (hf : Integrable f μ) (h'f : 0 ≤ f) {A : ℝ} :
    ∫ x, truncation f A x ∂μ ≤ ∫ x, f x ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : MeasureTheory.Integrable f μ)
(h'f : 0 ≤ f)
{A : ℝ}

∫ (x : α), ProbabilityTheory.truncation f A x ∂μ ≤ ∫ (x : α), f x ∂μ


@[simp]
theorem toComplex_comp_ofComplex : toComplex.comp ofComplex = AlgHom.id ℝ ℂ

CliffordAlgebraComplex.toComplex.comp CliffordAlgebraComplex.ofComplex = AlgHom.id ℝ ℂ


theorem IsTransitive.sUnion' (H : ∀ y ∈ x, IsTransitive y) :
    (⋃₀ x : ZFSet).IsTransitive

{x : ZFSet}
(H : ∀ y ∈ x, y.IsTransitive)


theorem ιSummand_comp_d_comp_πSummand_eq_zero (j k : ℕ) (A : IndexSet (op [j])) (hA : ¬A.EqId) :
    (s.cofan _).inj A ≫ K[X].d j k ≫ s.πSummand (IndexSet.id (op [k])) = 0

(A : SimplicialObject.Splitting.IndexSet (Opposite.op [j]))

(s.cofan (Opposite.op [j])).inj A ≫ K[X].d j k ≫ s.πSummand (SimplicialObject.Splitting.IndexSet.id (Opposite.op [k])) =
  0


@[to_additive sub_lt_sub_iff]
theorem div_lt_div_iff' : a / b < c / d ↔ a * d < c * b

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


/-- If `α` has a unique term, then the type of function `α → β` is measurably equivalent to `β`. -/
@[simps! (config := .asFn)]
def funUnique (α β : Type*) [Unique α] [MeasurableSpace β] : (α → β) ≃ᵐ β

(α : Type u_8)
(β : Type u_9)
[Unique α]
[MeasurableSpace β]

⇑(MeasurableEquiv.funUnique α β).symm = uniqueElim


@[simp]
theorem dist_map (x y : E) : dist (e x) (e y) = dist x y

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(e : E ≃ₛₗᵢ[σ₁₂] E₂)
(x y : E)


theorem mem_closure_of_frequently_of_tendsto {f : α → X} {b : Filter α}
    (h : ∃ᶠ x in b, f x ∈ s) (hf : Tendsto f b (𝓝 x)) : x ∈ closure s

{X : Type u}
{α : Type u_1}
{x : X}
{s : Set X}
[TopologicalSpace X]
{f : α → X}
{b : Filter α}
(h : ∃ᶠ (x : α) in b, f x ∈ s)
(hf : Filter.Tendsto f b (𝓝 x))


theorem PosDef.prod [PartialOrder P] [CovariantClass P P (· + ·) (· ≤ ·)]
    {Q₁ : QuadraticMap R M₁ P} {Q₂ : QuadraticMap R M₂ P} (h₁ : Q₁.PosDef) (h₂ : Q₂.PosDef) :
    (Q₁.prod Q₂).PosDef

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


@[simp]
theorem isoSheafify_inv {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) :
    (isoSheafify J hP).inv = sheafifyLift J (𝟙 _) hP

(J : CategoryTheory.GrothendieckTopology C)

(hP : CategoryTheory.Presheaf.IsSheaf J P)

(CategoryTheory.isoSheafify J hP).inv = CategoryTheory.sheafifyLift J (CategoryTheory.CategoryStruct.id P) hP


lemma rpow_eq_zero_iff_of_pos {x : ℝ≥0∞} {y : ℝ} (hy : 0 < y) : x ^ y = 0 ↔ x = 0


nonrec theorem star_add_self : star a + a = 2 * a.re


theorem ne_top_iff_dom {x : PartENat} : x ≠ ⊤ ↔ x.Dom


/-- The complex measures form a linear isomorphism to the type of pairs of signed measures. -/
@[simps]
def equivSignedMeasureₗ : ComplexMeasure α ≃ₗ[R] SignedMeasure α × SignedMeasure α

{α : Type u_1}
{m : MeasurableSpace α}
{R : Type u_3}
[Semiring R]
[Module R ℝ]
[ContinuousConstSMul R ℝ]
[ContinuousConstSMul R ℂ]

∀ (a : MeasureTheory.ComplexMeasure α),
  MeasureTheory.ComplexMeasure.equivSignedMeasureₗ a = MeasureTheory.ComplexMeasure.equivSignedMeasure.toFun a


/-- An interval of length `a` filtered over a periodic predicate of period `a` has cardinality
equal to the number naturals below `a` for which `p a` is true. -/
theorem filter_Ico_card_eq_of_periodic (n a : ℕ) (p : ℕ → Prop) [DecidablePred p]
    (pp : Periodic p a) : ((Ico n (n + a)).filter p).card = a.count p

(n a : ℕ)
(p : ℕ → Prop)
[DecidablePred p]
(pp : Function.Periodic p a)

(Finset.filter p (Finset.Ico n (n + a))).card = Nat.count p a


/-- The inclusion of the Moore complex in the alternating face map complex
is a homotopy equivalence -/
@[simps]
def homotopyEquivNormalizedMooreComplexAlternatingFaceMapComplex {A : Type*} [Category A]
    [Abelian A] {Y : SimplicialObject A} :
    HomotopyEquiv ((normalizedMooreComplex A).obj Y) ((alternatingFaceMapComplex A).obj Y)

{A : Type u_2}
[CategoryTheory.Category.{u_3, u_2} A]
[CategoryTheory.Abelian A]
{Y : CategoryTheory.SimplicialObject A}

AlgebraicTopology.DoldKan.homotopyEquivNormalizedMooreComplexAlternatingFaceMapComplex.hom =
  AlgebraicTopology.inclusionOfMooreComplexMap Y


lemma mem_upShadow_iterate_iff_exists_card :
    t ∈ ∂⁺^[k] 𝒜 ↔ ∃ u : Finset α, u.card = k ∧ u ⊆ t ∧ t \ u ∈ 𝒜

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{𝒜 : Finset (Finset α)}
{t : Finset α}
{k : ℕ}

t ∈ Finset.upShadow^[k] 𝒜 ↔ ∃ u, u.card = k ∧ u ⊆ t ∧ t \ u ∈ 𝒜


@[simp]
lemma decreasingInduction_self {n} {motive : (m : ℕ) → m ≤ n → Sort*} (of_succ self) :
    (decreasingInduction (motive := motive) of_succ self le_rfl) = self

(of_succ : (k : ℕ) → (h : k < n) → motive (k + 1) h → motive k ⋯)

Nat.decreasingInduction of_succ self ⋯ = self


@[simp]
theorem union_get_eq [Union α] (a b : Part α) (hab : Dom (a ∪ b)) :
    (a ∪ b).get hab = a.get (left_dom_of_union_dom hab) ∪ b.get (right_dom_of_union_dom hab)

{α : Type u_1}
[Union α]
(a b : Part α)
(hab : (a ∪ b).Dom)


/-- Given `R`-modules `A, B` with comultiplication maps `Δ_A, Δ_B` and counit maps
`ε_A, ε_B`, an `R`-coalgebra homomorphism `A →ₗc[R] B` is an `R`-linear map `f` such that
`ε_B ∘ f = ε_A` and `(f ⊗ f) ∘ Δ_A = Δ_B ∘ f`. -/
structure CoalgHom (R A B : Type*) [CommSemiring R]
    [AddCommMonoid A] [Module R A] [AddCommMonoid B] [Module R B]
    [CoalgebraStruct R A] [CoalgebraStruct R B] extends A →ₗ[R] B where
  counit_comp : counit ∘ₗ toLinearMap = counit
  map_comp_comul : TensorProduct.map toLinearMap toLinearMap ∘ₗ comul = comul ∘ₗ toLinearMap

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(self : A →ₗc[R] B)

TensorProduct.map self.toLinearMap self.toLinearMap ∘ₗ Coalgebra.comul = Coalgebra.comul ∘ₗ self.toLinearMap


/-- The functor `(F ⋙ L, R) ⥤ (L, R)` -/
@[simps]
def preLeft (F : C ⥤ A) (L : A ⥤ T) (R : B ⥤ T) : Comma (F ⋙ L) R ⥤ Comma L R

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
{C : Type u₄}
[CategoryTheory.Category.{v₄, u₄} C]
(F : CategoryTheory.Functor C A)
(L : CategoryTheory.Functor A T)
(R : CategoryTheory.Functor B T)

∀ {X Y : CategoryTheory.Comma (F.comp L) R} (f : X ⟶ Y), ((CategoryTheory.Comma.preLeft F L R).map f).right = f.right


/-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁]

{R : Type u_3}
[CommRing R]
(c₁ c₂ : R)
(t : ℍ[R,c₁,c₂])

((QuaternionAlgebra.swapEquiv c₁ c₂) t).imI = t.imJ


@[simp]
theorem nthRootsFinset_zero : nthRootsFinset 0 R = ∅


theorem ofFn_succ' {n} (f : Fin (succ n) → α) :
    ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _))

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

List.ofFn f = (List.ofFn fun i => f i.castSucc).concat (f (Fin.last n))


theorem im_smul (g : GL(2, ℝ)⁺) (z : ℍ) : (g • z).im = (num g z / denom g z).im

(g • z).im = (UpperHalfPlane.num g z / UpperHalfPlane.denom g z).im


/-- A version of `inv_sub_inv'` for `Ring.inverse`. -/
theorem Ring.inverse_sub_inverse [Ring α] {a b : α} (h : IsUnit a ↔ IsUnit b) :
    Ring.inverse a - Ring.inverse b = Ring.inverse a * (b - a) * Ring.inverse b

{α : Type u}
[Ring α]
{a b : α}
(h : IsUnit a ↔ IsUnit b)


@[simp]
theorem eraseLead_zero : eraseLead (0 : R[X]) = 0


/-- Two functions antivary iff the rearrangement inequality holds. -/
lemma antivaryOn_iff_smul_rearrangement :
    AntivaryOn f g s ↔
      ∀ ⦃i⦄, i ∈ s → ∀ ⦃j⦄, j ∈ s → f i • g i + f j • g j ≤ f i • g j + f j • g i

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{f : ι → α}
{g : ι → β}
{s : Set ι}

AntivaryOn f g s ↔ ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃j : ι⦄, j ∈ s → f i • g i + f j • g j ≤ f i • g j + f j • g i


/-- If a localizer morphism induces an equivalence on some choice of localized categories,
it will be so for any choice of localized categoriees. -/
lemma isEquivalence_imp [G.IsEquivalence] : G'.IsEquivalence

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)

[CategoryTheory.CatCommSq Φ.functor L₁ L₂ G]

[CategoryTheory.CatCommSq Φ.functor L₁' L₂' G']


lemma preimage_iSup_eq_top {ι} {U : ι → Opens Y} (hU : iSup U = ⊤) :
    ⨆ i, f ⁻¹ᵁ U i = ⊤

{X Y : AlgebraicGeometry.Scheme}
(f : X.Hom Y)
{ι : Sort u_1}
{U : ι → Y.Opens}
(hU : iSup U = ⊤)

⨆ i, (TopologicalSpace.Opens.map f.val.base).obj (U i) = ⊤


theorem Antitone.forall {P : β → α → Prop} (hP : ∀ x, Antitone (P x)) :
    Antitone fun y => ∀ x, P x y

{α : Type u}
{β : Type v}
[Preorder α]
{P : β → α → Prop}
(hP : ∀ (x : β), Antitone (P x))


@[functor_norm]
theorem Comp.seq_mk {α β : Type w} {f : Type u → Type v} {g : Type w → Type u} [Applicative f]
    [Applicative g] (h : f (g (α → β))) (x : f (g α)) :
    Comp.mk h <*> Comp.mk x = Comp.mk ((· <*> ·) <$> h <*> x)

(Seq.seq (Functor.Comp.mk h) fun x_1 => Functor.Comp.mk x) =
  Functor.Comp.mk (Seq.seq ((fun x x_1 => Seq.seq x fun x => x_1) <$> h) fun x_1 => x)


theorem mulRightMap_apply {M N : Submodule R S} {ι : Type*} (n : ι → N) (m : ι →₀ M) :
    mulRightMap M n m = Finsupp.sum m fun (i : ι) (m : M) ↦ m.1 * (n i).1

{R : Type u_1}
[Semiring R]
{S : Type u_4}
[Semiring S]
[Module R S]
[SMulCommClass R R S]
[IsScalarTower R S S]
{M N : Submodule R S}
{ι : Type u_5}
(n : ι → ↥N)
(m : ι →₀ ↥M)

(M.mulRightMap n) m = m.sum fun i m => ↑m * ↑(n i)


theorem eqOn_of_leftInvOn_of_rightInvOn (h₁ : LeftInvOn f₁' f s) (h₂ : RightInvOn f₂' f t)
    (h : MapsTo f₂' t s) : EqOn f₁' f₂' t

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
{f₁' f₂' : β → α}
(h₁ : Set.LeftInvOn f₁' f s)
(h₂ : Set.RightInvOn f₂' f t)
(h : Set.MapsTo f₂' t s)


@[simp] theorem atLeastTwo_true_left   : atLeastTwo true b c  = (b || c)


/-- If a pair of measures `HaveLebesgueDecomposition`, then `singularPart` chooses the
measure from `HaveLebesgueDecomposition`, otherwise it returns the zero measure. For sigma-finite
measures, `μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)`. -/
noncomputable irreducible_def singularPart (μ ν : Measure α) : Measure α

{α : Type u_3}
{m : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)

μ.singularPart ν = if h : μ.HaveLebesgueDecomposition ν then (Classical.choose ⋯).1 else 0


theorem tsub_pos_iff_not_le : 0 < a - b ↔ ¬a ≤ b

{α : Type u_1}
[CanonicallyOrderedAddCommMonoid α]
[Sub α]
[OrderedSub α]
{a b : α}


theorem TopologicalSpace.IsTopologicalBasis.eq_iff [T0Space X] {b : Set (Set X)}
    (hb : IsTopologicalBasis b) {x y : X} : x = y ↔ ∀ s ∈ b, (x ∈ s ↔ y ∈ s)

(hb : TopologicalSpace.IsTopologicalBasis b)


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

{α : Type u_3}
{β : Type u_4}
[Sup α]
[Bot α]
[Sup β]
[Bot β]
(f : SupBotHom α β)


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


theorem le_comap_single_pi [DecidableEq ι] (p : (i : ι) → Submodule R (φ i)) {i} :
    p i ≤ Submodule.comap (LinearMap.single i : φ i →ₗ[R] _) (Submodule.pi Set.univ p)

{R : Type u}
{ι : Type x}
[Semiring R]
{φ : ι → Type u_1}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[DecidableEq ι]
(p : (i : ι) → Submodule R (φ i))
{i : ι}

p i ≤ Submodule.comap (LinearMap.single i) (Submodule.pi Set.univ p)


/-- Class for having all filtered colimits of a given size. -/
@[pp_with_univ]
class HasFilteredColimitsOfSize : Prop where
  /-- For all filtered types of a size `w`, we have colimits -/
  HasColimitsOfShape : ∀ (I : Type w) [Category.{w'} I] [IsFiltered I], HasColimitsOfShape I C

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


lemma card_union_eq_card_add_card : (s ∪ t).card = s.card + t.card ↔ Disjoint s t

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


theorem invOfMemRange_surjective : Function.Surjective hf.invOfMemRange

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[DecidableEq β]
{f : α → β}
(hf : Function.Injective f)


theorem cons_get_inits_core :
    ∀ (a : α) (n : ℕ) (l : List α) (s : Stream' α),
      (a::get (initsCore l s) n) = get (initsCore (a::l) s) n

{α : Type u}
(a : α)
(n : ℕ)
(l : List α)
(s : Stream' α)

a :: (Stream'.initsCore l s).get n = (Stream'.initsCore (a :: l) s).get n


theorem isLeast_nth {n} (h : ∀ hf : (setOf p).Finite, n < hf.toFinset.card) :
    IsLeast {i | p i ∧ ∀ k < n, nth p k < i} (nth p n)

(h : ∀ (hf : (setOf p).Finite), n < hf.toFinset.card)

IsLeast {i | p i ∧ ∀ k < n, Nat.nth p k < i} (Nat.nth p n)


@[to_additive (attr := simp, norm_cast)]
theorem coe_centralizer : ↑(centralizer S) = S.centralizer

{M : Type u_1}
(S : Set M)
[Semigroup M]

↑(Subsemigroup.centralizer S) = S.centralizer


theorem supp_map (h : q.IsUniform) {α β : TypeVec n} (g : α ⟹ β) (x : F α) (i) :
    supp (g <$$> x) i = g i '' supp x i

{n : ℕ}
{F : TypeVec.{u} n → Type u_1}
[q : MvQPF F]
(h : MvQPF.IsUniform)
{α β : TypeVec.{u} n}
(g : α ⟹ β)
(x : F α)
(i : Fin2 n)

MvFunctor.supp (g <$$> x) i = g i '' MvFunctor.supp x i


theorem left_of_add (hn : IsPeriodicPt f (n + m) x) (hm : IsPeriodicPt f m x) :
    IsPeriodicPt f n x

(hn : Function.IsPeriodicPt f (n + m) x)


@[to_additive]
theorem mul_mem_sup {S T : Subsemigroup M} {x y : M} (hx : x ∈ S) (hy : y ∈ T) : x * y ∈ S ⊔ T

{M : Type u_2}
[Add M]
{S T : AddSubsemigroup M}
{x y : M}
(hx : x ∈ S)
(hy : y ∈ T)


theorem integral_comp_mul_right (g : ℝ → F) (a : ℝ) :
    (∫ x : ℝ, g (x * a)) = |a⁻¹| • ∫ y : ℝ, g y

{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(g : ℝ → F)
(a : ℝ)

∫ (x : ℝ), g (x * a) = |a⁻¹| • ∫ (y : ℝ), g y


theorem uniformEquicontinuous_iInf_dom {u : κ → UniformSpace β'} {F : ι → β' → α}
    {k : κ} (hk : UniformEquicontinuous (uβ := u k) F) :
    UniformEquicontinuous (uβ := ⨅ k, u k) F

{ι : Type u_1}
{κ : Type u_2}
{α : Type u_7}
{β' : Type u_10}
[uα : UniformSpace α]
{u : κ → UniformSpace β'}
{F : ι → β' → α}
{k : κ}
(hk : UniformEquicontinuous F)


theorem toMeasure_apply_eq_toOuterMeasure_apply (hs : MeasurableSet s) :
    p.toMeasure s = p.toOuterMeasure s

{α : Type u_1}
[MeasurableSpace α]
(p : PMF α)
(s : Set α)
(hs : MeasurableSet s)


@[to_additive Ico_add_Icc_subset]
theorem Ico_mul_Icc_subset' [LocallyFiniteOrder α] (a b c d : α) :
    Ico a b * Icc c d ⊆ Ico (a * c) (b * d)

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

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

Finset.Ico a b + Finset.Icc c d ⊆ Finset.Ico (a + c) (b + d)


@[simp]
theorem smul_hadamard [Mul α] [SMul R α] [IsScalarTower R α α] (k : R) : (k • A) ⊙ B = k • A ⊙ B

{α : Type u_1}
{m : Type u_4}
{n : Type u_5}
{R : Type u_6}
(A B : Matrix m n α)
[Mul α]
[SMul R α]
[IsScalarTower R α α]
(k : R)


theorem colorable_iff_exists_bdd_nat_coloring (n : ℕ) :
    G.Colorable n ↔ ∃ C : G.Coloring ℕ, ∀ v, C v < n

{V : Type u}
{G : SimpleGraph V}
(n : ℕ)


@[norm_cast]
theorem aeval_subalgebra_coe (g : R[X]) {A : Type*} [Semiring A] [Algebra R A] (s : Subalgebra R A)
    (f : s) : (aeval f g : A) = aeval (f : A) g

{R : Type u}
[CommSemiring R]
(g : R[X])
{A : Type u_3}
[Semiring A]
[Algebra R A]
(s : Subalgebra R A)
(f : ↥s)

↑((Polynomial.aeval f) g) = (Polynomial.aeval ↑f) g


@[to_additive]
theorem comap_iInf {ι : Sort*} (f : M →ₙ* N) (s : ι → Subsemigroup N) :
    (iInf s).comap f = ⨅ i, (s i).comap f

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{ι : Sort u_5}
(f : AddHom M N)
(s : ι → AddSubsemigroup N)

AddSubsemigroup.comap f (iInf s) = ⨅ i, AddSubsemigroup.comap f (s i)


/-- Taking opposites as an equivalence of powersets. -/
@[simps]
def opEquiv : Set α ≃ Set αᵒᵖ


/-- **Legendre's Theorem**

The multiplicity of a prime in `n!` is the sum of the quotients `n / p ^ i`. This sum is expressed
over the finset `Ico 1 b` where `b` is any bound greater than `log p n`. -/
theorem multiplicity_factorial {p : ℕ} (hp : p.Prime) :
    ∀ {n b : ℕ}, log p n < b → multiplicity p n ! = (∑ i ∈ Ico 1 b, n / p ^ i : ℕ)

Nat.log p n < b → multiplicity p n ! = ↑(∑ i ∈ Finset.Ico 1 b, n / p ^ i)


@[simp]
theorem ofLex_symm_eq : (@ofLex α).symm = toLex


theorem lintegral_max {f g : α → ℝ≥0∞} (hf : Measurable f) (hg : Measurable g) :
    ∫⁻ x, max (f x) (g x) ∂μ =
      ∫⁻ x in { x | f x ≤ g x }, g x ∂μ + ∫⁻ x in { x | g x < f x }, f x ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → ℝ≥0∞}
(hf : Measurable f)
(hg : Measurable g)

∫⁻ (x : α), max (f x) (g x) ∂μ = ∫⁻ (x : α) in {x | f x ≤ g x}, g x ∂μ + ∫⁻ (x : α) in {x | g x < f x}, f x ∂μ


/-- Ring equivalence between additive group endomorphisms of an `AddCommGroup` `A` and
`ℤ`-module endomorphisms of `A.` -/
@[simps] def addMonoidEndRingEquivInt (A : Type*) [AddCommGroup A] :
    AddMonoid.End A ≃+* Module.End ℤ A

∀ (a : A →ₗ[ℤ] A), (addMonoidEndRingEquivInt A).symm a = (addMonoidHomLequivInt ℤ).invFun a


lemma harmonic_eq_sum_Icc {n : ℕ} :  harmonic n = ∑ i ∈ Finset.Icc 1 n, (↑i)⁻¹


lemma neg_of_smul_neg_right [SMulPosReflectLT α β] (h : a • b < 0) (hb : 0 ≤ b) : a < 0

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Zero α]
[Zero β]
[SMulWithZero α β]
[Preorder α]
[Preorder β]
[SMulPosReflectLT α β]
(h : a • b < 0)
(hb : 0 ≤ b)


theorem zipWith_map_right (l₁ : List α) (l₂ : List β) (f : β → β') (g : α → β' → γ) :
    zipWith g l₁ (l₂.map f) = zipWith (fun a b => g a (f b)) l₁ l₂

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

List.zipWith g l₁ (List.map f l₂) = List.zipWith (fun a b => g a (f b)) l₁ l₂


theorem union_sdiff_left (s t : Finset α) : (s ∪ t) \ s = t \ s

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


protected lemma Connected.preconnected {H : G.Subgraph} (h : H.Connected) : H.Preconnected

{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
(h : H.Connected)


@[to_additive]
theorem prod_union_inter [DecidableEq α] :
    (∏ x ∈ s₁ ∪ s₂, f x) * ∏ x ∈ s₁ ∩ s₂, f x = (∏ x ∈ s₁, f x) * ∏ x ∈ s₂, f x

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[AddCommMonoid β]
[DecidableEq α]

∑ x ∈ s₁ ∪ s₂, f x + ∑ x ∈ s₁ ∩ s₂, f x = ∑ x ∈ s₁, f x + ∑ x ∈ s₂, f x


/-- Let `V` be a real topological vector space. A subset of `V` is a convex body if and only if
it is convex, compact, and nonempty.
-/
structure ConvexBody (V : Type*) [TopologicalSpace V] [AddCommMonoid V] [SMul ℝ V] where
  /-- The **carrier set** underlying a convex body: the set of points contained in it -/
  carrier : Set V
  /-- A convex body has convex carrier set -/
  convex' : Convex ℝ carrier
  /-- A convex body has compact carrier set -/
  isCompact' : IsCompact carrier
  /-- A convex body has non-empty carrier set -/
  nonempty' : carrier.Nonempty

{V : Type u_2}
[TopologicalSpace V]
[AddCommMonoid V]
[SMul ℝ V]
(self : ConvexBody V)


protected theorem IntegrableAtFilter.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E]
    [BoundedSMul 𝕜 E] {f : α → E} (hf : IntegrableAtFilter f l μ) (c : 𝕜) :
    IntegrableAtFilter (c • f) l μ

(hf : MeasureTheory.IntegrableAtFilter f l μ)

MeasureTheory.IntegrableAtFilter (c • f) l μ


theorem Prime.coprime_iff_not_dvd {p n : R} (hp : Prime p) : IsCoprime p n ↔ ¬p ∣ n

{R : Type u}
[CommRing R]
[IsDomain R]
[IsBezout R]
{p n : R}
(hp : Prime p)


/-- The obvious homotopy between a morphism of short complexes and itself. -/
@[simps!]
def refl (φ : S₁ ⟶ S₂) : Homotopy φ φ

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

(CategoryTheory.ShortComplex.Homotopy.refl φ).h₁ = 0


theorem ofDual_lt_iff {a : WithBot αᵒᵈ} {b : WithTop α} :
    WithBot.ofDual a < b ↔ WithTop.toDual b < a

{α : Type u_1}
[LT α]
{a : WithBot αᵒᵈ}
{b : WithTop α}


protected theorem differentiableWithinAt_aeval :
    DifferentiableWithinAt 𝕜 (fun x => aeval x q) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{R : Type u_1}
[CommSemiring R]
[Algebra R 𝕜]
(q : R[X])

DifferentiableWithinAt 𝕜 (fun x => (Polynomial.aeval x) q) s x


/-- For a finite subset `s` of `M ⊗[R] N`, there exists a finitely generated
submodule `N'` of `N`, such that `s` is contained in the image
of `M ⊗[R] N'` in `M ⊗[R] N`. -/
theorem exists_finite_submodule_right_of_finite (s : Set (M ⊗[R] N)) (hs : s.Finite) :
    ∃ N' : Submodule R N, Module.Finite R N' ∧ s ⊆ LinearMap.range (N'.subtype.lTensor M)

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(s : Set (M ⊗[R] N))
(hs : s.Finite)

∃ N', Module.Finite R ↥N' ∧ s ⊆ ↑(LinearMap.range (LinearMap.lTensor M N'.subtype))


theorem IsOpen.not_specializes (hs : IsOpen s) (hx : x ∉ s) (hy : y ∈ s) : ¬x ⤳ y

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{s : Set X}
(hs : IsOpen s)
(hx : x ∉ s)
(hy : y ∈ s)


protected theorem surjective : Function.Surjective e

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


lemma _root_.MeasureTheory.AEStronglyMeasurable.integral_kernel_condKernel (a : α)
    (hf : AEStronglyMeasurable f (κ a)) :
    AEStronglyMeasurable (fun x ↦ ∫ y, f (x, y) ∂(Kernel.condKernel κ (a, x)))
      (Kernel.fst κ a)

{κ : ProbabilityTheory.Kernel α (β × Ω)}

(hf : MeasureTheory.AEStronglyMeasurable f (κ a))

MeasureTheory.AEStronglyMeasurable (fun x => ∫ (y : Ω), f (x, y) ∂κ.condKernel (a, x)) (κ.fst a)


theorem nat_double_succ : Primrec (fun n : ℕ => 2 * n + 1)


@[to_additive]
lemma isUnit_of_mem_ofUnits (S : Subgroup Mˣ) {x : M} (hx : x ∈ S.ofUnits) : IsUnit x

{M : Type u_1}
[Monoid M]
(S : Subgroup Mˣ)
{x : M}
(hx : x ∈ S.ofUnits)


@[to_additive]
nonrec theorem IsUnit.op {M} [Monoid M] {m : M} (h : IsUnit m) : IsUnit (op m)

{M : Type u_2}
[Monoid M]
{m : M}
(h : IsUnit m)


@[simp] lemma deleteEdges_empty : G.deleteEdges ∅ = G


lemma C_addPolynomial (x y L : R) : C (W.addPolynomial x y L) =
    (Y - C (linePolynomial x y L)) * (W.negPolynomial - C (linePolynomial x y L)) +
      W.polynomial

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

Polynomial.C (W.addPolynomial x y L) =
  (Y - Polynomial.C (WeierstrassCurve.Affine.linePolynomial x y L)) *
      (W.negPolynomial - Polynomial.C (WeierstrassCurve.Affine.linePolynomial x y L)) +
    W.polynomial


theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : F α) :
    LiftP p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i j, p (f i j)

{n : ℕ}
{F : TypeVec.{u} n → Type u_1}
[q : MvQPF F]
{α : TypeVec.{u} n}
(p : ⦃i : Fin2 n⦄ → α i → Prop)
(x : F α)

MvFunctor.LiftP p x ↔ ∃ a f, x = MvQPF.abs ⟨a, f⟩ ∧ ∀ (i : Fin2 n) (j : (MvQPF.P F).B a i), p (f i j)


theorem posPart_sub_negPart (f : α →ₛ ℝ) : f.posPart - f.negPart = f

{α : Type u_1}
[MeasurableSpace α]
(f : MeasureTheory.SimpleFunc α ℝ)


theorem linfty_opNorm_mul (A : Matrix l m α) (B : Matrix m n α) : ‖A * B‖ ≤ ‖A‖ * ‖B‖

{l : Type u_2}
{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype l]
[Fintype m]
[Fintype n]
[NonUnitalSeminormedRing α]
(A : Matrix l m α)
(B : Matrix m n α)

‖A * B‖ ≤ ‖A‖ * ‖B‖


theorem card_support_le_one_of_eraseLead_eq_zero (h : f.eraseLead = 0) : f.support.card ≤ 1

{R : Type u_1}
[Semiring R]
{f : R[X]}
(h : f.eraseLead = 0)


@[simp]
theorem summable_star_iff' : Summable (star f) ↔ Summable f

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


lemma Nonempty.of_diffs_left : (s \\ t).Nonempty → s.Nonempty

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


theorem star_subset [InvolutiveStar α] {s t : Set α} : s⋆ ⊆ t ↔ s ⊆ t⋆

{α : Type u_1}
[InvolutiveStar α]
{s t : Set α}


theorem if_lt {n a b f g} (ha : @Primrec' n a) (hb : @Primrec' n b) (hf : @Primrec' n f)
    (hg : @Primrec' n g) : @Primrec' n fun v => if a v < b v then f v else g v

{n : ℕ}
{a b f g : Mathlib.Vector ℕ n → ℕ}
(ha : Nat.Primrec' a)
(hb : Nat.Primrec' b)
(hf : Nat.Primrec' f)
(hg : Nat.Primrec' g)

Nat.Primrec' fun v => if a v < b v then f v else g v


@[reassoc (attr := simp)]
theorem ofLEMk_comp_ofMkLEMk {B A₁ A₂ : C} (X : Subobject B) (f : A₁ ⟶ B) [Mono f] (g : A₂ ⟶ B)
    [Mono g] (h₁ : X ≤ mk f) (h₂ : mk f ≤ mk g) :
    ofLEMk X f h₁ ≫ ofMkLEMk f g h₂ = ofLEMk X g (h₁.trans h₂)

(h₁ : X ≤ CategoryTheory.Subobject.mk f)

(h₂ : CategoryTheory.Subobject.mk f ≤ CategoryTheory.Subobject.mk g)

CategoryTheory.CategoryStruct.comp (X.ofLEMk f h₁) (CategoryTheory.Subobject.ofMkLEMk f g h₂) = X.ofLEMk g ⋯


private irreducible_def lt : ℝ → ℝ → Prop

∀ (x x_1 : ℝ),
  Real.lt x x_1 =
    match x, x_1 with
    | { cauchy := x }, { cauchy := y } => Quotient.liftOn₂ x y (fun x x_2 => x < x_2) Real.definition.proof_1✝


lemma finset_inf_nhds_apply [SemilatticeInf L] [OrderTop L] [ContinuousInf L]
    (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (fun a ↦ s.inf (f · a)) l (𝓝 (s.inf g))

(hs : ∀ i ∈ s, Filter.Tendsto (f i) l (𝓝 (g i)))

Filter.Tendsto (fun a => s.inf fun x => f x a) l (𝓝 (s.inf g))


@[simp]
theorem preimage_const_add_Iio : (fun x => a + x) ⁻¹' Iio b = Iio (b - a)

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

(fun x => a + x) ⁻¹' Set.Iio b = Set.Iio (b - a)


@[ext]
protected theorem ext : ∀ {a1 a2 : { x // p x }}, (a1 : α) = (a2 : α) → a1 = a2

{α : Sort u_1}
{p : α → Prop}
{a1 a2 : { x // p x }}


/-- A variant of `span_induction` that combines `∀ x ∈ s, p x` and `∀ r x, p x → p (r • x)`
into a single condition `∀ r, ∀ x ∈ s, p (r • x)`, which can be easier to verify. -/
@[elab_as_elim]
theorem closure_induction {p : M → Prop} (h : x ∈ span R s) (zero : p 0)
    (add : ∀ x y, p x → p y → p (x + y)) (smul_mem : ∀ r : R, ∀ x ∈ s, p (r • x)) : p x

(add : ∀ (x y : M), p x → p y → p (x + y))

(smul_mem : ∀ (r : R), ∀ x ∈ s, p (r • x))


@[to_additive (attr := simp)]
theorem quot_lift_mk (β : Type v) (f : List (α × Bool) → β)
    (H : ∀ L₁ L₂, Red.Step L₁ L₂ → f L₁ = f L₂) : Quot.lift f H (mk L) = f L

(H : ∀ (L₁ L₂ : List (α × Bool)), FreeGroup.Red.Step L₁ L₂ → f L₁ = f L₂)


/-- Given a finite set `t` and a subset `s` of `t`, the product of `f i` over `i ∈ s`
times the product of `f i` over `t \ s` equals the product of `f i` over `i ∈ t`. -/
@[to_additive
      "Given a finite set `t` and a subset `s` of `t`, the sum of `f i` over `i ∈ s` plus
      the sum of `f i` over `t \\ s` equals the sum of `f i` over `i ∈ t`."]
theorem finprod_mem_mul_diff (hst : s ⊆ t) (ht : t.Finite) :
    ((∏ᶠ i ∈ s, f i) * ∏ᶠ i ∈ t \ s, f i) = ∏ᶠ i ∈ t, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{s t : Set α}
(hst : s ⊆ t)
(ht : t.Finite)

∑ᶠ (i : α) (_ : i ∈ s), f i + ∑ᶠ (i : α) (_ : i ∈ t \ s), f i = ∑ᶠ (i : α) (_ : i ∈ t), f i


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


@[deprecated divInt_add_divInt (since := "2024-03-18")]
theorem add_def'' {a b c d : ℤ} (b0 : b ≠ 0) (d0 : d ≠ 0) :
    a /. b + c /. d = (a * d + c * b) /. (b * d)

Rat.divInt a b + Rat.divInt c d = Rat.divInt (a * d + c * b) (b * d)


theorem _root_.AlgHom.map_adjugate {R A B : Type*} [CommSemiring R] [CommRing A] [CommRing B]
    [Algebra R A] [Algebra R B] (f : A →ₐ[R] B) (M : Matrix n n A) :
    f.mapMatrix M.adjugate = Matrix.adjugate (f.mapMatrix M)

{n : Type v}
[DecidableEq n]
[Fintype n]
{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[CommRing A]
[CommRing B]
[Algebra R A]
[Algebra R B]
(f : A →ₐ[R] B)
(M : Matrix n n A)

f.mapMatrix M.adjugate = (f.mapMatrix M).adjugate


theorem image_cast_int_Icc (a b : ℕ) : (↑) '' Icc a b = Icc (a : ℤ) b


@[to_additive]
theorem oreDiv_smul_oreDiv {r₁ : R} {r₂ : X} {s₁ s₂ : S} :
    (r₁ /ₒ s₁) • (r₂ /ₒ s₂) = oreNum r₁ s₂ • r₂ /ₒ (oreDenom r₁ s₂ * s₁)

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
{X : Type u_2}
[AddAction R X]
{r₁ : R}
{r₂ : X}
{s₁ s₂ : ↥S}

r₁ -ₒ s₁ +ᵥ (r₂ -ₒ s₂) = AddOreLocalization.oreMin r₁ s₂ +ᵥ r₂ -ₒ (AddOreLocalization.oreSubtra r₁ s₂ + s₁)


lemma isHamiltonianCycle_iff_isCycle_and_support_count_tail_eq_one :
    p.IsHamiltonianCycle ↔ p.IsCycle ∧ ∀ a, (support p).tail.count a = 1

{α : Type u_1}
[DecidableEq α]
{G : SimpleGraph α}
{a : α}
{p : G.Walk a a}

p.IsHamiltonianCycle ↔ p.IsCycle ∧ ∀ (a_1 : α), List.count a_1 p.support.tail = 1


{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]


@[to_additive]
theorem coe_liftRight (f : M →* N) (hf : ∀ x, IsUnit (f x)) (x) :
    (IsUnit.liftRight f hf x : N) = f x

{M : Type u_4}
{N : Type u_5}
[AddMonoid M]
[AddMonoid N]
(f : M →+ N)
(hf : ∀ (x : M), IsAddUnit (f x))
(x : M)


/-- Homotopy between morphisms of short complexes is compatible with precomposition. -/
@[simps]
def compLeft (h : Homotopy φ₁ φ₂) (ψ : S₃ ⟶ S₁) : Homotopy (ψ ≫ φ₁) (ψ ≫ φ₂)

{S₁ S₂ S₃ : CategoryTheory.ShortComplex C}

{φ₁ φ₂ : S₁ ⟶ S₂}

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)

(h.compLeft ψ).h₃ = CategoryTheory.CategoryStruct.comp ψ.τ₃ h.h₃


/-- `gramSchmidt` preserves span of vectors. -/
theorem span_gramSchmidt (f : ι → E) : span 𝕜 (range (gramSchmidt 𝕜 f)) = span 𝕜 (range f)

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_3}
[LinearOrder ι]
[LocallyFiniteOrderBot ι]
[IsWellOrder ι fun x x_1 => x < x_1]
(f : ι → E)

Submodule.span 𝕜 (Set.range (gramSchmidt 𝕜 f)) = Submodule.span 𝕜 (Set.range f)


theorem HasDerivWithinAt.arsinh (hf : HasDerivWithinAt f f' s a) :
    HasDerivWithinAt (fun x => arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') s a

{f : ℝ → ℝ}
{s : Set ℝ}
{a f' : ℝ}
(hf : HasDerivWithinAt f f' s a)

HasDerivWithinAt (fun x => Real.arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') s a


/-- A homomorphism between first-order structures is a function that commutes with the
  interpretations of functions and maps tuples in one structure where a given relation is true to
  tuples in the second structure where that relation is still true. -/
structure Hom where
  /-- The underlying function of a homomorphism of structures -/
  toFun : M → N
  /-- The homomorphism commutes with the interpretations of the function symbols -/
  -- Porting note:
  -- The autoparam here used to be `obviously`. We would like to replace it with `aesop`
  -- but that isn't currently sufficient.
  -- See https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Aesop.20and.20cases
  -- If that can be improved, we should change this to `by aesop` and remove the proofs below.
  map_fun' : ∀ {n} (f : L.Functions n) (x), toFun (funMap f x) = funMap f (toFun ∘ x) := by
    intros; trivial
  /-- The homomorphism sends related elements to related elements -/
  map_rel' : ∀ {n} (r : L.Relations n) (x), RelMap r x → RelMap r (toFun ∘ x) := by
    -- Porting note: see porting note on `Hom.map_fun'`
    intros; trivial

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
(self : L.Hom M N)
{n : ℕ}
(r : L.Relations n)
(x : Fin n → M)

FirstOrder.Language.Structure.RelMap r x → FirstOrder.Language.Structure.RelMap r (self.toFun ∘ x)


@[simp]
theorem destutter'_singleton : [b].destutter' R a = if R a b then [a, b] else [a]

{α : Type u_1}
(R : α → α → Prop)
[DecidableRel R]
{a b : α}

List.destutter' R a [b] = if R a b then [a, b] else [a]


lemma Antitone.partSeq (hf : Antitone f) (hg : Antitone g) : Antitone fun x ↦ f x <*> g x

{α : Type u_1}
[Preorder α]
{β γ : Type u_4}
{f : α → Part (β → γ)}
{g : α → Part β}
(hf : Antitone f)
(hg : Antitone g)

Antitone fun x => Seq.seq (f x) fun x_1 => g x


theorem ge_logGammaSeq (hf_conv : ConvexOn ℝ (Ioi 0) f)
    (hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + log y) (hx : 0 < x) (hn : n ≠ 0) :
    f 1 + logGammaSeq x n ≤ f x

(hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + Real.log y)

f 1 + Real.BohrMollerup.logGammaSeq x n ≤ f x


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

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

(CategoryTheory.Square.toArrowArrowFunctor'.obj sq).right.hom = sq.f₃₄


/-- Auxiliary lemma for norm_cast to move the cast `-↑n` upwards to `↑-↑n`.

(The restriction to `DivisionRing` is necessary, otherwise this would also apply in the case where
`R = ℤ` and cause nontermination.)
-/
@[norm_cast]
theorem cast_neg_natCast {R} [DivisionRing R] (n : ℕ) : ((-n : ℤ) : R) = -n


theorem get_set_of_ne {v : Vector α n} {i j : Fin n} (h : i ≠ j) (a : α) :
    (v.set i a).get j = v.get j

{n : ℕ}
{α : Type u_1}
{v : Mathlib.Vector α n}
{i j : Fin n}
(h : i ≠ j)
(a : α)


@[to_additive (attr := simp)]
theorem Germ.coe_prod {α : Type*} (l : Filter α) (R : Type*) [CommMonoid R] {ι} (f : ι → α → R)
    (s : Finset ι) : ((∏ i ∈ s, f i : α → R) : Germ l R) = ∏ i ∈ s, (f i : Germ l R)

{α : Type u_6}
(l : Filter α)
(R : Type u_7)
[CommMonoid R]
{ι : Type u_8}
(f : ι → α → R)
(s : Finset ι)


@[simp]
theorem coe_toContinuousMap (f : C₀(α, β)) : (f.toContinuousMap : α → β) = f

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
(f : α →C₀ β)


@[simp]
theorem baseChange_tmul (B₂ : BilinMap R M₂ R) (a : A) (m₂ : M₂)
    (a' : A) (m₂' : M₂) :
    B₂.baseChange A (a ⊗ₜ m₂) (a' ⊗ₜ m₂') = (B₂ m₂ m₂') • (a * a')

{R : Type uR}
{A : Type uA}
{M₂ : Type uM₂}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M₂]
[Algebra R A]
[Module R M₂]
(B₂ : LinearMap.BilinMap R M₂ R)
(a : A)
(m₂ : M₂)
(a' : A)
(m₂' : M₂)

((LinearMap.BilinMap.baseChange A B₂) (a ⊗ₜ[R] m₂)) (a' ⊗ₜ[R] m₂') = (B₂ m₂) m₂' • (a * a')


@[simp]
theorem find_get (h : (find P).Dom) : (find P).get h = Nat.find h

(P : ℕ → Prop)
[DecidablePred P]
(h : (PartENat.find P).Dom)


private lemma int_div_nonneg_of_nonneg_of_pos {a b : ℤ} (ha : 0 ≤ a) (hb : 0 < b) : 0 ≤ a / b


theorem smul_eq_C_mul (r : K) (x : RatFunc K) : r • x = C r * x

{K : Type u}
[CommRing K]
[IsDomain K]
(r : K)
(x : RatFunc K)


@[simp, norm_cast]
lemma ofENat_lt_aleph0 {m : ℕ∞} : (m : Cardinal) < ℵ₀ ↔ m < ⊤


@[simp]
theorem truncateAugment_inv_f (C : CochainComplex V ℕ) {X : V} (f : X ⟶ C.X 0)
    (w : f ≫ C.d 0 1 = 0) (i : ℕ) :
    (truncateAugment C f w).inv.f i = 𝟙 ((truncate.obj (augment C f w)).X i)

(C.truncateAugment f w).inv.f i = 𝟙 ((CochainComplex.truncate.obj (C.augment f w)).X i)


@[simp]
theorem inter_empty (s : Finset α) : s ∩ ∅ = ∅

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


theorem injective_toEmbedding : Function.Injective (toEmbedding : (M ≃[L] N) → M ↪[L] N)

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]


/-- A continuous function on a compact space automatically has compact support. -/
@[simps]
def ContinuousMap.liftCompactlySupported [CompactSpace α] : C(α, β) ≃ C_c(α, β)

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
[CompactSpace α]
(f : C(α, β))
(a : α)

(CompactlySupportedContinuousMap.ContinuousMap.liftCompactlySupported f) a = f a


@[simp]
theorem one_lt_exp_iff {x : ℝ} : 1 < exp x ↔ 0 < x


theorem Set.OrdConnected.isStronglyCoatomic [IsStronglyCoatomic α] {s : Set α}
    (h : Set.OrdConnected s) : IsStronglyCoatomic s

{α : Type u_4}
[Preorder α]
[IsStronglyCoatomic α]
{s : Set α}
(h : s.OrdConnected)


@[simp]
theorem mem_toList {a : α} {s : Finset α} : a ∈ s.toList ↔ a ∈ s


@[simp]
theorem cons_head_tail (u : Fin m.succ → α) : vecCons (vecHead u) (vecTail u) = u

{α : Type u}
{m : ℕ}
(u : Fin m.succ → α)

Matrix.vecCons (Matrix.vecHead u) (Matrix.vecTail u) = u


theorem setLaverage_one (hs₀ : μ s ≠ 0) (hs : μ s ≠ ∞) : ⨍⁻ _x in s, (1 : ℝ≥0∞) ∂μ = 1

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs₀ : μ s ≠ 0)
(hs : μ s ≠ ⊤)


/-- A `FloorRing` is a linear ordered ring over `α` with a function
`floor : α → ℤ` satisfying `∀ (z : ℤ) (a : α), z ≤ floor a ↔ (z : α) ≤ a)`.
-/
class FloorRing (α) [LinearOrderedRing α] where
  /-- `FloorRing.floor a` computes the greatest integer `z` such that `(z : α) ≤ a`. -/
  floor : α → ℤ
  /-- `FloorRing.ceil a` computes the least integer `z` such that `a ≤ (z : α)`. -/
  ceil : α → ℤ
  /-- `FloorRing.ceil` is the upper adjoint of the coercion `↑ : ℤ → α`. -/
  gc_coe_floor : GaloisConnection (↑) floor
  /-- `FloorRing.ceil` is the lower adjoint of the coercion `↑ : ℤ → α`. -/
  gc_ceil_coe : GaloisConnection ceil (↑)

{α : Type u_4}
[LinearOrderedRing α]
[self : FloorRing α]


theorem mul_tsub (a b c : α) : a * (b - c) = a * b - a * c

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


/-- See also `Irreducible.coprime_iff_not_dvd`. -/
lemma Irreducible.isRelPrime_iff_not_dvd [Monoid α] {p n : α} (hp : Irreducible p) :
    IsRelPrime p n ↔ ¬ p ∣ n

{α : Type u_1}
[Monoid α]
{p n : α}
(hp : Irreducible p)


theorem le_generate (R : Presieve X) : R ≤ generate R

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

R ≤ (CategoryTheory.Sieve.generate R).arrows


theorem arg_mul_cos_add_sin_mul_I_sub {r : ℝ} (hr : 0 < r) (θ : ℝ) :
    arg (r * (cos θ + sin θ * I)) - θ = 2 * π * ⌊(π - θ) / (2 * π)⌋

(↑r * (Complex.cos ↑θ + Complex.sin ↑θ * Complex.I)).arg - θ = 2 * π * ↑⌊(π - θ) / (2 * π)⌋


theorem GradedMonoid.mk_list_dProd (l : List α) (fι : α → ι) (fA : ∀ a, A (fι a)) :
    GradedMonoid.mk _ (l.dProd fι fA) = (l.map fun a => GradedMonoid.mk (fι a) (fA a)).prod

{ι : Type u_1}
{α : Type u_2}
{A : ι → Type u_3}
[AddMonoid ι]
[GradedMonoid.GMonoid A]
(l : List α)
(fι : α → ι)
(fA : (a : α) → A (fι a))

GradedMonoid.mk (l.dProdIndex fι) (l.dProd fι fA) = (List.map (fun a => GradedMonoid.mk (fι a) (fA a)) l).prod


lemma smul {f : 𝕜 → 𝕜} {g : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
    MeromorphicAt (f • g) x

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


theorem IsPreconnected.subsingleton [TotallyDisconnectedSpace α] {s : Set α}
    (h : IsPreconnected s) : s.Subsingleton

{α : Type u}
[TopologicalSpace α]
[TotallyDisconnectedSpace α]
{s : Set α}
(h : IsPreconnected s)


@[to_additive (attr := simp)]
theorem lift_comp_of : lift f ∘ of = f

{α : Type u}
{β : Type v}
[Add β]
(f : α → β)

⇑(FreeAddMagma.lift f) ∘ FreeAddMagma.of = f


@[simp]
theorem cardDistinctFactors_one : ω 1 = 0

ArithmeticFunction.cardDistinctFactors 1 = 0


@[simp] theorem coe_id_of {X : Type u} [Semiring X] :
    @DFunLike.coe no_index (SemiRingCat.of X ⟶ SemiRingCat.of X) X
      (fun _ ↦ X) _
      (𝟙 (of X)) =
    @DFunLike.coe (X →+* X) X (fun _ ↦ X) _ (RingHom.id X)

⇑(𝟙 (SemiRingCat.of X)) = ⇑(RingHom.id X)


protected theorem isCompact (s : Compacts α) : IsCompact (s : Set α)

{α : Type u_1}
[TopologicalSpace α]
(s : TopologicalSpace.Compacts α)


theorem nonsing_inv_apply (h : IsUnit A.det) : A⁻¹ = (↑h.unit⁻¹ : α) • A.adjugate

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
(h : IsUnit A.det)


theorem sum_casesOn_left {f : α → β ⊕ γ} {g : α → β →. σ} {h : α → γ → σ} (hf : Computable f)
    (hg : Partrec₂ g) (hh : Computable₂ h) :
    @Partrec _ σ _ _ fun a => Sum.casesOn (f a) (g a) fun c => Part.some (h a c)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{σ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
[Primcodable σ]
{f : α → β ⊕ γ}
{g : α → β →. σ}
{h : α → γ → σ}
(hf : Computable f)
(hg : Partrec₂ g)
(hh : Computable₂ h)

Partrec fun a => Sum.casesOn (f a) (g a) fun c => Part.some (h a c)


@[simp]
theorem total_repr : Finsupp.total _ _ _ b (b.repr x) = x

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


{R : Type u}
[CommSemiring R]
(S : Submonoid R)
(M : Type v)
[AddCommMonoid M]
[Module R M]

IsEquiv (M × ↥S) (LocalizedModule.r S M)


@[to_additive] lemma extend_le_one (hg : g ≤ 1) (he : e ≤ 1) : extend f g e ≤ 1

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Zero γ]
[LE γ]
{f : α → β}
{g : α → γ}
{e : β → γ}
(hg : g ≤ 0)
(he : e ≤ 0)


/-- Equivalence expressing that two morphisms are homotopic iff
their difference is homotopic to zero. -/
@[simps]
def equivSubZero : Homotopy φ₁ φ₂ ≃ Homotopy (φ₁ - φ₂) 0

(φ₁ φ₂ : S₁ ⟶ S₂)

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)

(CategoryTheory.ShortComplex.Homotopy.equivSubZero φ₁ φ₂) h =
  (h.sub (CategoryTheory.ShortComplex.Homotopy.refl φ₂)).trans (CategoryTheory.ShortComplex.Homotopy.ofEq ⋯)


theorem sum_le_exp_of_nonneg {x : ℝ} (hx : 0 ≤ x) (n : ℕ) : ∑ i ∈ range n, x ^ i / i ! ≤ exp x

∑ i ∈ Finset.range n, x ^ i / ↑i.factorial ≤ Real.exp x


theorem seq_bind_eq (x : m α) {g : β → m γ} {f : α → β} :
    f <$> x >>= g = x >>= g ∘ f

{α β γ : Type u}
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
(x : m α)
{g : β → m γ}
{f : α → β}


theorem writtenInExtChartAt_chartAt {x : M} {y : E} (h : y ∈ (extChartAt I x).target) :
    writtenInExtChartAt I I x (chartAt H x) y = y

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

writtenInExtChartAt I I x (↑(chartAt H x)) y = y


/-- An object in the arrow category is simply a morphism in `T`. -/
@[simps]
def mk {X Y : T} (f : X ⟶ Y) : Arrow T

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


@[simp]
theorem Iic_sInf (S : Set α) : Iic (sInf S) = ⨅ a ∈ S, Iic a

{α : Type u_1}
[CompleteLattice α]
(S : Set α)

LowerSet.Iic (sInf S) = ⨅ a ∈ S, LowerSet.Iic a


theorem sSup_def (s : Set (Filtration ι m)) (i : ι) :
    sSup s i = sSup ((fun f : Filtration ι m => f i) '' s)

(s : Set (MeasureTheory.Filtration ι m))

↑(sSup s) i = sSup ((fun f => ↑f i) '' s)


@[simp]
theorem PreservesProduct.iso_hom : (PreservesProduct.iso G f).hom = piComparison G f

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

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

(CategoryTheory.Limits.PreservesProduct.iso G f).hom = CategoryTheory.Limits.piComparison G f


theorem image_parallelepiped (f : E →ₗ[ℝ] F) (v : ι → E) :
    f '' parallelepiped v = parallelepiped (f ∘ v)

{ι : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Fintype ι]
[AddCommGroup E]
[Module ℝ E]
[AddCommGroup F]
[Module ℝ F]
(f : E →ₗ[ℝ] F)
(v : ι → E)

⇑f '' parallelepiped v = parallelepiped (⇑f ∘ v)


theorem divInt_ne_zero {a b : ℤ} (b0 : b ≠ 0) : a /. b ≠ 0 ↔ a ≠ 0


/-- The "identity" functor from `AsType α` to `ObjAsType α`. -/
@[simps]
noncomputable def asTypeToObjAsType : AsType α ⥤ ObjAsType α

(a : CategoryTheory.FinCategory.AsType α)

(CategoryTheory.FinCategory.asTypeToObjAsType α).obj a = id a


theorem coe_succ_le_iff {n : ℕ} {e : PartENat} : ↑n.succ ≤ e ↔ ↑n < e


/-- A morphism of homological complexes `φ : F ⟶ G` has a homotopy cofiber if for all
indices `i` and `j` such that `c.Rel i j`, the binary biproduct `F.X j ⊞ G.X i` exists. -/
class HasHomotopyCofiber (φ : F ⟶ G) : Prop where
  hasBinaryBiproduct (i j : ι) (hij : c.Rel i j) : HasBinaryBiproduct (F.X j) (G.X i)

[self : HomologicalComplex.HasHomotopyCofiber φ]

CategoryTheory.Limits.HasBinaryBiproduct (F.X j) (G.X i)


@[simp]
protected theorem inv_zero : (0 : tsze R M)⁻¹ = (0 : tsze R M)

{R : Type u}
{M : Type v}
[DivisionSemiring R]
[AddCommGroup M]
[Module Rᵐᵒᵖ M]
[Module R M]


protected theorem IsLUB.insert [SemilatticeSup γ] (a) {b} {s : Set γ} (hs : IsLUB s b) :
    IsLUB (insert a s) (a ⊔ b)

{γ : Type w}
[SemilatticeSup γ]
(a : γ)
{b : γ}
{s : Set γ}
(hs : IsLUB s b)


theorem ofNat_mul_re (n : ℕ) [n.AtLeastTwo] (z : K) :
    re (OfNat.ofNat n * z) = OfNat.ofNat n * re z

{K : Type u_1}
[RCLike K]
(n : ℕ)
[n.AtLeastTwo]
(z : K)

RCLike.re (OfNat.ofNat n * z) = OfNat.ofNat n * RCLike.re z


lemma f_eq_of_r_eq_some {i : ι} {i' : ι'} (hi : e.r i' = some i) :
    e.f i = i'

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(e : c.Embedding c')
{i : ι}
{i' : ι'}
(hi : e.r i' = some i)


theorem limsup_le_limsup_of_le {α β} [ConditionallyCompleteLattice β] {f g : Filter α} (h : f ≤ g)
    {u : α → β}
    (hf : f.IsCoboundedUnder (· ≤ ·) u := by isBoundedDefault)
    (hg : g.IsBoundedUnder (· ≤ ·) u := by isBoundedDefault) :
    limsup u f ≤ limsup u g

(hf : Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) f u := by isBoundedDefault)

(hg : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) g u := by isBoundedDefault)


theorem codisjoint_iff_coe_toSubmodule :
    Codisjoint N N' ↔ Codisjoint (N : Submodule R M) (N' : Submodule R M)

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


theorem dvd_antisymm_of_normalize_eq {a b : α} (ha : normalize a = a) (hb : normalize b = b)
    (hab : a ∣ b) (hba : b ∣ a) : a = b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
{a b : α}
(ha : normalize a = a)
(hb : normalize b = b)
(hab : a ∣ b)
(hba : b ∣ a)


/-- If `s : Set α` and `t : Set β` are finite sets, then taking the product over `s` commutes with
taking the product over `t`. -/
@[to_additive
      "If `s : Set α` and `t : Set β` are finite sets, then summing over `s` commutes with
      summing over `t`."]
theorem finprod_mem_comm {s : Set α} {t : Set β} (f : α → β → M) (hs : s.Finite) (ht : t.Finite) :
    (∏ᶠ i ∈ s, ∏ᶠ j ∈ t, f i j) = ∏ᶠ j ∈ t, ∏ᶠ i ∈ s, f i j

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
{s : Set α}
{t : Set β}
(f : α → β → M)
(hs : s.Finite)
(ht : t.Finite)


@[simp]
theorem image_const_sub_Ioi : (fun x => a - x) '' Ioi b = Iio (a - b)

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

(fun x => a - x) '' Set.Ioi b = Set.Iio (a - b)


/-- The `Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat`
for commutative rings. -/
theorem not_linearIndependent_pair_of_flat (hf : Module.Flat R M ∨ Module.Flat R N)
    (a b : ↥(M ⊓ N)) : ¬LinearIndependent R ![a, b]

(hf : Module.Flat R ↥M ∨ Module.Flat R ↥N)


theorem inter_preimage_minimals_eq_of_rel_iff_rel_on_of_subset {x : Set α} {y : Set β}
    (hf : ∀ ⦃a a'⦄, a ∈ x → a' ∈ x → (r a a' ↔ s (f a) (f a'))) (hy : y ⊆ f '' x) :
    x ∩ f ⁻¹' (minimals s y) = minimals r (x ∩ f ⁻¹' y)

(hf : ∀ ⦃a a' : α⦄, a ∈ x → a' ∈ x → (r a a' ↔ s (f a) (f a')))

x ∩ f ⁻¹' minimals s y = minimals r (x ∩ f ⁻¹' y)


@[simp]
theorem arccos_lt_pi_div_two {x : ℝ} : arccos x < π / 2 ↔ 0 < x


@[simp]
theorem zero_lf_neg_iff {x : PGame} : 0 ⧏ -x ↔ x ⧏ 0


theorem get?_len_le : ∀ {l : List α} {n}, length l ≤ n → l.get? n = none


theorem hasSum_at_zero (a : ℕ → E) : HasSum (fun n => (0 : 𝕜) ^ n • a n) (a 0)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(a : ℕ → E)


theorem mul_lt_of_lt_of_le_one_of_nonneg [PosMulMono α] (h : b < c) (ha : a ≤ 1) (hb : 0 ≤ b) :
    b * a < c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
(h : b < c)
(ha : a ≤ 1)
(hb : 0 ≤ b)


lemma sUnion_union_sUnion_diffFinset₀_of_subset (hC : IsSetSemiring C) (hs : s ∈ C)
    (hI : ↑I ⊆ C) (hI_ss : ∀ t ∈ I, t ⊆ s) :
    ⋃₀ I ∪ ⋃₀ hC.diffFinset₀ hs hI = s

{α : Type u_1}
{C : Set (Set α)}
{s : Set α}
{I : Finset (Set α)}
(hC : MeasureTheory.IsSetSemiring C)
(hs : s ∈ C)
(hI : ↑I ⊆ C)
(hI_ss : ∀ t ∈ I, t ⊆ s)


@[simp]
theorem inner_self_im (x : E) : im ⟪x, x⟫ = 0

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


@[to_additive le_card_add_mul_addEnergy] lemma le_card_add_mul_mulEnergy (s t : Finset α) :
    s.card ^ 2 * t.card ^ 2 ≤ (s * t).card * Eₘ[s, t]

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

s.card ^ 2 * t.card ^ 2 ≤ (s * t).card * s.mulEnergy t


theorem IsUniversalColimit.precompose_isIso {F G : J ⥤ C} (α : F ⟶ G) [IsIso α]
    {c : Cocone G} (hc : IsUniversalColimit c) :
    IsUniversalColimit ((Cocones.precompose α).obj c)

(hc : CategoryTheory.IsUniversalColimit c)

CategoryTheory.IsUniversalColimit ((CategoryTheory.Limits.Cocones.precompose α).obj c)


theorem ofLeftInverse'_eq_ofInjective {α β : Type*} (f : α → β) (f_inv : β → α)
    (hf : LeftInverse f_inv f) : ofLeftInverse' f f_inv hf = ofInjective f hf.injective

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(f_inv : β → α)
(hf : Function.LeftInverse f_inv f)

Equiv.ofLeftInverse' f f_inv hf = Equiv.ofInjective f ⋯


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

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

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


lemma fourierTransform_eq_gaussSum_mulShift (k : ZMod N) :
    𝓕 χ k = gaussSum χ (stdAddChar.mulShift (-k))

{N : ℕ}
[NeZero N]
(χ : DirichletCharacter ℂ N)
(k : ZMod N)

𝓕 (⇑χ) k = gaussSum χ (ZMod.stdAddChar.mulShift (-k))


theorem isLeftInversion_inv_iff {w t : W} :
    cs.IsLeftInversion w⁻¹ t ↔ cs.IsRightInversion w t

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


@[simp]
theorem sbtw_vadd_const_iff {x y z : V} (p : P) :
    Sbtw R (x +ᵥ p) (y +ᵥ p) (z +ᵥ p) ↔ Sbtw R x y z

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


theorem einfsep_ne_top :
    s.einfsep ≠ ∞ ↔ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y ≠ ∞

s.einfsep ≠ ⊤ ↔ ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y ≠ ⊤


/-- Multiplicative congruence relations preserve inversion. -/
@[to_additive "Additive congruence relations preserve negation."]
protected theorem inv {x y} (h : c x y) : c x⁻¹ y⁻¹

{M : Type u_1}
[AddGroup M]
(c : AddCon M)
{x y : M}
(h : c x y)


theorem isPrimitiveRoot_iff {k : ℕ} {ζ ξ : R} (h : IsPrimitiveRoot ζ k) (h0 : 0 < k) :
    IsPrimitiveRoot ξ k ↔ ∃ i < k, i.Coprime k ∧ ζ ^ i = ξ

{R : Type u_4}
[CommRing R]
[IsDomain R]
{k : ℕ}
{ζ ξ : R}
(h : IsPrimitiveRoot ζ k)
(h0 : 0 < k)


/-- The functor `HomologicalComplex C c ⥤ ShortComplex C` which sends a homological
complex `K` to the short complex `K.X (c.prev i) ⟶ K.X i ⟶ K.X (c.next i)`. -/
@[simps!]
noncomputable def shortComplexFunctor (i : ι)

∀ {X Y : HomologicalComplex C c} (f : X ⟶ Y), ((HomologicalComplex.shortComplexFunctor C c i).map f).τ₃ = f.f (c.next i)


theorem mem_iInf_of_mem {f : ι → Filter α} (i : ι) {s} (hs : s ∈ f i) : s ∈ ⨅ i, f i

{α : Type u}
{ι : Sort x}
{f : ι → Filter α}
(i : ι)
{s : Set α}
(hs : s ∈ f i)


theorem isLocalMax_const {b : β} : IsLocalMax (fun _ => b) a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{a : α}
{b : β}


protected nonrec theorem ContMDiffAt.coordChangeL
    (hf : ContMDiffAt IM IB n f x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
    ContMDiffAt IM 𝓘(𝕜, F →L[𝕜] F) n (fun y ↦ (e.coordChangeL 𝕜 e' (f y) : F →L[𝕜] F)) x

[TopologicalSpace (Bundle.TotalSpace F E)]

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

ContMDiffAt IM 𝓘(𝕜, F →L[𝕜] F) n (fun y => ↑(Trivialization.coordChangeL 𝕜 e e' (f y))) x


private theorem toIxxMod_total' (a b c : α) :
    toIcoMod hp b a ≤ toIocMod hp b c ∨ toIcoMod hp b c ≤ toIocMod hp b a

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


@[to_additive]
theorem mul_subset_iff_left : s * t ⊆ u ↔ ∀ a ∈ s, a • t ⊆ u


lemma AddMonoidHom.apply_nat (f : ℕ →+ β) (n : ℕ) : f n = n • f 1

(β : Type u_2)
[AddMonoid β]
(f : ℕ →+ β)
(n : ℕ)


theorem Char.val_ne_of_ne {c d : Char} (h : Not (Eq c d)) : Not (Eq c.val d.val)


@[simp]
theorem mk_as (a : LocallyDiscrete C) : mk a.as = a

{C : Type u}
(a : CategoryTheory.LocallyDiscrete C)


protected theorem isOpen [TopologicalSpace α] (F : Realizer α) (s : F.σ) : IsOpen (F.F s)

{α : Type u_1}
[TopologicalSpace α]
(F : Ctop.Realizer α)
(s : F.σ)


@[simp]
theorem coe_inf (f g : InfHom α β) : DFunLike.coe (f ⊓ g) = f ⊓ g

{α : Type u_3}
{β : Type u_4}
[Inf α]
[SemilatticeInf β]
(f g : InfHom α β)


/-- The empty set is σ-compact. -/
@[simp]
lemma isSigmaCompact_empty : IsSigmaCompact (∅ : Set X)


lemma collapse_modular (hu : a ∉ u) (h₁ : 0 ≤ f₁) (h₂ : 0 ≤ f₂) (h₃ : 0 ≤ f₃) (h₄ : 0 ≤ f₄)
    (h : ∀ ⦃s⦄, s ⊆ insert a u → ∀ ⦃t⦄, t ⊆ insert a u →  f₁ s * f₂ t ≤ f₃ (s ∩ t) * f₄ (s ∪ t))
    (𝒜 ℬ : Finset (Finset α)) :
    ∀ ⦃s⦄, s ⊆ u → ∀ ⦃t⦄, t ⊆ u → collapse 𝒜 a f₁ s * collapse ℬ a f₂ t ≤
      collapse (𝒜 ⊼ ℬ) a f₃ (s ∩ t) * collapse (𝒜 ⊻ ℬ) a f₄ (s ∪ t)

(h : ∀ ⦃s : Finset α⦄, s ⊆ insert a u → ∀ ⦃t : Finset α⦄, t ⊆ insert a u → f₁ s * f₂ t ≤ f₃ (s ∩ t) * f₄ (s ∪ t))

s ⊆ u →
  ∀ ⦃t : Finset α⦄,
    t ⊆ u → collapse 𝒜 a f₁ s * collapse ℬ a f₂ t ≤ collapse (𝒜 ⊼ ℬ) a f₃ (s ∩ t) * collapse (𝒜 ⊻ ℬ) a f₄ (s ∪ t)


/-- If the angle ∠ABC at a point is π, the angle ∠BCA is 0. -/
theorem angle_eq_zero_of_angle_eq_pi_right {p1 p2 p3 : P} (h : ∠ p1 p2 p3 = π) :
    ∠ p2 p3 p1 = 0

(h : EuclideanGeometry.angle p1 p2 p3 = π)


theorem Isometry.completion_map [PseudoMetricSpace β] {f : α → β}
    (h : Isometry f) : Isometry (Completion.map f)

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{f : α → β}
(h : Isometry f)


/-- The categories of cones over `F` and `G` are equivalent if `F` and `G` are naturally isomorphic
(possibly after changing the indexing category by an equivalence).
-/
@[simps! functor inverse unitIso counitIso]
def equivalenceOfReindexing {G : K ⥤ C} (e : K ≌ J) (α : e.functor ⋙ F ≅ G) : Cone F ≌ Cone G

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{G : K ⥤ C}
(e : K ≌ J)
(α : e.functor ⋙ F ≅ G)

(CategoryTheory.Limits.Cones.equivalenceOfReindexing e α).unitIso =
  CategoryTheory.NatIso.ofComponents (fun s => CategoryTheory.Limits.Cones.ext (CategoryTheory.Iso.refl s.pt) ⋯) ⋯ ≪≫
    CategoryTheory.isoWhiskerLeft (CategoryTheory.Limits.Cones.whiskering e.functor)
      (CategoryTheory.isoWhiskerRight
        (CategoryTheory.NatIso.ofComponents (fun s => CategoryTheory.Limits.Cones.ext (CategoryTheory.Iso.refl s.pt) ⋯)
          ⋯)
        (CategoryTheory.Limits.Cones.whiskering e.inverse ⋙
          CategoryTheory.Limits.Cones.postcompose (e.invFunIdAssoc F).hom))


/-- A set is complete iff its image under a uniform inducing map is complete. -/
theorem isComplete_image_iff {m : α → β} {s : Set α} (hm : UniformInducing m) :
    IsComplete (m '' s) ↔ IsComplete s

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{m : α → β}
{s : Set α}
(hm : UniformInducing m)


@[simp] theorem or_iff_right_iff_imp : (a ∨ b ↔ b) ↔ (a → b)


/-- The completion of a seminormed group, as an endofunctor on `SemiNormedGrp`. -/
@[simps]
def completion : SemiNormedGrp.{u} ⥤ SemiNormedGrp.{u}

∀ {X Y : SemiNormedGrp} (f : X ⟶ Y), SemiNormedGrp.completion.map f = NormedAddGroupHom.completion f


@[simp]
theorem restrict_apply (f : α →ᵇ β) (s : Set α) (x : s) : f.restrict s x = f x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
(f : BoundedContinuousFunction α β)
(s : Set α)
(x : ↑s)


theorem mkOfClosure_sets {s : Set (Set α)} {hs : { u | GenerateOpen s u } = s} :
    TopologicalSpace.mkOfClosure s hs = generateFrom s

{hs : {u | TopologicalSpace.GenerateOpen s u} = s}

TopologicalSpace.mkOfClosure s hs = TopologicalSpace.generateFrom s


theorem Measure.IsComplete.out (h : μ.IsComplete) : ∀ s, μ s = 0 → MeasurableSet s

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


theorem ediam_image_le_of_le (hf : HolderOnWith C r f s) {d : ℝ≥0∞} (hd : EMetric.diam s ≤ d) :
    EMetric.diam (f '' s) ≤ (C : ℝ≥0∞) * d ^ (r : ℝ)

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
{C r : ℝ≥0}
{f : X → Y}
{s : Set X}
(hf : HolderOnWith C r f s)
{d : ℝ≥0∞}
(hd : EMetric.diam s ≤ d)


theorem sub_self_equiv : ∀ (x : PGame), x - x ≈ 0


@[simp]
theorem mul_self_sqrt (h : 0 ≤ x) : √x * √x = x


@[simp]
theorem mul_lt_mul_left [PosMulStrictMono α] [PosMulReflectLT α] (a0 : 0 < a) :
    a * b < a * c ↔ b < c

{α : Type u_1}
{a b c : α}
[Mul α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
[PosMulReflectLT α]
(a0 : 0 < a)


theorem ZeroAtFilter.smul [TopologicalSpace β] [Zero 𝕜] [Zero β]
    [SMulWithZero 𝕜 β] [ContinuousConstSMul 𝕜 β] {l : Filter α} {f : α → β} (c : 𝕜)
    (hf : ZeroAtFilter l f) : ZeroAtFilter l (c • f)

{𝕜 : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
[Zero 𝕜]
[Zero β]
[SMulWithZero 𝕜 β]
[ContinuousConstSMul 𝕜 β]
{l : Filter α}
{f : α → β}
(c : 𝕜)
(hf : l.ZeroAtFilter f)


theorem eq_of_map_eq_withDensity' [SigmaFinite μ] {X : Ω → E} [HasPDF X ℙ μ] (f : E → ℝ≥0∞)
    (hmf : AEMeasurable f μ) : map X ℙ = μ.withDensity f ↔ pdf X ℙ μ =ᵐ[μ] f

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]
{m : MeasurableSpace Ω}
{ℙ : MeasureTheory.Measure Ω}
{μ : MeasureTheory.Measure E}
[MeasureTheory.SigmaFinite μ]
{X : Ω → E}
[MeasureTheory.HasPDF X ℙ μ]
(f : E → ℝ≥0∞)
(hmf : AEMeasurable f μ)

MeasureTheory.Measure.map X ℙ = μ.withDensity f ↔ MeasureTheory.pdf X ℙ μ =ᵐ[μ] f


/-- If both `a` and `b` commute with `c`, then their product commutes with `c`. -/
@[to_additive (attr := simp)
"If both `a` and `b` commute with `c`, then their product commutes with `c`."]
theorem mul_left (hac : Commute a c) (hbc : Commute b c) : Commute (a * b) c

{S : Type u_3}
[Semigroup S]
{a b c : S}
(hac : Commute a c)
(hbc : Commute b c)


/-- The canonical isomorphism `(F ⋙ G).mapTriangle ≅ F.mapTriangle ⋙ G.mapTriangle`. -/
@[simps!]
def mapTriangleCompIso : (F ⋙ G).mapTriangle ≅ F.mapTriangle ⋙ G.mapTriangle

(X : CategoryTheory.Pretriangulated.Triangle C)

((F.mapTriangleCompIso G).inv.app X).hom₃ = CategoryTheory.CategoryStruct.id (G.obj (F.obj X.obj₃))


theorem integral_cexp_neg_mul_sq_norm_add_of_euclideanSpace
    {ι : Type*} [Fintype ι] (hb : 0 < b.re) (c : ℂ) (w : EuclideanSpace ℝ ι) :
    ∫ v : EuclideanSpace ℝ ι, cexp (- b * ‖v‖^2 + c * ⟪w, v⟫) =
      (π / b) ^ (Fintype.card ι / 2 : ℂ) * cexp (c ^ 2 * ‖w‖^2 / (4 * b))

{b : ℂ}
{ι : Type u_2}
[Fintype ι]
(hb : 0 < b.re)
(c : ℂ)
(w : EuclideanSpace ℝ ι)

∫ (v : EuclideanSpace ℝ ι), cexp (-b * ↑‖v‖ ^ 2 + c * ↑⟪w, v⟫_ℝ) =
  (↑π / b) ^ (↑(Fintype.card ι) / 2) * cexp (c ^ 2 * ↑‖w‖ ^ 2 / (4 * b))


@[simp] lemma unop_div [Div α] (a b : αᵃᵒᵖ) : unop (a / b) = unop a / unop b

AddOpposite.unop (a / b) = AddOpposite.unop a / AddOpposite.unop b


/-- The functor `RightExtension L F ⥤ RightExtension (G ⋙ L) (G ⋙ F)`
obtained by precomposition. -/
@[simps!]
def RightExtension.precomp : RightExtension L F ⥤ RightExtension (G ⋙ L) (G ⋙ F)

(X : CategoryTheory.Comma ((CategoryTheory.whiskeringLeft C D H).obj L) (CategoryTheory.Functor.fromPUnit F))

((CategoryTheory.Functor.RightExtension.precomp L F G).obj X).right = X.right


theorem Infinite.ne_zero {x : ℝ*} (hI : Infinite x) : x ≠ 0


@[simp] lemma injective_domRestrict_iff {f : M →ₛₗ[τ₁₂] M₂} {S : Submodule R M} :
    Injective (f.domRestrict S) ↔ S ⊓ LinearMap.ker f = ⊥

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_6}
{M₂ : Type u_8}
[Ring R]
[Ring R₂]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{f : M →ₛₗ[τ₁₂] M₂}
{S : Submodule R M}

Function.Injective ⇑(f.domRestrict S) ↔ S ⊓ LinearMap.ker f = ⊥


theorem drop_eq_getElem_cons {n} {l : List α} (h) : drop n l = l[n] :: drop (n + 1) l

{α : Type u_1}
{n : Nat}
{l : List α}
(h : n < l.length)

List.drop n l = l[n] :: List.drop (n + 1) l


@[simp]
theorem degree_zero : degree (0 : σ →₀ ℕ) = 0


theorem ceil_eq_on_Ioc' (z : ℤ) : ∀ a ∈ Set.Ioc (z - 1 : α) z, (⌈a⌉ : α) = z

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


theorem disjSups_subset_sups : s ○ t ⊆ s ⊻ t

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


/-- Submonoids of monoid `M` are isomorphic to additive submonoids of `Additive M`. -/
@[simps]
def Submonoid.toAddSubmonoid : Submonoid M ≃o AddSubmonoid (Additive M)

{M : Type u_1}
[MulOneClass M]
(S : AddSubmonoid (Additive M))

↑((RelIso.symm Submonoid.toAddSubmonoid) S) = ⇑Additive.ofMul ⁻¹' ↑S


theorem nth_count_eq_sInf (n : ℕ) : nth p (count p n) = sInf {i : ℕ | p i ∧ n ≤ i}

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

Nat.nth p (Nat.count p n) = sInf {i | p i ∧ n ≤ i}


theorem coeSubmodule_injective : Function.Injective (coeSubmodule K : Ideal R → Submodule R K)

(R : Type u_1)
[CommRing R]
(K : Type u_5)
[CommRing K]
[Algebra R K]
[IsFractionRing R K]


/-- If `μ` is a finite measure then `∫ x in a..b, c ∂μ = (μ (Iic b) - μ (Iic a)) • c`. -/
theorem integral_const_of_cdf [IsFiniteMeasure μ] (c : E) :
    ∫ _ in a..b, c ∂μ = ((μ (Iic b)).toReal - (μ (Iic a)).toReal) • c

{E : Type u_3}
[NormedAddCommGroup E]
[CompleteSpace E]
[NormedSpace ℝ E]
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
[MeasureTheory.IsFiniteMeasure μ]
(c : E)

∫ (x : ℝ) in a..b, c ∂μ = ((μ (Set.Iic b)).toReal - (μ (Set.Iic a)).toReal) • c


@[to_additive]
theorem prod_finset_product_right (r : Finset (α × γ)) (s : Finset γ) (t : γ → Finset α)
    (h : ∀ p : α × γ, p ∈ r ↔ p.2 ∈ s ∧ p.1 ∈ t p.2) {f : α × γ → β} :
    ∏ p ∈ r, f p = ∏ c ∈ s, ∏ a ∈ t c, f (a, c)

(h : ∀ (p : α × γ), p ∈ r ↔ p.2 ∈ s ∧ p.1 ∈ t p.2)

{f : α × γ → β}


/-- Isomorphism between `PUnit ∗ M` and `M`. -/
@[simps! (config := .asFn)]
def punitCoprod : PUnit ∗ M ≃* M

⇑(Monoid.MulEquiv.punitCoprod M).symm = ⇑Monoid.Coprod.inr


theorem map_apply_eq_iff_map_symm_apply_eq (e : α ≃ᵐ β) : μ.map e = ν ↔ ν.map e.symm = μ

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
(e : α ≃ᵐ β)

MeasureTheory.Measure.map (⇑e) μ = ν ↔ MeasureTheory.Measure.map (⇑e.symm) ν = μ


@[simp]
theorem rank_eq_rank_subalgebra : Module.rank K F.toSubalgebra = Module.rank K F

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

Module.rank K ↥F.toSubalgebra = Module.rank K ↥F


theorem lt_cof_type [IsWellOrder α r] {S : Set α} : #S < cof (type r) → Bounded r S

{α : Type u_1}
{r : α → α → Prop}
[IsWellOrder α r]
{S : Set α}

#↑S < (Ordinal.type r).cof → Set.Bounded r S


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

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

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

((CategoryTheory.MonoOver.lift F h).obj f).obj = F.obj ((CategoryTheory.MonoOver.forget Y).obj f)


theorem Ioi_mem_nhdsSet_Icc (h : a < b) : Ioi a ∈ 𝓝ˢ (Icc b c)

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{a b c : α}
(h : a < b)


@[to_additive (attr := simp)]
theorem map_equiv_top (f : M ≃* N) : (⊤ : Subsemigroup M).map (f : M →ₙ* N) = ⊤

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(f : M ≃+ N)


@[to_additive (attr := gcongr)]
lemma zpow_lt_zpow (ha : 1 < a) (h : m < n) : a ^ m < a ^ n

{α : Type u_1}
[OrderedAddCommGroup α]
{m n : ℤ}
{a : α}
(ha : 0 < a)
(h : m < n)


theorem strictMonoOn_mul_self [PosMulStrictMono α] [MulPosMono α] :
    StrictMonoOn (fun x : α => x * x) { x | 0 ≤ x }

{α : Type u}
[Semiring α]
[PartialOrder α]
[PosMulStrictMono α]
[MulPosMono α]

StrictMonoOn (fun x => x * x) {x | 0 ≤ x}


/-- A partial homeomorphism whose source is all of `X` defines an open embedding of `X` into `Y`.
The converse is also true; see `OpenEmbedding.toPartialHomeomorph`. -/
theorem to_openEmbedding (h : e.source = Set.univ) : OpenEmbedding e

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
(h : e.source = Set.univ)


/-- If a set is at finite Hausdorff edistance of a nonempty set, it is nonempty. -/
theorem nonempty_of_hausdorffEdist_ne_top (hs : s.Nonempty) (fin : hausdorffEdist s t ≠ ⊤) :
    t.Nonempty

{α : Type u}
[PseudoEMetricSpace α]
{s t : Set α}
(hs : s.Nonempty)
(fin : EMetric.hausdorffEdist s t ≠ ⊤)


/-- **Liouville's theorem**: a complex differentiable bounded function `f : E → F` is a constant. -/
theorem apply_eq_apply_of_bounded {f : E → F} (hf : Differentiable ℂ f) (hb : IsBounded (range f))
    (z w : E) : f z = f w

(hb : Bornology.IsBounded (Set.range f))


theorem assoc_flip :
    (A.X ◁ M.act) ≫ M.act = (α_ A.X A.X M.X).inv ≫ (A.mul ▷ M.X) ≫ M.act

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

A.X ◁ M.act ≫ M.act = (α_ A.X A.X M.X).inv ≫ A.mul ▷ M.X ≫ M.act


theorem tanh_ofReal_re (x : ℝ) : (tanh x).re = Real.tanh x


/-- Oh, monads are just monoids in the category of endofunctors (equivalence of categories). -/
@[simps]
def monadMonEquiv : Monad C ≌ Mon_ (C ⥤ C)

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

∀ (x : CategoryTheory.Monad C) (x_1 : C),
  ((CategoryTheory.Monad.monadMonEquiv C).unitIso.inv.app x).app x_1 =
    CategoryTheory.CategoryStruct.id
      ((((CategoryTheory.Monad.monadToMon C).comp (CategoryTheory.Monad.monToMonad C)).obj x).obj x_1)


theorem integral_exp_neg_rpow {p : ℝ} (hp : 0 < p) :
    ∫ x in Ioi (0 : ℝ), exp (- x ^ p) = Gamma (1 / p + 1)

∫ (x : ℝ) in Set.Ioi 0, rexp (-x ^ p) = Real.Gamma (1 / p + 1)


theorem IsOrtho.mono_left {U₁ U₂ V : Submodule 𝕜 E} (hU : U₂ ≤ U₁) (h : U₁ ⟂ V) : U₂ ⟂ V

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{U₁ U₂ V : Submodule 𝕜 E}
(hU : U₂ ≤ U₁)
(h : U₁ ⟂ V)


theorem circle_def : ↑circle = { z : ℂ | abs z = 1 }


theorem algebraMap_injective : Function.Injective (⇑(algebraMap Fq[X] (ringOfIntegers Fq F)))

(Fq F : Type)
[Field Fq]
[Field F]
[Algebra Fq[X] F]
[Algebra (RatFunc Fq) F]
[IsScalarTower Fq[X] (RatFunc Fq) F]

Function.Injective ⇑(algebraMap Fq[X] ↥(FunctionField.ringOfIntegers Fq F))


theorem sin_sq : sin x ^ 2 = 1 - cos x ^ 2

Complex.sin x ^ 2 = 1 - Complex.cos x ^ 2


@[to_additive (attr := simp)]
theorem toTopologicalSpace_bot : (⊥ : GroupTopology α).toTopologicalSpace = ⊥


@[simp]
theorem coe_smul_linearMap (r : S) (D : LieDerivation R L M) : ↑(r • D) = r • (D : L →ₗ[R] M)

[LieDerivation.SMulBracketCommClass S L M]


lemma isZero₃_iff : IsZero T.obj₃ ↔ (T.mor₂ = 0 ∧ T.mor₃ = 0)

[∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive]

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

CategoryTheory.Limits.IsZero T.obj₃ ↔ T.mor₂ = 0 ∧ T.mor₃ = 0


@[simp]
theorem self_modEq_zero : p ≡ 0 [PMOD p]


@[to_additive addIndex_union_eq]
theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty)
    (h : Disjoint (K₁.1 * V⁻¹) (K₂.1 * V⁻¹)) :
    index (K₁.1 ∪ K₂.1) V = index K₁.1 V + index K₂.1 V

(h : Disjoint (K₁.carrier + -V) (K₂.carrier + -V))

MeasureTheory.Measure.haar.addIndex (K₁.carrier ∪ K₂.carrier) V =
  MeasureTheory.Measure.haar.addIndex K₁.carrier V + MeasureTheory.Measure.haar.addIndex K₂.carrier V


@[to_additive (attr := simp)]
theorem div_left_inj : b / a = c / a ↔ b = c


@[to_additive]
theorem nhds_translation_div (x : G) : comap (· / x) (𝓝 1) = 𝓝 x

{G : Type w}
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
(x : G)

Filter.comap (fun x_1 => x_1 - x) (𝓝 0) = 𝓝 x


theorem moveLeft_nim_hEq (o : Ordinal) :
    have : IsWellOrder (Quotient.out o).α (· < ·) := inferInstance
    HEq (nim o).moveLeft fun i : o.out.α => nim (typein (· < ·) i)

let_fun this := ⋯;
HEq (SetTheory.PGame.nim o).moveLeft fun i => SetTheory.PGame.nim (Ordinal.typein (fun x x_1 => x < x_1) i)


theorem add_lf_add_right : ∀ {b c : Game} (_ : b ⧏ c) (a), (b + a : Game) ⧏ c + a

b.LF c → ∀ (a : SetTheory.Game), (b + a).LF (c + a)


@[simp]
theorem coe_top : ((⊤ : NonUnitalSubsemiring R) : Set R) = Set.univ

{R : Type u}
[NonUnitalNonAssocSemiring R]


protected theorem div_eq_iff_eq_mul_right {a b c : Int}
    (H : b ≠ 0) (H' : b ∣ a) : a.div b = c ↔ a = b * c


theorem card_support_swap_mul {f : Perm α} {x : α} (hx : f x ≠ x) :
    (swap x (f x) * f).support.card < f.support.card

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{f : Equiv.Perm α}
{x : α}
(hx : f x ≠ x)

(Equiv.swap x (f x) * f).support.card < f.support.card


/-- The right homology map data associated to the identity morphism of a short complex. -/
@[simps]
def id (h : S.RightHomologyData) : RightHomologyMapData (𝟙 S) h h

(CategoryTheory.ShortComplex.RightHomologyMapData.id h).φH = CategoryTheory.CategoryStruct.id h.H


@[simp]
theorem rotate_length_mul (l : List α) (n : ℕ) : l.rotate (l.length * n) = l


@[to_additive (attr := simp)]
theorem mem_orbit_self (a : α) : a ∈ orbit M a

{M : Type u}
[AddMonoid M]
{α : Type v}
[AddAction M α]
(a : α)


/-- If a set `s` does not contain any triple of elements `x < y < z`, then `s` is finite. -/
lemma Set.finite_of_forall_not_lt_lt (h : ∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ s, x < y → y < z → False) :
    Set.Finite s


/-- We say that there exists an absolute left Kan extension of `g` along `f` if any 1-morphism `h`
commutes with the left Kan extension `f⁺ g`. -/
class HasAbsLeftKanExtension (f : a ⟶ b) (g : a ⟶ c) extends HasLeftKanExtension f g : Prop where
  commute {x : B} (h : c ⟶ x) : Lan.CommuteWith f g h

[self : CategoryTheory.Bicategory.HasAbsLeftKanExtension f g]

CategoryTheory.Bicategory.Lan.CommuteWith f g h


theorem card_le_one_iff_subsingleton : card α ≤ 1 ↔ Subsingleton α


@[simp]
theorem comp_id_left (B : BilinForm R M) (r : M →ₗ[R] M) :
    B.comp LinearMap.id r = B.compRight r

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(B : LinearMap.BilinForm R M)
(r : M →ₗ[R] M)


theorem of_surjective [hM : Finite R M] (f : M →ₗ[R] N) (hf : Surjective f) : Finite R N

{R : Type u_1}
{M : Type u_4}
{N : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
[hM : Module.Finite R M]
(f : M →ₗ[R] N)
(hf : Function.Surjective ⇑f)


theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn 𝕜 (fun _ => v) s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{v : F}
{s : Set E}


@[simp]
theorem iterToSum_X (b : S₁) : iterToSum R S₁ S₂ (X b) = X (Sum.inl b)

(R : Type u)
(S₁ : Type v)
(S₂ : Type w)
[CommSemiring R]
(b : S₁)

(MvPolynomial.iterToSum R S₁ S₂) (MvPolynomial.X b) = MvPolynomial.X (Sum.inl b)


/-- If a function `f` on `β × γ` has product `a` and for each `b` the restriction of `f` to
`{b} × γ` has product `g b`, then the function `g` has product `a`. -/
@[to_additive HasSum.prod_fiberwise "If a series `f` on `β × γ` has sum `a` and for each `b` the
restriction of `f` to `{b} × γ` has sum `g b`, then the series `g` has sum `a`."]
theorem HasProd.prod_fiberwise {f : β × γ → α} {g : β → α} {a : α} (ha : HasProd f a)
    (hf : ∀ b, HasProd (fun c ↦ f (b, c)) (g b)) : HasProd g a

{f : β × γ → α}

(hf : ∀ (b : β), HasSum (fun c => f (b, c)) (g b))


/-- Given `w : TwoSquare T L R B` and a morphism `g : R.obj X₂ ⟶ B.obj X₃`, this is
the obvious equivalence of categories
`w.StructuredArrowRightwards g ≌ w.CostructuredArrowDownwards g`. -/
@[simps functor inverse unitIso counitIso]
def equivalenceJ : w.StructuredArrowRightwards g ≌ w.CostructuredArrowDownwards g

{C₁ : Type u₁}
{C₂ : Type u₂}
{C₃ : Type u₃}
{C₄ : Type u₄}
[CategoryTheory.Category.{v₁, u₁} C₁]
[CategoryTheory.Category.{v₂, u₂} C₂]
[CategoryTheory.Category.{v₃, u₃} C₃]
[CategoryTheory.Category.{v₄, u₄} C₄]
{T : CategoryTheory.Functor C₁ C₂}
{L : CategoryTheory.Functor C₁ C₃}
{R : CategoryTheory.Functor C₂ C₄}
{B : CategoryTheory.Functor C₃ C₄}
(w : CategoryTheory.TwoSquare T L R B)
{X₂ : C₂}
{X₃ : C₃}
(g : R.obj X₂ ⟶ B.obj X₃)

(w.equivalenceJ g).counitIso =
  CategoryTheory.Iso.refl
    ((CategoryTheory.TwoSquare.EquivalenceJ.inverse w g).comp (CategoryTheory.TwoSquare.EquivalenceJ.functor w g))


@[simp]
theorem filter_lt (n m l : ℕ) :
    ((Ico n m).filter fun x => x < l) = Ico n (min m l)

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


@[simp]
theorem one_toGame : toGame 1 = 1


theorem exists_prod_multiset_X_sub_C_mul (p : R[X]) :
    ∃ q,
      (p.roots.map fun a => X - C a).prod * q = p ∧
        Multiset.card p.roots + q.natDegree = p.natDegree ∧ q.roots = 0

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

∃ q,
  (Multiset.map (fun a => Polynomial.X - Polynomial.C a) p.roots).prod * q = p ∧
    Multiset.card p.roots + q.natDegree = p.natDegree ∧ q.roots = 0


theorem natAbs_eq_iff_mul_self_eq {a b : ℤ} : a.natAbs = b.natAbs ↔ a * a = b * b


theorem neg_def (a : Fin n) : -a = ⟨(n - a) % n, Nat.mod_lt _ a.pos⟩


/-- The sine of the sum of two angles in a possibly degenerate
triangle (where two given sides are nonzero), vector angle form. -/
theorem sin_angle_sub_add_angle_sub_rev_eq_sin_angle {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    Real.sin (angle x (x - y) + angle y (y - x)) = Real.sin (angle x y)

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}
(hx : x ≠ 0)
(hy : y ≠ 0)

Real.sin (InnerProductGeometry.angle x (x - y) + InnerProductGeometry.angle y (y - x)) =
  Real.sin (InnerProductGeometry.angle x y)


@[simp] theorem cast_eq {n : Nat} (h : n = n) (x : BitVec n) : cast h x = x


/-- **Vertical Angles Theorem**: angles opposite each other, formed by two intersecting straight
lines, are equal. -/
theorem angle_eq_angle_of_angle_eq_pi_of_angle_eq_pi {p1 p2 p3 p4 p5 : P} (hapc : ∠ p1 p5 p3 = π)
    (hbpd : ∠ p2 p5 p4 = π) : ∠ p1 p5 p2 = ∠ p3 p5 p4

(hapc : EuclideanGeometry.angle p1 p5 p3 = π)

(hbpd : EuclideanGeometry.angle p2 p5 p4 = π)

EuclideanGeometry.angle p1 p5 p2 = EuclideanGeometry.angle p3 p5 p4


/-- If `F` and `G` are naturally isomorphic functors, then they have equivalent categories of
cones.
-/
@[simps]
def postcomposeEquivalence {G : J ⥤ C} (α : F ≅ G) : Cone F ≌ Cone G

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

(CategoryTheory.Limits.Cones.postcomposeEquivalence α).unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun s => CategoryTheory.Limits.Cones.ext (CategoryTheory.Iso.refl ((𝟭 (CategoryTheory.Limits.Cone F)).obj s).pt) ⋯)
    ⋯


@[simp]
theorem id_obj (X : C) : (𝟭 C).obj X = X

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


/-- Translating a function by left-multiplication does not change its integral with respect to a
left-invariant measure. -/
@[to_additive
      "Translating a function by left-addition does not change its integral with respect to a
      left-invariant measure."] -- Porting note: was `@[simp]`
theorem integral_mul_left_eq_self [IsMulLeftInvariant μ] (f : G → E) (g : G) :
    (∫ x, f (g * x) ∂μ) = ∫ x, f x ∂μ

{G : Type u_4}
{E : Type u_5}
[MeasurableSpace G]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure G}
[Group G]
[MeasurableMul G]
[μ.IsMulLeftInvariant]
(f : G → E)
(g : G)

∫ (x : G), f (g * x) ∂μ = ∫ (x : G), f x ∂μ


@[simp]
theorem restrict_sum_of_countable [Countable ι] (μ : ι → Measure α) (s : Set α) :
    (sum μ).restrict s = sum fun i => (μ i).restrict s

{α : Type u_2}
{ι : Type u_6}
{m0 : MeasurableSpace α}
[Countable ι]
(μ : ι → MeasureTheory.Measure α)
(s : Set α)

(MeasureTheory.Measure.sum μ).restrict s = MeasureTheory.Measure.sum fun i => (μ i).restrict s


/-- `f` is homotopic to `g` iff `g` is homotopic to `f`. -/
@[simps!, symm]
def symm {f g : C ⟶ D} (h : Homotopy f g) : Homotopy g f

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
{f g : C ⟶ D}
(h : Homotopy f g)
(i j : ι)


/-- A version of the global `continuous_inv` suitable for dot notation. -/
@[to_additive "A version of the global `continuous_neg` suitable for dot notation."]
theorem continuous_inv' (g : GroupTopology α) :
    haveI := g.toTopologicalSpace
    Continuous (Inv.inv : α → α)

{α : Type u}
[AddGroup α]
(g : AddGroupTopology α)


theorem image_update_Ico_left (f : ∀ i, α i) (i : ι) (a : α i) :
    update f i '' Ico a (f i) = Ico (update f i a) f

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → PartialOrder (α i)]
(f : (i : ι) → α i)
(i : ι)
(a : α i)

Function.update f i '' Set.Ico a (f i) = Set.Ico (Function.update f i a) f


@[to_additive]
theorem prod_mul_tprod_compl {s : Finset β} (hf : Multipliable f) :
    (∏ x ∈ s, f x) * ∏' x : ↑(s : Set β)ᶜ, f x = ∏' x, f x

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[TopologicalSpace α]
[TopologicalGroup α]
{f : β → α}
[T2Space α]
{s : Finset β}
(hf : Multipliable f)

(∏ x ∈ s, f x) * ∏' (x : ↑(↑s)ᶜ), f ↑x = ∏' (x : β), f x


/-- In the model space, the identity is in any maximal atlas. -/
theorem StructureGroupoid.id_mem_maximalAtlas : PartialHomeomorph.refl H ∈ G.maximalAtlas H

{H : Type u}
[TopologicalSpace H]
(G : StructureGroupoid H)

PartialHomeomorph.refl H ∈ StructureGroupoid.maximalAtlas H G


lemma finrank_maxGenEigenspace (φ : Module.End K M) :
    finrank K (φ.maxGenEigenspace 0) = natTrailingDegree (φ.charpoly)

{K : Type u_2}
{M : Type u_3}
[Field K]
[AddCommGroup M]
[Module K M]
[Module.Finite K M]
(φ : Module.End K M)

FiniteDimensional.finrank K ↥(φ.maxGenEigenspace 0) = (LinearMap.charpoly φ).natTrailingDegree


lemma IsSemisimple_smul (t : K) (h : f.IsSemisimple) :
    (t • f).IsSemisimple

{M : Type u_2}
[AddCommGroup M]
{K : Type u_3}
[Field K]
[Module K M]
{f : Module.End K M}
(t : K)
(h : f.IsSemisimple)


/-- The left inverse to a formal multilinear series is indeed a left inverse, provided its linear
term is invertible. -/
theorem leftInv_comp (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F)
    (h : p 1 = (continuousMultilinearCurryFin1 𝕜 E F).symm i) : (leftInv p i).comp p = id 𝕜 E

(h : p 1 = (continuousMultilinearCurryFin1 𝕜 E F).symm ↑i)

(p.leftInv i).comp p = FormalMultilinearSeries.id 𝕜 E


/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear:
`‖D^n (x ↦ B (f x) (g x))‖ ≤ ‖B‖ ∑_{k ≤ n} n.choose k ‖D^k f‖ ‖D^{n-k} g‖` -/
theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear (B : E →L[𝕜] F →L[𝕜] G)
    {f : D → E} {g : D → F} {N : ℕ∞} {s : Set D} {x : D} (hf : ContDiffOn 𝕜 N f s)
    (hg : ContDiffOn 𝕜 N g s) (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) {n : ℕ} (hn : (n : ℕ∞) ≤ N) :
    ‖iteratedFDerivWithin 𝕜 n (fun y => B (f y) (g y)) s x‖ ≤
      ‖B‖ * ∑ i ∈ Finset.range (n + 1), (n.choose i : ℝ) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *
        ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{D : Type uD}
[NormedAddCommGroup D]
[NormedSpace 𝕜 D]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(B : E →L[𝕜] F →L[𝕜] G)
{f : D → E}
{g : D → F}
{N : ℕ∞}
{s : Set D}
{x : D}
(hf : ContDiffOn 𝕜 N f s)
(hg : ContDiffOn 𝕜 N g s)
(hs : UniqueDiffOn 𝕜 s)
(hx : x ∈ s)
{n : ℕ}
(hn : ↑n ≤ N)

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


@[simp]
theorem frontier_Ioo {a b : α} (h : a < b) : frontier (Ioo a b) = {a, b}

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
{a b : α}
(h : a < b)


/--
If `M` is a finitely presented module over a local ring `(R, 𝔪)` such that `m ⊗ M → M` is
injective, then `M` is free.
-/
theorem free_of_maximalIdeal_rTensor_injective [Module.FinitePresentation R M]
    (H : Function.Injective ((𝔪).subtype.rTensor M)) :
    Module.Free R M

(H : Function.Injective ⇑(LinearMap.rTensor M (Submodule.subtype (LocalRing.maximalIdeal R))))


lemma ContinuousOn.finset_sup'_apply (hne : s.Nonempty) (hs : ∀ i ∈ s, ContinuousOn (f i) t) :
    ContinuousOn (fun a ↦ s.sup' hne (f · a)) t

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeSup L]
[ContinuousSup L]
{s : Finset ι}
{f : ι → X → L}
{t : Set X}
(hne : s.Nonempty)
(hs : ∀ i ∈ s, ContinuousOn (f i) t)

ContinuousOn (fun a => s.sup' hne fun x => f x a) t


@[simp]
theorem map_pair_eq (f : α → β) (x y : α) : map f s(x, y) = s(f x, f y)

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


@[simp]
theorem measurableSpace_const (f : Filtration ι m) (i : ι) :
    (isStoppingTime_const f i).measurableSpace = f i

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
(f : MeasureTheory.Filtration ι m)
(i : ι)


@[to_additive]
theorem coe_smul [Group G] [MulAction G β] (g : G) (f : α ↪ β) : ⇑(g • f) = g • ⇑f

{G : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Group G]
[MulAction G β]
(g : G)
(f : α ↪ β)


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

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

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


theorem order_smul_not_lt [Zero Γ] (r : R) (x : HahnSeries Γ V) (h : r • x ≠ 0) :
    ¬ (r • x).order < x.order

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
{V : Type u_3}
[Zero V]
[SMulZeroClass R V]
[Zero Γ]
(r : R)
(x : HahnSeries Γ V)
(h : r • x ≠ 0)


/-- Since the definition of `BoxIntegral.Prepartition.compl` uses `Exists.choose`,
the result depends only on `π.iUnion`. -/
theorem compl_congr {π₁ π₂ : Prepartition I} (h : π₁.iUnion = π₂.iUnion) : π₁.compl = π₂.compl

{ι : Type u_1}
{I : BoxIntegral.Box ι}
[Finite ι]
{π₁ π₂ : BoxIntegral.Prepartition I}
(h : π₁.iUnion = π₂.iUnion)


/-- Linear independent families are injective, even if you multiply either side. -/
theorem LinearIndependent.eq_of_smul_apply_eq_smul_apply {M : Type*} [AddCommGroup M] [Module R M]
    {v : ι → M} (li : LinearIndependent R v) (c d : R) (i j : ι) (hc : c ≠ 0)
    (h : c • v i = d • v j) : i = j

{ι : Type u'}
{R : Type u_2}
[Ring R]
{M : Type u_8}
[AddCommGroup M]
[Module R M]
{v : ι → M}
(li : LinearIndependent R v)
(c d : R)
(i j : ι)
(hc : c ≠ 0)
(h : c • v i = d • v j)


/-- If `f : X → Y` is continuous and `Y` is equipped with the Borel sigma algebra, then
(weak) convergence of `FiniteMeasure`s on `X` implies (weak) convergence of the push-forwards
of these measures by `f`. -/
lemma tendsto_map_of_tendsto_of_continuous {ι : Type*} {L : Filter ι}
    (νs : ι → FiniteMeasure Ω) (ν : FiniteMeasure Ω) (lim : Tendsto νs L (𝓝 ν))
    {f : Ω → Ω'} (f_cont : Continuous f) :
    Tendsto (fun i ↦ (νs i).map f) L (𝓝 (ν.map f))

(νs : ι → MeasureTheory.FiniteMeasure Ω)

Filter.Tendsto (fun i => (νs i).map f) L (𝓝 (ν.map f))


theorem stdBasis_eq_single {a : R} :
    (fun i : ι => (stdBasis R (fun _ : ι => R) i) a) = fun i : ι => ↑(Finsupp.single i a)

(R : Type u_1)
{ι : Type u_2}
[Semiring R]
[DecidableEq ι]
{a : R}

(fun i => (LinearMap.stdBasis R (fun x => R) i) a) = fun i => ⇑(Finsupp.single i a)


theorem cycleOf_inv (f : Perm α) [DecidableRel f.SameCycle] (x : α) :
    (cycleOf f x)⁻¹ = cycleOf f⁻¹ x

{α : Type u_2}
(f : Equiv.Perm α)
[DecidableRel f.SameCycle]
(x : α)


/-- **Ptolemy’s Theorem**. -/
theorem mul_dist_add_mul_dist_eq_mul_dist_of_cospherical {a b c d p : P}
    (h : Cospherical ({a, b, c, d} : Set P)) (hapc : ∠ a p c = π) (hbpd : ∠ b p d = π) :
    dist a b * dist c d + dist b c * dist d a = dist a c * dist b d

(h : EuclideanGeometry.Cospherical {a, b, c, d})


theorem translationNumber_eq_int_iff (hf : Continuous f) {m : ℤ} :
    τ f = m ↔ ∃ x : ℝ, f x = x + m

(f : CircleDeg1Lift)
(hf : Continuous ⇑f)
{m : ℤ}

f.translationNumber = ↑m ↔ ∃ x, f x = x + ↑m


@[simp]
theorem degree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.toPoly.degree = 2

{R : Type u_1}
{P : Cubic R}
[Semiring R]
(ha : P.a = 0)
(hb : P.b ≠ 0)


@[to_additive]
theorem le_op_iff {S₁ : Submonoid Mᵐᵒᵖ} {S₂ : Submonoid M} : S₁ ≤ S₂.op ↔ S₁.unop ≤ S₂

{M : Type u_2}
[MulOneClass M]
{S₁ : Submonoid Mᵐᵒᵖ}
{S₂ : Submonoid M}