src/HOL/AxClasses/Lattice/LatPreInsts.ML
changeset 1440 de6f18da81bb
child 1573 6d66b59f94a9
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/HOL/AxClasses/Lattice/LatPreInsts.ML	Mon Jan 15 15:49:21 1996 +0100
     1.3 @@ -0,0 +1,76 @@
     1.4 +
     1.5 +open LatPreInsts;
     1.6 +
     1.7 +
     1.8 +(** complete lattices **)
     1.9 +
    1.10 +goal thy "is_inf x y (Inf {x, y})";
    1.11 +  br (bin_is_Inf_eq RS subst) 1;
    1.12 +  br Inf_is_Inf 1;
    1.13 +qed "Inf_is_inf";
    1.14 +
    1.15 +goal thy "is_sup x y (Sup {x, y})";
    1.16 +  br (bin_is_Sup_eq RS subst) 1;
    1.17 +  br Sup_is_Sup 1;
    1.18 +qed "Sup_is_sup";
    1.19 +
    1.20 +
    1.21 +
    1.22 +(** product lattices **)
    1.23 +
    1.24 +(* pairs *)
    1.25 +
    1.26 +goalw thy [is_inf_def, le_prod_def] "is_inf p q (fst p && fst q, snd p && snd q)";
    1.27 +  by (simp_tac prod_ss 1);
    1.28 +  by (safe_tac HOL_cs);
    1.29 +  by (REPEAT_FIRST (fn i => resolve_tac [inf_lb1, inf_lb2, inf_ub_lbs] i ORELSE atac i));
    1.30 +qed "prod_is_inf";
    1.31 +
    1.32 +goalw thy [is_sup_def, le_prod_def] "is_sup p q (fst p || fst q, snd p || snd q)";
    1.33 +  by (simp_tac prod_ss 1);
    1.34 +  by (safe_tac HOL_cs);
    1.35 +  by (REPEAT_FIRST (fn i => resolve_tac [sup_ub1, sup_ub2, sup_lb_ubs] i ORELSE atac i));
    1.36 +qed "prod_is_sup";
    1.37 +
    1.38 +
    1.39 +(* functions *)
    1.40 +
    1.41 +goalw thy [is_inf_def, le_fun_def] "is_inf f g (%x. f x && g x)";
    1.42 +  by (safe_tac HOL_cs);
    1.43 +  br inf_lb1 1;
    1.44 +  br inf_lb2 1;
    1.45 +  br inf_ub_lbs 1;
    1.46 +  by (REPEAT_FIRST (fast_tac HOL_cs));
    1.47 +qed "fun_is_inf";
    1.48 +
    1.49 +goalw thy [is_sup_def, le_fun_def] "is_sup f g (%x. f x || g x)";
    1.50 +  by (safe_tac HOL_cs);
    1.51 +  br sup_ub1 1;
    1.52 +  br sup_ub2 1;
    1.53 +  br sup_lb_ubs 1;
    1.54 +  by (REPEAT_FIRST (fast_tac HOL_cs));
    1.55 +qed "fun_is_sup";
    1.56 +
    1.57 +
    1.58 +
    1.59 +(** dual lattices **)
    1.60 +
    1.61 +goalw thy [is_inf_def, le_dual_def] "is_inf x y (Abs_dual (Rep_dual x || Rep_dual y))";
    1.62 +  by (stac Abs_dual_inverse' 1);
    1.63 +  by (safe_tac HOL_cs);
    1.64 +  br sup_ub1 1;
    1.65 +  br sup_ub2 1;
    1.66 +  br sup_lb_ubs 1;
    1.67 +  ba 1;
    1.68 +  ba 1;
    1.69 +qed "dual_is_inf";
    1.70 +
    1.71 +goalw thy [is_sup_def, le_dual_def] "is_sup x y (Abs_dual (Rep_dual x && Rep_dual y))";
    1.72 +  by (stac Abs_dual_inverse' 1);
    1.73 +  by (safe_tac HOL_cs);
    1.74 +  br inf_lb1 1;
    1.75 +  br inf_lb2 1;
    1.76 +  br inf_ub_lbs 1;
    1.77 +  ba 1;
    1.78 +  ba 1;
    1.79 +qed "dual_is_sup";