Term for function which maps an empty set to range of size one












2














I realize this is a bit pedantic, but I am not sure if there is a term for a function which maps from an empty domain to a range of size one. I am a programmer, and not a mathematician, but was thinking of a general case for a single variable. So something like,



f(x) = x



int f(int x) { returns x; }


is a linear mapping of the integer domain to the integer codomain. If I had:



g(x) = 4



int g(int x) { returns 4; }


that is again a linear mapping of the integer domain to the integer codomain, with range of size 1. I am not sure if this is mathematically correct to say so but if I had:



h() = 5



int h() { return 5; }


that takes no input, thus there an empty domain, but the codomain is still integers and the range is of size 1. Is there a special term for this?



this is coming from the idea that:



int i = 5;


and



int h() { return 5; }


are the 'same'. Thus if there is a term to describe the function h, it can describe what 'i' is.



Some background, I became interested in this question when I realized (though the definition of tensors can vary) that singular numbers are tensors of rank 0 (scalars). I want to know if singular numbers can also be described as a special case of functions.










share|cite|improve this question





























    2














    I realize this is a bit pedantic, but I am not sure if there is a term for a function which maps from an empty domain to a range of size one. I am a programmer, and not a mathematician, but was thinking of a general case for a single variable. So something like,



    f(x) = x



    int f(int x) { returns x; }


    is a linear mapping of the integer domain to the integer codomain. If I had:



    g(x) = 4



    int g(int x) { returns 4; }


    that is again a linear mapping of the integer domain to the integer codomain, with range of size 1. I am not sure if this is mathematically correct to say so but if I had:



    h() = 5



    int h() { return 5; }


    that takes no input, thus there an empty domain, but the codomain is still integers and the range is of size 1. Is there a special term for this?



    this is coming from the idea that:



    int i = 5;


    and



    int h() { return 5; }


    are the 'same'. Thus if there is a term to describe the function h, it can describe what 'i' is.



    Some background, I became interested in this question when I realized (though the definition of tensors can vary) that singular numbers are tensors of rank 0 (scalars). I want to know if singular numbers can also be described as a special case of functions.










    share|cite|improve this question



























      2












      2








      2







      I realize this is a bit pedantic, but I am not sure if there is a term for a function which maps from an empty domain to a range of size one. I am a programmer, and not a mathematician, but was thinking of a general case for a single variable. So something like,



      f(x) = x



      int f(int x) { returns x; }


      is a linear mapping of the integer domain to the integer codomain. If I had:



      g(x) = 4



      int g(int x) { returns 4; }


      that is again a linear mapping of the integer domain to the integer codomain, with range of size 1. I am not sure if this is mathematically correct to say so but if I had:



      h() = 5



      int h() { return 5; }


      that takes no input, thus there an empty domain, but the codomain is still integers and the range is of size 1. Is there a special term for this?



      this is coming from the idea that:



      int i = 5;


      and



      int h() { return 5; }


      are the 'same'. Thus if there is a term to describe the function h, it can describe what 'i' is.



      Some background, I became interested in this question when I realized (though the definition of tensors can vary) that singular numbers are tensors of rank 0 (scalars). I want to know if singular numbers can also be described as a special case of functions.










      share|cite|improve this question















      I realize this is a bit pedantic, but I am not sure if there is a term for a function which maps from an empty domain to a range of size one. I am a programmer, and not a mathematician, but was thinking of a general case for a single variable. So something like,



      f(x) = x



      int f(int x) { returns x; }


      is a linear mapping of the integer domain to the integer codomain. If I had:



      g(x) = 4



      int g(int x) { returns 4; }


      that is again a linear mapping of the integer domain to the integer codomain, with range of size 1. I am not sure if this is mathematically correct to say so but if I had:



      h() = 5



      int h() { return 5; }


      that takes no input, thus there an empty domain, but the codomain is still integers and the range is of size 1. Is there a special term for this?



      this is coming from the idea that:



      int i = 5;


      and



      int h() { return 5; }


      are the 'same'. Thus if there is a term to describe the function h, it can describe what 'i' is.



      Some background, I became interested in this question when I realized (though the definition of tensors can vary) that singular numbers are tensors of rank 0 (scalars). I want to know if singular numbers can also be described as a special case of functions.







      functions terminology






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Nov 21 '18 at 19:26







      Michael Choi

















      asked Nov 21 '18 at 19:21









      Michael ChoiMichael Choi

      156




      156






















          3 Answers
          3






          active

          oldest

          votes


















          4














          The domain of your h is not really the empty set. If it were so, it would be impossible to get a function value out of it.



          Rather, the domain of h is a set with exactly one element, and that element is the empty tuple (). (Or some other abstract representation of "here are all the $0$ arguments given in the call).



          (Functional languages like ML or Haskell make this more explicit and orthogonal than typical imperative or OO languages.)



          I don't think there is any particular word for such functions in mathematics. The closest mathematical expression of the situation would be to say that the function space $1to X$ is naturally in bijection with $X$, or with different notation $X^1cong X$ -- but those do not provide a word for the function.






          share|cite|improve this answer























          • I am a bit confused though, I thought that the domain of h is an empty set though because there is no input. If h had a domain as a set with exactly one element, wouldn't it be h(x) where x can only be one number?
            – Michael Choi
            Nov 21 '18 at 19:59










          • @MichaelChoi: Nobody says the input to a function has to be a number. For int k(int a, int b) it is two numbers, and for int j(String a) it's a string. With your int h() the input is a list with no values in it, but this list certainly a thing. And the set that contains that thing is not the empty set.
            – Henning Makholm
            Nov 21 '18 at 21:23










          • @MichaelChoi: In a sense the void type in C-like languages is exactly the one-element type we're speaking of. Many languages restrict what it can be used for, but usually you can declare a function as returning void. Then when you write return; the compiler supplies the single, unnamed, element of that for you. The type is not the empty set, because by definition it would be impossible to return if you needed to pass an element of the empty set. (And in C your function would even be declared as int h(void), though that is more for profane syntactical reasons that due to theory).
            – Henning Makholm
            Nov 21 '18 at 21:28








          • 1




            A type that truly corresponds to an empty set would be a bottom type. It rarely has a name in programming languages, but one might imagine a noreturn that could syntactically appear as the return type of a function. (As input it would be cannotcall, which is less practically useful).
            – Henning Makholm
            Nov 21 '18 at 21:32



















          3














          Although it invokes an unnecessary degree of abstraction, I suppose one could use the mathematical term global element for such a function [taking into account the necessary correction of the question in Henning Makholm's answer, of course]. Quoting user Andrea's answer to the question Elements and arrows in a category:




          As you noted, in the definition of a category, objects do not have elements. However, in a category there can be arrows that act like the elements of a set would do.



          In a category $mathbf{C}$, a terminal object, call it $1$, is defined as follows.
          For any object $A$ of $mathbf{C}$ there exists a unique arrow $!:A rightarrow 1$. Terminal objects are unique up to isomorphism. In a category with a terminal object $1$, any given object $A$ then, there is a unique arrow to $1$, but there may be several arrows $a:1 rightarrow A$ to the object. These are called global elements or points of $A$. [$ldots$]



          To see why this is interesting, lets look at $mathbf{Sets}$, the category of sets and functions. There, the terminal object is any set containing only one element, like $1 equiv {1}$. For each set $X$ there is only one function to it, ie $ forall x in X : x mapsto 1$ so this is a terminal object. The [global] elements of $X$ then are the functions (arrows) from ${1} rightarrow X$, and it is easy to see that the set of such arrows is isomorphic to the set of elements of $X$, In other words, for each element $xin X$ there is an arrow ${1} rightarrow X$, the function $1mapsto x$. And for each arrow there is an element.
          Thus in $mathbf{Sets}$, the [global] elements of $X$ reduce to the elements of $X$.




          See also Global element - Wikipedia, or generalized element in nLab, or page 78 of Robert Goldblatt, Topoi: The Categorial Analysis of Logic (2nd ed. 1984, repr. Dover 2006) - although he just calls them elements, which would be confusing in this context!






          share|cite|improve this answer





















          • Nice find! $(+1)$
            – Henning Makholm
            Nov 22 '18 at 1:12



















          1














          Interesting question.



          I think that speaking strictly mathematically the "function" $h$ that takes no input and returns a value is not a function, since a function is defined as a set of ardered pairs ...



          It is in effect just a way to insert a constant when it's called.



          Of course there is every reason to call it a function in a computer program, and even a good thing to do, since you can then change the value of that constant by changing the code for the function without having to find all the places it's called. (There are other programming strategies for this design.)






          share|cite|improve this answer





















          • I am wondering then, can constants be considered in the set of empty functions? (from by answer earlier) or are they fundamentally different?
            – Michael Choi
            Nov 21 '18 at 19:33













          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%2f3008200%2fterm-for-function-which-maps-an-empty-set-to-range-of-size-one%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          The domain of your h is not really the empty set. If it were so, it would be impossible to get a function value out of it.



          Rather, the domain of h is a set with exactly one element, and that element is the empty tuple (). (Or some other abstract representation of "here are all the $0$ arguments given in the call).



          (Functional languages like ML or Haskell make this more explicit and orthogonal than typical imperative or OO languages.)



          I don't think there is any particular word for such functions in mathematics. The closest mathematical expression of the situation would be to say that the function space $1to X$ is naturally in bijection with $X$, or with different notation $X^1cong X$ -- but those do not provide a word for the function.






          share|cite|improve this answer























          • I am a bit confused though, I thought that the domain of h is an empty set though because there is no input. If h had a domain as a set with exactly one element, wouldn't it be h(x) where x can only be one number?
            – Michael Choi
            Nov 21 '18 at 19:59










          • @MichaelChoi: Nobody says the input to a function has to be a number. For int k(int a, int b) it is two numbers, and for int j(String a) it's a string. With your int h() the input is a list with no values in it, but this list certainly a thing. And the set that contains that thing is not the empty set.
            – Henning Makholm
            Nov 21 '18 at 21:23










          • @MichaelChoi: In a sense the void type in C-like languages is exactly the one-element type we're speaking of. Many languages restrict what it can be used for, but usually you can declare a function as returning void. Then when you write return; the compiler supplies the single, unnamed, element of that for you. The type is not the empty set, because by definition it would be impossible to return if you needed to pass an element of the empty set. (And in C your function would even be declared as int h(void), though that is more for profane syntactical reasons that due to theory).
            – Henning Makholm
            Nov 21 '18 at 21:28








          • 1




            A type that truly corresponds to an empty set would be a bottom type. It rarely has a name in programming languages, but one might imagine a noreturn that could syntactically appear as the return type of a function. (As input it would be cannotcall, which is less practically useful).
            – Henning Makholm
            Nov 21 '18 at 21:32
















          4














          The domain of your h is not really the empty set. If it were so, it would be impossible to get a function value out of it.



          Rather, the domain of h is a set with exactly one element, and that element is the empty tuple (). (Or some other abstract representation of "here are all the $0$ arguments given in the call).



          (Functional languages like ML or Haskell make this more explicit and orthogonal than typical imperative or OO languages.)



          I don't think there is any particular word for such functions in mathematics. The closest mathematical expression of the situation would be to say that the function space $1to X$ is naturally in bijection with $X$, or with different notation $X^1cong X$ -- but those do not provide a word for the function.






          share|cite|improve this answer























          • I am a bit confused though, I thought that the domain of h is an empty set though because there is no input. If h had a domain as a set with exactly one element, wouldn't it be h(x) where x can only be one number?
            – Michael Choi
            Nov 21 '18 at 19:59










          • @MichaelChoi: Nobody says the input to a function has to be a number. For int k(int a, int b) it is two numbers, and for int j(String a) it's a string. With your int h() the input is a list with no values in it, but this list certainly a thing. And the set that contains that thing is not the empty set.
            – Henning Makholm
            Nov 21 '18 at 21:23










          • @MichaelChoi: In a sense the void type in C-like languages is exactly the one-element type we're speaking of. Many languages restrict what it can be used for, but usually you can declare a function as returning void. Then when you write return; the compiler supplies the single, unnamed, element of that for you. The type is not the empty set, because by definition it would be impossible to return if you needed to pass an element of the empty set. (And in C your function would even be declared as int h(void), though that is more for profane syntactical reasons that due to theory).
            – Henning Makholm
            Nov 21 '18 at 21:28








          • 1




            A type that truly corresponds to an empty set would be a bottom type. It rarely has a name in programming languages, but one might imagine a noreturn that could syntactically appear as the return type of a function. (As input it would be cannotcall, which is less practically useful).
            – Henning Makholm
            Nov 21 '18 at 21:32














          4












          4








          4






          The domain of your h is not really the empty set. If it were so, it would be impossible to get a function value out of it.



          Rather, the domain of h is a set with exactly one element, and that element is the empty tuple (). (Or some other abstract representation of "here are all the $0$ arguments given in the call).



          (Functional languages like ML or Haskell make this more explicit and orthogonal than typical imperative or OO languages.)



          I don't think there is any particular word for such functions in mathematics. The closest mathematical expression of the situation would be to say that the function space $1to X$ is naturally in bijection with $X$, or with different notation $X^1cong X$ -- but those do not provide a word for the function.






          share|cite|improve this answer














          The domain of your h is not really the empty set. If it were so, it would be impossible to get a function value out of it.



          Rather, the domain of h is a set with exactly one element, and that element is the empty tuple (). (Or some other abstract representation of "here are all the $0$ arguments given in the call).



          (Functional languages like ML or Haskell make this more explicit and orthogonal than typical imperative or OO languages.)



          I don't think there is any particular word for such functions in mathematics. The closest mathematical expression of the situation would be to say that the function space $1to X$ is naturally in bijection with $X$, or with different notation $X^1cong X$ -- but those do not provide a word for the function.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Nov 21 '18 at 19:40

























          answered Nov 21 '18 at 19:35









          Henning MakholmHenning Makholm

          238k16303540




          238k16303540












          • I am a bit confused though, I thought that the domain of h is an empty set though because there is no input. If h had a domain as a set with exactly one element, wouldn't it be h(x) where x can only be one number?
            – Michael Choi
            Nov 21 '18 at 19:59










          • @MichaelChoi: Nobody says the input to a function has to be a number. For int k(int a, int b) it is two numbers, and for int j(String a) it's a string. With your int h() the input is a list with no values in it, but this list certainly a thing. And the set that contains that thing is not the empty set.
            – Henning Makholm
            Nov 21 '18 at 21:23










          • @MichaelChoi: In a sense the void type in C-like languages is exactly the one-element type we're speaking of. Many languages restrict what it can be used for, but usually you can declare a function as returning void. Then when you write return; the compiler supplies the single, unnamed, element of that for you. The type is not the empty set, because by definition it would be impossible to return if you needed to pass an element of the empty set. (And in C your function would even be declared as int h(void), though that is more for profane syntactical reasons that due to theory).
            – Henning Makholm
            Nov 21 '18 at 21:28








          • 1




            A type that truly corresponds to an empty set would be a bottom type. It rarely has a name in programming languages, but one might imagine a noreturn that could syntactically appear as the return type of a function. (As input it would be cannotcall, which is less practically useful).
            – Henning Makholm
            Nov 21 '18 at 21:32


















          • I am a bit confused though, I thought that the domain of h is an empty set though because there is no input. If h had a domain as a set with exactly one element, wouldn't it be h(x) where x can only be one number?
            – Michael Choi
            Nov 21 '18 at 19:59










          • @MichaelChoi: Nobody says the input to a function has to be a number. For int k(int a, int b) it is two numbers, and for int j(String a) it's a string. With your int h() the input is a list with no values in it, but this list certainly a thing. And the set that contains that thing is not the empty set.
            – Henning Makholm
            Nov 21 '18 at 21:23










          • @MichaelChoi: In a sense the void type in C-like languages is exactly the one-element type we're speaking of. Many languages restrict what it can be used for, but usually you can declare a function as returning void. Then when you write return; the compiler supplies the single, unnamed, element of that for you. The type is not the empty set, because by definition it would be impossible to return if you needed to pass an element of the empty set. (And in C your function would even be declared as int h(void), though that is more for profane syntactical reasons that due to theory).
            – Henning Makholm
            Nov 21 '18 at 21:28








          • 1




            A type that truly corresponds to an empty set would be a bottom type. It rarely has a name in programming languages, but one might imagine a noreturn that could syntactically appear as the return type of a function. (As input it would be cannotcall, which is less practically useful).
            – Henning Makholm
            Nov 21 '18 at 21:32
















          I am a bit confused though, I thought that the domain of h is an empty set though because there is no input. If h had a domain as a set with exactly one element, wouldn't it be h(x) where x can only be one number?
          – Michael Choi
          Nov 21 '18 at 19:59




          I am a bit confused though, I thought that the domain of h is an empty set though because there is no input. If h had a domain as a set with exactly one element, wouldn't it be h(x) where x can only be one number?
          – Michael Choi
          Nov 21 '18 at 19:59












          @MichaelChoi: Nobody says the input to a function has to be a number. For int k(int a, int b) it is two numbers, and for int j(String a) it's a string. With your int h() the input is a list with no values in it, but this list certainly a thing. And the set that contains that thing is not the empty set.
          – Henning Makholm
          Nov 21 '18 at 21:23




          @MichaelChoi: Nobody says the input to a function has to be a number. For int k(int a, int b) it is two numbers, and for int j(String a) it's a string. With your int h() the input is a list with no values in it, but this list certainly a thing. And the set that contains that thing is not the empty set.
          – Henning Makholm
          Nov 21 '18 at 21:23












          @MichaelChoi: In a sense the void type in C-like languages is exactly the one-element type we're speaking of. Many languages restrict what it can be used for, but usually you can declare a function as returning void. Then when you write return; the compiler supplies the single, unnamed, element of that for you. The type is not the empty set, because by definition it would be impossible to return if you needed to pass an element of the empty set. (And in C your function would even be declared as int h(void), though that is more for profane syntactical reasons that due to theory).
          – Henning Makholm
          Nov 21 '18 at 21:28






          @MichaelChoi: In a sense the void type in C-like languages is exactly the one-element type we're speaking of. Many languages restrict what it can be used for, but usually you can declare a function as returning void. Then when you write return; the compiler supplies the single, unnamed, element of that for you. The type is not the empty set, because by definition it would be impossible to return if you needed to pass an element of the empty set. (And in C your function would even be declared as int h(void), though that is more for profane syntactical reasons that due to theory).
          – Henning Makholm
          Nov 21 '18 at 21:28






          1




          1




          A type that truly corresponds to an empty set would be a bottom type. It rarely has a name in programming languages, but one might imagine a noreturn that could syntactically appear as the return type of a function. (As input it would be cannotcall, which is less practically useful).
          – Henning Makholm
          Nov 21 '18 at 21:32




          A type that truly corresponds to an empty set would be a bottom type. It rarely has a name in programming languages, but one might imagine a noreturn that could syntactically appear as the return type of a function. (As input it would be cannotcall, which is less practically useful).
          – Henning Makholm
          Nov 21 '18 at 21:32











          3














          Although it invokes an unnecessary degree of abstraction, I suppose one could use the mathematical term global element for such a function [taking into account the necessary correction of the question in Henning Makholm's answer, of course]. Quoting user Andrea's answer to the question Elements and arrows in a category:




          As you noted, in the definition of a category, objects do not have elements. However, in a category there can be arrows that act like the elements of a set would do.



          In a category $mathbf{C}$, a terminal object, call it $1$, is defined as follows.
          For any object $A$ of $mathbf{C}$ there exists a unique arrow $!:A rightarrow 1$. Terminal objects are unique up to isomorphism. In a category with a terminal object $1$, any given object $A$ then, there is a unique arrow to $1$, but there may be several arrows $a:1 rightarrow A$ to the object. These are called global elements or points of $A$. [$ldots$]



          To see why this is interesting, lets look at $mathbf{Sets}$, the category of sets and functions. There, the terminal object is any set containing only one element, like $1 equiv {1}$. For each set $X$ there is only one function to it, ie $ forall x in X : x mapsto 1$ so this is a terminal object. The [global] elements of $X$ then are the functions (arrows) from ${1} rightarrow X$, and it is easy to see that the set of such arrows is isomorphic to the set of elements of $X$, In other words, for each element $xin X$ there is an arrow ${1} rightarrow X$, the function $1mapsto x$. And for each arrow there is an element.
          Thus in $mathbf{Sets}$, the [global] elements of $X$ reduce to the elements of $X$.




          See also Global element - Wikipedia, or generalized element in nLab, or page 78 of Robert Goldblatt, Topoi: The Categorial Analysis of Logic (2nd ed. 1984, repr. Dover 2006) - although he just calls them elements, which would be confusing in this context!






          share|cite|improve this answer





















          • Nice find! $(+1)$
            – Henning Makholm
            Nov 22 '18 at 1:12
















          3














          Although it invokes an unnecessary degree of abstraction, I suppose one could use the mathematical term global element for such a function [taking into account the necessary correction of the question in Henning Makholm's answer, of course]. Quoting user Andrea's answer to the question Elements and arrows in a category:




          As you noted, in the definition of a category, objects do not have elements. However, in a category there can be arrows that act like the elements of a set would do.



          In a category $mathbf{C}$, a terminal object, call it $1$, is defined as follows.
          For any object $A$ of $mathbf{C}$ there exists a unique arrow $!:A rightarrow 1$. Terminal objects are unique up to isomorphism. In a category with a terminal object $1$, any given object $A$ then, there is a unique arrow to $1$, but there may be several arrows $a:1 rightarrow A$ to the object. These are called global elements or points of $A$. [$ldots$]



          To see why this is interesting, lets look at $mathbf{Sets}$, the category of sets and functions. There, the terminal object is any set containing only one element, like $1 equiv {1}$. For each set $X$ there is only one function to it, ie $ forall x in X : x mapsto 1$ so this is a terminal object. The [global] elements of $X$ then are the functions (arrows) from ${1} rightarrow X$, and it is easy to see that the set of such arrows is isomorphic to the set of elements of $X$, In other words, for each element $xin X$ there is an arrow ${1} rightarrow X$, the function $1mapsto x$. And for each arrow there is an element.
          Thus in $mathbf{Sets}$, the [global] elements of $X$ reduce to the elements of $X$.




          See also Global element - Wikipedia, or generalized element in nLab, or page 78 of Robert Goldblatt, Topoi: The Categorial Analysis of Logic (2nd ed. 1984, repr. Dover 2006) - although he just calls them elements, which would be confusing in this context!






          share|cite|improve this answer





















          • Nice find! $(+1)$
            – Henning Makholm
            Nov 22 '18 at 1:12














          3












          3








          3






          Although it invokes an unnecessary degree of abstraction, I suppose one could use the mathematical term global element for such a function [taking into account the necessary correction of the question in Henning Makholm's answer, of course]. Quoting user Andrea's answer to the question Elements and arrows in a category:




          As you noted, in the definition of a category, objects do not have elements. However, in a category there can be arrows that act like the elements of a set would do.



          In a category $mathbf{C}$, a terminal object, call it $1$, is defined as follows.
          For any object $A$ of $mathbf{C}$ there exists a unique arrow $!:A rightarrow 1$. Terminal objects are unique up to isomorphism. In a category with a terminal object $1$, any given object $A$ then, there is a unique arrow to $1$, but there may be several arrows $a:1 rightarrow A$ to the object. These are called global elements or points of $A$. [$ldots$]



          To see why this is interesting, lets look at $mathbf{Sets}$, the category of sets and functions. There, the terminal object is any set containing only one element, like $1 equiv {1}$. For each set $X$ there is only one function to it, ie $ forall x in X : x mapsto 1$ so this is a terminal object. The [global] elements of $X$ then are the functions (arrows) from ${1} rightarrow X$, and it is easy to see that the set of such arrows is isomorphic to the set of elements of $X$, In other words, for each element $xin X$ there is an arrow ${1} rightarrow X$, the function $1mapsto x$. And for each arrow there is an element.
          Thus in $mathbf{Sets}$, the [global] elements of $X$ reduce to the elements of $X$.




          See also Global element - Wikipedia, or generalized element in nLab, or page 78 of Robert Goldblatt, Topoi: The Categorial Analysis of Logic (2nd ed. 1984, repr. Dover 2006) - although he just calls them elements, which would be confusing in this context!






          share|cite|improve this answer












          Although it invokes an unnecessary degree of abstraction, I suppose one could use the mathematical term global element for such a function [taking into account the necessary correction of the question in Henning Makholm's answer, of course]. Quoting user Andrea's answer to the question Elements and arrows in a category:




          As you noted, in the definition of a category, objects do not have elements. However, in a category there can be arrows that act like the elements of a set would do.



          In a category $mathbf{C}$, a terminal object, call it $1$, is defined as follows.
          For any object $A$ of $mathbf{C}$ there exists a unique arrow $!:A rightarrow 1$. Terminal objects are unique up to isomorphism. In a category with a terminal object $1$, any given object $A$ then, there is a unique arrow to $1$, but there may be several arrows $a:1 rightarrow A$ to the object. These are called global elements or points of $A$. [$ldots$]



          To see why this is interesting, lets look at $mathbf{Sets}$, the category of sets and functions. There, the terminal object is any set containing only one element, like $1 equiv {1}$. For each set $X$ there is only one function to it, ie $ forall x in X : x mapsto 1$ so this is a terminal object. The [global] elements of $X$ then are the functions (arrows) from ${1} rightarrow X$, and it is easy to see that the set of such arrows is isomorphic to the set of elements of $X$, In other words, for each element $xin X$ there is an arrow ${1} rightarrow X$, the function $1mapsto x$. And for each arrow there is an element.
          Thus in $mathbf{Sets}$, the [global] elements of $X$ reduce to the elements of $X$.




          See also Global element - Wikipedia, or generalized element in nLab, or page 78 of Robert Goldblatt, Topoi: The Categorial Analysis of Logic (2nd ed. 1984, repr. Dover 2006) - although he just calls them elements, which would be confusing in this context!







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Nov 21 '18 at 20:20









          Calum GilhooleyCalum Gilhooley

          4,152529




          4,152529












          • Nice find! $(+1)$
            – Henning Makholm
            Nov 22 '18 at 1:12


















          • Nice find! $(+1)$
            – Henning Makholm
            Nov 22 '18 at 1:12
















          Nice find! $(+1)$
          – Henning Makholm
          Nov 22 '18 at 1:12




          Nice find! $(+1)$
          – Henning Makholm
          Nov 22 '18 at 1:12











          1














          Interesting question.



          I think that speaking strictly mathematically the "function" $h$ that takes no input and returns a value is not a function, since a function is defined as a set of ardered pairs ...



          It is in effect just a way to insert a constant when it's called.



          Of course there is every reason to call it a function in a computer program, and even a good thing to do, since you can then change the value of that constant by changing the code for the function without having to find all the places it's called. (There are other programming strategies for this design.)






          share|cite|improve this answer





















          • I am wondering then, can constants be considered in the set of empty functions? (from by answer earlier) or are they fundamentally different?
            – Michael Choi
            Nov 21 '18 at 19:33


















          1














          Interesting question.



          I think that speaking strictly mathematically the "function" $h$ that takes no input and returns a value is not a function, since a function is defined as a set of ardered pairs ...



          It is in effect just a way to insert a constant when it's called.



          Of course there is every reason to call it a function in a computer program, and even a good thing to do, since you can then change the value of that constant by changing the code for the function without having to find all the places it's called. (There are other programming strategies for this design.)






          share|cite|improve this answer





















          • I am wondering then, can constants be considered in the set of empty functions? (from by answer earlier) or are they fundamentally different?
            – Michael Choi
            Nov 21 '18 at 19:33
















          1












          1








          1






          Interesting question.



          I think that speaking strictly mathematically the "function" $h$ that takes no input and returns a value is not a function, since a function is defined as a set of ardered pairs ...



          It is in effect just a way to insert a constant when it's called.



          Of course there is every reason to call it a function in a computer program, and even a good thing to do, since you can then change the value of that constant by changing the code for the function without having to find all the places it's called. (There are other programming strategies for this design.)






          share|cite|improve this answer












          Interesting question.



          I think that speaking strictly mathematically the "function" $h$ that takes no input and returns a value is not a function, since a function is defined as a set of ardered pairs ...



          It is in effect just a way to insert a constant when it's called.



          Of course there is every reason to call it a function in a computer program, and even a good thing to do, since you can then change the value of that constant by changing the code for the function without having to find all the places it's called. (There are other programming strategies for this design.)







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Nov 21 '18 at 19:30









          Ethan BolkerEthan Bolker

          41.8k547110




          41.8k547110












          • I am wondering then, can constants be considered in the set of empty functions? (from by answer earlier) or are they fundamentally different?
            – Michael Choi
            Nov 21 '18 at 19:33




















          • I am wondering then, can constants be considered in the set of empty functions? (from by answer earlier) or are they fundamentally different?
            – Michael Choi
            Nov 21 '18 at 19:33


















          I am wondering then, can constants be considered in the set of empty functions? (from by answer earlier) or are they fundamentally different?
          – Michael Choi
          Nov 21 '18 at 19:33






          I am wondering then, can constants be considered in the set of empty functions? (from by answer earlier) or are they fundamentally different?
          – Michael Choi
          Nov 21 '18 at 19:33




















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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.


          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%2f3008200%2fterm-for-function-which-maps-an-empty-set-to-range-of-size-one%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

          MongoDB - Not Authorized To Execute Command

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

          How to fix TextFormField cause rebuild widget in Flutter