Discussion of Homotopy Type Theory and Univalent Foundations
 help / color / mirror / Atom feed
From: Dan Licata <d...@cs.cmu.edu>
To: Jon Sterling <j...@jonmsterling.com>
Cc: HomotopyT...@googlegroups.com
Subject: Re: [HoTT] Different notions of equality; terminology
Date: Tue, 19 Jul 2016 22:45:31 -0400	[thread overview]
Message-ID: <D76049BD-95A6-408C-AC02-291AF928D4D1@cs.cmu.edu> (raw)
In-Reply-To: <1468946947.2314129.670766785.49572383@webmail.messagingengine.com>

Maybe part of the problem is that we are trying to jam the terminology into too low-dimensional a feature space?  I think there are at least the following different distinctions:

(A) how do you use an equality?  I'll use Vladimir's terminology of substitutional vs transportational for this.  

(B) is the equality represented by an element of a type, or by a judgement other than membership in a type?  I'll use typal vs judgemental for this, though this is a generalization of what is usually called "judgemental".  

(C) is the equality "strict"/"exact", or a "path"/"identification"?

Of these, I can come up with examples for 6/8 (not (substitutional and path)):

A=substitutional, B=typal, C=exact: the equality type in a computational type theory or ITT+equality reflection
A=substitutional, B=typal, C=path: doesn't make sense
A=substitutional, B=judgemental, C=exact: the equality judgement in a computational type theory
A=substitutional, B=judgemental, C=path: doesn't make sense
A=transportational, B=typal, C=exact: the equality type in the Altenkirch, McBride, Swierstra observational type theory paper
A=transportational, B=typal, C=path: the Id_A(M,N) type in intensional type theory + univalence
A=transportational, B=judgemental, C=exact: rarer, but has come up in some programming languages work, e.g. "System FC" which is used as an internal language in the GHC Haskell compiler.  here there is a judgement of type equality that are used as "coercions" but which have no actual runtime effect.  another example would be something where you mark uses of (what is usually called) a "definitional equality" judgement in the terms
A=transportational, B=judgemental, C=path: a line x:I |- a : A in a cubical type theory 

-Dan

On Jul 19, 2016, at 12:49 PM, Jon Sterling <j...@jonmsterling.com> wrote:

> Hi Mike,
> 
> I liked your message below! I am essentially in agreement with most of
> your remarks. Let me begin by saying, I think we should call
> "propositional/typeal" equality "internal equality", since the whole
> point is that it consists in the internalization of a judgment as a
> proposition/type—and the evidence of the judgment corresponds to the
> truth of the proposition/type.
> 
> On Tue, Jul 19, 2016, at 05:53 AM, Michael Shulman wrote:
>> My apologies to everyone (except Andrew), who saw his replies to my
>> messages without the originals.  The problem was an email issue on my
>> end.  Below I summarize the content of my messages; this will be my
>> last email on the subject.
>> 
>> ~~
>> 
>> I have been advocating the term "typal equality" for what used to be
>> called "propositional".  It is less awkward than "type-level" or
>> "type-theoretic", and conveys exactly what is meant, namely that the
>> statement of equality *is a type*.  I prefer it to "logical equality"
>> because traditionally, "logic" has often referred only to the type
>> theory of mere propositions, so "logical equality" has something of
>> the same problem as "propositional equality".
> 
> In the programming languages field, we use "logical equivalence" to
> refer to a type directed extensional equality, for what it's worth.
> 
>> 
>> For the reasons given by Andrew, in most cases it suffices to simply
>> say "equality".  It only occasionally happens that we need to
>> disambiguate what kind of equality we are talking about, and in that
>> case I think it better to use a word that conveys *exactly* what the
>> distinction is, rather than any historical or opinionable gloss on
>> that distinction.  (If this is "logical" equality, is the other one
>> "illogical"?)  Typal equality is indeed related to other kinds of
>> equality that existed before type theory, but inside of type theory,
>> what distinguishes it is precisely that it is a type (and inside of
>> type theory, "predicate/formula/thing-you-can-prove-or-inhabit" is
>> just a long-winded way of saying "type").
> 
> Now, in response to this, Andrew has said: 
> 
>> The distinction is that it is the equality predicate/formula/thing-you-can-prove-or-inhabit.
> 
> If this was intended to mean that the propositional/"typal"/internal
> equality is the one you can inhabit/prove, whereas the judgmental
> equality holds or fails to hold on its own (i.e. is not susceptible to
> mathematical argument), I must disagree. The notion of a "judgment" is
> very broad and very old, and in general, a judgment may become evident
> by virtue of a non-trivial proof; see Martin-Löf's paper "Analytic and
> Synthetic Judgment in Type Theory".
> 
> So, we can say with confidence that the distinction is not that it is a
> thing which you can prove—since that is in fact the same for judgments
> and for types. The difference is just the level at which this object
> lives...
> 
>> 
>> For the same reasons, I prefer "judgmental equality" because it
>> conveys exactly what is meant in that case, namely that the statement
>> of equality *is a judgment*.  Maybe it doesn't have to be formulated
>> as a judgment, but as far as I know in all cases it can our could be
>> so, without changing the type theory materially.
>> 
>> This possible slight inaccuracy seems to me to be preferable to the
>> more serious problem with "definitional equality", namely that such a
>> statement of equality is certainly not always a definition.  For
>> instance, in type theory with a reflection rule from typal equality to
>> judgmental, there is no sense in which a judgmental equality obtained
>> by that rule is a "definition" of one side in terms of the other.
>> Associativity of addition of natural numbers is not true "by
>> definition" unless you are willing to redefine the word "definition".
> 
> Excellent remark about "judgmental equality" and "definitional
> equality". I also think "judgmental" is the correct term to use in
> general, and I would go even further as to say that there is no "slight
> inaccuracy" to worry about; that is, people often have this idea that
> untyped conversion (for instance) is not "judgmental", but whether
> something is typed or not is irrelevant to whether it is a judgment.
> Untyped conversion is still a judgment, and if you use it as equality,
> it is the judgmental equality for your language.
> 
> [Now, contrary to remarks made on this list, Agda's underlying type
> theory (regardless of its implementation, which I know less about) has
> the full type-directed judgmental equality—what I recall from what Peter
> Dybjer mentioned last year is that Agda is based on an extension of
> Martin-Löf's Logical Framework, which is described in detail in
> Nordström et al's "Programming in Martin-Löf's Type Theory"; now, to my
> knowledge, Coq's equality judgment is based on untyped conversion, but
> this does not mean it lacks an equality judgment.]
> 
> So, what's the place for "definitional equality"? In Per Martin-Löf's
> Bibliopolis book (Intuitionistic Type Theory, from lectures given in
> Padua, 1980), he explains that definitional equality is *only* syntactic
> equality modulo alpha-equivalence & definitional extension (replacing
> left-hand-side with right-hand-side)—i.e. equality of "sense".
> 
> A careful reader will note that definitional equality is also of course
> a judgment, so in some sense it is technically a form of judgmental
> equality; and in a theory like the Canonical Logical Framework developed
> by Watkins et al, it is the only possible form of judgmental equality.
> 
> By convention, we do tend to use the term "judgmental equality"
> specifically for some type-directed thing that is a bit coarser than
> syntactic equality, but I don't think that's really essential—it just
> depends on the theory, and sometimes one equality *judgment* is singled
> out as "the judgmental equality", and other finer-grained "equality"
> judgments get called something else… There is little rhyme or reason to
> it, and I think that's OK.
> 
> In my mind, the term "judgmental equality" only serves to contrast it
> with an *internal* notion of equality (what has been called
> propositional equality, or typal equality, etc.). The term "judgmental"
> just specifies at what level/layer of the theory it is happening.
> 
> Best,
> Jon
> 
> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups
>> "Homotopy Type Theory" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to HomotopyTypeThe...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups "Homotopy Type Theory" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to HomotopyTypeThe...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


  parent reply	other threads:[~2016-07-20  2:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 20:45 Andrew Polonsky
2016-07-18 21:03 ` [HoTT] " Andrej Bauer
2016-07-18 21:05 ` Vladimir Voevodsky
2016-07-18 21:13   ` Andrew Polonsky
     [not found]     ` <2506A3A8-8AC0-4B49-AD1E-D660A7A15245@ias.edu>
     [not found]       ` <CABcT7WDYqUY=efCTvdRpdW98aDSXpjfHGo9pJz2jBNa3yNXCgQ@mail.gmail.com>
     [not found]         ` <085E4ACF-BD06-484F-ACA3-17DD6249CF76@ias.edu>
     [not found]           ` <CABcT7WBKxFhcvuBP66wOcUzU1uPNUqPqXoSYW4aCJv4c8U7iuQ@mail.gmail.com>
2016-07-18 21:45             ` Vladimir Voevodsky
2016-07-18 21:16   ` Dimitris Tsementzis
2016-07-18 21:17 ` Jon Sterling
2016-07-18 21:24   ` Andrew Polonsky
     [not found] ` <CAOvivQyZzdyhFFPfqkH4W+Z--78t0LEVWtthLhCpDxUkJNUrMQ@mail.gmail.com>
2016-07-18 22:20   ` Andrew Polonsky
2016-07-18 22:24     ` Jon Sterling
     [not found]     ` <CAOvivQy44FvN_bVD+nby8t0BnnTYf38dR5=s31_Yv_VsDOzLCA@mail.gmail.com>
2016-07-18 22:43       ` Andrew Polonsky
     [not found]         ` <CAOvivQw15pOvi9wzWFpB2WcwmgxB=uw-826xNmxUck57VagEQA@mail.gmail.com>
2016-07-18 23:01           ` Andrew Polonsky
2016-07-19 12:53             ` Michael Shulman
2016-07-19 16:49               ` Jon Sterling
2016-07-19 19:07                 ` Egbert Rijke
2016-07-20  2:45                 ` Dan Licata [this message]
2016-07-19 23:19 ` Martin Hotzel Escardo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D76049BD-95A6-408C-AC02-291AF928D4D1@cs.cmu.edu \
    --to="d..."@cs.cmu.edu \
    --cc="HomotopyT..."@googlegroups.com \
    --cc="j..."@jonmsterling.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).