src/HOL/Real/Lubs.ML
author paulson
Wed, 15 Jul 1998 14:19:02 +0200
changeset 5148 74919e8f221c
parent 5143 b94cd208f073
child 7219 4e3f386c2e37
permissions -rw-r--r--
More tidying and removal of "\!\!... from Goal commands
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     1
(*  Title       : Lubs.ML
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     2
    Author      : Jacques D. Fleuriot
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     3
    Copyright   : 1998  University of Cambridge
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     4
    Description : Completeness of the reals. A few of the 
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     5
                  definitions suggested by James Margetson
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     6
*) 
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     7
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     8
open Lubs;
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
     9
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    10
(*------------------------------------------------------------------------
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    11
                        Rules for *<= and <=*
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    12
 ------------------------------------------------------------------------*)
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    13
Goalw [setle_def] "ALL y: S. y <= x ==> S *<= x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    14
by (assume_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    15
qed "setleI";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    16
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    17
Goalw [setle_def] "[| S *<= x; y: S |] ==> y <= x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    18
by (Fast_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    19
qed "setleD";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    20
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    21
Goalw [setge_def] "ALL y: S. x<= y ==> x <=* S";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    22
by (assume_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    23
qed "setgeI";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    24
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    25
Goalw [setge_def] "[| x <=* S; y: S |] ==> x <= y";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    26
by (Fast_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    27
qed "setgeD";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    28
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    29
(*------------------------------------------------------------------------
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    30
                        Rules about leastP, ub and lub
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    31
 ------------------------------------------------------------------------*)
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    32
Goalw [leastP_def] "leastP P x ==> P x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    33
by (Step_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    34
qed "leastPD1";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    35
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    36
Goalw [leastP_def] "leastP P x ==> x <=* Collect P";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    37
by (Step_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    38
qed "leastPD2";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    39
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    40
Goal "[| leastP P x; y: Collect P |] ==> x <= y";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    41
by (blast_tac (claset() addSDs [leastPD2,setgeD]) 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    42
qed "leastPD3";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    43
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    44
Goalw [isLub_def,isUb_def,leastP_def] 
5148
74919e8f221c More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5143
diff changeset
    45
      "isLub R S x ==> S *<= x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    46
by (Step_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    47
qed "isLubD1";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    48
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    49
Goalw [isLub_def,isUb_def,leastP_def] 
5148
74919e8f221c More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5143
diff changeset
    50
      "isLub R S x ==> x: R";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    51
by (Step_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    52
qed "isLubD1a";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    53
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    54
Goalw [isUb_def] "isLub R S x ==> isUb R S x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    55
by (blast_tac (claset() addDs [isLubD1,isLubD1a]) 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    56
qed "isLub_isUb";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    57
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    58
Goal "[| isLub R S x; y : S |] ==> y <= x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    59
by (blast_tac (claset() addSDs [isLubD1,setleD]) 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    60
qed "isLubD2";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    61
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    62
Goalw [isLub_def] "isLub R S x ==> leastP(isUb R S) x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    63
by (assume_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    64
qed "isLubD3";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    65
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    66
Goalw [isLub_def] "leastP(isUb R S) x ==> isLub R S x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    67
by (assume_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    68
qed "isLubI1";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    69
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    70
Goalw [isLub_def,leastP_def] 
5148
74919e8f221c More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5143
diff changeset
    71
      "[| isUb R S x; x <=* Collect (isUb R S) |] ==> isLub R S x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    72
by (Step_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    73
qed "isLubI2";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    74
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    75
Goalw [isUb_def] "[| isUb R S x; y : S |] ==> y <= x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    76
by (fast_tac (claset() addDs [setleD]) 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    77
qed "isUbD";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    78
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    79
Goalw [isUb_def] "isUb R S x ==> S *<= x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    80
by (Step_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    81
qed "isUbD2";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    82
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    83
Goalw [isUb_def] "isUb R S x ==> x: R";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    84
by (Step_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    85
qed "isUbD2a";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    86
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    87
Goalw [isUb_def] "[| S *<= x; x: R |] ==> isUb R S x";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    88
by (Step_tac 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    89
qed "isUbI";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    90
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    91
Goalw [isLub_def] "[| isLub R S x; isUb R S y |] ==> x <= y";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    92
by (blast_tac (claset() addSIs [leastPD3]) 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    93
qed "isLub_le_isUb";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    94
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5078
diff changeset
    95
Goalw [ubs_def,isLub_def] "isLub R S x ==> x <=* ubs R S";
5078
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    96
by (etac leastPD2 1);
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    97
qed "isLub_ubs";
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    98
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
    99
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
   100
7b5ea59c0275 Installation of target HOL-Real
paulson
parents:
diff changeset
   101