a nominal exploration of intuitionism
play

A Nominal Exploration of Intuitionism Vincent Rahli and Mark - PowerPoint PPT Presentation

A Nominal Exploration of Intuitionism Vincent Rahli and Mark Bickford http://www.nuprl.org January 19, 2016 Vincent Rahli Continuity January 19, 2016 1/21 Overall Story L.E.J. Brouwer Mark Bickford Robert L. Constable Stephen C. Kleene


  1. A Nominal Exploration of Intuitionism Vincent Rahli and Mark Bickford http://www.nuprl.org January 19, 2016 Vincent Rahli Continuity January 19, 2016 1/21

  2. Overall Story L.E.J. Brouwer Mark Bickford Robert L. Constable Stephen C. Kleene Vincent Rahli Continuity January 19, 2016 2/21

  3. Nuprl in a Nutshell Similar to Coq and Agda Extensional Intuitionistic Type Theory for partial functions Consistency proof in Coq: https://github.com/vrahli/NuprlInCoq Cloud based & virtual machines: http://www.nuprl.org JonPRL: http://www.jonprl.org Vincent Rahli Continuity January 19, 2016 3/21

  4. Nuprl Stack Vincent Rahli Continuity January 19, 2016 4/21

  5. Nuprl Types Based on Martin-L¨ of’s extensional type theory Equality : a “ b P T Dependent product : Π a : A . B r a s Dependent sum : Σ a : A . B r a s Universe : U i Vincent Rahli Continuity January 19, 2016 5/21

  6. Nuprl Types Less “conventional types” Partial : A Domain : Base Disjoint union : A ` B Simulation : t 1 ĺ t 2 Intersection : X a : A . B r a s Bisimulation : t 1 » t 2 Union : Y a : A . B r a s Image : Img p A , f q Subset : t a : A | B r a su PER : per p R q Quotient : T {{ E Vincent Rahli Continuity January 19, 2016 6/21

  7. Nuprl Types Squashing/Truncation Ó T t Unit | T u x “ y P Ó T iff x and y compute to ‹ and T “is true” ...but we don’t remember the reason why å T T {{ True x “ y P å T iff x , y P T Vincent Rahli Continuity January 19, 2016 7/21

  8. Nuprl PER Semantics Implemented in Coq Vincent Rahli Continuity January 19, 2016 8/21

  9. The More Types & Inference Rules the Better! All verified Expose more of the metatheory Encode Mathematical knowledge Vincent Rahli Continuity January 19, 2016 9/21

  10. Towards Intuitionistic Type Theory We’ve proved this rule correct using our Coq model: Brouwer’s Continuity Principle for numbers Π F : B Ñ N . Π f : B . å Σ n : N . Π g : B . f “ B n g Ñ F p f q “ N F p g q ( B “ N N “ N Ñ N B n “ N N n “ N n Ñ N ) & Given a total function F on infinite sequences of numbers, for every sequence f , F only applies f to numbers up to some n . Vincent Rahli Continuity January 19, 2016 10/21

  11. Weak Continuity False in Nuprl (Kreisel 62, Troelstra 77, Escard´ o & Xu 2015) Π F : B Ñ N . Π f : B . Σ n : N . Π g : B . f “ B n g Ñ F p f q “ N F p g q Easy in Coq model (almost purely by computation) because it doesn’t have computational content Π F : B Ñ N . Π f : B . Ó Σ n : N . Π g : B . f “ B n g Ñ F p f q “ N F p g q Harder in Coq because it has computational content: uses named exceptions + ν (following Longley’s method) Π F : B Ñ N . Π f : B . å Σ n : N . Π g : B . f “ B n g Ñ F p f q “ N F p g q Vincent Rahli Continuity January 19, 2016 11/21

  12. Strong Continuity Actually what we proved in Coq is essentially Π F : B Ñ N . å Σ M : p Π n : N . B n Ñ N ` Unit q . Π f : B . Σ n : N . M n f “ N ` Unit inl p F p f qq ^ Π m : N . isl p M m f q Ñ m “ N n Given a total function F on infinite sequences of numbers, there exists a function M , that can tell us for every finite sequence f , whether f is long enough to apply F to f , and if it is, it returns F p f q . For all infinite sequence f , there exists a number n such that applying M to f ’s initial segment of length n returns F p f q . Vincent Rahli Continuity January 19, 2016 12/21

  13. Strong Continuity Actually what we proved in Coq is essentially Π F : B Ñ N . å Σ M : p Π n : N . B n Ñ N ` Unit q . Π f : B . Σ n : N . M n f “ N ` Unit inl p F p f qq ^ Π m : N . isl p M m f q Ñ m “ N n Every function F in B Ñ N has a neighborhood function M . which is equivalent to weak continuity because (standard) AC 1 , 0 å ñ (WCP å ð ñ SCP å ) Vincent Rahli Continuity January 19, 2016 13/21

  14. (Digression) Axiom of Choice Trivial Π a : A . Σ b : B . P a b ñ Σ f : B A . Π a : A . P a f p a q Harder to prove (AC 0 , 0 ) in Coq: uses the axiom of choice and free choice sequences Π a : N . Ó Σ b : N . P a b ñ Ó Σ f : N N . Π a : N . P a f p a q Non-trivial to prove (AC 0 , n and AC 1 , n ) in Nuprl Π a : N . å Σ b : B . P a b ñ å Σ f : B N . Π a : N . P a f p a q Π a : B . å Σ b : B . P a b ñ å Σ f : B B . Π a : B . P a f p a q Vincent Rahli Continuity January 19, 2016 14/21

  15. How to Compute Moduli of Continuity? Π F : B Ñ N . å Σ M : p Π n : N . B n Ñ N ` Unit q . Π f : B . Σ n : N . M n f “ N ` Unit inl p F p f qq ^ Π m : N . isl p M m f q Ñ m “ N n We want to be able to test whether a finite sequence f of length n is long enough. Following Longley’s method of using effectful computations: l e t exception e in (F ( fun x = > i f x < n then f x else r a i s e e ) ; true ) handle e = > f a l s e Vincent Rahli Continuity January 19, 2016 15/21

  16. How to Compute Moduli of Continuity? l e t exception e in (F ( fun x = > i f x < n then f x else r a i s e e ) ; true ) handle e = > f a l s e We want exceptions & a try/catch operator F should not be able to catch exception e Vincent Rahli Continuity January 19, 2016 16/21

  17. How to Compute Moduli of Continuity? l e t exception e in (F ( fun x = > i f x < n then f x else r a i s e e ) ; true ) handle e = > f a l s e We want “unguessable” names (Have been around in Nuprl for a long time) If F does not have the name of the exception e then it cannot catch e We want to be able to generate fresh “unguessable” names Vincent Rahli Continuity January 19, 2016 17/21

  18. Let’s Extend Nuprl With These New Operators l e t exception e in (F ( fun x = > i f x < n then f x else r a i s e e ) ; true ) handle e = > f a l s e v :: “ ¨ ¨ ¨ | (name value) a e :: “ exc p t 1 , t 2 q (exception) vt :: “ . . . | Name (name type) | Exc p t 1 , t 2 q (exception type) t :: “ . . . | e (exception) | if t 1 “ t 2 then t 3 else t 4 (name equaliy) | ν x . t (fresh) | try n t with x . c (try/catch) The way our ν operator works is similar to Odersky’s ν operator in his λν -calculus. Vincent Rahli Continuity January 19, 2016 18/21

  19. Mostly Computational Proof We’ve proved that this effectful test function inhabits the continuity principle Proof mostly done by computation For example: In Coq, we compute an over-approximation of the modulus of continuity of F at f by computing F p f q to a number k , and returning the largest number occurring in the sequence: F p f q ÞÑ ¨ ¨ ¨ ÞÑ k This proves that the modulus of continuity of F at f Ó -exists. Vincent Rahli Continuity January 19, 2016 19/21

  20. Consistency We’ve added these terms to Nuprl’s computation system and proved that Nuprl’s meta-theoretical properties are preserved Including: The congruence of Howe’s computational equivalence relation The validity of Nuprl’s inference rules Vincent Rahli Continuity January 19, 2016 20/21

  21. Questions Can we prove continuity for sequences of terms instead of B ? Exception mechanism doesn’t seem to play well with a parallel operator? What properties of names and exceptions do we have to make available as inference rules so that we can do the proof directly in Nuprl? Vincent Rahli Continuity January 19, 2016 21/21

Recommend


More recommend