Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

What does this symbol: -> , mean?

enter image description here

share|improve this question
3  
Isn't there a computing site where this question would not be off-topic? –  Gerry Myerson Apr 11 '12 at 0:22
1  
See e.g. this Wikipedia section –  joriki Apr 11 '12 at 0:24
2  
I was tempted to post an answer, but I voted to close as off-topic. This question belongs to Computer Science. Stackexchange. –  user2468 Apr 11 '12 at 0:29
1  
Great. For your benefit, the types of the said language are either t = int, t = bool or functions t -> t. So things like (bool -> (int -> bool)) -> (bool -> int) are legitimate types here. –  user2468 Apr 11 '12 at 0:34
5  
Voting to reopen. @JD: We were explicitly promised when the CS.SE ghetto opened that it would not affect what is on topic at MSE. Do you have any information that this has changed? –  Henning Makholm Apr 12 '12 at 11:38

2 Answers 2

up vote 3 down vote accepted

It is a function type, e.g. $\mathbb{R} \to \mathbb{R}$ would denote the type (you can think of this as kind of set) of all functions from reals to reals.

In mathematics (especially set theory) this is usually denoted as $\mathbb{R}^\mathbb{R}$, but again this would denote a set of all functions and the type is just a formal notion (that of course can have some intuitive interpretations).

share|improve this answer
    
Thank You Very Much, so it's a special type in a way. Awesome thanks a lot. –  Adel Apr 11 '12 at 0:30
1  
Please give a reference in the MinML documentation which states that this is what is the meaning. –  Aryabhata Apr 13 '12 at 21:42
2  
@Aryabhata I didn't checked anywhere, it is just a widespread convention and traditional notation in simply typed lambda calculus, majority of statically typed functional languages (especially Standard ML, OCaml and probably any other derivatives of ML), and almost all modern (i.e. post Hindley-Milner type-system) papers in type theory. However, if you still want a reference, here it is. –  dtldarek Apr 13 '12 at 22:24
    
@dtldarek: Just giving a link to the whole document? :-) The point I wanted to make was, you cannot be reasonably sure of this answer, without a reference to some MinML programming language documentation. –  Aryabhata Apr 13 '12 at 22:30
1  
@dtldarek: Of course you don't have to formalize every word you type. That will be pointless. All I was saying is that this is more of a programming language question, than a type theory question! Notice that when asked for references, you can only refer to MinML documentation, rather than a book on type theory. I refer you to this meta thread: meta.math.stackexchange.com/questions/3954/…. –  Aryabhata Apr 14 '12 at 15:56

On the slide here, which only defines the syntax of types and not their semantics, -> is just some symbol. It has no particular meaning, except that certain nodes in the abstract syntax tree are labeled with it. (And other nodes are labeled int and bool).

Later in the slide set, one hopes, there will be some typing rules that tell you what you can do with types built using the -> symbol. These rules will implicitly define what it "means". But it has no meaning beyond what follows deductively from the typing rules.

It does have some intuition attached to it, which is what dtldarek's answer describes. This intuition does not count when constructing formal arguments about the type system, though -- then only the actual typing rules count.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.