An Introduction to Nominal Sets
Andrew Pits
Computer Science & Technology
EWSCS 2020
1/70
An Introduction to Nominal Sets Andrew Pi t s Computer Science & - - PowerPoint PPT Presentation
An Introduction to Nominal Sets Andrew Pi t s Computer Science & Technology EWSCS 2020 1/70 Lecture 4 52/70 Outline L1 Structural recursion and induction in the presence of name-binding operations. L2 Introducing the category of nominal
Computer Science & Technology
EWSCS 2020
1/70
52/70
References: AMP, Nominal Sets: Names and Symmetry in Computer Science, CUP 2013 AMP, Alpha-Structural Recursion and Induction, JACM 53(2006)459-506. AMP, J. Mathiesen and J. Derikx, A Dependent Type Theory with Abstractable Names, ENTCS 312(2015)19-50.
53/70
54/70
55/70
56/70
56/70
56/70
[MR Shinwell, AMP, MJ Gabbay, FreshML: Programming with Binders Made Simple, Proc. ICFP 2003.] [www.cl.cam.ac.uk/users/amp12/fresh-ocaml]
57/70
(* syntax *) type t;; type var = t name;; type term = Var of var | Lam of <<var>>term | App of term*term;; (* semantics *) type sem = L of ((unit -> sem) -> sem) | N of neu and neu = V of var | A of neu*sem;; (* reify : sem -> term *) let rec reify d = match d with L f -> let x = fresh in Lam(<<x>>(reify(f(function () -> N(V x))))) | N n -> reifyn n and reifyn n = match n with V x -> Var x | A(n’,d’) -> App(reifyn n’, reify d’);; (* evals : (var * (unit -> sem))list -> term -> sem *) let rec evals env t = match t with Var x -> (match env with [] -> N(V x) | (x’,v)::env -> if x=x’ then v() else evals env (Var x)) | Lam(<<x>>t) -> L(function v -> evals ((x,v)::env) t) | App(t1,t2) -> (match evals env t1 with L f -> f(function () -> evals env t2) | N n -> N(A(n,evals env t2)));; (* eval : term -> sem *) let rec eval t = evals [] t;; (* norm : lam -> lam *) let norm t = reify(eval t);; 58/70
[MR Shinwell, AMP, MJ Gabbay, FreshML: Programming with Binders Made Simple, Proc. ICFP 2003.] [www.cl.cam.ac.uk/users/amp12/fresh-ocaml]
59/70
59/70
60/70
61/70
62/70
given 푓 ∈ Nom(푋 ∗ A,푌) satisfying 푎 # 푥 ⇒ 푎 # 푓 (푥,푎), we get ˆ 푓 ∈ Nom(푋,푌) well-defined by: ˆ 푓 (푥) = 푓 (푥,푎) for some/any 푎 # 푥. Notation: fresh 푎 in 푓 (푥,푎) ˆ 푓 (푥)
62/70
62/70
bunched contexts (+), extensional & undecidable (−)
semantics/expressivity?
bunched contexts (+), no local fresh names (−)
based on nominal terms (+), explicit substitutions (−), first-order (±)
simple types (−), definitional freshness (+)
63/70
bunched contexts (+), extensional & undecidable (−)
semantics/expressivity?
bunched contexts (+), no local fresh names (−)
based on nominal terms (+), explicit substitutions (−), first-order (±)
simple types (−), definitional freshness (+) AMP, J. Mathiesen and J. Derikx, A Dependent Type Theory with Abstractable Names, ENTCS 312(2015)19-50.
63/70
e.g. for fresh 푎 in 푓 (푥,푎) to be well-defined, we need 푎 # 푥 ⇒ 푎 # 푓 (푥,푎)
64/70
65/70
65/70
bunched contexts, generated by Γ ↦→ Γ(푥 : 푇) Γ ↦→ Γ#(푎 : A) definitional equality definitional freshness
65/70
definitional freshness for types: Γ ⊢ 푇 푎 ∈ Γ Γ#(푏 : A) ⊢ (swap 푎,푏 in푇) = 푇 Γ ⊢ 푎 # 푇
65/70
65/70
66/70
66/70
67/70
67/70
AMP, J. Mathiesen and J. Derikx, A Dependent Type Theory with Abstractable Names, ENTCS 312(2015)19-50
68/70
69/70
69/70
(so e.g., if an object has support {푎,푏,푐} it is 3-dimensional)
HoTT and univalence is about (computable) mathematical foundations (a topic no longer very popular with mathematicians). That’s where the mathematics of nominal sets came from...
69/70
Abraham Fraenkel, Der Begriff “definit” und die Unabh¨ angigkeit des Auswahlsaxioms, Sitzungsberichte der Preussischen Akademie der Wissenschafen, Physikalisch-mathematische Klasse (1922), 253–257. Andrzej Mostowski, Uber die Unabh¨ angigkeit des Wohlordnungssatzes vom Ordnungsprinzip, Fundamenta Mathematicae 32 (1939), 201–252.
70/70
70/70