Code Monkey home page Code Monkey logo

agda-smash's Introduction

Agda Smash

Formal specification of Haskell smash library in Agda.

From programming point of view provided data types Smash, Wedge and Can can treated as different possiblities how to combine two types same as: Product, Sum and These:

Product, Sum and These show how to combine types in sets, where Smash, Wedge and Can do the same for pointed ses:

descriptionsetsalgebra in setsspointed setsalgebra in pointed sets
bothProductA * BSmash product1 + (A * B)
on of themSumA + BWedge sum1 + A + B
bot of one of themTheseA + B + (A * B)Can1 + A + B + (A * B)

Smash product is canonical tensor product of pointed sets in a category, vien by taking product of underlying objects and indentifying with new basepoint - basepoints from ingredients.

data Smash (A : Set) (B : Set) : Set where
  nada  :           Smash A B
  smash : A -> B -> Smash A B
nada ----+---- smash A B

Wedge sum of two pointed sets A and B is the quotient set of the disjoint union A + B where both copies of the basepoint are identified.

data Wedge (A : Set)(B : Set) : Set where
  nowhere :           Wedge A B
  here    : A ->      Wedge A B
  there   :      B -> Wedge A B
         here A
            |
            |
nowhere ----+
            |
            |
          there B

Can combines smash product with wedge sum:

data Can (A : Set)(B : Set) : Set where
  non : Can A B
  one : A      -> Can A B
  eno :      B -> Can A B
  two : A -> B -> Can A B
      one A
        |
        |
Non ----+----- two A B
        |
        |
      eno B

Building

Project can be build using make:

make

or nix:

nix build

Update nix flakes:

nix flake update

agda-smash's People

Contributors

lemastero avatar

Watchers

 avatar  avatar  avatar

agda-smash's Issues

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.