GithubHelp home page GithubHelp logo

catt.io's People

Contributors

alexarice avatar ericfinster avatar jamievicary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

catt.io's Issues

Test for equality

It would be good to add a test for equality (up to alpha equivalence) into our syntax. That would allow us to write .catt files that test the normalization functionality, e.g. to test that a given term A normalizes correctly to a second term B.

Basic documentation

Would it be possible to get a single sentence of the major constructs used in examples?
I think one pager would go a long way, does not need to be full fledged reference or tutorial.

EOF

It would be good to be able to write "EOF" to stop parsing at a given point in a file.

Add functionality to identify the locally maximal variables of a pasting context

Now implemented with the function "locally_maximal" in normalization.ml. It makes use of an operation on contexts called "remove_first_cell", which removes the first variable in the context (guaranteed to be locally maximal), and then gobbles up more of the context until it reaches the next local maximum.

To trigger this in a .catt file use the function "locmax".

Too many free variables for terms?

There is the following code to determine the free variables of terms:

and tm_free_vars t =
  match t with
  | VarT id -> SS.singleton id
  | DefAppT (_, args) ->
     List.fold_right SS.union (List.map tm_free_vars args) SS.empty
  | CellAppT (cell, args) -> 
     let args_fvs = List.fold_right SS.union (List.map tm_free_vars args) SS.empty in
     SS.union (cell_free_vars cell) args_fvs

It seems very odd that (cell_free_vars cell) is added to the free variables. This gives for example:

Simple normal form: [coh (x0 : *) : x0 -> x0](x)
Free variables x x0

whereas intuitively I feel the free variables should just be x?

Apologies if I have misunderstood how this is meant to work, I couldn't find a bit in the paper explaining how to calculate the free variables of coherences.

Load .catt files within .catt files

It would be useful to have a catt command that instructs the parser to load another catt file. This would allow us to call multiple catt test files from a single master file.

Inference ignores invalid variables

When enough locally maximal terms are supplied for a substitution, the checker will ignore other invalid variables. The following should not typecheck:

coh comp
  (x : *) (y : *) (f : x -> y) (z : *) (g : y -> z)
  : x -> z

coh whisk_good
  (x : *) (y : *) (f : x -> y) (g : x -> y) (a : f -> g) (z : *) (h : y -> z)
  : comp(f,h) -> comp(g,h)

coh whisk_bad
  (x : *) (y : *) (f : x -> y) (g : x -> y) (a : f -> g) (z : *) (h : y -> z)
  : comp(z,w,f,h) -> comp(g,h)

catt.txt

Tab depth

I'm not sure of the intended tab structure of the files. We need to check our editors are configured in a consistent way. Let's discuss this.

PPX extension

Eric suggested we could use a PPX syntax extension to allow us to write Catt terms directly in OCaml. This would remove the need for a separate parser, and give us an ability to work more flexibly (build lists of contexts, call other files, etc). It would also let us experiment with the Catt library interactively in the toplevel.

Gordon, Power, and Street's weak equivalence between Gray-categories and tricategories?

I just watched the HoTTest presentation @jamievicary gave in December, and Emily Riehl's question (and the answer) brought to mind that there may be a (ready-made) proof of a stronger weak equivalence than the one stated as WIP in the talk, which might get you both strict unitality and strict associativity.

Specifically, in "Coherence for tricategories", Gordon, Power, and Street show that Gray-categories (which are strict in everything except interchange, as the answer mentioned) are weakly equivalent to tricategories.

I'm just an interested hobbyist, so I don't know if this has already been considered and is unsuitable in some way, but I thought I'd bring it up.

EDIT: On consideration, it may be that what's missing is the generalization to higher n, and perhaps the proof doesn't generalize straightforwardly - I could certainly see how that could be the case.

CylinderTypes branch: Unification does not seem to respect normalisation

In #17 I have implemented some reduction relations. We would expect that unification is able to unify definitionally equal terms but this does not seem to be the case. I believe a fallback case of the unification algorithm has gone missing somewhere between all the different branches (in particular the case that tries to completely unfold both values).

An example of this not working can be seen in the current (as of Web 07 Apr) version of #17 with the unification algorithm giving the following error:

Typing error:

The expression:

 unitor g

has type:

  [comp g (id y) => g]

but was expected to have type:

 [g => _ C x y f g a]

even though we get the following reduction above:

Checking definition: test
Checking complete for test
Type: {C : Cat} {x : [C]} {y : [C]} (f : [x => y]) -> [x => y]
Term: \{C}. \{x}. \{y}. \f. comp f (id y)
Type unfolded: {C : Cat} {x : [C]} {y : [C]} (f : [x => y]) -> [x => y]
Term unfolded: \{C}. \{x}. \{y}. \f. f

Editor support?

I seem to remember that you had some sort of (at least minimal) interface for editing catt terms when you gave a demo, does this still exist?

Ambiguity in definition of identities

the identity on a zero cell can be defined in two possible ways

let id = coh (x : *) : x -> x

let id2 = comp (x : *) : x -> x

@jamievicary seemed to believe that each term should either be a comp or a coh. Is it possible that the second term should not be accepted?

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.