src/ZF/AC/WO1_WO7.ML
author wenzelm
Sun, 11 Nov 2001 21:35:04 +0100
changeset 12144 f84eb7334d04
parent 11380 e76366922751
permissions -rw-r--r--
added RAW_METHOD, RAW_METHOD_CASES; METHOD, METHOD_CASES etc.: conjunction_tac;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
     1
(*  Title:      ZF/AC/WO1_WO7.ML
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
     3
    Author:     Krzysztof Grabczewski
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     4
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     5
WO7 <-> LEMMA <-> WO1 (Rubin & Rubin p. 5)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     6
LEMMA is the sentence denoted by (**)
11380
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
     7
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
     8
Also, WO1 <-> WO8
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     9
*)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    10
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    11
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    12
(* It is easy to see, that WO7 is equivallent to (**)                     *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    13
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    14
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    15
Goalw [WO7_def, LEMMA_def] 
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    16
  "WO7 <-> LEMMA";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    17
by (fast_tac (claset() addSEs [Finite_well_ord_converse]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    18
qed "WO7_iff_LEMMA";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    19
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    20
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    21
(* It is also easy to show that LEMMA implies WO1.                        *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    22
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    23
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    24
Goalw [WO1_def, LEMMA_def] "LEMMA ==> WO1";
1208
bc3093616ba4 Ran expandshort and corrected spelling of Grabczewski
paulson
parents: 1200
diff changeset
    25
by (rtac allI 1);
bc3093616ba4 Ran expandshort and corrected spelling of Grabczewski
paulson
parents: 1200
diff changeset
    26
by (etac allE 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    27
by (excluded_middle_tac "Finite(A)" 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
    28
by (Fast_tac 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    29
by (rewrite_goals_tac [Finite_def, eqpoll_def]);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    30
by (fast_tac (claset() addSIs [[bij_is_inj, nat_implies_well_ord] MRS
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    31
                                 well_ord_rvimage]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    32
qed "LEMMA_imp_WO1";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    33
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    34
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    35
(* The Rubins' proof of the other implication is contained within the     *)
11317
7f9e4c389318 X-symbols for set theory
paulson
parents: 7499
diff changeset
    36
(* following sentence \\<in>                                                   *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    37
(* "... each infinite ordinal is well ordered by < but not by >."         *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    38
(* This statement can be proved by the following two theorems.            *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    39
(* But moreover we need to show similar property for any well ordered     *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    40
(* infinite set. It is not very difficult thanks to Isabelle order types  *)
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5068
diff changeset
    41
(* We show that if a set is well ordered by some relation and by its     *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    42
(* converse, then apropriate order type is well ordered by the converse   *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    43
(* of it's membership relation, which in connection with the previous     *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    44
(* gives the conclusion.                                                  *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    45
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    46
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
    47
Goalw [wf_on_def, wf_def] 
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    48
    "[| Ord(a); ~Finite(a) |] ==> ~wf[a](converse(Memrel(a)))";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    49
by (dresolve_tac [nat_le_infinite_Ord RS le_imp_subset] 1 
1196
d43c1f7a53fe Numerous small improvements by KG and LCP
lcp
parents: 1123
diff changeset
    50
    THEN (assume_tac 1));
1208
bc3093616ba4 Ran expandshort and corrected spelling of Grabczewski
paulson
parents: 1200
diff changeset
    51
by (rtac notI 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    52
by (eres_inst_tac [("x","nat")] allE 1);
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    53
by (Blast_tac 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    54
qed "converse_Memrel_not_wf_on";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    55
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
    56
Goalw [well_ord_def] 
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    57
    "[| Ord(a); ~Finite(a) |] ==> ~well_ord(a,converse(Memrel(a)))";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    58
by (fast_tac (claset() addSDs [converse_Memrel_not_wf_on]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    59
qed "converse_Memrel_not_well_ord";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    60
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5068
diff changeset
    61
Goal "[| well_ord(A,r); well_ord(A,converse(r)) |]  \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    62
\       ==> well_ord(ordertype(A,r), converse(Memrel(ordertype(A, r))))";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    63
by (rtac ([ordertype_ord_iso RS ord_iso_sym RS ord_iso_rvimage_eq, 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    64
                Memrel_type RS (subset_Int_iff RS iffD1)] 
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    65
                MRS trans RS subst) 1
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    66
        THEN (assume_tac 1));
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    67
by (rtac (rvimage_converse RS subst) 1);
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    68
by (etac (ordertype_ord_iso RS ord_iso_sym RS ord_iso_is_bij RS
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    69
                bij_is_inj RS well_ord_rvimage) 1
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    70
        THEN (assume_tac 1));
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    71
qed "well_ord_converse_Memrel";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    72
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    73
Goalw [WO1_def, LEMMA_def] "WO1 ==> LEMMA";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    74
by (REPEAT (resolve_tac [allI,impI] 1));
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    75
by (REPEAT (eresolve_tac [allE,exE] 1));
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    76
by (REPEAT (ares_tac [exI,conjI,notI] 1));
7499
23e090051cb8 isatool expandshort;
wenzelm
parents: 5473
diff changeset
    77
by (ftac well_ord_converse_Memrel 1 THEN (assume_tac 1));
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    78
by (forward_tac [Ord_ordertype RS converse_Memrel_not_well_ord] 1);
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    79
by (contr_tac 2);
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    80
by (fast_tac (empty_cs addSEs [ordertype_ord_iso RS ord_iso_is_bij RS 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    81
                bij_is_inj RS (exI RS (lepoll_def RS def_imp_iff RS iffD2))
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    82
                RS lepoll_Finite]
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    83
                addSIs [notI] addEs [notE]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    84
qed "WO1_imp_LEMMA";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    85
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    86
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    87
Goal "WO1 <-> WO7";
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    88
by (simp_tac (simpset() addsimps [WO7_iff_LEMMA]) 1);
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    89
by (blast_tac (claset() addIs [LEMMA_imp_WO1, WO1_imp_LEMMA]) 1);
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    90
qed "WO1_iff_WO7";
11380
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
    91
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
    92
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
    93
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
    94
(* ********************************************************************** *)
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
    95
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
    96
(*            The proof of WO8 <-> WO1 (Rubin & Rubin p. 6)               *)
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
    97
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
    98
(* ********************************************************************** *)
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
    99
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   100
Goalw WO_defs "WO1 ==> WO8";
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   101
by (Fast_tac 1);
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   102
qed "WO1_WO8";
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   103
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   104
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   105
(* The proof of "WO8 ==> WO1" - faithful image of Rubin & Rubin's proof   *)
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   106
Goalw WO_defs "WO8 ==> WO1";
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   107
by (rtac allI 1);
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   108
by (eres_inst_tac [("x","{{x}. x \\<in> A}")] allE 1);
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   109
by (etac impE 1);
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   110
by (fast_tac (claset() addSEs [lam_sing_bij RS bij_is_inj RS
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   111
                        well_ord_rvimage]) 2);
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   112
by (res_inst_tac [("x","\\<lambda>a \\<in> {{x}. x \\<in> A}. THE x. a={x}")] exI 1);
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   113
by (force_tac (claset() addSIs [lam_type],
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   114
               simpset() addsimps [singleton_eq_iff, the_equality]) 1);
e76366922751 tidying and consolidating files
paulson
parents: 11317
diff changeset
   115
qed "WO8_WO1";