author | paulson |
Wed, 15 Jul 1998 14:13:18 +0200 | |
changeset 5147 | 825877190618 |
parent 5137 | 60205b0de9b9 |
child 5321 | f8848433d240 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: ZF/Rel.ML |
435 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
435 | 4 |
Copyright 1994 University of Cambridge |
5 |
||
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
6 |
Relations in Zermelo-Fraenkel Set Theory |
435 | 7 |
*) |
8 |
||
9 |
open Rel; |
|
10 |
||
11 |
(*** Some properties of relations -- useful? ***) |
|
12 |
||
13 |
(* irreflexivity *) |
|
14 |
||
15 |
val prems = goalw Rel.thy [irrefl_def] |
|
16 |
"[| !!x. x:A ==> <x,x> ~: r |] ==> irrefl(A,r)"; |
|
17 |
by (REPEAT (ares_tac (prems @ [ballI]) 1)); |
|
760 | 18 |
qed "irreflI"; |
435 | 19 |
|
20 |
val prems = goalw Rel.thy [irrefl_def] |
|
21 |
"[| irrefl(A,r); x:A |] ==> <x,x> ~: r"; |
|
22 |
by (rtac (prems MRS bspec) 1); |
|
760 | 23 |
qed "irreflE"; |
435 | 24 |
|
25 |
(* symmetry *) |
|
26 |
||
27 |
val prems = goalw Rel.thy [sym_def] |
|
28 |
"[| !!x y.<x,y>: r ==> <y,x>: r |] ==> sym(r)"; |
|
29 |
by (REPEAT (ares_tac (prems @ [allI,impI]) 1)); |
|
760 | 30 |
qed "symI"; |
435 | 31 |
|
5137 | 32 |
Goalw [sym_def] "[| sym(r); <x,y>: r |] ==> <y,x>: r"; |
3016 | 33 |
by (Blast_tac 1); |
760 | 34 |
qed "symE"; |
435 | 35 |
|
36 |
(* antisymmetry *) |
|
37 |
||
38 |
val prems = goalw Rel.thy [antisym_def] |
|
39 |
"[| !!x y.[| <x,y>: r; <y,x>: r |] ==> x=y |] ==> \ |
|
40 |
\ antisym(r)"; |
|
41 |
by (REPEAT (ares_tac (prems @ [allI,impI]) 1)); |
|
760 | 42 |
qed "antisymI"; |
435 | 43 |
|
44 |
val prems = goalw Rel.thy [antisym_def] |
|
45 |
"!!r. [| antisym(r); <x,y>: r; <y,x>: r |] ==> x=y"; |
|
3016 | 46 |
by (Blast_tac 1); |
760 | 47 |
qed "antisymE"; |
435 | 48 |
|
49 |
(* transitivity *) |
|
50 |
||
5067 | 51 |
Goalw [trans_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
52 |
"[| trans(r); <a,b>:r; <b,c>:r |] ==> <a,c>:r"; |
3016 | 53 |
by (Blast_tac 1); |
760 | 54 |
qed "transD"; |
435 | 55 |
|
5067 | 56 |
Goalw [trans_on_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
57 |
"[| trans[A](r); <a,b>:r; <b,c>:r; a:A; b:A; c:A |] ==> <a,c>:r"; |
3016 | 58 |
by (Blast_tac 1); |
760 | 59 |
qed "trans_onD"; |
435 | 60 |