src/HOL/AxClasses/Lattice/LatPreInsts.ML
author wenzelm
Mon, 22 Jun 1998 17:26:46 +0200
changeset 5069 3ea049f7979d
parent 4153 e534c4c32d54
child 5711 5a1cd4b4b20e
permissions -rw-r--r--
isatool fixgoal;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     1
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     2
open LatPreInsts;
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     3
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     4
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     5
(** complete lattices **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
     6
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
     7
Goal "is_inf x y (Inf {x, y})";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
     8
  by (rtac (bin_is_Inf_eq RS subst) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
     9
  by (rtac Inf_is_Inf 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    10
qed "Inf_is_inf";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    11
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    12
Goal "is_sup x y (Sup {x, y})";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    13
  by (rtac (bin_is_Sup_eq RS subst) 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    14
  by (rtac Sup_is_Sup 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    15
qed "Sup_is_sup";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    16
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    17
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    18
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    19
(** product lattices **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    20
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    21
(* pairs *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    22
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    23
Goalw [is_inf_def, le_prod_def] "is_inf p q (fst p && fst q, snd p && snd q)";
1573
6d66b59f94a9 added constdefs section
clasohm
parents: 1440
diff changeset
    24
  by (Simp_tac 1);
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    25
  by Safe_tac;
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    26
  by (REPEAT_FIRST (fn i => resolve_tac [inf_lb1, inf_lb2, inf_ub_lbs] i ORELSE atac i));
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    27
qed "prod_is_inf";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    28
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    29
Goalw [is_sup_def, le_prod_def] "is_sup p q (fst p || fst q, snd p || snd q)";
1573
6d66b59f94a9 added constdefs section
clasohm
parents: 1440
diff changeset
    30
  by (Simp_tac 1);
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    31
  by Safe_tac;
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    32
  by (REPEAT_FIRST (fn i => resolve_tac [sup_ub1, sup_ub2, sup_lb_ubs] i ORELSE atac i));
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    33
qed "prod_is_sup";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    34
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    35
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    36
(* functions *)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    37
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    38
Goalw [is_inf_def, le_fun_def] "is_inf f g (%x. f x && g x)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    39
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    40
  by (rtac inf_lb1 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    41
  by (rtac inf_lb2 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    42
  by (rtac inf_ub_lbs 1);
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1573
diff changeset
    43
  by (REPEAT_FIRST (Fast_tac));
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    44
qed "fun_is_inf";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    45
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    46
Goalw [is_sup_def, le_fun_def] "is_sup f g (%x. f x || g x)";
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    47
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    48
  by (rtac sup_ub1 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    49
  by (rtac sup_ub2 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    50
  by (rtac sup_lb_ubs 1);
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1573
diff changeset
    51
  by (REPEAT_FIRST (Fast_tac));
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    52
qed "fun_is_sup";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    53
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    54
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    55
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    56
(** dual lattices **)
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    57
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    58
Goalw [is_inf_def, le_dual_def] "is_inf x y (Abs_dual (Rep_dual x || Rep_dual y))";
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    59
  by (stac Abs_dual_inverse' 1);
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    60
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    61
  by (rtac sup_ub1 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    62
  by (rtac sup_ub2 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    63
  by (rtac sup_lb_ubs 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    64
  by (assume_tac 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    65
  by (assume_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    66
qed "dual_is_inf";
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    67
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4153
diff changeset
    68
Goalw [is_sup_def, le_dual_def] "is_sup x y (Abs_dual (Rep_dual x && Rep_dual y))";
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    69
  by (stac Abs_dual_inverse' 1);
4153
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    70
  by Safe_tac;
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    71
  by (rtac inf_lb1 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    72
  by (rtac inf_lb2 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    73
  by (rtac inf_ub_lbs 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    74
  by (assume_tac 1);
e534c4c32d54 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    75
  by (assume_tac 1);
1440
de6f18da81bb added this stuff;
wenzelm
parents:
diff changeset
    76
qed "dual_is_sup";