Skip to content

Commit 8d815fe

Browse files
Merge master into nightly-testing
2 parents 90a22ed + e2361c1 commit 8d815fe

6 files changed

Lines changed: 148 additions & 8 deletions

File tree

Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ lemma tendsto_rpow_atBot_of_base_lt_one (b : ℝ) (hb₀ : 0 < b) (hb₁ : b < 1
8181
refine tendsto_exp_atTop.comp <| (tendsto_const_mul_atTop_iff_neg <| tendsto_id (α := ℝ)).mpr ?_
8282
exact (log_neg_iff hb₀).mpr hb₁
8383

84+
lemma tendsto_rpow_atTop_of_base_gt_one (b : ℝ) (hb : 1 < b) :
85+
Tendsto (b ^ · : ℝ → ℝ) atTop atTop := by
86+
simp_rw [Real.rpow_def_of_pos (by positivity : 0 < b)]
87+
refine tendsto_exp_atTop.comp <| (tendsto_const_mul_atTop_iff_pos <| tendsto_id (α := ℝ)).mpr ?_
88+
exact log_pos hb
89+
8490
lemma tendsto_rpow_atBot_of_base_gt_one (b : ℝ) (hb : 1 < b) :
8591
Tendsto (b ^ · : ℝ → ℝ) atBot (𝓝 0) := by
8692
simp_rw [Real.rpow_def_of_pos (by positivity : 0 < b)]

Mathlib/CategoryTheory/Bicategory/Adjunction/Basic.lean

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/-
22
Copyright (c) 2023 Yuma Mizuno. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Yuma Mizuno
4+
Authors: Yuma Mizuno, Fernando Chu
55
-/
66
module
77

8+
public import Mathlib.CategoryTheory.Bicategory.Functor.Pseudofunctor
9+
public import Mathlib.CategoryTheory.Bicategory.Functor.StrictPseudofunctor
810
public import Mathlib.Tactic.CategoryTheory.Bicategory.Basic
911
public import Mathlib.Tactic.CategoryTheory.BicategoricalComp
1012

@@ -22,6 +24,9 @@ identities. The 2-morphism `η` is called the unit and `ε` is called the counit
2224
* `Bicategory.Equivalence.mkOfAdjointifyCounit`: construct an adjoint equivalence from
2325
2-isomorphisms
2426
`η : 𝟙 a ≅ f ≫ g` and `ε : g ≫ f ≅ 𝟙 b`, by upgrading `ε` to a counit.
27+
* `Pseudofunctor.mapAdjunction`: a pseudofunctor `F` carries an adjunction `f ⊣ g`
28+
between 1-morphisms to an adjunction `F.map f ⊣ F.map g`. An analogous definition is given
29+
for `StrictPseudofunctor`.
2530
2631
## TODO
2732
@@ -34,15 +39,14 @@ identities. The 2-morphism `η` is called the unit and `ε` is called the counit
3439

3540
namespace CategoryTheory
3641

37-
namespace Bicategory
38-
39-
open Category
42+
open Category Bicategory
4043

41-
open scoped Bicategory
44+
universe w₁ w₂ v₁ v₂ u₁ u₂
4245

43-
universe w v u
46+
variable {B : Type u₁} [Bicategory.{w₁, v₁} B] {C : Type u₂} [Bicategory.{w₂, v₂} C]
47+
{a b c : B} {f : a ⟶ b} {g : b ⟶ a}
4448

45-
variable {B : Type u} [Bicategory.{w, v} B] {a b c : B} {f : a ⟶ b} {g : b ⟶ a}
49+
namespace Bicategory
4650

4751
/-- The 2-morphism defined by the following pasting diagram:
4852
```
@@ -341,4 +345,55 @@ end
341345

342346
end Bicategory
343347

348+
namespace Pseudofunctor
349+
350+
variable (F : Pseudofunctor B C) (adj : f ⊣ g)
351+
352+
lemma leftZigzag_map :
353+
leftZigzag ((F.mapId a).inv ≫ F.map₂ adj.unit ≫ (F.mapComp f g).hom)
354+
((F.mapComp g f).inv ≫ F.map₂ adj.counit ≫ (F.mapId b).hom) =
355+
(F.mapId a).inv ▷ F.map f ⊗≫ (F.mapComp (𝟙 a) f).inv ≫
356+
F.map₂ (leftZigzag adj.unit adj.counit) ≫
357+
(F.mapComp f (𝟙 b)).hom ⊗≫ F.map f ◁ (F.mapId b).hom := by
358+
simp [leftZigzag, bicategoricalComp]
359+
360+
lemma rightZigzag_map :
361+
rightZigzag ((F.mapId a).inv ≫ F.map₂ adj.unit ≫ (F.mapComp f g).hom)
362+
((F.mapComp g f).inv ≫ F.map₂ adj.counit ≫ (F.mapId b).hom) =
363+
F.map g ◁ (F.mapId a).inv ⊗≫ (F.mapComp g (𝟙 a)).inv ≫
364+
F.map₂ (rightZigzag adj.unit adj.counit) ≫
365+
(F.mapComp (𝟙 b) g).hom ⊗≫ (F.mapId b).hom ▷ F.map g := by
366+
simp [rightZigzag, bicategoricalComp, F.map₂_iso_inv]
367+
368+
/-- A pseudofunctor carries an adjunction `f ⊣ g` to an adjunction `F.map f ⊣ F.map g`. -/
369+
@[simps]
370+
def mapAdjunction : F.map f ⊣ F.map g where
371+
unit := (F.mapId a).inv ≫ F.map₂ adj.unit ≫ (F.mapComp f g).hom
372+
counit := (F.mapComp g f).inv ≫ F.map₂ adj.counit ≫ (F.mapId b).hom
373+
left_triangle := by simp [leftZigzag_map, bicategoricalComp, F.map₂_iso_inv]
374+
right_triangle := by simp [rightZigzag_map, bicategoricalComp, F.map₂_iso_inv]
375+
376+
end Pseudofunctor
377+
378+
namespace StrictPseudofunctor
379+
380+
variable (F : StrictPseudofunctor B C) (adj : f ⊣ g)
381+
382+
/-- A strict pseudofunctor carries an adjunction `f ⊣ g` to an adjunction
383+
`F.map f ⊣ F.map g`. -/
384+
@[simps!]
385+
def mapAdjunction : F.map f ⊣ F.map g := F.toPseudofunctor.mapAdjunction adj
386+
387+
lemma mapAdjunction_unit' :
388+
(F.mapAdjunction adj).unit =
389+
eqToHom (F.map_id a).symm ≫ F.map₂ adj.unit ≫ eqToHom (F.map_comp f g) := by
390+
simp [F.mapId_eq_eqToIso, F.mapComp_eq_eqToIso]
391+
392+
lemma mapAdjunction_counit' :
393+
(F.mapAdjunction adj).counit =
394+
eqToHom (F.map_comp g f).symm ≫ F.map₂ adj.counit ≫ eqToHom (F.map_id b) := by
395+
simp [F.mapId_eq_eqToIso, F.mapComp_eq_eqToIso]
396+
397+
end StrictPseudofunctor
398+
344399
end CategoryTheory

Mathlib/CategoryTheory/Bicategory/Functor/Prelax.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ lemma map₂_inv {f g : a ⟶ b} (η : f ⟶ g) [IsIso η] : F.map₂ (inv η) =
175175
apply IsIso.eq_inv_of_hom_inv_id
176176
simp [← F.map₂_comp η (inv η)]
177177

178+
lemma map₂_iso_inv {f g : a ⟶ b} (η : f ≅ g) :
179+
F.map₂ η.inv = inv (F.map₂ η.hom) := by
180+
rw [← F.map₂_inv, IsIso.Iso.inv_hom]
181+
178182
@[reassoc, simp]
179183
lemma map₂_hom_inv {f g : a ⟶ b} (η : f ≅ g) :
180184
F.map₂ η.hom ≫ F.map₂ η.inv = 𝟙 (F.map f) := by

Mathlib/Data/Finsupp/Weight.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ theorem finite_of_nat_weight_le [Finite σ] (w : σ → ℕ) (hw : ∀ x, w x
200200
grw [← le_weight _ (hw x)] at hd
201201
simp [*]
202202

203+
theorem finite_of_nat_weight_lt [Finite σ] (w : σ → ℕ) (hw : ∀ x, w x ≠ 0) (n : ℕ) :
204+
{d : σ →₀ ℕ | weight w d < n}.Finite :=
205+
Set.Finite.subset (finite_of_nat_weight_le w hw n) (by grind)
206+
207+
theorem finite_of_nat_weight_eq [Finite σ] (w : σ → ℕ) (hw : ∀ x, w x ≠ 0) (n : ℕ) :
208+
{d : σ →₀ ℕ | weight w d = n}.Finite :=
209+
Set.Finite.subset (finite_of_nat_weight_le w hw n) (by grind)
210+
203211
end CanonicallyOrderedAddCommMonoid
204212

205213
variable {R : Type*} [AddCommMonoid R]
@@ -257,6 +265,9 @@ theorem finite_of_degree_le [Finite σ] (n : ℕ) :
257265
lemma finite_of_degree_lt [Finite σ] (n : ℕ) : {f : σ →₀ ℕ | degree f < n}.Finite :=
258266
Set.Finite.subset (finite_of_degree_le n) (by grind)
259267

268+
lemma finite_of_degree_eq [Finite σ] (n : ℕ) : {f : σ →₀ ℕ | f.degree = n}.Finite :=
269+
Set.Finite.subset (finite_of_degree_le n) (by grind)
270+
260271
lemma range_single_one :
261272
Set.range (fun a : σ ↦ Finsupp.single a 1) = { d | d.degree = 1 } := by
262273
refine subset_antisymm ?_ ?_

Mathlib/RingTheory/MvPolynomial/Homogeneous.lean

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ theorem homogeneousSubmodule_eq_finsupp_supported (n : ℕ) :
109109
simp_rw [degree_eq_weight_one]
110110
exact weightedHomogeneousSubmodule_eq_finsupp_supported R 1 n
111111

112+
lemma homogeneousSubmodule_fg [Finite σ] (n : ℕ) :
113+
(homogeneousSubmodule σ R n).FG :=
114+
weightedHomogeneousSubmodule_fg R (1 : σ → ℕ) (by simp) n
115+
112116
variable {σ R}
113117

114118
set_option backward.isDefEq.respectTransparency false in
@@ -165,6 +169,10 @@ theorem isHomogeneous_zero (n : ℕ) : IsHomogeneous (0 : MvPolynomial σ R) n :
165169
theorem isHomogeneous_one : IsHomogeneous (1 : MvPolynomial σ R) 0 :=
166170
isHomogeneous_C _ _
167171

172+
lemma isHomogeneous_of_isEmpty [IsEmpty σ] (f : MvPolynomial σ R) : f.IsHomogeneous 0 := by
173+
rw [eq_C_of_isEmpty f]
174+
exact isHomogeneous_C _ _
175+
168176
variable {σ}
169177

170178
theorem isHomogeneous_X (i : σ) : IsHomogeneous (X i : MvPolynomial σ R) 1 := by
@@ -565,11 +573,26 @@ theorem homogeneousComponent_of_mem {m n : ℕ} {p : MvPolynomial σ R}
565573
homogeneousComponent m p = if m = n then p else 0 :=
566574
weightedHomogeneousComponent_of_mem h
567575

576+
lemma homogeneousComponent_eq_self {n : ℕ} {p : MvPolynomial σ R}
577+
(hp : p.IsHomogeneous n) : homogeneousComponent n p = p := by
578+
simp [homogeneousComponent_of_mem hp]
579+
568580
lemma support_homogeneousComponent (n : ℕ) (p : MvPolynomial σ R) :
569581
(homogeneousComponent n p).support = {c ∈ p.support | c.degree = n} := by
570582
rw [degree_eq_weight_one]
571583
exact support_weightedHomogeneousComponent n p
572584

585+
lemma rename_homogeneousComponent {τ : Type*} {φ : σ → τ} (n : ℕ) (p : MvPolynomial σ R) :
586+
rename φ (homogeneousComponent n p) = homogeneousComponent n (rename φ p) := by
587+
induction p using MvPolynomial.induction_on' with
588+
| monomial d c =>
589+
rw [rename_monomial,
590+
homogeneousComponent_of_mem (isHomogeneous_monomial c rfl),
591+
homogeneousComponent_of_mem (isHomogeneous_monomial c (Finsupp.degree_mapDomain φ d))]
592+
split_ifs <;> simp [rename_monomial]
593+
| add p q hp hq => simp [map_add, hp, hq]
594+
595+
573596
end HomogeneousComponent
574597

575598
end
@@ -607,6 +630,18 @@ theorem decomposition.decompose'_eq :
607630
rw [degree_eq_weight_one]
608631
rfl
609632

633+
attribute [local instance] MvPolynomial.gradedAlgebra
634+
635+
lemma mem_iff_homogeneousComponent_mem {I : Ideal (MvPolynomial σ R)}
636+
(h : I.IsHomogeneous (homogeneousSubmodule σ R)) (p : MvPolynomial σ R) :
637+
p ∈ I ↔ ∀ n, (homogeneousComponent n p) ∈ I :=
638+
mem_iff_weightedHomogeneousComponent_mem R (1 : σ → ℕ) h p
639+
640+
lemma homogeneousComponent_mem_of_mem {I : Ideal (MvPolynomial σ R)}
641+
(h : I.IsHomogeneous (homogeneousSubmodule σ R)) {p : MvPolynomial σ R} (hp : p ∈ I) (n : ℕ) :
642+
(homogeneousComponent n p) ∈ I :=
643+
weightedHomogeneousComponent_mem_of_mem R (1 : σ → ℕ) h hp n
644+
610645
end GradedAlgebra
611646

612647
end MvPolynomial

Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public import Mathlib.Algebra.GradedMonoid
1111
public import Mathlib.Algebra.MvPolynomial.Basic
1212
public import Mathlib.Algebra.Order.Monoid.Canonical.Defs
1313
public import Mathlib.Data.Finsupp.Weight
14-
public import Mathlib.RingTheory.GradedAlgebra.Basic
14+
public import Mathlib.RingTheory.GradedAlgebra.Homogeneous.Ideal
15+
public import Mathlib.RingTheory.MvPolynomial.Basic
1516
public import Mathlib.Tactic.Order
1617

1718
/-!
@@ -161,6 +162,12 @@ theorem weightedHomogeneousSubmodule_eq_finsupp_supported (w : σ → M) (m : M)
161162
simp [IsWeightedHomogeneous]
162163
simp [AddMonoidAlgebra.mem_supported, Set.subset_def, MvPolynomial, coeff]
163164

165+
lemma weightedHomogeneousSubmodule_fg [Finite σ] (w : σ → ℕ) (hw : ∀ (x : σ), w x ≠ 0) (n : ℕ) :
166+
(weightedHomogeneousSubmodule R w n).FG := by
167+
rw [weightedHomogeneousSubmodule_eq_finsupp_supported, ← Module.Finite.iff_fg]
168+
have := (Finsupp.finite_of_nat_weight_eq w hw n).to_subtype
169+
exact Module.Finite.of_basis (basisRestrictSupport R {d | Finsupp.weight w d = n})
170+
164171
variable {R}
165172

166173
set_option backward.isDefEq.respectTransparency false in
@@ -217,6 +224,11 @@ theorem isWeightedHomogeneous_zero (w : σ → M) (m : M) :
217224
theorem isWeightedHomogeneous_one (w : σ → M) : IsWeightedHomogeneous w (1 : MvPolynomial σ R) 0 :=
218225
isWeightedHomogeneous_C _ _
219226

227+
lemma isWeightedHomogeneous_of_isEmpty [IsEmpty σ] (w : σ → M) (f : MvPolynomial σ R) :
228+
IsWeightedHomogeneous w f 0 := by
229+
rw [eq_C_of_isEmpty f]
230+
exact isWeightedHomogeneous_C _ _
231+
220232
/-- An indeterminate `i : σ` is weighted homogeneous of degree `w i`. -/
221233
theorem isWeightedHomogeneous_X (w : σ → M) (i : σ) :
222234
IsWeightedHomogeneous w (X i : MvPolynomial σ R) (w i) := by
@@ -476,6 +488,10 @@ theorem weightedHomogeneousComponent_of_mem [DecidableEq M] {m n : M}
476488
· rfl
477489
· simp only [coeff_zero]
478490

491+
lemma weightedHomogeneousComponent_eq_self {n : M} {p : MvPolynomial σ R}
492+
(hp : p.IsWeightedHomogeneous w n) : weightedHomogeneousComponent w n p = p := by
493+
classical simp [weightedHomogeneousComponent_of_mem hp]
494+
479495
lemma support_weightedHomogeneousComponent [DecidableEq M] (n : M) (p : MvPolynomial σ R) :
480496
(weightedHomogeneousComponent w n p).support = {c ∈ p.support | (weight w) c = n} := by
481497
ext c
@@ -676,6 +692,19 @@ theorem weightedDecomposition.decompose'_apply [DecidableEq M]
676692
weightedHomogeneousComponent w m φ :=
677693
MvPolynomial.decompose'_apply R w φ m
678694

695+
attribute [local instance] MvPolynomial.weightedGradedAlgebra
696+
697+
lemma mem_iff_weightedHomogeneousComponent_mem [DecidableEq M] {I : Ideal (MvPolynomial σ R)}
698+
(h : I.IsHomogeneous (weightedHomogeneousSubmodule R w)) (p : MvPolynomial σ R) :
699+
p ∈ I ↔ ∀ m : M, (weightedHomogeneousComponent w m p) ∈ I := by
700+
simp_rw [← weightedDecomposition.decompose'_apply]
701+
exact h.mem_iff
702+
703+
lemma weightedHomogeneousComponent_mem_of_mem [DecidableEq M] {I : Ideal (MvPolynomial σ R)}
704+
(h : I.IsHomogeneous (weightedHomogeneousSubmodule R w)) {p : MvPolynomial σ R} (hp : p ∈ I)
705+
(m : M) : (weightedHomogeneousComponent w m p) ∈ I :=
706+
(mem_iff_weightedHomogeneousComponent_mem R w h p).mp hp m
707+
679708
end GradedAlgebra
680709

681710
end MvPolynomial

0 commit comments

Comments
 (0)