Natural transformation = parametric polymorphic function in “structure categories”?“Cat” modulo natural isomorphism?Natural transformations and small categoriesWhat is the 'type' of a natural transformationHigher transformations between natural transformations and so onEqual CategoriesNatural transformations arise from arrow categories?“Alternatives” to Natural TransformationsRepresenting natural transformations with diagramsdeterminant as natural transformationWhy is a natural transformation not a functor of functors?

What to do when during a meeting client people start to fight (even physically) with each others?

Word for a person who has no opinion about whether god exists

Should QA ask requirements to developers?

Why does the negative sign arise in this thermodynamic relation?

Extra alignment tab has been changed to cr. } using table, tabular and resizebox

Are the terms "stab" and "staccato" synonyms?

How did Alan Turing break the enigma code using the hint given by the lady in the bar?

Make a transparent 448*448 image

Reverse string, can I make it faster?

Peter's Strange Word

Placing subfig vertically

They call me Inspector Morse

In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?

Why is there a voltage between the mains ground and my radiator?

Accountant/ lawyer will not return my call

Is "history" a male-biased word ("his+story")?

Low budget alien movie about the Earth being cooked

Is it true that real estate prices mainly go up?

Should I tell my boss the work he did was worthless

My story is written in English, but is set in my home country. What language should I use for the dialogue?

Single word request: Harming the benefactor

"One can do his homework in the library"

Replacing Windows 7 security updates with anti-virus?

Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?



Natural transformation = parametric polymorphic function in “structure categories”?


“Cat” modulo natural isomorphism?Natural transformations and small categoriesWhat is the 'type' of a natural transformationHigher transformations between natural transformations and so onEqual CategoriesNatural transformations arise from arrow categories?“Alternatives” to Natural TransformationsRepresenting natural transformations with diagramsdeterminant as natural transformationWhy is a natural transformation not a functor of functors?













3












$begingroup$


By “structure category” I mean a concrete category that contains as objects all spaces of a particular type of structure, and as morphisms, functions that preserve that type of structure. I.e. the standard categories like Grp, Top, Cat, Ab, Vec, ... etc.



A “parametric polymorphic function” is a concept from type theory and functional programming, which says intuitively that




parametric polymorphic function: a function $f_X$ that is parameterized by type (object) $X$, but where the computation it performs is independent of $X$.




Obviously, a parametric polymorphic function is a natural transformation in a category where objects are types (if the underlying functors are also well-behaved). This is because of some “theorems for free” result.



But natural transformations are defined categorically, rather than type theoretically. So in arbitrary categories, a natural transformation does not need to correspond to any parametric polymorphic function.



I am wondering whether in “structure categories”, the “naturality” of $f_X$ (i.e. of a pre-natural transformation), coincides with “parametric polymorphism”, and how this can be seen from the definition.



  • Are there (natural?) examples of natural transformations $f_X$ in structure categories that are not “parametrically polymorphic”? I.e. whose formula/computation depends on the object $X$?


  • If not, how can we see from the commuting diagram property of natural transformations $f_X$ that “they do the same computation regardless of $X$”?


  • Can we prove the inverse of the “theorems for free” result? i.e. Can we prove that, if a transformation is natural in the category of a ”sufficiently general” type system, then it must be somehow equivalent to a parametrically polymorphic function (possibly given some conditions on the underlying functors)?










share|cite|improve this question









$endgroup$











  • $begingroup$
    I think this is an interesting question. One potentially important issue I see is that there's no sense in which morphisms in these categories are computations which have formulas or programs. For instance, there exists a natural isomorphism out of the identity endofunctor of sets which acts as an arbitrary isomorphism from any given set to a fixed set of the same cardinality, and I think this really does depend on the object, intuitively. But on the other hand I have a sense that parametric polymorphism is getting at a similar intuition to naturality.
    $endgroup$
    – Kevin Carlson
    2 days ago










  • $begingroup$
    @KevinCarlson, Thank you for your comment! There is a sense in which the natural isomorphism you describe depends only on the object “via the information contained in the functor”. What if we also force the functor to be parametric polymorphic though?
    $endgroup$
    – user56834
    2 days ago










  • $begingroup$
    Good point. I'm not really sure how to interpret parametric polymorphicity for a functor. For instance, can such a functor use the cardinality of its inputs, or does it have to be "even more uniform" than that?
    $endgroup$
    – Kevin Carlson
    2 days ago






  • 1




    $begingroup$
    @KevinCarlson, I am not sure what the best way to restrict it is. Perhaps the following: strictly speaking, I would say a functor is paremetric polymorphic if it is paremtric polymorphic in it's operation on morphisms. i.e. Given a morphism $f:Xto Y$, it should map to a morphism $F(f):F(X)to F(Y)$ without using any information about $X$ and $Y$, only using the information that all objects in the category have in common. Hence it cannot use the information about $X,Y$'s cardinality. But e.g. in the category of groups, it can use the face that every element of every groups have inverses.
    $endgroup$
    – user56834
    yesterday










  • $begingroup$
    cntd: Hence the opposite group functor is parametric polymorphic by that view. Note that the restriction of parametric polymorphicity on morphisms also restricts the operation on objects, since we can't map $F(f):F(X)to F(X)$ the same way as we do $F(g):F(Y)to F(Y)$ if $F(X) =Xtimes X$ but $F(Y)=Y^Y$.
    $endgroup$
    – user56834
    yesterday















3












$begingroup$


By “structure category” I mean a concrete category that contains as objects all spaces of a particular type of structure, and as morphisms, functions that preserve that type of structure. I.e. the standard categories like Grp, Top, Cat, Ab, Vec, ... etc.



A “parametric polymorphic function” is a concept from type theory and functional programming, which says intuitively that




parametric polymorphic function: a function $f_X$ that is parameterized by type (object) $X$, but where the computation it performs is independent of $X$.




Obviously, a parametric polymorphic function is a natural transformation in a category where objects are types (if the underlying functors are also well-behaved). This is because of some “theorems for free” result.



But natural transformations are defined categorically, rather than type theoretically. So in arbitrary categories, a natural transformation does not need to correspond to any parametric polymorphic function.



I am wondering whether in “structure categories”, the “naturality” of $f_X$ (i.e. of a pre-natural transformation), coincides with “parametric polymorphism”, and how this can be seen from the definition.



  • Are there (natural?) examples of natural transformations $f_X$ in structure categories that are not “parametrically polymorphic”? I.e. whose formula/computation depends on the object $X$?


  • If not, how can we see from the commuting diagram property of natural transformations $f_X$ that “they do the same computation regardless of $X$”?


  • Can we prove the inverse of the “theorems for free” result? i.e. Can we prove that, if a transformation is natural in the category of a ”sufficiently general” type system, then it must be somehow equivalent to a parametrically polymorphic function (possibly given some conditions on the underlying functors)?










share|cite|improve this question









$endgroup$











  • $begingroup$
    I think this is an interesting question. One potentially important issue I see is that there's no sense in which morphisms in these categories are computations which have formulas or programs. For instance, there exists a natural isomorphism out of the identity endofunctor of sets which acts as an arbitrary isomorphism from any given set to a fixed set of the same cardinality, and I think this really does depend on the object, intuitively. But on the other hand I have a sense that parametric polymorphism is getting at a similar intuition to naturality.
    $endgroup$
    – Kevin Carlson
    2 days ago










  • $begingroup$
    @KevinCarlson, Thank you for your comment! There is a sense in which the natural isomorphism you describe depends only on the object “via the information contained in the functor”. What if we also force the functor to be parametric polymorphic though?
    $endgroup$
    – user56834
    2 days ago










  • $begingroup$
    Good point. I'm not really sure how to interpret parametric polymorphicity for a functor. For instance, can such a functor use the cardinality of its inputs, or does it have to be "even more uniform" than that?
    $endgroup$
    – Kevin Carlson
    2 days ago






  • 1




    $begingroup$
    @KevinCarlson, I am not sure what the best way to restrict it is. Perhaps the following: strictly speaking, I would say a functor is paremetric polymorphic if it is paremtric polymorphic in it's operation on morphisms. i.e. Given a morphism $f:Xto Y$, it should map to a morphism $F(f):F(X)to F(Y)$ without using any information about $X$ and $Y$, only using the information that all objects in the category have in common. Hence it cannot use the information about $X,Y$'s cardinality. But e.g. in the category of groups, it can use the face that every element of every groups have inverses.
    $endgroup$
    – user56834
    yesterday










  • $begingroup$
    cntd: Hence the opposite group functor is parametric polymorphic by that view. Note that the restriction of parametric polymorphicity on morphisms also restricts the operation on objects, since we can't map $F(f):F(X)to F(X)$ the same way as we do $F(g):F(Y)to F(Y)$ if $F(X) =Xtimes X$ but $F(Y)=Y^Y$.
    $endgroup$
    – user56834
    yesterday













3












3








3


1



$begingroup$


By “structure category” I mean a concrete category that contains as objects all spaces of a particular type of structure, and as morphisms, functions that preserve that type of structure. I.e. the standard categories like Grp, Top, Cat, Ab, Vec, ... etc.



A “parametric polymorphic function” is a concept from type theory and functional programming, which says intuitively that




parametric polymorphic function: a function $f_X$ that is parameterized by type (object) $X$, but where the computation it performs is independent of $X$.




Obviously, a parametric polymorphic function is a natural transformation in a category where objects are types (if the underlying functors are also well-behaved). This is because of some “theorems for free” result.



But natural transformations are defined categorically, rather than type theoretically. So in arbitrary categories, a natural transformation does not need to correspond to any parametric polymorphic function.



I am wondering whether in “structure categories”, the “naturality” of $f_X$ (i.e. of a pre-natural transformation), coincides with “parametric polymorphism”, and how this can be seen from the definition.



  • Are there (natural?) examples of natural transformations $f_X$ in structure categories that are not “parametrically polymorphic”? I.e. whose formula/computation depends on the object $X$?


  • If not, how can we see from the commuting diagram property of natural transformations $f_X$ that “they do the same computation regardless of $X$”?


  • Can we prove the inverse of the “theorems for free” result? i.e. Can we prove that, if a transformation is natural in the category of a ”sufficiently general” type system, then it must be somehow equivalent to a parametrically polymorphic function (possibly given some conditions on the underlying functors)?










share|cite|improve this question









$endgroup$




By “structure category” I mean a concrete category that contains as objects all spaces of a particular type of structure, and as morphisms, functions that preserve that type of structure. I.e. the standard categories like Grp, Top, Cat, Ab, Vec, ... etc.



A “parametric polymorphic function” is a concept from type theory and functional programming, which says intuitively that




parametric polymorphic function: a function $f_X$ that is parameterized by type (object) $X$, but where the computation it performs is independent of $X$.




Obviously, a parametric polymorphic function is a natural transformation in a category where objects are types (if the underlying functors are also well-behaved). This is because of some “theorems for free” result.



But natural transformations are defined categorically, rather than type theoretically. So in arbitrary categories, a natural transformation does not need to correspond to any parametric polymorphic function.



I am wondering whether in “structure categories”, the “naturality” of $f_X$ (i.e. of a pre-natural transformation), coincides with “parametric polymorphism”, and how this can be seen from the definition.



  • Are there (natural?) examples of natural transformations $f_X$ in structure categories that are not “parametrically polymorphic”? I.e. whose formula/computation depends on the object $X$?


  • If not, how can we see from the commuting diagram property of natural transformations $f_X$ that “they do the same computation regardless of $X$”?


  • Can we prove the inverse of the “theorems for free” result? i.e. Can we prove that, if a transformation is natural in the category of a ”sufficiently general” type system, then it must be somehow equivalent to a parametrically polymorphic function (possibly given some conditions on the underlying functors)?







category-theory type-theory






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked 2 days ago









user56834user56834

3,42321252




3,42321252











  • $begingroup$
    I think this is an interesting question. One potentially important issue I see is that there's no sense in which morphisms in these categories are computations which have formulas or programs. For instance, there exists a natural isomorphism out of the identity endofunctor of sets which acts as an arbitrary isomorphism from any given set to a fixed set of the same cardinality, and I think this really does depend on the object, intuitively. But on the other hand I have a sense that parametric polymorphism is getting at a similar intuition to naturality.
    $endgroup$
    – Kevin Carlson
    2 days ago










  • $begingroup$
    @KevinCarlson, Thank you for your comment! There is a sense in which the natural isomorphism you describe depends only on the object “via the information contained in the functor”. What if we also force the functor to be parametric polymorphic though?
    $endgroup$
    – user56834
    2 days ago










  • $begingroup$
    Good point. I'm not really sure how to interpret parametric polymorphicity for a functor. For instance, can such a functor use the cardinality of its inputs, or does it have to be "even more uniform" than that?
    $endgroup$
    – Kevin Carlson
    2 days ago






  • 1




    $begingroup$
    @KevinCarlson, I am not sure what the best way to restrict it is. Perhaps the following: strictly speaking, I would say a functor is paremetric polymorphic if it is paremtric polymorphic in it's operation on morphisms. i.e. Given a morphism $f:Xto Y$, it should map to a morphism $F(f):F(X)to F(Y)$ without using any information about $X$ and $Y$, only using the information that all objects in the category have in common. Hence it cannot use the information about $X,Y$'s cardinality. But e.g. in the category of groups, it can use the face that every element of every groups have inverses.
    $endgroup$
    – user56834
    yesterday










  • $begingroup$
    cntd: Hence the opposite group functor is parametric polymorphic by that view. Note that the restriction of parametric polymorphicity on morphisms also restricts the operation on objects, since we can't map $F(f):F(X)to F(X)$ the same way as we do $F(g):F(Y)to F(Y)$ if $F(X) =Xtimes X$ but $F(Y)=Y^Y$.
    $endgroup$
    – user56834
    yesterday
















  • $begingroup$
    I think this is an interesting question. One potentially important issue I see is that there's no sense in which morphisms in these categories are computations which have formulas or programs. For instance, there exists a natural isomorphism out of the identity endofunctor of sets which acts as an arbitrary isomorphism from any given set to a fixed set of the same cardinality, and I think this really does depend on the object, intuitively. But on the other hand I have a sense that parametric polymorphism is getting at a similar intuition to naturality.
    $endgroup$
    – Kevin Carlson
    2 days ago










  • $begingroup$
    @KevinCarlson, Thank you for your comment! There is a sense in which the natural isomorphism you describe depends only on the object “via the information contained in the functor”. What if we also force the functor to be parametric polymorphic though?
    $endgroup$
    – user56834
    2 days ago










  • $begingroup$
    Good point. I'm not really sure how to interpret parametric polymorphicity for a functor. For instance, can such a functor use the cardinality of its inputs, or does it have to be "even more uniform" than that?
    $endgroup$
    – Kevin Carlson
    2 days ago






  • 1




    $begingroup$
    @KevinCarlson, I am not sure what the best way to restrict it is. Perhaps the following: strictly speaking, I would say a functor is paremetric polymorphic if it is paremtric polymorphic in it's operation on morphisms. i.e. Given a morphism $f:Xto Y$, it should map to a morphism $F(f):F(X)to F(Y)$ without using any information about $X$ and $Y$, only using the information that all objects in the category have in common. Hence it cannot use the information about $X,Y$'s cardinality. But e.g. in the category of groups, it can use the face that every element of every groups have inverses.
    $endgroup$
    – user56834
    yesterday










  • $begingroup$
    cntd: Hence the opposite group functor is parametric polymorphic by that view. Note that the restriction of parametric polymorphicity on morphisms also restricts the operation on objects, since we can't map $F(f):F(X)to F(X)$ the same way as we do $F(g):F(Y)to F(Y)$ if $F(X) =Xtimes X$ but $F(Y)=Y^Y$.
    $endgroup$
    – user56834
    yesterday















$begingroup$
I think this is an interesting question. One potentially important issue I see is that there's no sense in which morphisms in these categories are computations which have formulas or programs. For instance, there exists a natural isomorphism out of the identity endofunctor of sets which acts as an arbitrary isomorphism from any given set to a fixed set of the same cardinality, and I think this really does depend on the object, intuitively. But on the other hand I have a sense that parametric polymorphism is getting at a similar intuition to naturality.
$endgroup$
– Kevin Carlson
2 days ago




$begingroup$
I think this is an interesting question. One potentially important issue I see is that there's no sense in which morphisms in these categories are computations which have formulas or programs. For instance, there exists a natural isomorphism out of the identity endofunctor of sets which acts as an arbitrary isomorphism from any given set to a fixed set of the same cardinality, and I think this really does depend on the object, intuitively. But on the other hand I have a sense that parametric polymorphism is getting at a similar intuition to naturality.
$endgroup$
– Kevin Carlson
2 days ago












$begingroup$
@KevinCarlson, Thank you for your comment! There is a sense in which the natural isomorphism you describe depends only on the object “via the information contained in the functor”. What if we also force the functor to be parametric polymorphic though?
$endgroup$
– user56834
2 days ago




$begingroup$
@KevinCarlson, Thank you for your comment! There is a sense in which the natural isomorphism you describe depends only on the object “via the information contained in the functor”. What if we also force the functor to be parametric polymorphic though?
$endgroup$
– user56834
2 days ago












$begingroup$
Good point. I'm not really sure how to interpret parametric polymorphicity for a functor. For instance, can such a functor use the cardinality of its inputs, or does it have to be "even more uniform" than that?
$endgroup$
– Kevin Carlson
2 days ago




$begingroup$
Good point. I'm not really sure how to interpret parametric polymorphicity for a functor. For instance, can such a functor use the cardinality of its inputs, or does it have to be "even more uniform" than that?
$endgroup$
– Kevin Carlson
2 days ago




1




1




$begingroup$
@KevinCarlson, I am not sure what the best way to restrict it is. Perhaps the following: strictly speaking, I would say a functor is paremetric polymorphic if it is paremtric polymorphic in it's operation on morphisms. i.e. Given a morphism $f:Xto Y$, it should map to a morphism $F(f):F(X)to F(Y)$ without using any information about $X$ and $Y$, only using the information that all objects in the category have in common. Hence it cannot use the information about $X,Y$'s cardinality. But e.g. in the category of groups, it can use the face that every element of every groups have inverses.
$endgroup$
– user56834
yesterday




$begingroup$
@KevinCarlson, I am not sure what the best way to restrict it is. Perhaps the following: strictly speaking, I would say a functor is paremetric polymorphic if it is paremtric polymorphic in it's operation on morphisms. i.e. Given a morphism $f:Xto Y$, it should map to a morphism $F(f):F(X)to F(Y)$ without using any information about $X$ and $Y$, only using the information that all objects in the category have in common. Hence it cannot use the information about $X,Y$'s cardinality. But e.g. in the category of groups, it can use the face that every element of every groups have inverses.
$endgroup$
– user56834
yesterday












$begingroup$
cntd: Hence the opposite group functor is parametric polymorphic by that view. Note that the restriction of parametric polymorphicity on morphisms also restricts the operation on objects, since we can't map $F(f):F(X)to F(X)$ the same way as we do $F(g):F(Y)to F(Y)$ if $F(X) =Xtimes X$ but $F(Y)=Y^Y$.
$endgroup$
– user56834
yesterday




$begingroup$
cntd: Hence the opposite group functor is parametric polymorphic by that view. Note that the restriction of parametric polymorphicity on morphisms also restricts the operation on objects, since we can't map $F(f):F(X)to F(X)$ the same way as we do $F(g):F(Y)to F(Y)$ if $F(X) =Xtimes X$ but $F(Y)=Y^Y$.
$endgroup$
– user56834
yesterday










0






active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3142222%2fnatural-transformation-parametric-polymorphic-function-in-structure-categorie%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3142222%2fnatural-transformation-parametric-polymorphic-function-in-structure-categorie%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Lowndes Grove History Architecture References Navigation menu32°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661132°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661178002500"National Register Information System"Historic houses of South Carolina"Lowndes Grove""+32° 48' 6.00", −79° 57' 58.00""Lowndes Grove, Charleston County (260 St. Margaret St., Charleston)""Lowndes Grove"The Charleston ExpositionIt Happened in South Carolina"Lowndes Grove (House), Saint Margaret Street & Sixth Avenue, Charleston, Charleston County, SC(Photographs)"Plantations of the Carolina Low Countrye

random experiment with two different functions on unit interval Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Random variable and probability space notionsRandom Walk with EdgesFinding functions where the increase over a random interval is Poisson distributedNumber of days until dayCan an observed event in fact be of zero probability?Unit random processmodels of coins and uniform distributionHow to get the number of successes given $n$ trials , probability $P$ and a random variable $X$Absorbing Markov chain in a computer. Is “almost every” turned into always convergence in computer executions?Stopped random walk is not uniformly integrable

How should I support this large drywall patch? Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I cover large gaps in drywall?How do I keep drywall around a patch from crumbling?Can I glue a second layer of drywall?How to patch long strip on drywall?Large drywall patch: how to avoid bulging seams?Drywall Mesh Patch vs. Bulge? To remove or not to remove?How to fix this drywall job?Prep drywall before backsplashWhat's the best way to fix this horrible drywall patch job?Drywall patching using 3M Patch Plus Primer