tag:dreamwidth.org,2010-05-25:518115Renaissance Grrrlwren romanowren romano2016-04-25T01:45:02Ztag:dreamwidth.org,2010-05-25:518115:108092Quantifiers in type theory2016-04-25T00:12:55Z2016-04-25T01:45:02Zpublic2<p>All this stuff is "well known", but I want to put it out there for folks who may not have encountered it, or not encountered it all together in one picture.</p>
<p>The Damas–Hindley–Milner type system (i.e., the type system that Algorithm W is inferring types for) is propositional logic extended with <b><i>rank-1 second-order universal</i></b> quantifiers. It is interesting because it is so particularly stable with respect to inference, decidability, etc. That is, we can come up with many other algorithms besides Algorithm W and they enjoy nice properties like the fact that adding type signatures won't cause inference to fail. (It's worth noting, that Algorithm W is DEXPTIME-complete; so while in practice it's often linear time, for pathological inputs it can take exponentially long. However, if we put a constant bound on the depth of nested let-bindings, then the upper bound becomes polynomial.)</p>
<p>The extension of DHM with <b><i>rank-1 second-order existential</i></b> quantifiers is strictly more powerful. It is interesting because it allows unrestricted use of both of the quantifiers in prenex position; thus, it is the limit/top of the alternating quantifier hierarchy (à la the arithmetical hierarchy) that starts with DHM. Surely there are other interesting properties here, but this system is understudied relative to the ones above and below. <i>Edit:</i> Although GHC gets by with encoding existentials away, it's worth noting that MLF allows existentials where the unpacking is implicit rather than requiring an "unseal" or case eliminator <a href="http://research.microsoft.com/en-us/um/people/daan/download/papers/existentials.pdf">(Leijen 2006)</a>; and also that UHC does in fact offer first-class existentials <a href="http://dspace.library.uu.nl/bitstream/handle/1874/7352/full.pdf?sequence=8">(Dijkstra 2005)</a>.</p>
<p>The extension with <b><i>rank-2 second-order universals<i></i></i></b> (i.e., where the universal quantifier can appear to the left of one function arrow) is strictly more powerful still. Here we can encode rank-1 existentials, but my point in this whole post is to point out that rank-1 existentials themselves are strictly weaker than the rank-2 universals it takes to encode them! Also, one little-known fact: this type system is interesting because it is the last one in this progression where type inference is decidable. The decidability of rank-2 universal quantification is part of the reason why GHC distinguishes between <code>-XRank2Types</code> vs <code>-XRankNTypes</code>. Alas, although inference is decidable —and thus of mathematical interest— it is not decidable in the same robust way that DHM is. That is, if we care about human factors like good error messages or not breaking when the user adds type signatures, then we don't get those properties here. Still, the fact that this system is at the cusp of decidable inference is important to know. <i>Edit:</i> Also of interest, this system has the same typeable terms as simply-typed λ-calculus with <b><i>rank-2 intersection types</i></b>, and the type inference problem here is fundamentally DEXPTIME-complete <a href="http://publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TM-531b.pdf">(Jim 1995)</a>.</p>
<p>Things keep alternating back and forth between existentials and universals of each rank; so far as I'm aware, none of these systems are of any particular interest until we hit the limit: <b><i>rank-ω (aka: rank-N) second-order quantification<i></i></i></b>. This type system is often called "System F", but that's a misnomer. It is important to differentiate between the syntactic system (i.e., actual System F) we're inferring types for, vs the type system (aka: propositional logic with second-order quantifiers) in which the inferred types live. That is, we can perfectly well have a syntactic system which doesn't have explicit type abstractions/applications but for which we still ascribe rank-ω types. It so happens that the type inference problem is undecidable for that syntactic system, but it was already undecidable way back at rank-3 so the undecidability isn't particularly novel.</p>
<div class="btn-group">
<a href="https://twitter.com/share?text=Quantifiers%20in%20type%20theory&url=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F108092.html&via=wrengr" class="btn" title="Share on Twitter" target="_blank">Twitter</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F108092.html&t=Quantifiers%20in%20type%20theory" class="btn" title="Share on Facebook" target="_blank">Facebook</a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F108092.html" class="btn" title="Share on Google+" target="_blank">Google+</a>
<a href="http://www.tumblr.com/share/link?url=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F108092.html&name=Quantifiers%20in%20type%20theory" class="btn" title="Share on Tumblr" target="_blank">Tumblr</a>
<a href="http://wordpress.com/press-this.php?u=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F108092.html&t=Quantifiers%20in%20type%20theory&s=" class="btn" title="Share on WordPress" target="_blank">WordPress</a>
</div><br /><br /><img src="http://www.dreamwidth.org/tools/commentcount?user=winterkoninkje&ditemid=108092" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2010-05-25:518115:101420An introduction to recursive types2015-04-02T21:37:29Z2016-02-26T05:33:29Zpublic0<p>The past couple weeks I've been teaching about recursive types and their encodings in B522. Here's a short annotated bibliography for followup reading:</p>
<ul>
<li>For a basic intro to recursive types, and for the set-theoretic metatheory: see section IV, chapters 20 and 21.
<ul><li>Benjamin C. Pierce (2002) <i>Types and Programming Languages.</i> MIT Press.</li></ul></li>
<li>The proof of logical inconsistency and non-termination is "well-known". For every type <code>τ</code> we can define a fixed-point combinator and use that to exhibit an inhabitant of the type:
<ul><li><code>fix<sub>τ</sub> = λf:(τ→τ). let e = λx:(μα.α→τ). f (x (unroll x)) in e (roll<sub>(μα.α→τ)</sub> e)</code></li><li><code>⊥<sub>τ</sub> = fix<sub>τ</sub> (λx:τ. x)</code></li></ul></li>
<li>A category-theoretic proof that having fixed-points causes inconsistency
<ul><li>Hagen Huwig and Axel Poigné (1990) <a href="http://www.sciencedirect.com/science/article/pii/030439759090165E"><i>A note on inconsistencies caused by fixpoints in a Cartesian Closed Category.</i></a> Theoretical Computer Science, 73:101–112.</li></ul></li>
<li>The proof of Turing-completeness is "well-known". Here's a translation from the untyped λ-calculus to STLC with fixed-points:
<ul><li><code>(x)<sup>*</sup> = x</code></li><li><code>(λx. e)<sup>*</sup> = roll<sub>(μα.α→α)</sub> (λx:(μα.α→α). e<sup>*</sup>)</code></li><li><code>(f e)<sup>*</sup> = unroll (f<sup>*</sup>) (e<sup>*</sup>)</code></li></ul></li>
<li>Knaster–Tarski (1955): For any monotone function, <code>f</code>, (a) the least fixed-point of <code>f</code> is the intersection of all <code>f</code>-closed sets, and (b) the greatest fixed-point of <code>f</code> is the union of all <code>f</code>-consistent sets.
<ul><li>Alfred Tarski (1955) <a href="http://projecteuclid.org/euclid.pjm/1103044538"><i>A lattice-theoretical fixpoint theorem and its applications.</i></a> Pacific Journal of Mathematics 5(2):285–309.</li>
<li>Bronisław Knaster (1928) <i>Un théorème sur les fonctions d'ensembles.</i> Annales de la Société Polonaise de Mathématique, 6:133–134.</li></ul></li>
<li>For a quick introduction to category theory, a good place to start is:
<ul><li>Benjamin C. Pierce (1991) <i>Basic Category Theory for Computer Scientists.</i> MIT Press.</li></ul></li>
<li>For a more thorough introduction to category theory, consider:
<ul><li>Jiří Adámek, Horst Herrlich, and George Strecker (1990) <a href="http://katmat.math.uni-bremen.de/acc/"><i>Abstract and Concrete Categories: The Joy of Cats.</i></a> John Wiley and Sons.</li></ul></li>
<li>The Boehm–Berarducci encoding
<ul><li>Oleg Kiselyov (2012) <a href="http://okmij.org/ftp/tagless-final/course/Boehm-Berarducci.html"><i>Beyond Church encoding: Boehm–Berarducci isomorphism of algebraic data types and polymorphic lambda-terms</i></a></li>
<li>Corrado Boehm and Alessandro Berarducci (1985) <i>Automatic Synthesis of Typed Lambda-Programs on Term Algebras.</i> Theoretical Computer Science, v39:135–154</li></ul></li>
<li>Under βη-equivalence, Church/Boehm–Berarducci encodings are only weakly initial (hence, can define functions by recursion but can't prove properties by induction)
<ul><li>Herman Geuvers (1992) <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.35.9758"><i>Inductive and Coinductive types with Iteration and Recursion.</i></a> Proceedings of the 1992 Workshop on Types for Proofs and Programs, pp. 193–217</li></ul></li>
<li>However, using contextual equivalence, Church/Boehm–Berarducci encodings are (strongly) initial
<ul><li>Neel Krishnaswami (2009) <a href="https://golem.ph.utexas.edu/category/2009/12/syntax_semantics_and_structura_1.html#c030257">mentions in passing</a> [Better citation needed]</li></ul></li>
<li>Surjective pairing cannot be encoded in STLC (i.e., the implicational fragment of intuitionistic propositional logic): see p.155
<ul><li>Morten H. Sørensen and Paweł Urzyczyn (2006) <i>Lectures on the Curry–Howard isomorphism.</i> Studies in Logic and the Foundations of Mathematics, v.149.</li></ul></li>
<li>However, adding it is a conservative extension
<ul><li>Roel de Vrijer (1987) <i>Surjective Pairing and Strong Normalization: Two themes in lambda calculus.</i> dissertation, University of Amsterdam.</li>
<li>Roel de Vrijer (1989) <i>Extending the lambda calculus with surjective pairing is conservative.</i> 4th LICS, pp.204–215.</li>
<li>Kristian Støvring (2005) <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.164.3706"><i>Extending the Extensional Lambda Calculus with Surjective Pairing is Conservative.</i></a> BRICS.</li></ul></li>
<li>Boehm–Berarducci encoded pairs is not surjective pairing: the η-rule for Boehm–Berarducci encoding of pairs cannot be derived in System F. (The instances for closed terms can be, just not the general rule.)
<ul><li>Peter Selinger <a href="http://www.mathstat.dal.ca/~selinger/papers/lambdanotes.pdf">mentions in passing (p.77)</a> [Better citation needed]</li></ul></li>
<li>Compiling data types with Scott encodings
<ul><li>Jan Martin Jansen, Pieter Koopman, and Rinus Plasmeijer (200X) <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.76.5557"><i>Data Types and Pattern Matching by Function Application.</i></a></li>
<li>Jan Martin Jansen, Pieter Koopman, and Rinus Plasmeijer (2006) <a href="http://www.nlda-tw.nl/janmartin/papers/jmjansenTFP2006.pdf"><i>Efficient Interpretation by Transforming Data Types and Patterns to Functions.</i></a> Trends in Functional Programming.</li>
<li>Jan Martin Jansen, Rinus Plasmeijer, and Pieter Koopman (2010) <a href="http://hbo-kennisbank.uvt.nl/cgi/nda/show.cgi?fid=2381"><i>Comprehensive Encoding of Data Types and Algorithms in the λ-Calculus.</i></a> J. Functional Programming.</li>
<li>Pieter Koopman, Rinus Plasmeijer, and Jan Martin Jansen (2014) <a href="https://ifl2014.github.io/submissions/ifl2014_submission_13.pdf"><i>Church encoding of data types considered harmful for implementations.</i></a> IFL submission</li></ul></li>
<li>For more on the difference between Scott and Mogensten–Scott encodings:
<ul><li>Aaron Stump (2009) <a href="http://homepage.cs.uiowa.edu/~astump/classes/185/archon.pdf"><i>Directly Reflective Meta-Programming.</i></a> J. Higher Order and Symbolic Computation, 22(2):115–144.</li></ul></li>
<li>Parigot encodings
<ul><li>M. Parigot (1988) <i>Programming with proofs: A second-order type theory.</i> ESOP, LNCS 300, pp.145–159. Springer.</li></ul></li>
<li>Parigot encoding of natural numbers is not canonical (i.e., there exist terms of the correct type which do not represent numbers); though both Church/Boehm–Berarducci and Scott encoded natural numbers are.
<ul><li>Herman Geuvers (2014) <a href="http://www.cs.ru.nl/~herman/talk-Types2014Paris-May_ChurchScott.pdf">mentions in passing</a> [Better citation needed]</li></ul></li>
<li>For more on catamorphisms, anamorphisms, paramorphisms, and apomorphisms
<ul><li>Varmo Vene and Tarmo Uustalu (1998) <a href="http://cs.ioc.ee/~tarmo/papers/nwpt97-peas.pdf"><i>Functional programming with apomorphisms (corecursion).</i></a> In Proc. Estonian Acad. Sci. Phys. Math., 47:147–161</li>
<li>Erik Meijer, Maarten Fokkinga, and Ross Paterson (1991) <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.125"><i>Functional Programming with Bananas, Lenses, Envelopes, and Barbed Wire.</i></a> In Proc. 5th ACM conference on Functional programming languages and computer architecture, pp.124–144
<ul><li><a href="http://blog.ezyang.com/2010/05/bananas-lenses-envelopes-and-barbed-wire-a-translation-guide/">A translation of Squiggol into Haskell by Edward Yang.</a></li></ul></li></ul></li>
<li>build/foldr list fusion
<ul><li>Andy Gill, John Launchbury, and Simon Peyton Jones (1993) <a href="http://dl.acm.org/citation.cfm?doid=165180.165214"><i>A short cut to deforestation.</i></a> In Proc. Functional Programming Languages and Computer Architecture, pp.223–232.</li>
<li>Many more links at the bottom of <a href="https://wiki.haskell.org/Correctness_of_short_cut_fusion">this page</a></li></ul></li>
<li>For another general introduction along the lines of what we covered in class
<ul><li>Philip Wadler (1990) <a href="http://homepages.inf.ed.ac.uk/wadler/papers/free-rectypes/free-rectypes.txt"><i>Recursive types for free!</i></a></li></ul></li>
<li>"Iterators" vs "recursors" in Heyting arithmetic and Gödel's System T: see ch.10:
<ul><li>Morten H. Sørensen and Paweł Urzyczyn (2006) <i>Lectures on the Curry–Howard isomorphism</i> Studies in Logic and the Foundations of Mathematics, v.149.</li></ul></li>
<li>There are a great many more papers by Tarmo Uustalu, Varmo Vene, Ralf Hinze, and Jeremy Gibbons on all this stuff; just google for it.</li>
</ul>
<div class="btn-group">
<a href="https://twitter.com/share?via=wrengr&url=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F101420.html&text=An%20introduction%20to%20recursive%20types" class="btn" title="Share on Twitter" target="_blank">Twitter</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F101420.html&t=An%20introduction%20to%20recursive%20types" class="btn" title="Share on Facebook" target="_blank">Facebook</a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F101420.html" class="btn" title="Share on Google+" target="_blank">Google+</a>
<a href="http://www.tumblr.com/share/link?url=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F101420.html&name=An%20introduction%20to%20recursive%20types" class="btn" title="Share on Tumblr" target="_blank">Tumblr</a>
<a href="http://wordpress.com/press-this.php?u=http%3A%2F%2Fwinterkoninkje.dreamwidth.org%2F101420.html&t=An%20introduction%20to%20recursive%20types&s=" class="btn" title="Share on WordPress" target="_blank">WordPress</a>
</div><br /><br /><img src="http://www.dreamwidth.org/tools/commentcount?user=winterkoninkje&ditemid=101420" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2010-05-25:518115:99975Upcoming talk2014-10-21T02:39:32Z2014-11-06T07:00:53Zpublic1<p>For all you local folks, I'll be giving a talk about my dissertation on <b>November 5th at 4:00–5:00 in Ballantine Hall 011</b>. For those who've heard me give talks about it before, not much has changed since NLCS 2013. But the majority of current CL/NLP, PL, and logic folks haven't seen the talk, so do feel free to stop by.</p>
<blockquote><p><i>Abstract:</i> Many natural languages allow scrambling of constituents, or so-called "free word order". However, most syntactic formalisms are designed for English first and foremost. They assume that word order is rigidly fixed, and consequently these formalisms cannot handle languages like Latin, German, Russian, or Japanese. In this talk I introduce a new calculus —the chiastic lambda-calculus— which allows us to capture both the freedoms and the restrictions of constituent scrambling in Japanese. In addition to capturing these syntactic facts about free word order, the chiastic lambda-calculus also captures semantic issues that arise in Japanese verbal morphology. Moreover, chiastic lambda-calculus can be used to capture numerous non-linguistic phenomena, such as: justifying notational shorthands in category theory, providing a strong type theory for programming languages with keyword-arguments, and exploring metatheoretical issues around the duality between procedures and values.</p></blockquote>
<p><i>Edit 2014.11.05:</i> The <a href="http://cl.indiana.edu/~wren/pubs/chiastic_logicseminar2014.pdf">slides</a> from the talk are now up.</p><br /><br /><img src="http://www.dreamwidth.org/tools/commentcount?user=winterkoninkje&ditemid=99975" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2010-05-25:518115:83774Upcoming talk2013-05-20T22:11:45Z2013-07-03T03:43:14Zpublic0<p>Next month I'll be giving a talk at the <a href="http://www.indiana.edu/~iulg/nlcs.html">NLCS</a> workshop, on the chiastic lambda-calculi I first presented at NASSLLI 2010 (<a href="http://llama.freegeek.org/~wren/pubs/ccgjp_nasslli2010.pdf">slides</a>[1]). After working out some of the metatheory for one of my quals, I gave more recent talks at our local PL Wonks and CLingDing seminars (<a href="http://llama.freegeek.org/~wren/pubs/chiastic_plwonks2013.pdf">slides</a>). The NASSLLI talk was more about the linguistic motivations and the general idea, whereas the PLWonks/CLingDing talks were more about the formal properties of the calculus itself. For NLCS I hope to combine these threads a bit better— which has always been the challenge with this work.</p>
<p>NLCS is collocated with this year's <a href="http://lii.rwth-aachen.de/lics/lics13/">LICS</a> (and MFPS and CSF). I'll also be around for LICS itself, and in town for MFPS though probably not attending. So if you're around, feel free to stop by and chat.</p>
<p>[1] N.B., the NASSLLI syntax is a bit different than the newer version: square brackets were used instead of angle brackets (the latter were chosen because they typeset better in general); juxtaposition was just juxtaposition rather than being made explicit; and the left- vs right-chiastic distinction was called chi vs ksi (however, it turns out that ksi already has an important meaning in type theory).</p>
<p><i>Edit 2013.07.02:</i> the slides are <a href="http://llama.freegeek.org/~wren/pubs/chiastic_nlcs2013.pdf">available here</a>.</p><br /><br /><img src="http://www.dreamwidth.org/tools/commentcount?user=winterkoninkje&ditemid=83774" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2010-05-25:518115:83374PSA: deduction proofs in LaTeX2013-04-18T05:47:14Z2013-04-18T05:47:14Zpublic0<p>Until recently I've been using <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/semantic">semantic</a> for typesetting my deduction rules and deduction proofs. But in writing the last few papers I've become acutely aware of its limitations: in particular, it offers no way to do dotted or doubled inference lines. After looking around for a while I found <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/bussproofs">bussproofs</a>; and I don't think I'll ever look back.</p>
<p>The semantic package is solid enough, and follows the traditional structural/nested style of macros. At first I was quite dubious of bussproofs' stack-machine style of macros, but after typing up a few proofs in it, I'm convinced. Because you don't have all the nested braces, it's <i>much</i> easier to restructure, clean up, or copypaste chunks of proofs. It's a bit verbose, all told, but that's easy enough to remedy by writing your own layer of macros on top of it. The one downside to bussproofs (compared to semantic) is that it doesn't support arbitrarily many premisses, and it doesn't allow vertical orientation of premisses. So if your typing rules are complex enough, you may need to stick with semantic; but for doing proofs in basic logics, or for doing CCG derivations, bussproofs is where it's at.</p><br /><br /><img src="http://www.dreamwidth.org/tools/commentcount?user=winterkoninkje&ditemid=83374" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2010-05-25:518115:81548on differences in worldview between C/C++/Java and Haskell2013-01-27T04:41:50Z2013-01-27T04:41:50Zpublic0<p>Quoth <a href="http://cliffordbeshers.blogspot.com/2011/10/conalelliott-re-what-resources.html">Clifford Beshers</a>:</p>
<blockquote><p>As a test, ask your students to write down the definition of 'type'. I'll bet that their answers will be longer than 'set' and include some mention of bytes, words and big-endian. We were all trained to be mechanics instead of drivers, because all we had were go-carts.</p></blockquote><br /><br /><img src="http://www.dreamwidth.org/tools/commentcount?user=winterkoninkje&ditemid=81548" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2010-05-25:518115:79182New favorite quote2012-11-26T05:44:23Z2012-11-26T05:44:23Zpublic0<p>Quoth <a href="http://math.andrej.com/2012/09/28/substitution-is-pullback/">Paul Taylor</a>:</p>
<blockquote><p>This result is <b>folklore</b>, which is a technical term for a method of publication in category theory. It means that someone sketched it on the back of an envelope, mimeographed it (whatever that means) and showed it to three people in a seminar in Chicago in 1973, except that the only evidence that we have of these events is a comment that was overheard in another seminar at Columbia in 1976. Nevertheless, if some younger person is so presumptuous as to write out a proper proof and attempt to publish it, they will get shot down in flames.</p></blockquote><br /><br /><img src="http://www.dreamwidth.org/tools/commentcount?user=winterkoninkje&ditemid=79182" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2010-05-25:518115:72346PSA: Terminology confusion in dependent type theory2011-05-07T07:33:29Z2011-05-07T07:33:29Zpublic0<p>I've mentioned these a few times in different places, most recently on Reddit. So I figured I should repost them here for better googleability for folks just starting to learn about dependent types and type theory.</p>
<p><a href="http://www.reddit.com/r/haskell/comments/h3ius/generalised_gadts_agda_inductive_families_for/c1shi5f">PSA #1</a>: Beware: "type theory" and "Type Theory" are not the same thing, note the caps. The former describes the entire field of enquiry which explores possible theories about types; the latter is the name of one particular theory/system, namely the one Per Martin-Löf popularized (and others have extended and reinvented since then).</p>
<p>Yes, this is an extremely obnoxious detail, but it's one that often confuses newcomers; e.g., learning MLTT and thinking that applies to all type systems, or learning other type systems and then being confused when people make flagrantly false statements (when interpreted as statements about type theory as a whole, though they're true of MLTT). This is why I prefer to refer to Type Theory as "TT" or "MLTT", to avoid confusion, and because I am interested in the entire field of enquiry and in comparing different systems rather than focusing on just one.</p>
<p>ObTangent: There are similar reasons for why ML is called "ML" instead of "metalanguage".</p>
<p><a href="http://www.reddit.com/r/dependent_types/comments/grzfc/what_is_the_most_intuitive_dependent_type_theory/c1q5ptn">PSA #2</a>: There are conflicting meanings for the terms "sum" and "product" in dependent type land. Those coming from category theory and functional programming tend to say "sum" to mean tagged unions, "product" to mean pairs (e.g, cartesian products or similar), and "exponentials" to mean functions as objects— all of these exactly as in non-dependent languages. However, those coming more from the set-theory side of things use "product" to mean functions (whence the capital Pi), "sum" to mean pairs (whence the capital Sigma), and have no common term for unions.</p><br /><br /><img src="http://www.dreamwidth.org/tools/commentcount?user=winterkoninkje&ditemid=72346" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> comments