aboutsummaryrefslogtreecommitdiffhomepage
path: root/etc/coq/naming.v
blob: 53455239b58bdf379c0afa08f76791f6b0eedc56 (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
(* Coq theorems, etc can be named at the top .... *)

Theorem and_comms: forall (A B:Prop),(A /\ B) -> (B /\ A). 
  intros A B H.
  induction H.
  apply conj.
  assumption.
  assumption.
Qed.

(* at the bottom... *)

Goal forall (A B:Prop),(A /\ B) -> (B /\ A). 
  intros A B H.
  induction H.
  apply conj.
  assumption.
  assumption.
Save and_comms2.

(* or not at all! *)
(* Coq calls this "Unamed_thm", so must forget it like any other *)
(* test: do, undo, then check shell buffer to see "Reset Unnamed_thm" *)

Goal forall (A B:Prop),(A /\ B) -> (B /\ A). 
  intros A B H.
  induction H.
  apply conj.
  assumption.
  assumption.
Save.

(* Odd side effect: two unnamed theorems in a row are not possible! 
   Latest: with Coq 8.2, we get Unamed_thm0, Unamed_thm1, ... *)
Goal forall (A B:Prop),(A /\ B) -> (B /\ A). 
  intros A B H.
  induction H.
  apply conj.
  assumption.
  assumption.
Save.

(* TESTING: notice output window behaviour here with different settings:
   exact output displayed also depends on how many steps are issued
   at once.
*)

Goal forall (A B:Prop),(A /\ B) -> (B /\ A). 
tauto.
Save.