SetImplicitArguments. GeneralizableAllVariables. Set Asymmetric Patterns. Set Universe Polymorphism.
Record Category (obj : Type) := { Morphism : obj -> obj -> Type }.
Record Functor `(C : Category objC) `(D : Category objD) :=
{ ObjectOf :> objC -> objD;
MorphismOf : forall s d, C.(Morphism) s d -> D.(Morphism) (ObjectOf s) (ObjectOf d) }.
Definition TypeCat : @Category Type := @Build_Category Type (fun s d => s -> d). Definition SetCat : @Category Set := @Build_Category Set (fun s d => s -> d).
Definition FunctorToSet `(C : @Category objC) := Functor C SetCat. Definition FunctorToType `(C : @Category objC) := Functor C TypeCat.
(* Removing the following line, as well as the [Definition] and [Identity Coercion] immediately following it, makes the file go through *)
Identity Coercion FunctorToType_Id : FunctorToType >-> Functor.
Set Printing Universes. Definition FunctorTo_Set2Type `(C : @Category objC) (F : FunctorToSet C)
: FunctorToType C.
refine (@Build_Functor _ C _ TypeCat
(fun x => F.(ObjectOf) x)
(fun s d m => F.(MorphismOf) _ _ m)). (* ??? Toplevel input, characters 8-148: Error: Inenvironment objC:Type{Top.100} C:Category@{Top.100Top.101}objC F:FunctorToSet@{Top.100Top.101Top.99}C Theterm "{| ObjectOf:=funx:objC=>Fx; MorphismOf:=fun(sd:objC)(m:Morphism@{Top.100Top.101}Csd)=> MorphismOf@{Top.100Top.101Top.99Set}Fsdm|}"hastype "Functor@{Top.104Top.105Top.106Top.107}CTypeCat@{Top.108Top.109 Top.110}"whileitisexpectedtohavetype "FunctorToType@{Top.100Top.101Top.102Top.103}C" (Universeinconsistency:CannotenforceSet=Top.103)).
*) Defined. (* Toplevel input, characters 0-8: Error: Theterm "fun(objC:Type)(C:CategoryobjC)(F:FunctorToSetC)=> {| ObjectOf:=funx:objC=>Fx; MorphismOf:=fun(sd:objC)(m:MorphismCsd)=>MorphismOfFsdm|}" hastype "forall(objC:Type)(C:CategoryobjC), FunctorToSetC->FunctorCTypeCat"whileitisexpectedtohavetype "forall(objC:Type)(C:CategoryobjC),FunctorToSetC->FunctorToTypeC".
*)
Record GrothendieckPair `(C : @Category objC) (F : Functor C TypeCat) :=
{ GrothendieckC : objC;
GrothendieckX : F GrothendieckC }.
Record SetGrothendieckPair `(C : @Category objC) (F' : Functor C SetCat) :=
{ SetGrothendieckC : objC;
SetGrothendieckX : F' SetGrothendieckC }.
Section SetGrothendieckCoercion.
Context `(C : @Category objC). Variable F : Functor C SetCat. Let F' := (F : FunctorToSet _) : FunctorToType _. (* The command has indeed failed with message: =>Anomaly:apply_coercion_args:mismatchbetweenargumentsandcoercion.
Please report. *)
Set Printing Universes. Definition SetGrothendieck2Grothendieck (G : SetGrothendieckPair F) : GrothendieckPair F'
:= {| GrothendieckC := G.(SetGrothendieckC); GrothendieckX := G.(SetGrothendieckX) : F' _ |}. (* Toplevel input, characters 0-187: Error:Illegalapplication:
The term "ObjectOf (* Top.8375 Top.8376 Top.8379 Set *)" of type "forall (objC : Type (* Top.8375 *))
(C : Category (* Top.8375 Top.8376 *) objC) (objD : Type (* Top.8379 *))
(D : Category (* Top.8379 Set *) objD),
Functor (* Top.8375 Top.8376 Top.8379 Set *) C D -> objC -> objD"
cannot be applied to the terms "objC" : "Type (* Top.8375 *)" "C" : "Category (* Top.8375 Top.8376 *) objC" "Type (* Set *)" : "Type (* Set+1 *)" "TypeCat (* Top.8379 Set *)" : "Category (* Top.8379 Set *) Set" "F'" : "FunctorToType (* Top.8375 Top.8376 Top.8379 Set *) C" "SetGrothendieckC (* Top.8375 Top.8376 Top.8379 *) G" : "objC"
The 5th term has type"FunctorToType (* Top.8375 Top.8376 Top.8379 Set *) C"
which should be coercible to "Functor (* Top.8375 Top.8376 Top.8379 Set *) C TypeCat (* Top.8379 Set *)".
*) End SetGrothendieckCoercion.
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.