File: deep_alpha.doc

package info (click to toggle)
hol-light 20170109-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 36,568 kB
  • ctags: 8,549
  • sloc: ml: 540,018; cpp: 439; lisp: 286; java: 279; makefile: 262; sh: 229; yacc: 108; perl: 78; ansic: 57; sed: 39
file content (37 lines) | stat: -rw-r--r-- 973 bytes parent folder | download | duplicates (6)
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
\DOC deep_alpha

\TYPE {deep_alpha : (string * string) list -> term -> term}

\SYNOPSIS
Modify bound variable according to renaming scheme.

\DESCRIBE
When applied to a list of string-string pairs
{
  deep_alpha ["x1'","x1"; ...; "xn'","xn"]
}
\noindent a conversion results that will attempt to traverse a term and
systematically replace any bound variable called {xi} with one called {xi'}. It
will quietly do nothing in cases where that is impossible because of variable
capture.

\EXAMPLE
{
  # deep_alpha ["x'","x"; "y'","y"] `?x. x <=> !y. y = y`;;
  Warning: inventing type variables
  val it : term = `?x'. x' <=> (!y'. y' = y')`
}

\COMMENTS
This is used inside {PART_MATCH} to try to achieve a reasonable correspondence
in bound variable names, e.g. so that the bound variable is still called `{n}'
rather than `{x}' here:
{
  # REWR_CONV NOT_FORALL_THM `~(!n. n < m)`;;
  val it : thm = |- ~(!n. n < m) <=> (?n. ~(n < m))
}

\SEEALSO
alpha, PART_MATCH.

\ENDDOC