aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/ide/undo.v
blob: ea3920551d5ff97bd61f378744d18c063439ef70 (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
(* Here are a sequences of scripts to test interactively with undo and
   replay in coqide proof sessions *)

(* Undoing arbitrary commands, as first step *)

Theorem a : O=O. (* 2 *)
Ltac f x := x. (* 1 * 3 *)
assert True by trivial.
trivial.
Qed.

(* Undoing arbitrary commands, as non-first step *)

Theorem b : O=O.
assert True by trivial.
Ltac g x := x.
assert True by trivial.
trivial.
Qed.

(* Undoing declarations, as first step *)
(* was bugged in 8.1 *)

Theorem c : O=O.
Inductive T : Type := I.
trivial.
Qed.

(* Undoing declarations, as first step *)
(* new in 8.2 *)

Theorem d : O=O.
Definition e := O.
Definition f := O.
assert True by trivial.
trivial.
Qed.

(* Undoing declarations, as non-first step *)
(* new in 8.2 *)

Theorem h : O=O.
assert True by trivial.
Definition i := O.
Definition j := O.
assert True by trivial.
trivial.
Qed.

(* Undoing declarations, interleaved with proof steps *)
(* new in 8.2 *)

Theorem k : O=O.
assert True by trivial.
Definition l := O.
assert True by trivial.
Definition m := O.
assert True by trivial.
trivial.
Qed.

(* Undoing declarations, interleaved with proof steps and commands *)
(* new in 8.2 *)

Theorem n : O=O.
assert True by trivial.
Definition o := O.
Ltac h x := x.
assert True by trivial.
Focus.
Definition p := O.
assert True by trivial.
trivial.
Qed.

(* Undoing declarations, not in proof *)

Definition q := O.
Definition r := O.

(* Bug 2082 : Follow the numbers *)
(* Broken due to proof engine rewriting *)

Variable A : Prop.
Variable B : Prop.

Axiom OR : A \/ B.

Lemma MyLemma2 : True.
proof.
per cases of (A \/ B) by OR.
suppose A.
    then (1 = 1).
    then H1 : thesis. (* 4 *)
    thus thesis by H1. (* 2 *)
suppose B. (* 1 *) (* 3 *)
    then (1 = 1).
    then H2 : thesis.
    thus thesis by H2.
end cases.
end proof.
Qed. (* 5 if you made it here, there is no regression *)