Giter Site home page Giter Site logo

rahulc29 / realizability Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 7.5 MB

Experiments with Realizability in Univalent Type Theory

Home Page: https://rahulc29.github.io/realizability/

License: Apache License 2.0

Agda 99.38% Makefile 0.03% Scheme 0.11% Dockerfile 0.48%
category-theory cubical-type-theory realizability univalent-foundations univalent-mathematics univalent-type-theory

realizability's Introduction

Experiments with Realizability in Univalent Type Theory

This repository contains code for a formalisation of categorical realisability in cubical type theory.

This project is very much a work-in-progress and undergoing active hackery. As of right now, Agda will not type-check things with `–safe` enabled.

Here you can find both a timeline and an agenda of the formalisation. Some things are only formalised to the extent necessary.

Combinatory Algebras

  • [X] Applicative Structures
  • [X] Feferman structure on an AS
  • [X] Combinatorial completeness
  • [X] Computation rule for $λ*$
  • Combinators
    • [X] Identity, booleans, if-then-else, pairs, projections, B combinator, some Curry numerals
    • [X] Computation rule for pairs
    • [ ] Fixpoint combinators and primitive recursion combinator

Category of Assemblies

Definition, limits and colimits

  • [X] Define assemblies
  • [X] Define the category $\mathsf{Asm}$
  • [X] Cartesian closure and similar structure
    • [X] Binary products
    • [X] Binary coproducts
    • [X] Equalisers
    • [X] Exponentials
    • [X] Initial and terminal objects
    • [X] Coequalisers

Regular and exact

  • [ ] $\mathsf{Asm}$ is regular (requires Axiom of Choice)
    • [x] Kernel pairs of morphisms exist
    • [x] Kernel pairs have coequalisers
    • [ ] Regular epics stable under pullback
  • [ ] Exact completion
    • [x] Internal equivalence relations of a category
    • [ ] Functional relations

Tripos to Topos Construction

See PR #6

A valued Predicates

  • [X] Heyting-valued Predicates
  • [X] $∀$ and $∃$ are adjoints
  • [X] Beck-Chevalley condition
  • [X] Heyting prealgebra structure
  • [X] Interpret intuitionistic logic

Realisability Topos

  • [X] Partial Equivalence Relations
  • [X] Functional Relations
  • [X] Morphisms and RT is a category
  • [X] Finite limits
    • [X] Terminal object
    • [X] Binary products
    • [X] Equalisers (can be shown to merely exist)
  • [X] Power objects
    • [-] Monomorphisms
    • [ ] Subobjects and pullbacks lemmas
    • [ ] Power objects exist

realizability's People

Contributors

rahulc29 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

drruisseau

realizability's Issues

Perform major refactor

Break Assembly.agda into

  • Base - definition
  • Morphism - definition and basic lemmas
  • Asm is a category
  • Binary products + terminal
  • Binary coproducts + initial
  • Exponentials
  • Coequalizers
  • Equalizers
  • Regular epi characterisation lemma
  • Asm is a regular category

Fix workflows

Currently the workflow does not work properly so an ad-hoc method of building HTML locally has been applied.

Automate intuitionistic logic

Write a prover for intuitionistic logic and get the tripos-to-topos construction working using that.

Potential ideas :

  1. Tableaux for Intutionistic Logics, from Handbook of Tableaux Logics
  2. A Tableau Decision Procedure for Propositional Intuitionistic Logic

Construct the effective topos

Depends on #7.
With $\mathcal{K}_1$ in hand, proceed with a similar tripos-to-topos construction and construct the effective topos.

Separate data structures from logical structures

Right now, everything is in a single Agda record. Refactor into

  1. IsPartialityAlgebra
  2. IsBinaryApplicativeStructure
  3. IsPartialCombinatoryAlgebra

This makes for cleaner code and allows for cleaner distinction between property and structure since most of these are probably properties.

Add models of combinatory algebras

Add (at least) the following models of combinatory algebras :

  1. $\lambda$ calculus terms with $\beta$ equality
  2. $\lambda$ calculus terms with $\beta \eta$ equality
  3. $\lambda$ calculus terms with the equational theory generated by their Bohm trees
  4. Scott's $D_{\infty}$
  5. Scott's graph model (and other graph models too maybe?)

Treat partiality and construct Kleene's first algebra

An outline :

  1. Define the lifting monad $\mathcal{L}$
  2. Define the syntax primitive recursive functions
  3. Define $\mu$
  4. Interpret the syntax of partial recursive functions using the $\mathcal{L}$
  5. Use the syntax of partial recursive functions to create a (partial) combinatory algbera. No need for Godel codes.
  6. This should be equivalent to Kleene's first algebra.

Refactor into using `opaque/unfolding`

Especially considering that using set quotients seems to create large ugly hcomps which take forever to type-check, it is necessary to control unfolding.

Classical Realizability

Add stuff about realisability algebras of Krivine and how they create a tripos that yields a Boolean topos. There's also $\lambda_c$ calculus and all the cool ZF models.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.