From: Neelakantan Krishnaswami <n.krish...@cs.bham.ac.uk>
To: Homotopy Type Theory <HomotopyT...@googlegroups.com>
Subject: Re: [HoTT] Re: cubical type theory with UIP
Date: Tue, 1 Aug 2017 02:14:15 -0700 (PDT) [thread overview]
Message-ID: <38162a12-c8b2-401d-b272-07d1db7c1be8@googlegroups.com> (raw)
In-Reply-To: <CAOvivQykPkQePQRELFbsLJSt9kVentz-S06m=qmw-gUz1Tc3fw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2632 bytes --]
On Monday, July 31, 2017 at 4:51:18 PM UTC+1, Michael Shulman wrote:
>
> Another motivation is that as far as I know, there is not a really
> satisfactory version of sequent calculus for first-order logic with
> equality (e.g. not having a fully satisfactory cut-elimination
> theorem). If cubical methods are a good way to treat equality
> "computationally", I wonder whether a "cubical sequent calculus" would
> be able to deal with equality better.
>
Actually, there *are* good versions of sequent calculus with
equality. Jean-Yves Girard and Peter Schroeder-Heister have both given
the appropriate rules. So, given a language of terms with some
equational theory, the right and left rules are:
—————————— =R
Γ ⊢ t = t
∀θ ∈ csu(s,t). θ(Γ) ⊢ Θ(C)
—————————————————————————— =L
Γ, s = t ⊢ C
The premise of the left rule quantifies over a *complete set of
unifiers* for s and t. For terms freely generated by some signature,
there is a single most general unifier (if one exists), and so the
left rule has at most one premise. Once you add equations then
there can be more than one most general unifier -- possibly even
infinite (eg, if terms are lambda-terms modulo beta/eta, as in
higher-order unification).
The Girard/Schroeder-Heister equality is not the same as the Martin-Lof
identity type, but it gives rise to a nicer programming language than raw J
does, since the left rule is invertible. Invertible left rules are what
give rise to
pattern matching syntax, and so languages like Agda choose a fragment
where the G/SH rule and J coincide to implement pattern matching.
Agda restricts pattern matching so that an identity type
argument can only have a refl pattern when the two terms being equated
are generated from variables and constructors. So an identity proof
p : (cons x y) = (cons a b)) can be matched as refl, but an identity
proof q : (append x y) = (append a b)) can't be.
This restriction ensures that first-order unification suffices for the
G/SH elim, and therefore to implement pattern matching.
If you are very interested in this topic, Joshua Dunfield and I have a draft
paper where we work out the Curry-Howard story for pattern matching
with the G/SH equality (what are called GADTs by PL theorists) in gory
detail:
* Sound and Complete Bidirectional Typechecking for Higher-Rank
Polymorphism and Indexed Types*
<http://www.cl.cam.ac.uk/~nk480/gadt.pdf>
--
Neel Krishnaswami
nk...@cl.cam.ac.uk
[-- Attachment #1.2: Type: text/html, Size: 2955 bytes --]
next prev parent reply other threads:[~2017-08-01 9:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-23 22:54 Michael Shulman
2017-07-29 1:47 ` Matt Oliveri
2017-07-29 2:25 ` [HoTT] " Jon Sterling
2017-07-29 7:29 ` Matt Oliveri
2017-07-29 6:19 ` Michael Shulman
2017-07-29 7:23 ` Matt Oliveri
2017-07-29 8:07 ` Michael Shulman
2017-07-29 10:19 ` Matt Oliveri
2017-07-29 11:08 ` Matt Oliveri
2017-07-29 21:19 ` Michael Shulman
[not found] ` <8f052071-09e0-74db-13dc-7f76bc71e374@cs.bham.ac.uk>
2017-07-31 3:49 ` Matt Oliveri
2017-07-31 15:50 ` Michael Shulman
2017-07-31 17:36 ` Matt Oliveri
2017-08-01 9:14 ` Neelakantan Krishnaswami [this message]
2017-08-01 9:20 ` Michael Shulman
2017-08-01 9:34 ` James Cheney
2017-08-01 16:26 ` Michael Shulman
2017-08-01 21:27 ` Matt Oliveri
2017-07-31 4:19 ` Matt Oliveri
2017-08-02 9:40 ` [HoTT] " Andrea Vezzosi
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=38162a12-c8b2-401d-b272-07d1db7c1be8@googlegroups.com \
--to="n.krish..."@cs.bham.ac.uk \
--cc="HomotopyT..."@googlegroups.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).