Coder Social home page Coder Social logo

larrytheliquid / generic-reuse Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 6.28 MB

Source code accompanying the draft paper "Generic Zero-Cost Reuse for Dependent Types"

Home Page: https://arxiv.org/abs/1803.08150

License: MIT License

Makefile 0.08% TeX 99.92%

generic-reuse's People

Contributors

larrytheliquid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

generic-reuse's Issues

Difference between definition of AssocV in paper vs code

In the paper, AssocV is defined very concisely:

AssocV ◂ AppV → ★ = λ appV.
∀ A : ★. ∀ n : Nat. Π xs : Vec A n.
∀ m : Nat. Π ys : Vec A m. ∀ o : Nat. Π zs : Vec A o.
appV (appV xs ys) zs ≃ appV xs (appV ys zs)).

In the code, however, it depends on four auxiliary definitions:

AssocV4 ◂ AppV ➔ Π A : ★.
Π n : Nat. Vec · A n ➔ Π m : Nat. Vec · A m ➔ Π o : Nat. Vec · A o ➔ ★ =
  λ appV : AppV. λ A : ★. λ n : Nat. λ xs : Vec · A n.
  λ m : Nat. λ ys : Vec · A m. λ o : Nat. λ zs : Vec · A o.
  {appV (appV xs ys) zs ≃ appV xs (appV ys zs)}.
AssocV3 ◂ AppV ➔ Π A : ★. Π n : Nat. Vec · A n ➔ Π m : Nat. Vec · A m ➔ ★ =
  λ appV : AppV. λ A : ★. λ n : Nat. λ xs : Vec · A n. λ m : Nat. λ ys : Vec · A m.
  ∀ o : Nat. Π zs : Vec · A o. AssocV4 appV · A n xs m ys o zs.
AssocV2 ◂ AppV ➔ Π A : ★. Π n : Nat. Vec · A n ➔ ★ =
  λ appV : AppV. λ A : ★. λ n : Nat. λ xs : Vec · A n.
  ∀ m : Nat. Π ys : Vec · A m. AssocV3 appV · A n xs m ys.
AssocV1 ◂ AppV ➔ ★ ➔ ★ = λ appV : AppV. λ A : ★.
  ∀ n : Nat. Π xs : Vec · A n. AssocV2 appV · A n xs.
AssocV ◂ AppV ➔ ★ = λ appV : AppV. ∀ A : ★. AssocV1 appV · A.

Is this because the version in the code is more generic than the one in the paper, or are these four auxiliary definitions strictly necessary to make it work? Also, could you share some intuition on what they're good for?

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.