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
wenzelm@1440
     1
wenzelm@1440
     2
open LatPreInsts;
wenzelm@1440
     3
wenzelm@1440
     4
wenzelm@1440
     5
(** complete lattices **)
wenzelm@1440
     6
wenzelm@1440
     7
goal thy "is_inf x y (Inf {x, y})";
paulson@4153
     8
  by (rtac (bin_is_Inf_eq RS subst) 1);
paulson@4153
     9
  by (rtac Inf_is_Inf 1);
wenzelm@1440
    10
qed "Inf_is_inf";
wenzelm@1440
    11
wenzelm@1440
    12
goal thy "is_sup x y (Sup {x, y})";
paulson@4153
    13
  by (rtac (bin_is_Sup_eq RS subst) 1);
paulson@4153
    14
  by (rtac Sup_is_Sup 1);
wenzelm@1440
    15
qed "Sup_is_sup";
wenzelm@1440
    16
wenzelm@1440
    17
wenzelm@1440
    18
wenzelm@1440
    19
(** product lattices **)
wenzelm@1440
    20
wenzelm@1440
    21
(* pairs *)
wenzelm@1440
    22
wenzelm@1440
    23
goalw thy [is_inf_def, le_prod_def] "is_inf p q (fst p && fst q, snd p && snd q)";
clasohm@1573
    24
  by (Simp_tac 1);
paulson@4153
    25
  by Safe_tac;
wenzelm@1440
    26
  by (REPEAT_FIRST (fn i => resolve_tac [inf_lb1, inf_lb2, inf_ub_lbs] i ORELSE atac i));
wenzelm@1440
    27
qed "prod_is_inf";
wenzelm@1440
    28
wenzelm@1440
    29
goalw thy [is_sup_def, le_prod_def] "is_sup p q (fst p || fst q, snd p || snd q)";
clasohm@1573
    30
  by (Simp_tac 1);
paulson@4153
    31
  by Safe_tac;
wenzelm@1440
    32
  by (REPEAT_FIRST (fn i => resolve_tac [sup_ub1, sup_ub2, sup_lb_ubs] i ORELSE atac i));
wenzelm@1440
    33
qed "prod_is_sup";
wenzelm@1440
    34
wenzelm@1440
    35
wenzelm@1440
    36
(* functions *)
wenzelm@1440
    37
wenzelm@1440
    38
goalw thy [is_inf_def, le_fun_def] "is_inf f g (%x. f x && g x)";
paulson@4153
    39
  by Safe_tac;
paulson@4153
    40
  by (rtac inf_lb1 1);
paulson@4153
    41
  by (rtac inf_lb2 1);
paulson@4153
    42
  by (rtac inf_ub_lbs 1);
berghofe@1899
    43
  by (REPEAT_FIRST (Fast_tac));
wenzelm@1440
    44
qed "fun_is_inf";
wenzelm@1440
    45
wenzelm@1440
    46
goalw thy [is_sup_def, le_fun_def] "is_sup f g (%x. f x || g x)";
paulson@4153
    47
  by Safe_tac;
paulson@4153
    48
  by (rtac sup_ub1 1);
paulson@4153
    49
  by (rtac sup_ub2 1);
paulson@4153
    50
  by (rtac sup_lb_ubs 1);
berghofe@1899
    51
  by (REPEAT_FIRST (Fast_tac));
wenzelm@1440
    52
qed "fun_is_sup";
wenzelm@1440
    53
wenzelm@1440
    54
wenzelm@1440
    55
wenzelm@1440
    56
(** dual lattices **)
wenzelm@1440
    57
wenzelm@1440
    58
goalw thy [is_inf_def, le_dual_def] "is_inf x y (Abs_dual (Rep_dual x || Rep_dual y))";
wenzelm@1440
    59
  by (stac Abs_dual_inverse' 1);
paulson@4153
    60
  by Safe_tac;
paulson@4153
    61
  by (rtac sup_ub1 1);
paulson@4153
    62
  by (rtac sup_ub2 1);
paulson@4153
    63
  by (rtac sup_lb_ubs 1);
paulson@4153
    64
  by (assume_tac 1);
paulson@4153
    65
  by (assume_tac 1);
wenzelm@1440
    66
qed "dual_is_inf";
wenzelm@1440
    67
wenzelm@1440
    68
goalw thy [is_sup_def, le_dual_def] "is_sup x y (Abs_dual (Rep_dual x && Rep_dual y))";
wenzelm@1440
    69
  by (stac Abs_dual_inverse' 1);
paulson@4153
    70
  by Safe_tac;
paulson@4153
    71
  by (rtac inf_lb1 1);
paulson@4153
    72
  by (rtac inf_lb2 1);
paulson@4153
    73
  by (rtac inf_ub_lbs 1);
paulson@4153
    74
  by (assume_tac 1);
paulson@4153
    75
  by (assume_tac 1);
wenzelm@1440
    76
qed "dual_is_sup";