File: PINST.doc

package info (click to toggle)
hol-light 20131026-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,264 kB
  • ctags: 4,620
  • sloc: ml: 400,325; cpp: 438; java: 279; lisp: 261; makefile: 256; sh: 190; yacc: 108; perl: 78; ansic: 57; sed: 39
file content (38 lines) | stat: -rw-r--r-- 1,329 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
\DOC PINST

\TYPE {PINST : (hol_type * hol_type) list -> (term * term) list -> thm -> thm}

\SYNOPSIS
Instantiate types and terms in a theorem.

\DESCRIBE
The call {PINST [ty1,tv1; ...; tyn,tvn] [tm1,v1; ...; tmk,vk] th} instantiates 
both types and terms in the theorem {th} using the two instantiation 
lists. The {tyi} should be types, the {tvi} type variables, the {tmi} terms and 
the {vi} term variables. Note carefully that the {vi} refer to variables in the 
theorem {{\em before}} type instantiation, but the {tmi} should be replacements 
for the type-instantiated ones. More explicitly, the behaviour is as follows.
First, the type variables in {th} are instantiated according to the list
{[ty1,tv1; ...; tyn,tvn]}, exactly as for {INST_TYPE}. Moreover the same type
instantiation is applied to the variables in the second list, to give
{[tm1,v1'; ...; tmk,vk']}. This is then used to instantiate the already 
type-instantiated theorem.

\FAILURE
Fails if the instantiation lists are ill-formed, as with {INST} and 
{INST_TYPE}, for example if some {tvi} is not a type variable.

\EXAMPLE
{
  # let th = MESON[] `(x:A = y) <=> (y = x)`;;
  ...
  val th : thm = |- x = y <=> y = x

  # PINST [`:num`,`:A`] [`2 + 2`,`x:A`; `4`,`y:A`] th;;
  val it : thm = |- 2 + 2 = 4 <=> 4 = 2 + 2
}

\SEEALSO
INST, INST_TYPE.

\ENDDOC