Skip to Content.
Sympa Menu

coq-club - [Coq-Club] PHOAS with extrinsic typing?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] PHOAS with extrinsic typing?


Chronological Thread 
  • From: Joey Eremondi <joey.eremondi AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] PHOAS with extrinsic typing?
  • Date: Tue, 26 Nov 2019 12:41:14 -0800
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=joey.eremondi AT gmail.com; spf=Pass smtp.mailfrom=joey.eremondi AT gmail.com; spf=None smtp.helo=postmaster AT mail-ot1-f46.google.com
  • Ironport-phdr: 9a23:hbsueR30uPbxsJnTsmDT+DRfVm0co7zxezQtwd8ZseIWKvad9pjvdHbS+e9qxAeQG9mCsLQd1bGd6vy4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCezbL9oMRm7rAvcusYLjYZtNqo61wfErGZPd+lK321jOEidnwz75se+/Z5j9zpftvc8/MNeUqv0Yro1Q6VAADspL2466svrtQLeTQSU/XsTTn8WkhtTDAfb6hzxQ4r8vTH7tup53ymaINH2QLUpUjms86tnVBnlgzoBOjUk8m/Yl9ZwgbpUrxyhqRJxwJPabp+JO/dlZKzRYckXSHBdUspNVSFMBJ63YYsVD+oGOOZVt43zp1wQohq+GAKiC/nvxSFNhn/x2601zuUhGhzB0QwiGNIBrnTVoM/rO6cIT++1ya7IzTPeYPNXwjr9543IfQogofGIR75/bc3RyUw2Gg7Dk16ep4vlPzaP2eQMtWiW9/FgVf61hGE7qAF+vDeuydssiobTgIIVxU7L+T9lz4YyIN20UFJ0Yd6gEJtRryGVLY92Tdk4T2Fupik61rsLsoO4cigS0Jkr2QLTZvidf4WL4h/vTvidLSpkiH5/d7+yhhC/+lW6xOLmTMm7ylNKozJFktbSsnAN0ATe6s2dRft8+ketwDGP1xzO5u1dL0A5mqvWJ4Quwr43kZoTvkDDETHslErqi6+Wc10o+umu6+v5frXrvoGQO5Nwhw3kMakjmtazDfolPgQSRWSW9uWx2KXm/ULjQbVKivM2krPesJDfPckbpKm5DBFV04o59Rm/FSmp0NEfnXkBMV1FeQmKj4fsO17UIfD4Ce2zjEirkDdu3/zGJKHuAo3RLnjfl7fsZapy60lFyAYq0d9f449UBaoaLfLoWk7xscTYAQUjPwy1xebnEtR92ZkEVWKBGK/KeJ/V5FSP/6ckJ/SGTI4Tojf0bfY/tND0inpsu1gQbOGEx5YSb3a0H7wyIUKUcDzhmNoEFmEGvyIxSeXrjBuJVjsFNCX6ZL41+jxuUNHuNozEXI342OXdjhf+JYVfYyV9Mn7JCW3hLtzWVPIFaSbUKchkwGRdBOqRDrQ53BTrjzfUjr9uL+7a4Cod7Mux29185umVnhY3p2UtUpatllqVRmQxpVsmAj872Kcl/B54w1aHlK9k2rlWSYIV6PROXQM3c5Xbyr4iBg==

Disclaimer: x-posted at https://cstheory.stackexchange.com/questions/45924/phoas-with-extrinsic-typing

Parameterized Higher Order Abstract Syntax (PHOAS) is a representation of syntax trees that allows the host language's binding to be used to represent binding in the language being modelled, while fulfilling the strict positivity requirements that most dependently typed languages impose . This is done by modelling the type of variables as a type parameter: `term : (V : Set) -> Set`.

The original PHOAS paper (http://adam.chlipala.net/papers/PhoasICFP08/) describes a way to model System F using *intrinsic typing*: the syntax tree of a term is indexed by its type, so only well typed terms can be constructed.

The problem I have is that, I would like to use PHOAS to model a dependently typed calculus. Having terms and types be in the same syntactic category means that (as far as I can see) the extrinsic approach is not feasible: we can't have  `term (V : Set) :  term  ->  Set `.

I'm wondering if there has been any work done on using PHOAS to model *extrinsically typed* languages: that is, where our syntax allows ill-typed terms to be formed, and we have a separately defined relation between telescopes, terms and types, i.e. traditional  `Gamma |- t : T ` typing rules.

In particular, I'm unsure how to model a term whose free variables all come from the given telescope. PHOAS uses  `Term_0 = forall V , term V ` to model closed terms, and  `Term_1 = forall V , (V  ->  term V) ` to model terms with one open variable. How can I generalize this to arbitrary telescopes? Should my typing rules refer to  `term `s or  `Terms `?

Thanks!






Archive powered by MHonArc 2.6.18.

Top of Page