HOL Light and Coq are written in OCaml, a dialect of ML, which is therefore similar to Scheme, but it has one difference that I wonder if anyone here's knows how to deal with. Scheme is well-suited for writing a Scheme interpreter, because of the quote feature. OCaml doesn't have a quote feature, so the question arises how to write an OCaml interpreter inside OCaml. That's not quite what I want to do, but if anyone could explain how to do it, I'd be grateful.
I have a 7th grade student I'm trying to teach Racket, and I'm a bit confused about Bootstrap and Program By Design. Is there any reason for my student not to just read HtDP?
--
Best,
Bill
____________________
Racket Users list:
http://lists.racket-lang.org/users
Thanks, Matthias! I know this is way off topic, but I think it's the sort of thing only Schemers understand, and I think HOL Light would be a lot better off my problem got solved. There's a lot I didn't understand with your ML explanation. Is this written down somewhere? How to write a ML interpreter in ML using your type ideas? Are you saying I don't need camlp parsing? I would find that hard to believe. Formal proofs in HOL Light are really just OCaml programs where a lot of code has already been evaluated. Here's a simple Hilbert geometry program in my dialect:
let ExistsPointOffLine = theorem `;
∀l. Line l ⇒ ∃Q. Q ∉ l
proof
intro_TAC ∀l, H1;
consider A B C such that
¬(A = B) ∧ ¬(A = C) ∧ ¬(B = C) ∧ ¬Collinear A B C [Distinct] by fol I3;
assume (A ∈ l) ∧ (B ∈ l) ∧ (C ∈ l) [all_on] by fol ∉;
Collinear A B C [] by fol H1 - Collinear_DEF;
fol - Distinct;
qed;
`;;
I think I need the `;[...]` construct, which at present just turns my proof into a string without any backslash or newline problems, which is then passed to my function theorem. The usual HOL Light style is like this, using instead a function prove:
let MULT_0 = prove
(`!m. m * 0 = 0`,
INDUCT_TAC THEN ASM_REWRITE_TAC[MULT; ADD_CLAUSES]);;
Notice the related `[...]` construct, which I think sends the ordered pair off to heavy camlp parsing.
Thanks for the 7th and 8th advice. I think my student is smart and hard-working, and I (finally!) learned how to program reading your book HtDP, so it sounds like you're saying that I should be able to teach it to my student. I went to bootstrap-world.org and, uh, maybe I didn't look hard enough, but I didn't find anything that looked juicy.
--
Best,
Bill