src/HOL/AxClasses/Lattice/LatPreInsts.ML
author paulson
Wed Nov 05 13:23:46 1997 +0100 (1997-11-05)
changeset 4153 e534c4c32d54
parent 4091 771b1f6422a8
child 5069 3ea049f7979d
permissions -rw-r--r--
Ran expandshort, especially to introduce Safe_tac
     1 
     2 open LatPreInsts;
     3 
     4 
     5 (** complete lattices **)
     6 
     7 goal thy "is_inf x y (Inf {x, y})";
     8   by (rtac (bin_is_Inf_eq RS subst) 1);
     9   by (rtac Inf_is_Inf 1);
    10 qed "Inf_is_inf";
    11 
    12 goal thy "is_sup x y (Sup {x, y})";
    13   by (rtac (bin_is_Sup_eq RS subst) 1);
    14   by (rtac Sup_is_Sup 1);
    15 qed "Sup_is_sup";
    16 
    17 
    18 
    19 (** product lattices **)
    20 
    21 (* pairs *)
    22 
    23 goalw thy [is_inf_def, le_prod_def] "is_inf p q (fst p && fst q, snd p && snd q)";
    24   by (Simp_tac 1);
    25   by Safe_tac;
    26   by (REPEAT_FIRST (fn i => resolve_tac [inf_lb1, inf_lb2, inf_ub_lbs] i ORELSE atac i));
    27 qed "prod_is_inf";
    28 
    29 goalw thy [is_sup_def, le_prod_def] "is_sup p q (fst p || fst q, snd p || snd q)";
    30   by (Simp_tac 1);
    31   by Safe_tac;
    32   by (REPEAT_FIRST (fn i => resolve_tac [sup_ub1, sup_ub2, sup_lb_ubs] i ORELSE atac i));
    33 qed "prod_is_sup";
    34 
    35 
    36 (* functions *)
    37 
    38 goalw thy [is_inf_def, le_fun_def] "is_inf f g (%x. f x && g x)";
    39   by Safe_tac;
    40   by (rtac inf_lb1 1);
    41   by (rtac inf_lb2 1);
    42   by (rtac inf_ub_lbs 1);
    43   by (REPEAT_FIRST (Fast_tac));
    44 qed "fun_is_inf";
    45 
    46 goalw thy [is_sup_def, le_fun_def] "is_sup f g (%x. f x || g x)";
    47   by Safe_tac;
    48   by (rtac sup_ub1 1);
    49   by (rtac sup_ub2 1);
    50   by (rtac sup_lb_ubs 1);
    51   by (REPEAT_FIRST (Fast_tac));
    52 qed "fun_is_sup";
    53 
    54 
    55 
    56 (** dual lattices **)
    57 
    58 goalw thy [is_inf_def, le_dual_def] "is_inf x y (Abs_dual (Rep_dual x || Rep_dual y))";
    59   by (stac Abs_dual_inverse' 1);
    60   by Safe_tac;
    61   by (rtac sup_ub1 1);
    62   by (rtac sup_ub2 1);
    63   by (rtac sup_lb_ubs 1);
    64   by (assume_tac 1);
    65   by (assume_tac 1);
    66 qed "dual_is_inf";
    67 
    68 goalw thy [is_sup_def, le_dual_def] "is_sup x y (Abs_dual (Rep_dual x && Rep_dual y))";
    69   by (stac Abs_dual_inverse' 1);
    70   by Safe_tac;
    71   by (rtac inf_lb1 1);
    72   by (rtac inf_lb2 1);
    73   by (rtac inf_ub_lbs 1);
    74   by (assume_tac 1);
    75   by (assume_tac 1);
    76 qed "dual_is_sup";