Zulip Chat Archive
Stream: mathlib4
Topic: unknown declaration `CategoryTheory.Limits.pullback`
Anthony Bordg (Jul 10 2024 at 17:18):
The piece of code below,
def restriction_map {X' : C} (f : X' ⟶ XS.1) :
(yoneda.obj X' ⟶ P) → ((pullback (XS.2.functorInclusion) (yoneda.map f)) ⟶ P) :=
fun α => (pullback.snd (f := XS.2.functorInclusion) (g := yoneda.map f)) ≫ α
where XS : (X : C) × Sieve X
and P : Cᵒᵖ ⥤ Type v₁
, attempts to formalize the restriction map .
I got an unknown declaration 'CategoryTheory.Limits.pullback'
error, although I import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
and the scope Limits
is opened, moreover, I can Ctrl-click on pullback
and open the corresponding file Pullbacks
. Also, the code
def restriction_map {X' : C} (f : X' ⟶ XS.1) :
(yoneda.obj X' ⟶ P) → ((pullback (XS.2.functorInclusion) (yoneda.map f)) ⟶ P) := sorry
doesn't return an error, suggesting that the error comes from the body of the function. Some suggestion?
PS: in the Documentation, pullback is located inHasPullback
. Is the documentation outdated?
Kim Morrison (Jul 10 2024 at 22:08):
Why do you think something is outdated?
Kim Morrison (Jul 10 2024 at 22:08):
Could you post a #mwe showing the unknown declaration
error you're seeing?
Anthony Bordg (Jul 11 2024 at 06:15):
Here is a mwe.
import Mathlib.CategoryTheory.Sites.Sheaf
import Mathlib.CategoryTheory.Limits.Shapes.Pullback.HasPullback
open CategoryTheory
universe u₁ v₁
variable {C : Type u₁} [Category.{v₁} C]
variable (XS : (X : C) × Sieve X)
variable (P : Cᵒᵖ ⥤ Type v₁)
open Limits
def restriction_map {X' : C} (f : X' ⟶ XS.1) :
(yoneda.obj X' ⟶ P) → ((pullback (XS.2.functorInclusion) (yoneda.map f)) ⟶ P) :=
/-
compiler IR check failed at 'restriction_map._rarg', error: unknown declaration 'CategoryTheory.Limits.pullback'
-/
fun α => (pullback.snd (f := XS.2.functorInclusion) (g := yoneda.map f)) ≫ α
Christian Merten (Jul 11 2024 at 08:41):
Adding noncomputable
in front of the def
fixes this.
Kevin Buzzard (Jul 11 2024 at 08:57):
Last updated: May 02 2025 at 03:31 UTC