- From: r.britten at auckland.ac.nz (Randall Britten)
- Subject: [cellml-discussion] A typed lambda calculus system for CellML
- Date: Thu, 7 Aug 2008 14:31:06 +1200
>
>>> MathML operators for dealing with types:
>
>>> ----------------------------------------
>
>>> - "Creating types which represent the product space of two (or more)
>
>>>
>
>> other
>
>>
>
>>> types. For example, given the types real_metre and real_second,
creates
>
>>>
>
>> the
>
>>
>
>>> type for both a real_metre and real_second." Couldn't you refer to
>
>>>
>
>> "product"
>
>>
>
>>> rather than "product space"?
>
>>>
>
>> I mean product space in the sense that the set of acceptable values for
>
>> the type is the cartesian product of the sets of possible values of the
>
>> types the operator is applied to. So for example, a variable of the
>
>> product space type of real_metre x real_second could take the value
(5m,
>
>> 10s).
>
>>
>
>
>
> Ok, though I am now wondering when such a product would be useful to
have.
>
>
>
Any time you have two or more pieces of information that are so tightly
>
coupled they should be in one variable instead of two, or when you want
>
to put that information onto a list. Complex numbers, Cartesian
>
co-ordinates, and similar sorts of tightly coupled structured
>
information would be likely applications.
Just a thought: a function of two variables, one of which is in metres and
the other in seconds could also be viewed as a function of a single variable
whose type is the ordered pair.
e.g. function calculateSpeed(distanceTravelled[metres], timeTaken[seconds])
could also be calculateSpeed( distanceAndSpeed[ metre x second ])
We might want to consider that for functions of multiple variables. Same
goes for returning multiple values from a function.
Overall, though I think it takes some work to digest Andrew's document, I
think he has done an excellent job. Well done, Andrew.
Andrew, please could you recommend some lambda calculus introduction
resources.
Regards,
Randall
Archive powered by MHonArc 2.6.18.