File: r.doc

package info (click to toggle)
hol-light 20230128-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,636 kB
  • sloc: ml: 688,681; cpp: 439; makefile: 302; lisp: 286; java: 279; sh: 251; yacc: 108; perl: 78; ansic: 57; sed: 39; python: 13
file content (50 lines) | stat: -rw-r--r-- 1,008 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
44
45
46
47
48
49
50
\DOC r

\TYPE {r : int -> goalstack}

\SYNOPSIS
Reorders the subgoals on top of the subgoal package goal stack.

\DESCRIBE
The function {r} is part of the subgoal package. It `rotates' the current list
of goals by the given number, which may be positive or negative. For a
description of the subgoal package, see {set_goal}.

\FAILURE
If there are no goals.

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

  `HD [1; 2; 3] = 1 /\ TL [1; 2; 3] = [2; 3] /\ HD (TL [1; 2; 3]) = 2`

  # e (REPEAT CONJ_TAC);;
  val it : goalstack = 3 subgoals (3 total)

  `HD (TL [1; 2; 3]) = 2`

  `TL [1; 2; 3] = [2; 3]`

  `HD [1; 2; 3] = 1`

  # r 1;;
  val it : goalstack = 1 subgoal (3 total)

  `TL [1; 2; 3] = [2; 3]`

  # r 1;;
  val it : goalstack = 1 subgoal (3 total)

  `HD (TL [1; 2; 3]) = 2`
}

\USES
Proving subgoals in a different order from that generated by the subgoal
package.

\SEEALSO
b, e, g, p, set_goal, top_thm.

\ENDDOC