GithubHelp home page GithubHelp logo

Comments (3)

liufengyun avatar liufengyun commented on September 21, 2024

Multiple binders are indeed annoying, I don't know any good reference about this.

Instead, I think the mechanization can try to simplify the pattern language so that it only has single binder and try to keep the same expressiveness. This is one area, where pen & paper systems look better esthetically.

The annoying case is application. If we assume the pattern for application is always App[T] f x, where f and x are bound variables, will simplify the problem? By doing so, patterns are no longer composable, but they can nest patmat to have the same expressiveness.

from quotedpatternmatchingproof.

radeusgd avatar radeusgd commented on September 21, 2024

This sounds like a good idea to simplify things.
However are you sure we are not limiting the expressiveness by restricting to not-nested pattern matching? I think that this is likely true, but it doesn't seem completely trivial to assume it.

As for binding two variables in the case of App, it is certainly much simpler than the arbitrary amount of variables. I can try experimenting with autosubst if that will somehow be possible.

Unfortunately, the simplest solution I tried:

| Lam (ebody : {bind term}) (typ: type)
| Lam2 (ebody : {bind {bind term}}) (typ: type)

where I hoped Lam2 to capture 2 binders instead of just one doesn't seem to work - when tested with substitutions Lam2 seems to behave exactly like Lam.

from quotedpatternmatchingproof.

radeusgd avatar radeusgd commented on September 21, 2024

This is solved as described in #6

from quotedpatternmatchingproof.

Related Issues (17)

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.