Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joël Riou <[email protected]>
  • Loading branch information
callesonne and joelriou authored Oct 29, 2024
1 parent 0aadff6 commit 895efbd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Mathlib/CategoryTheory/FiberedCategory/HasFibers.lean
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ Here is an example of when this typeclass is useful. Suppose we have a presheaf
`F : 𝒮ᵒᵖ ⥤ Type _`. The associated fibered category then has objects `(S, a)` where `S : 𝒮` and `a`
is an element of `F(S)`. The fiber category `Fiber p S` is then equivalent to the discrete category
`Fib S` with objects `a` in `F(S)`. In this case, the `HasFibers` instance is given by the
categories `F(S)` and the functor `ι` sends `a : F(S)` to `(S, a)` in the fibered category. See
`Presheaf.lean` for more details.
categories `F(S)` and the functor `ι` sends `a : F(S)` to `(S, a)` in the fibered category.
## Main API
The following API is developed so that the fibers from a `HasFibers` instance can be used
Expand Down Expand Up @@ -79,15 +78,15 @@ namespace HasFibers
@[default_instance]
instance canonical (p : 𝒳 ⥤ 𝒮) : HasFibers p where
Fib := Fiber p
ι S := @fiberInclusion _ _ _ _ p S
ι S := fiberInclusion
comp_const S := fiberInclusion_comp_eq_const
equiv S := by exact isEquivalence_of_iso (F := 𝟭 (Fiber p S)) (Iso.refl _)

section

variable (p : 𝒳 ⥤ 𝒮) [HasFibers p] (S : 𝒮)

instance : Category (Fib p S) := isCategory S
attribute [instance] isCategory

/-- The induced functor from `Fib p S` to the standard fiber. -/
@[simps!]
Expand Down

0 comments on commit 895efbd

Please sign in to comment.