Code Monkey home page Code Monkey logo

Comments (4)

m-yac avatar m-yac commented on July 20, 2024 2

This is inspiring me to finish a port of redprl's biinv-int that I started last year (https://github.com/m-yac/cubical/tree/biinv-int). It adds the following HIT equivalent to Int:

data BiInvInt : Type₀ where
  zero : BiInvInt
  suc : BiInvInt -> BiInvInt
  -- suc is a bi-invertible equivalence:
  predr : BiInvInt -> BiInvInt
  suc-predr :  z -> suc (predr z) ≡ z
  predl : BiInvInt -> BiInvInt
  predl-suc :  z -> predl (suc z) ≡ z

A close cousin of this type is mentioned* in the linked slides as an example of the other way to solve the 'truncation problem' -- adding coherences. I think these twos HITs would complement one another well.

* What Thorsten actually states is hard to work with, I tried and failed to prove it equivalent to Int and it seems others have too: https://github.com/agda/cubical/blob/master/Cubical/Experiments/HInt.agda

from cubical.

mortberg avatar mortberg commented on July 20, 2024

It would be great to have both the truncated and untruncated (based on biinv-int) versions in the library. So please make PRs.

The version from Thorsten's slides is indeed a nightmare to work with and I only pushed what worked to the HInt file. I tried many different approaches to filling those holes, but it always led straight to coherence hell.

from cubical.

phadej avatar phadej commented on July 20, 2024

@mortberg Should I put my variant into Cubical.HITs.IntTrunc ?

from cubical.

mortberg avatar mortberg commented on July 20, 2024

from cubical.

Related Issues (20)

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.