mk_oracle_thm : string -> term list * term -> thm
However, it is occasionally useful to interface HOL with trusted external tools that also produce, in some sense, theorems that would be derivable in HOL. It is clearly a burden to require that HOL proofs accompany such theorems so that they can be (re-)derived in HOL. In order to support greater interoperation of proof tools, therefore, HOL provides the notion of a ‘tagged’ theorem.
A tagged theorem is manufactured by invoking mk_oracle_thm tag (A,w), where A is a list of HOL terms of type bool, and w is also a HOL term of boolean type. No proof is done; the sequent is merely injected into the type of theorems, and the tag value is attached to it. The result is the theorem A |- w.
The tag value stays with the theorem, and it propagates in a hereditary fashion to any theorem derived from the tagged theorem. Thus, if one examines a theorem with Thm.tag and finds that it has no tag, then the theorem has been derived purely by proof steps in the HOL logic. Otherwise, shortcuts have been taken, and the external tools, also known as ‘oracles’, used to make the shortcuts are signified by the tags.
- val tag = "SimonSays"; > val tag = "SimonSays" : string - val SimonThm = mk_oracle_thm tag; > val SimonThm = fn : term list * term -> thm - val th = SimonThm ([], Term `!x. x`); > val th = |- !x. x : thm - val th1 = SPEC F th; > val th1 = |- F : thm - (show_tags := true; th1); > val it = [oracles: SimonSays] [axioms: ] [] |- F : thm
- CONJ th1 th1; > val it = [oracles: SimonSays] [axioms: ] [] |- F /\ F : thm - val SerenaThm = mk_oracle_thm "Serena"; > val SerenaThm = fn : term list * term -> thm - CONJ th1 (SerenaThm ([],T)); > val it = [oracles: Serena, SimonSays] [axioms: ] [] |- F /\ T : thm