Narrating Formal Proof (Work in Progress) Carst Tankink Joint work - - PowerPoint PPT Presentation

narrating formal proof
SMART_READER_LITE
LIVE PREVIEW

Narrating Formal Proof (Work in Progress) Carst Tankink Joint work - - PowerPoint PPT Presentation

Narrating Formal Proof (Work in Progress) Carst Tankink Joint work with Herman Geuvers and James McKinna Supported by NWO project: MathWiki Institute for Computing and Information Science Faculty of Science, Radboud University Nijmegen


slide-1
SLIDE 1

Narrating Formal Proof

(Work in Progress) Carst Tankink Joint work with Herman Geuvers and James McKinna Supported by NWO project: “MathWiki”

Institute for Computing and Information Science Faculty of Science, Radboud University Nijmegen and Eindhoven University of Technology The Netherlands

15th July 2010

slide-2
SLIDE 2

(∗∗ Having made the a s s e r t i o n , we can a l s o ask Coq to v e r i f y it , l i k e t h i s : ∗) Proof . simpl . r e f l e x i v i t y . Qed.

slide-3
SLIDE 3

(∗∗ Having made the a s s e r t i o n , we can a l s o ask Coq to v e r i f y it , l i k e t h i s : ∗) Proof . simpl . r e f l e x i v i t y . Qed.

+

slide-4
SLIDE 4

(∗∗ Having made the a s s e r t i o n , we can a l s o ask Coq to v e r i f y it , l i k e t h i s : ∗) Proof . simpl . r e f l e x i v i t y . Qed.

+ = Proviola!

Picture by J&R Moviola, CC BY-SA

slide-5
SLIDE 5

Demo

Resources, examples: http://mws.cs.ru.nl/proviola

slide-6
SLIDE 6

Motivation

◮ Mathematics should be explained, not just presented.

◮ From proofs for certainty. . . ◮ . . . to proofs for understanding.

◮ Repository of formal proof should include explanation.

slide-7
SLIDE 7

Motivation

◮ Mathematics should be explained, not just presented.

◮ From proofs for certainty. . . ◮ . . . to proofs for understanding.

◮ Repository of formal proof should include explanation.

slide-8
SLIDE 8

Assumptions

◮ Two roles: Author and Reader. ◮ Tactic-based prover: there is a notion of state.

slide-9
SLIDE 9

How is formal proof communicated?

  • 1. Author writes formalization using a prover → proof script.
  • 2. Reader obtains script.
  • 3. Reader reads script using local installation of prover.
slide-10
SLIDE 10

How is formal proof communicated?

  • 1. Author writes formalization using a prover → proof script.
  • 2. Reader obtains script.
  • 3. Reader reads script using local installation of prover.
slide-11
SLIDE 11

How is formal proof communicated?

  • 1. Author writes formalization using a prover → proof script.
  • 2. Reader obtains script.
  • 3. Reader reads script using local installation of prover.
slide-12
SLIDE 12

What’s the problem?

◮ Author used to the prover, reader (in general) not.

◮ Especially if the reader is a student.

◮ Reader needs to see state transformations, requiring:

  • 1. installation of a prover.
  • 2. computation of state based on script.

◮ Possible solution for installation: online provers (e.g.

ProofWeb)

◮ Still has a computational overhead.

slide-13
SLIDE 13

What’s the problem?

◮ Author used to the prover, reader (in general) not.

◮ Especially if the reader is a student.

◮ Reader needs to see state transformations, requiring:

  • 1. installation of a prover.
  • 2. computation of state based on script.

◮ Possible solution for installation: online provers (e.g.

ProofWeb)

◮ Still has a computational overhead.

slide-14
SLIDE 14

What’s the problem?

◮ Author used to the prover, reader (in general) not.

◮ Especially if the reader is a student.

◮ Reader needs to see state transformations, requiring:

  • 1. installation of a prover.
  • 2. computation of state based on script.

◮ Possible solution for installation: online provers (e.g.

ProofWeb)

◮ Still has a computational overhead.

slide-15
SLIDE 15

What do we need?

In summary: the reader should zip through the proof:

◮ Fast access to proof state. ◮ No prover necessary for viewing. ◮ Usable over the web.

Additionally: No overhead for the author.

slide-16
SLIDE 16

Proof movies

◮ Our solution: Proof Movies ◮ Stores proof states with script, in frames.

◮ Trades space for time. ◮ A few KB, on average: blowup 6×

◮ Reader’s access to state becomes lookup, not

computation.

◮ Construction is automated: no overhead for author.

slide-17
SLIDE 17

Proof movies

◮ Movie is implemented as XML. ◮ Prototype implementation based on Coq/CoqIDE.

. . .

<frame frameNumber="25"> <command > simpl. </command > <response > 1 subgoal ============================ tuesday = tuesday </response > </frame >

. . .

slide-18
SLIDE 18

Watching a movie: Proviola

◮ ‘Tool’ for reviewing: Proviola (transformation to HTML). ◮ Simplifies the reader’s part of the use case. ◮ Instead of obtaining a proof script, obtain a movie. ◮ Watch, not recompute: point to reveal state.

slide-19
SLIDE 19

Building Movies: Camera

◮ Making movies is recording prover input and output. ◮ Input: a proof script.

◮ Cut into commands by camera.

◮ Output: captured directly from the prover, after each

command.

◮ The prover is still a part of the workflow.

slide-20
SLIDE 20

Extending Movies: Data and Services

◮ Movies are XML: presentation in HTML is easy. ◮ Also possible to add other (meta)data: pretty-printing.

In general

◮ Extend frames with additional data. ◮ Programs can read the movie, and add data. ◮ In effect: services based on movies.

slide-21
SLIDE 21

Extending Movies: Data and Services

◮ Movies are XML: presentation in HTML is easy. ◮ Also possible to add other (meta)data: pretty-printing.

In general

◮ Extend frames with additional data. ◮ Programs can read the movie, and add data. ◮ In effect: services based on movies.

slide-22
SLIDE 22

Extending Movies: Narration

◮ Coqdoc: interleave frames with documentation. ◮ Movies: add commentary track. ◮ No longer about single frames, but scenes of frames with

commentary.

◮ Problem: create a user-friendly editor.

slide-23
SLIDE 23

Extending Movies: Narration

◮ Coqdoc: interleave frames with documentation. ◮ Movies: add commentary track. ◮ No longer about single frames, but scenes of frames with

commentary.

◮ Problem: create a user-friendly editor.

slide-24
SLIDE 24

Extending Movies: Narration

◮ Coqdoc: interleave frames with documentation. ◮ Movies: add commentary track. ◮ No longer about single frames, but scenes of frames with

commentary.

◮ Problem: create a user-friendly editor.

slide-25
SLIDE 25

Towards a Movie-based MathWiki

◮ Show movies with documentation to readers of Wiki. ◮ Movies provide a fast overview of files in the repository.

Roadmap:

◮ Support other provers:

◮ For the author: implement camera. ◮ For the reader: rendering.

◮ Generate pages: just invoke camera. ◮ Add commentary track to narrate movie. ◮ Editing the movie.

slide-26
SLIDE 26

Towards a Movie-based MathWiki

◮ Show movies with documentation to readers of Wiki. ◮ Movies provide a fast overview of files in the repository.

Roadmap:

◮ Support other provers:

◮ For the author: implement camera. ◮ For the reader: rendering.

◮ Generate pages: just invoke camera. ◮ Add commentary track to narrate movie. ◮ Editing the movie.

slide-27
SLIDE 27

Movies in MathWiki — Dynamic movie editing

◮ Author is also a reader, also benefits from fast lookup. ◮ Author writes movie, prover works in the background.

◮ Prover is a service.

◮ Similar to document-centered approaches & ProofGeneral ◮ Not just a proof script. ◮ A true Wiki: make authors out of readers.

slide-28
SLIDE 28

Movies in MathWiki — Dynamic movie editing

◮ Author is also a reader, also benefits from fast lookup. ◮ Author writes movie, prover works in the background.

◮ Prover is a service.

◮ Similar to document-centered approaches & ProofGeneral ◮ Not just a proof script. ◮ A true Wiki: make authors out of readers.