File: b.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 (43 lines) | stat: -rw-r--r-- 1,027 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
39
40
41
42
43
\DOC b

\TYPE {b : unit -> goalstack}

\SYNOPSIS
Restores the proof state, undoing the effects of a previous expansion.

\DESCRIBE
The function {b} is part of the subgoal package.  It allows backing up
from the last state change (caused by calls to {e}, {g}, {r}, {set_goal} etc.)
The package maintains a backup list of previous proof states. A call to {b}
restores the state to the previous state (which was on top of the backup list).

\FAILURE
The function {b} will fail if the backup list is empty.

\EXAMPLE
{
  # g `(HD[1;2;3] = 1) /\ (TL[1;2;3] = [2;3])`;;
  val it : goalstack = 1 subgoal (1 total)
  
  `HD [1; 2; 3] = 1 /\ TL [1; 2; 3] = [2; 3]`
  
  # e CONJ_TAC;;
  val it : goalstack = 2 subgoals (2 total)
  
  `TL [1; 2; 3] = [2; 3]`
  
  `HD [1; 2; 3] = 1`
  
  # b();;
  val it : goalstack = 1 subgoal (1 total)
  
  `HD [1; 2; 3] = 1 /\ TL [1; 2; 3] = [2; 3]`
}

\USES
Back tracking in a goal-directed proof to undo errors or try different tactics.

\SEEALSO
e, g, p, r, set_goal, top_goal, top_thm.

\ENDDOC