src/HOL/Real/HahnBanach/Bounds.thy
changeset 7808 fd019ac3485f
parent 7656 2f18c0ffc348
child 7917 5e5b9813cce7
equal deleted inserted replaced
7807:6a102f74ad0a 7808:fd019ac3485f
     1 (*  Title:      HOL/Real/HahnBanach/Bounds.thy
     1 (*  Title:      HOL/Real/HahnBanach/Bounds.thy
     2     ID:         $Id$
     2     ID:         $Id$
     3     Author:     Gertrud Bauer, TU Munich
     3     Author:     Gertrud Bauer, TU Munich
     4 *)
     4 *)
     5 
     5 
       
     6 header {* Bounds *};
       
     7 
     6 theory Bounds = Main + Real:;
     8 theory Bounds = Main + Real:;
     7 
     9 
     8 
    10 
     9 section {* The sets of lower and upper bounds *};
    11 subsection {* The sets of lower and upper bounds *};
    10 
    12 
    11 constdefs
    13 constdefs
    12   is_LowerBound :: "('a::order) set => 'a set => 'a => bool"
    14   is_LowerBound :: "('a::order) set => 'a set => 'a => bool"
    13   "is_LowerBound A B == %x. x:A & (ALL y:B. x <= y)"
    15   "is_LowerBound A B == %x. x:A & (ALL y:B. x <= y)"
    14    
    16    
    20  
    22  
    21   UpperBounds :: "('a::order) set => 'a set => 'a set"
    23   UpperBounds :: "('a::order) set => 'a set => 'a set"
    22   "UpperBounds A B == Collect (is_UpperBound A B)";
    24   "UpperBounds A B == Collect (is_UpperBound A B)";
    23 
    25 
    24 syntax
    26 syntax
    25   "_UPPERS" :: "[pttrn, 'a set, 'a => bool] => 'a set"     ("(3UPPER'_BOUNDS _:_./ _)" 10)
    27   "_UPPERS" :: "[pttrn, 'a set, 'a => bool] => 'a set"     
    26   "_UPPERS_U" :: "[pttrn, 'a => bool] => 'a set"           ("(3UPPER'_BOUNDS _./ _)" 10)
    28     ("(3UPPER'_BOUNDS _:_./ _)" 10)
    27   "_LOWERS" :: "[pttrn, 'a set, 'a => bool] => 'a set"     ("(3LOWER'_BOUNDS _:_./ _)" 10)
    29   "_UPPERS_U" :: "[pttrn, 'a => bool] => 'a set"           
    28   "_LOWERS_U" :: "[pttrn, 'a => bool] => 'a set"           ("(3LOWER'_BOUNDS _./ _)" 10);
    30     ("(3UPPER'_BOUNDS _./ _)" 10)
       
    31   "_LOWERS" :: "[pttrn, 'a set, 'a => bool] => 'a set"     
       
    32     ("(3LOWER'_BOUNDS _:_./ _)" 10)
       
    33   "_LOWERS_U" :: "[pttrn, 'a => bool] => 'a set"           
       
    34     ("(3LOWER'_BOUNDS _./ _)" 10);
    29 
    35 
    30 translations
    36 translations
    31   "UPPER_BOUNDS x:A. P" == "UpperBounds A (Collect (%x. P))"
    37   "UPPER_BOUNDS x:A. P" == "UpperBounds A (Collect (%x. P))"
    32   "UPPER_BOUNDS x. P" == "UPPER_BOUNDS x:UNIV. P"
    38   "UPPER_BOUNDS x. P" == "UPPER_BOUNDS x:UNIV. P"
    33   "LOWER_BOUNDS x:A. P" == "LowerBounds A (Collect (%x. P))"
    39   "LOWER_BOUNDS x:A. P" == "LowerBounds A (Collect (%x. P))"
    34   "LOWER_BOUNDS x. P" == "LOWER_BOUNDS x:UNIV. P";
    40   "LOWER_BOUNDS x. P" == "LOWER_BOUNDS x:UNIV. P";
    35 
    41 
    36 
    42 
    37 section {* Least and greatest elements *};
    43 subsection {* Least and greatest elements *};
    38 
    44 
    39 constdefs
    45 constdefs
    40   is_Least :: "('a::order) set => 'a => bool"
    46   is_Least :: "('a::order) set => 'a => bool"
    41   "is_Least B == is_LowerBound B B"
    47   "is_Least B == is_LowerBound B B"
    42 
    48 
    48 
    54 
    49   Greatest :: "('a::order) set => 'a" 
    55   Greatest :: "('a::order) set => 'a" 
    50   "Greatest B == Eps (is_Greatest B)";
    56   "Greatest B == Eps (is_Greatest B)";
    51 
    57 
    52 syntax
    58 syntax
    53   "_LEAST"    :: "[pttrn, 'a => bool] => 'a"   ("(3LLEAST _./ _)" 10)
    59   "_LEAST"    :: "[pttrn, 'a => bool] => 'a"  
    54   "_GREATEST" :: "[pttrn, 'a => bool] => 'a"   ("(3GREATEST _./ _)" 10);
    60     ("(3LLEAST _./ _)" 10)
       
    61   "_GREATEST" :: "[pttrn, 'a => bool] => 'a"  
       
    62     ("(3GREATEST _./ _)" 10);
    55 
    63 
    56 translations
    64 translations
    57   "LLEAST x. P" == "Least {x. P}"
    65   "LLEAST x. P" == "Least {x. P}"
    58   "GREATEST x. P" == "Greatest {x. P}";
    66   "GREATEST x. P" == "Greatest {x. P}";
    59 
    67 
    60 
    68 
    61 section {* Inf and Sup *};
    69 subsection {* Infimum and Supremum *};
    62 
    70 
    63 constdefs
    71 constdefs
    64   is_Sup :: "('a::order) set => 'a set => 'a => bool"
    72   is_Sup :: "('a::order) set => 'a set => 'a => bool"
    65   "is_Sup A B x == isLub A B x"
    73   "is_Sup A B x == isLub A B x"
    66    
    74    
    72 
    80 
    73   Inf :: "('a::order) set => 'a set => 'a"
    81   Inf :: "('a::order) set => 'a set => 'a"
    74   "Inf A B == Eps (is_Inf A B)";
    82   "Inf A B == Eps (is_Inf A B)";
    75 
    83 
    76 syntax
    84 syntax
    77   "_SUP" :: "[pttrn, 'a set, 'a => bool] => 'a set"     ("(3SUP _:_./ _)" 10)
    85   "_SUP" :: "[pttrn, 'a set, 'a => bool] => 'a set"     
    78   "_SUP_U" :: "[pttrn, 'a => bool] => 'a set"           ("(3SUP _./ _)" 10)
    86     ("(3SUP _:_./ _)" 10)
    79   "_INF" :: "[pttrn, 'a set, 'a => bool] => 'a set"     ("(3INF _:_./ _)" 10)
    87   "_SUP_U" :: "[pttrn, 'a => bool] => 'a set"           
    80   "_INF_U" :: "[pttrn, 'a => bool] => 'a set"           ("(3INF _./ _)" 10);
    88     ("(3SUP _./ _)" 10)
       
    89   "_INF" :: "[pttrn, 'a set, 'a => bool] => 'a set"     
       
    90     ("(3INF _:_./ _)" 10)
       
    91   "_INF_U" :: "[pttrn, 'a => bool] => 'a set"           
       
    92     ("(3INF _./ _)" 10);
    81 
    93 
    82 translations
    94 translations
    83   "SUP x:A. P" == "Sup A (Collect (%x. P))"
    95   "SUP x:A. P" == "Sup A (Collect (%x. P))"
    84   "SUP x. P" == "SUP x:UNIV. P"
    96   "SUP x. P" == "SUP x:UNIV. P"
    85   "INF x:A. P" == "Inf A (Collect (%x. P))"
    97   "INF x:A. P" == "Inf A (Collect (%x. P))"
    86   "INF x. P" == "INF x:UNIV. P";
    98   "INF x. P" == "INF x:UNIV. P";
    87 
       
    88 
    99 
    89 lemma sup_le_ub: "isUb A B y ==> is_Sup A B s ==> s <= y";
   100 lemma sup_le_ub: "isUb A B y ==> is_Sup A B s ==> s <= y";
    90   by (unfold is_Sup_def, rule isLub_le_isUb);
   101   by (unfold is_Sup_def, rule isLub_le_isUb);
    91 
   102 
    92 lemma sup_ub: "y:B ==> is_Sup A B s ==> y <= s";
   103 lemma sup_ub: "y:B ==> is_Sup A B s ==> y <= s";
    98   have "a <= x"; by (rule bspec);
   109   have "a <= x"; by (rule bspec);
    99   also; have "x <= s"; by (rule sup_ub);
   110   also; have "x <= s"; by (rule sup_ub);
   100   finally; show "a <= s"; .;
   111   finally; show "a <= s"; .;
   101 qed;
   112 qed;
   102   
   113   
   103 
       
   104 end;
   114 end;