Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing proof context #30

Open
tbelaire opened this issue Mar 14, 2016 · 2 comments
Open

Showing proof context #30

tbelaire opened this issue Mar 14, 2016 · 2 comments

Comments

@tbelaire
Copy link
Contributor

Hi, this is an idea I've had to use peacoq's existing work to generate annotated coq files to get things like

http://homes.cs.washington.edu/~jrw12/dep-destruct.html

where you can mouse over the proof in the post and read it.

Long term idea is to get that working on some sort of pastebin.

(*begin code *)
    Require Import Program.
(*context
  y : Fin 2
  ============================
   bool_to_Fin_2 (Fin_2_to_bool y) = y

<hr />
    dependent destruction y.

<hr />
  ============================
   bool_to_Fin_2 (Fin_2_to_bool (F1 1)) = F1 1

subgoal 2 (ID 140) is:
 bool_to_Fin_2 (Fin_2_to_bool (FS 1 y)) = FS 1 y
*)
    dependent destruction y.

Generating the *context sections automatically.

I'm just poking around, but if you have any ideas, that would be great.

@Ptival
Copy link
Owner

Ptival commented Mar 15, 2016

Sounds like a pretty good idea. I could see it work in two ways:

  • one would be to just have the contexts statically. with the way the editor works now, this should be fairly simple, as you can already move your cursor around to see goals at different points in time.
  • one would be to use something like jscoq to actually have dynamic code that you could alter and run. It would be a bit more work.

@tbelaire
Copy link
Contributor Author

The problem I was aiming at was making it nicer to post problems in the irc channel and have people
follow the proof state without needing to copy it to their local disk first.
It would also be awesome for blogging about coq.

I'm leaning towards just statically generating the contexts by using peacoq as a library and just having a little command line tool step through the file, feeding it piece by piece to coqtop and recording
the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants