src/ZF/AC/WO1_WO7.ML
author wenzelm
Tue, 07 Sep 1999 10:40:58 +0200
changeset 7499 23e090051cb8
parent 5473 4abb47b79b86
child 11317 7f9e4c389318
permissions -rw-r--r--
isatool expandshort;
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 (**)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     7
*)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     8
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
     9
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    10
(* It is easy to see, that WO7 is equivallent to (**)                     *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    11
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    12
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    13
Goalw [WO7_def, LEMMA_def] 
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    14
  "WO7 <-> LEMMA";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    15
by (fast_tac (claset() addSEs [Finite_well_ord_converse]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    16
qed "WO7_iff_LEMMA";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    17
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    18
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    19
(* It is also easy to show that LEMMA implies WO1.                        *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    20
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    21
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    22
Goalw [WO1_def, LEMMA_def] "LEMMA ==> WO1";
1208
bc3093616ba4 Ran expandshort and corrected spelling of Grabczewski
paulson
parents: 1200
diff changeset
    23
by (rtac allI 1);
bc3093616ba4 Ran expandshort and corrected spelling of Grabczewski
paulson
parents: 1200
diff changeset
    24
by (etac allE 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    25
by (excluded_middle_tac "Finite(A)" 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1461
diff changeset
    26
by (Fast_tac 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    27
by (rewrite_goals_tac [Finite_def, eqpoll_def]);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    28
by (fast_tac (claset() addSIs [[bij_is_inj, nat_implies_well_ord] MRS
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    29
                                 well_ord_rvimage]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    30
qed "LEMMA_imp_WO1";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    31
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    32
(* ********************************************************************** *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    33
(* The Rubins' proof of the other implication is contained within the     *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    34
(* following sentence :                                                   *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    35
(* "... each infinite ordinal is well ordered by < but not by >."         *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    36
(* This statement can be proved by the following two theorems.            *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    37
(* 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
    38
(* 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
    39
(* 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
    40
(* converse, then apropriate order type is well ordered by the converse   *)
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    41
(* of it's membership relation, which in connection with the previous     *)
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    42
(* gives the conclusion.                                                  *)
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    43
(* ********************************************************************** *)
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    44
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
    45
Goalw [wf_on_def, wf_def] 
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    46
    "[| Ord(a); ~Finite(a) |] ==> ~wf[a](converse(Memrel(a)))";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    47
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
    48
    THEN (assume_tac 1));
1208
bc3093616ba4 Ran expandshort and corrected spelling of Grabczewski
paulson
parents: 1200
diff changeset
    49
by (rtac notI 1);
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    50
by (eres_inst_tac [("x","nat")] allE 1);
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    51
by (Blast_tac 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    52
qed "converse_Memrel_not_wf_on";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    53
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4091
diff changeset
    54
Goalw [well_ord_def] 
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    55
    "[| Ord(a); ~Finite(a) |] ==> ~well_ord(a,converse(Memrel(a)))";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3731
diff changeset
    56
by (fast_tac (claset() addSDs [converse_Memrel_not_wf_on]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    57
qed "converse_Memrel_not_well_ord";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    58
5137
60205b0de9b9 Huge tidy-up: removal of leading \!\!
paulson
parents: 5068
diff changeset
    59
Goal "[| well_ord(A,r); well_ord(A,converse(r)) |]  \
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    60
\       ==> well_ord(ordertype(A,r), converse(Memrel(ordertype(A, r))))";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    61
by (rtac ([ordertype_ord_iso RS ord_iso_sym RS ord_iso_rvimage_eq, 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    62
                Memrel_type RS (subset_Int_iff RS iffD1)] 
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    63
                MRS trans RS subst) 1
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    64
        THEN (assume_tac 1));
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    65
by (rtac (rvimage_converse RS subst) 1);
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    66
by (etac (ordertype_ord_iso RS ord_iso_sym RS ord_iso_is_bij RS
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    67
                bij_is_inj RS well_ord_rvimage) 1
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    68
        THEN (assume_tac 1));
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    69
qed "well_ord_converse_Memrel";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    70
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    71
Goalw [WO1_def, LEMMA_def] "WO1 ==> LEMMA";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    72
by (REPEAT (resolve_tac [allI,impI] 1));
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    73
by (REPEAT (eresolve_tac [allE,exE] 1));
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    74
by (REPEAT (ares_tac [exI,conjI,notI] 1));
7499
23e090051cb8 isatool expandshort;
wenzelm
parents: 5473
diff changeset
    75
by (ftac well_ord_converse_Memrel 1 THEN (assume_tac 1));
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    76
by (forward_tac [Ord_ordertype RS converse_Memrel_not_well_ord] 1);
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    77
by (contr_tac 2);
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    78
by (fast_tac (empty_cs addSEs [ordertype_ord_iso RS ord_iso_is_bij RS 
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    79
                bij_is_inj RS (exI RS (lepoll_def RS def_imp_iff RS iffD2))
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    80
                RS lepoll_Finite]
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1208
diff changeset
    81
                addSIs [notI] addEs [notE]) 1);
3731
71366483323b result() -> qed; Step_tac -> Safe_tac
paulson
parents: 2469
diff changeset
    82
qed "WO1_imp_LEMMA";
1123
5dfdc1464966 Krzysztof Grabczewski's (nearly) complete AC proofs
lcp
parents:
diff changeset
    83
5473
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    84
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    85
Goal "WO1 <-> WO7";
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    86
by (simp_tac (simpset() addsimps [WO7_iff_LEMMA]) 1);
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    87
by (blast_tac (claset() addIs [LEMMA_imp_WO1, WO1_imp_LEMMA]) 1);
4abb47b79b86 added proof of final result...
paulson
parents: 5241
diff changeset
    88
qed "WO1_iff_WO7";