Skip to content- 1.1 The way through J-Bob’s entry points; numbers are lines of
scheme/j-bob.scm. Dotted arrows: the answers to ill-formed input. Dashed arrow: list-extend (scheme/j-bob.scm:227–233), the way around the gates that dethm.contradiction takes (scheme/little-prover.scm:215–231). Gate 1 checks only syntax, so a function that does not terminate can enter the definitions (Chapter 6).A proof assistant you can read - 2.1 The grammar of J-Bob’s object language: the shapes that the checking functions of
scheme/j-bob.scm are written to enforce; J-Bob accepts a little more (below). is the list of variables an expression may use, or the symbol any; is the list of definitions known so far. Expressions and definitions are explained below; paths and steps in Chapter 3; seeds in Chapter 6 and Chapter 7.A language of total functions - 3.1 The claim
(atom (cdr (cons (car (cons p q)) '()))) as a tree. Edges are labelled with directions. The dashed box is the focus at the path (1 1 1), the subterm (car (cons p q)).Rewriting at a path - 3.2 One rewrite step.
rewrite/step looks up the name of the app, and equality/def builds the equation (top row); equality/path checks the path, discharges premises and rewrites the focus (bottom row). Every dashed exit gives back the claim as it was, which ends the list of steps (Section 3.4). Numbers are lines of scheme/j-bob.scm.Rewriting at a path - 5.1 Top: the claim
(if (atom x) 't (cons (car x) (cdr x))), focus at (E) (boxed). Bottom: cons/car+cdr instantiated by the step (cons/car+cdr x). Both E branches sit under the same question, so follow-prems reaches the equation, which rewrites the focus to x.Theorems, premises and the chain of definitions - 7.1 Left: the body of
list-induction (scheme/j-bob.scm:858–862).
Right: the induction claim of
(dethm memb?/remb (xs) (equal (memb? (remb xs)) 'nil)) with the seed
(list-induction xs), as in memb-remb.out. The formal
x becomes the seed’s variable xs.Induction from recursion - 8.1
((a . b) . c) and its rotation (a b . c). Each pair is a
circle holding its wt; an atom weighs 1. Both trees have size 2.
Values from size-vs-wt.out.The book’s proofs - 9.1 The call graph of
scheme/j-bob.scm, simplified, with the lines of each function. Shaded: the entry points. Dashed: the checks every entry point runs before anything else (J-Bob/step also checks its claim with expr?). rewrite/steps applies the first step itself and rewrite/continue the others. The builders are reached through helpers not drawn (totality/if, induction/if and others). lookup is also called from def?, seed? and induction/claim.Inside J-Bob - 10.1 After
(defun atom (x) 't), two equations give one term two different values.Can J-Bob be fooled?