Nominal/Test_compat.thy
author Christian Urban <urbanc@in.tum.de>
Mon, 08 Mar 2010 20:18:27 +0100
changeset 1368 c0cb30581f58
child 1369 424962b8b699
permissions -rw-r--r--
added a test-file for compatibility
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1368
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
theory Test_compat
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
imports "Parser" "../Attic/Prove"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
begin
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
text {* 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
  example 1 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
  
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
  single let binding
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
*}
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
nominal_datatype lam =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
  VAR "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
| APP "lam" "lam"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
| LET bp::"bp" t::"lam"   bind "bi bp" in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
and bp = 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
  BP "name" "lam" 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
  bi::"bp \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
  "bi (BP x t) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
thm alpha_lam_raw_alpha_bp_raw.intros[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
abbreviation "VAR \<equiv> VAR_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
abbreviation "APP \<equiv> APP_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
abbreviation "LET \<equiv> LET_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
abbreviation "BP \<equiv> BP_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
abbreviation "bi \<equiv> bi_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
(* non-recursive case *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
inductive
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
  alpha_lam :: "lam_raw \<Rightarrow> lam_raw \<Rightarrow> bool" and
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
  alpha_bp  :: "bp_raw \<Rightarrow> bp_raw \<Rightarrow> bool" and
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
  compat_bp :: "bp_raw \<Rightarrow> perm \<Rightarrow> bp_raw \<Rightarrow> bool"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
  "x = y \<Longrightarrow> alpha_lam (VAR x) (VAR y)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
| "alpha_lam l1 s1 \<and> alpha_lam l2 s2 \<Longrightarrow> alpha_lam (APP l1 l2) (APP s1 s2)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
| "\<exists>pi. (bi bp, lam) \<approx>gen alpha_lam fv_lam_raw pi (bi bp', lam') \<and> compat_bp bp pi bp' 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
   \<Longrightarrow> alpha_lam (LET bp lam) (LET bp' lam')"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
| "alpha_lam lam lam' \<and> name = name' \<Longrightarrow> alpha_bp (BP name lam) (BP name' lam')"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
| "alpha_lam t t' \<and> pi \<bullet> x = x' \<Longrightarrow> compat_bp (BP x t) pi (BP x' t')" 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
lemma test1:
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
  assumes "distinct [x, y]"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
  shows "alpha_lam (LET (BP x (VAR x)) (VAR x))
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
                   (LET (BP y (VAR x)) (VAR y))"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
apply(rule alpha_lam_alpha_bp_compat_bp.intros)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
apply(rule_tac x="(x \<leftrightarrow> y)" in exI)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
apply(simp add: alpha_gen fresh_star_def)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
apply(simp add: alpha_lam_alpha_bp_compat_bp.intros(1))
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
apply(rule alpha_lam_alpha_bp_compat_bp.intros)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
apply(simp add: alpha_lam_alpha_bp_compat_bp.intros(1))
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
done
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
lemma test2:
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
  assumes asm: "distinct [x, y]"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
  shows "\<not> alpha_lam (LET (BP x (VAR x)) (VAR x))
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
                     (LET (BP y (VAR y)) (VAR y))"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
using asm
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
apply(clarify)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
apply(erule alpha_lam.cases)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
apply(simp_all)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
apply(erule exE)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
apply(clarify)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
apply(simp add: alpha_gen fresh_star_def)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
apply(erule alpha_lam.cases)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
apply(simp_all)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
apply(clarify)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
apply(erule compat_bp.cases)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
apply(simp_all)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
apply(clarify)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
apply(erule alpha_lam.cases)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
apply(simp_all)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
done
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
(* recursive case where we have also bind "bi bp" in bp *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
inductive
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
  Alpha_lam :: "lam_raw \<Rightarrow> lam_raw \<Rightarrow> bool" and
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
  Alpha_bp  :: "bp_raw \<Rightarrow> bp_raw \<Rightarrow> bool" and
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
  Compat_bp :: "bp_raw \<Rightarrow> perm \<Rightarrow> bp_raw \<Rightarrow> bool"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
  "x = y \<Longrightarrow> Alpha_lam (VAR x) (VAR y)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
| "Alpha_lam l1 s1 \<and> Alpha_lam l2 s2 \<Longrightarrow> Alpha_lam (APP l1 l2) (APP s1 s2)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
| "\<exists>pi. (bi bp, lam) \<approx>gen Alpha_lam fv_lam_raw pi (bi bp', lam') \<and> Compat_bp bp pi bp' 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
   \<Longrightarrow> Alpha_lam (LET bp lam) (LET bp' lam')"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
| "Alpha_lam lam lam' \<and> name = name' \<Longrightarrow> Alpha_bp (BP name lam) (BP name' lam')"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
| "Alpha_lam (pi \<bullet> t) t' \<and> pi \<bullet> x = x' \<Longrightarrow> Compat_bp (BP x t) pi (BP x' t')"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
lemma Test1:
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
  assumes "distinct [x, y]"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  shows "Alpha_lam (LET (BP x (VAR x)) (VAR x))
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
                   (LET (BP y (VAR y)) (VAR y))"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
apply(rule Alpha_lam_Alpha_bp_Compat_bp.intros)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
apply(rule_tac x="(x \<leftrightarrow> y)" in exI)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
apply(simp add: alpha_gen fresh_star_def)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
apply(simp add: Alpha_lam_Alpha_bp_Compat_bp.intros(1))
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
apply(rule Alpha_lam_Alpha_bp_Compat_bp.intros)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
apply(simp add: Alpha_lam_Alpha_bp_Compat_bp.intros(1))
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
done
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
lemma Test2:
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
  assumes asm: "distinct [x, y]"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
  shows "\<not> Alpha_lam (LET (BP x (VAR x)) (VAR x))
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
                     (LET (BP y (VAR x)) (VAR y))"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
using asm
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
apply(clarify)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
apply(erule Alpha_lam.cases)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
apply(simp_all)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
apply(erule exE)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
apply(clarify)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
apply(simp add: alpha_gen fresh_star_def)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
apply(erule Alpha_lam.cases)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
apply(simp_all)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
apply(clarify)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
apply(erule Compat_bp.cases)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
apply(simp_all)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
apply(clarify)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
apply(erule Alpha_lam.cases)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
apply(simp_all)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
done
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
text {* example 2 *}
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
nominal_datatype trm' =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
  Var "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
| App "trm'" "trm'"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
| Lam x::"name" t::"trm'"          bind x in t 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
| Let p::"pat'" "trm'" t::"trm'"   bind "f p" in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
and pat' =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
  PN
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
| PS "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
| PD "name" "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
  f::"pat' \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
where 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
  "f PN = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
| "f (PS x) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
| "f (PD x y) = {atom x} \<union> {atom y}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
thm alpha_trm'_raw_alpha_pat'_raw.intros[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
abbreviation "Var \<equiv> VAR_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
abbreviation "App \<equiv> APP_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
abbreviation "Lam \<equiv> Lam_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
abbreviation "Lett \<equiv> Let_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
abbreviation "PN \<equiv> PN_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
abbreviation "PS \<equiv> PS_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
abbreviation "PD \<equiv> PD_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
abbreviation "f \<equiv> f_raw"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
(* not_yet_done
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
name = namea \<Longrightarrow> alpha_trm'_raw (Var_raw name) (Var_raw namea)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
alpha_trm'_raw trm'_raw2 trm'_raw2a \<and> alpha_trm'_raw trm'_raw1 trm'_raw1a \<Longrightarrow>
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
alpha_trm'_raw (App_raw trm'_raw1 trm'_raw2) (App_raw trm'_raw1a trm'_raw2a)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
\<exists>pi. ({atom name}, trm'_raw) \<approx>gen alpha_trm'_raw fv_trm'_raw pi ({atom namea}, trm'_rawa) \<Longrightarrow>
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
alpha_trm'_raw (Lam_raw name trm'_raw) (Lam_raw namea trm'_rawa)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
\<exists>pi. (f_raw pat'_raw,
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
      trm'_raw2) \<approx>gen alpha_trm'_raw fv_trm'_raw pi (f_raw pat'_rawa, trm'_raw2a) \<and>
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   162
     alpha_trm'_raw trm'_raw1 trm'_raw1a \<and>
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
     (f_raw pat'_raw,
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   164
      pat'_raw) \<approx>gen alpha_pat'_raw fv_pat'_raw pi (f_raw pat'_rawa, pat'_rawa) \<Longrightarrow>
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
alpha_trm'_raw (Let_raw pat'_raw trm'_raw1 trm'_raw2) (Let_raw pat'_rawa trm'_raw1a trm'_raw2a)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   166
True \<Longrightarrow> alpha_pat'_raw PN_raw PN_raw
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   167
name = namea \<Longrightarrow> alpha_pat'_raw (PS_raw name) (PS_raw namea)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
name2 = name2a \<and> name1 = name1a \<Longrightarrow> alpha_pat'_raw (PD_raw name1 name2) (PD_raw name1a name2a)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   171
(* compat should be
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
compat (PN) pi (PN) == True
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   173
compat (PS x) pi (PS x') == pi o x = x'
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   174
compat (PD p1 p2) pi (PD p1' p2') == compat p1 pi p1' & compat p2 pi p2'
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   175
*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   176
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   177
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   178
thm alpha_trm'_raw_alpha_pat'_raw.intros[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   179
thm fv_trm'_raw_fv_pat'_raw.simps[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   180
thm f_raw.simps
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   181
(*thm trm'_pat'_induct
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   182
thm trm'_pat'_perm
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   183
thm trm'_pat'_fv
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   184
thm trm'_pat'_bn
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
thm trm'_pat'_inject*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   186
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   187
nominal_datatype trm0 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   188
  Var0 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   189
| App0 "trm0" "trm0"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   190
| Lam0 x::"name" t::"trm0"          bind x in t 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   191
| Let0 p::"pat0" "trm0" t::"trm0"   bind "f0 p" in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   192
and pat0 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   193
  PN0
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   194
| PS0 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   195
| PD0 "pat0" "pat0"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   196
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   197
  f0::"pat0 \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   198
where 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   199
  "f0 PN0 = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   200
| "f0 (PS0 x) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   201
| "f0 (PD0 p1 p2) = (f0 p1) \<union> (f0 p2)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   203
thm f0_raw.simps
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   204
(*thm trm0_pat0_induct
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   205
thm trm0_pat0_perm
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   206
thm trm0_pat0_fv
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   207
thm trm0_pat0_bn*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   208
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   209
text {* example type schemes *}
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   210
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   211
(* does not work yet
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   212
nominal_datatype t =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   213
  Var "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   214
| Fun "t" "t"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   215
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   216
nominal_datatype tyS =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   217
  All xs::"name list" ty::"t_raw" bind xs in ty
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   219
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   220
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   221
nominal_datatype t = 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   222
  Var "name" 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   223
| Fun "t" "t"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   224
and  tyS = 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   225
  All xs::"name set" ty::"t" bind xs in ty
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   226
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   227
(* example 1 from Terms.thy *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   228
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   229
nominal_datatype trm1 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   230
  Vr1 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   231
| Ap1 "trm1" "trm1"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   232
| Lm1 x::"name" t::"trm1"       bind x in t 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   233
| Lt1 p::"bp1" "trm1" t::"trm1" bind "bv1 p" in t 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   234
and bp1 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   235
  BUnit1
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   236
| BV1 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   237
| BP1 "bp1" "bp1"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   238
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   239
  bv1
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   240
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   241
  "bv1 (BUnit1) = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   242
| "bv1 (BV1 x) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   243
| "bv1 (BP1 bp1 bp2) = (bv1 bp1) \<union> (bv1 bp2)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   244
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   245
thm bv1_raw.simps
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   246
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   247
(* example 2 from Terms.thy *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   248
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   249
nominal_datatype trm2 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   250
  Vr2 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   251
| Ap2 "trm2" "trm2"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   252
| Lm2 x::"name" t::"trm2"       bind x in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   253
| Lt2 r::"assign" t::"trm2"    bind "bv2 r" in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   254
and assign = 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   255
  As "name" "trm2"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   256
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   257
  bv2
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   258
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   259
  "bv2 (As x t) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   260
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   261
(* compat should be
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   262
compat (As x t) pi (As x' t') == pi o x = x' & alpha t t'
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   263
*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   264
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   265
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   266
thm fv_trm2_raw_fv_assign_raw.simps[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   267
thm alpha_trm2_raw_alpha_assign_raw.intros[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   268
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   269
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   270
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   271
text {* example 3 from Terms.thy *}
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   272
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   273
nominal_datatype trm3 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   274
  Vr3 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   275
| Ap3 "trm3" "trm3"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   276
| Lm3 x::"name" t::"trm3"        bind x in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   277
| Lt3 r::"rassigns3" t::"trm3"   bind "bv3 r" in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   278
and rassigns3 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   279
  ANil
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   280
| ACons "name" "trm3" "rassigns3"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   281
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   282
  bv3
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   283
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   284
  "bv3 ANil = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   285
| "bv3 (ACons x t as) = {atom x} \<union> (bv3 as)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   286
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   287
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   288
(* compat should be
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   289
compat (ANil) pi (PNil) \<equiv> TRue
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   290
compat (ACons x t ts) pi (ACons x' t' ts') \<equiv> pi o x = x' \<and> alpha t t' \<and> compat ts pi ts'
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   291
*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   292
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   293
(* example 4 from Terms.thy *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   294
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   295
(* fv_eqvt does not work, we need to repaire defined permute functions
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   296
   defined fv and defined alpha... *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   297
nominal_datatype trm4 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   298
  Vr4 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   299
| Ap4 "trm4" "trm4 list"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   300
| Lm4 x::"name" t::"trm4"  bind x in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   301
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   302
thm alpha_trm4_raw_alpha_trm4_raw_list.intros[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   303
thm fv_trm4_raw_fv_trm4_raw_list.simps[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   304
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   305
(* example 5 from Terms.thy *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   306
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   307
nominal_datatype trm5 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   308
  Vr5 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   309
| Ap5 "trm5" "trm5"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   310
| Lt5 l::"lts" t::"trm5"  bind "bv5 l" in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   311
and lts =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   312
  Lnil
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   313
| Lcons "name" "trm5" "lts"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   314
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   315
  bv5
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   316
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   317
  "bv5 Lnil = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   318
| "bv5 (Lcons n t ltl) = {atom n} \<union> (bv5 ltl)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   319
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   320
(* example 6 from Terms.thy *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   321
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   322
(* BV is not respectful, needs to fail*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   323
nominal_datatype trm6 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   324
  Vr6 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   325
| Lm6 x::"name" t::"trm6"         bind x in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   326
| Lt6 left::"trm6" right::"trm6"  bind "bv6 left" in right
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   327
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   328
  bv6
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   329
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   330
  "bv6 (Vr6 n) = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   331
| "bv6 (Lm6 n t) = {atom n} \<union> bv6 t"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   332
| "bv6 (Lt6 l r) = bv6 l \<union> bv6 r"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   333
(* example 7 from Terms.thy *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   334
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   335
(* BV is not respectful, needs to fail*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   336
nominal_datatype trm7 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   337
  Vr7 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   338
| Lm7 l::"name" r::"trm7"   bind l in r
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   339
| Lt7 l::"trm7" r::"trm7"   bind "bv7 l" in r
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   340
binder 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   341
  bv7 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   342
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   343
  "bv7 (Vr7 n) = {atom n}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   344
| "bv7 (Lm7 n t) = bv7 t - {atom n}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   345
| "bv7 (Lt7 l r) = bv7 l \<union> bv7 r"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   346
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   347
(* example 8 from Terms.thy *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   348
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   349
nominal_datatype foo8 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   350
  Foo0 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   351
| Foo1 b::"bar8" f::"foo8" bind "bv8 b" in f --"check fo error if this is called foo"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   352
and bar8 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   353
  Bar0 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   354
| Bar1 "name" s::"name" b::"bar8" bind s in b
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   355
binder 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   356
  bv8
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   357
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   358
  "bv8 (Bar0 x) = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   359
| "bv8 (Bar1 v x b) = {atom v}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   360
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   361
(* example 9 from Terms.thy *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   362
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   363
(* BV is not respectful, needs to fail*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   364
nominal_datatype lam9 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   365
  Var9 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   366
| Lam9 n::"name" l::"lam9" bind n in l
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   367
and bla9 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   368
  Bla9 f::"lam9" s::"lam9" bind "bv9 f" in s
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   369
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   370
  bv9
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   371
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   372
  "bv9 (Var9 x) = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   373
| "bv9 (Lam9 x b) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   374
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   375
(* example from my PHD *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   376
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   377
atom_decl coname
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   378
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   379
nominal_datatype phd =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   380
   Ax "name" "coname"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   381
|  Cut n::"coname" t1::"phd" c::"coname" t2::"phd"              bind n in t1, bind c in t2
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   382
|  AndR c1::"coname" t1::"phd" c2::"coname" t2::"phd" "coname"  bind c1 in t1, bind c2 in t2
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   383
|  AndL1 n::"name" t::"phd" "name"                              bind n in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   384
|  AndL2 n::"name" t::"phd" "name"                              bind n in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   385
|  ImpL c::"coname" t1::"phd" n::"name" t2::"phd" "name"        bind c in t1, bind n in t2
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   386
|  ImpR c::"coname" n::"name" t::"phd" "coname"                 bind n in t, bind c in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   387
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   388
thm alpha_phd_raw.intros[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   389
thm fv_phd_raw.simps[no_vars]
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   390
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   391
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   392
(* example form Leroy 96 about modules; OTT *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   393
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   394
nominal_datatype mexp =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   395
  Acc "path"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   396
| Stru "body"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   397
| Funct x::"name" "sexp" m::"mexp"    bind x in m
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   398
| FApp "mexp" "path"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   399
| Ascr "mexp" "sexp"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   400
and body =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   401
  Empty
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   402
| Seq c::defn d::"body"     bind "cbinders c" in d
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   403
and defn =  
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   404
  Type "name" "tyty"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   405
| Dty "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   406
| DStru "name" "mexp"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   407
| Val "name" "trmtrm"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   408
and sexp =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   409
  Sig sbody
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   410
| SFunc "name" "sexp" "sexp"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   411
and sbody = 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   412
  SEmpty
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   413
| SSeq C::spec D::sbody    bind "Cbinders C" in D
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   414
and spec =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   415
  Type1 "name" 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   416
| Type2 "name" "tyty"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   417
| SStru "name" "sexp"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   418
| SVal "name" "tyty"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   419
and tyty =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   420
  Tyref1 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   421
| Tyref2 "path" "tyty"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   422
| Fun "tyty" "tyty"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   423
and path =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   424
  Sref1 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   425
| Sref2 "path" "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   426
and trmtrm =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   427
  Tref1 "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   428
| Tref2 "path" "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   429
| Lam' v::"name" "tyty" M::"trmtrm"  bind v in M
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   430
| App' "trmtrm" "trmtrm"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   431
| Let' "body" "trmtrm"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   432
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   433
    cbinders :: "defn \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   434
and Cbinders :: "spec \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   435
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   436
  "cbinders (Type t T) = {atom t}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   437
| "cbinders (Dty t) = {atom t}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   438
| "cbinders (DStru x s) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   439
| "cbinders (Val v M) = {atom v}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   440
| "Cbinders (Type1 t) = {atom t}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   441
| "Cbinders (Type2 t T) = {atom t}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   442
| "Cbinders (SStru x S) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   443
| "Cbinders (SVal v T) = {atom v}"  
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   444
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   445
(* core haskell *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   446
print_theorems
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   447
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   448
atom_decl var
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   449
atom_decl tvar
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   450
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   451
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   452
(* there are types, coercion types and regular types *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   453
nominal_datatype tkind = 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   454
  KStar
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   455
| KFun "tkind" "tkind"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   456
and ckind =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   457
  CKEq "ty" "ty" 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   458
and ty =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   459
  TVar "tvar"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   460
| TC "string"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   461
| TApp "ty" "ty"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   462
| TFun "string" "ty list"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   463
| TAll tv::"tvar" "tkind" T::"ty"  bind tv in T
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   464
| TEq "ty" "ty" "ty"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   465
and co =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   466
  CC "string"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   467
| CApp "co" "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   468
| CFun "string" "co list"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   469
| CAll tv::"tvar" "ckind" C::"co"  bind tv in C
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   470
| CEq "co" "co" "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   471
| CSym "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   472
| CCir "co" "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   473
| CLeft "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   474
| CRight "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   475
| CSim "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   476
| CRightc "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   477
| CLeftc "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   478
| CCoe "co" "co"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   479
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   480
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   481
typedecl ty --"hack since ty is not yet defined"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   482
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   483
abbreviation 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   484
  "atoms A \<equiv> atom ` A"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   485
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   486
nominal_datatype trm =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   487
  Var "var"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   488
| C "string"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   489
| LAM tv::"tvar" "kind" t::"trm"   bind tv in t 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   490
| APP "trm" "ty"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   491
| Lam v::"var" "ty" t::"trm"       bind v in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   492
| App "trm" "trm"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   493
| Let x::"var" "ty" "trm" t::"trm" bind x in t
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   494
| Case "trm" "assoc list"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   495
| Cast "trm" "ty"                   --"ty is supposed to be a coercion type only"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   496
and assoc = 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   497
  A p::"pat" t::"trm" bind "bv p" in t 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   498
and pat = 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   499
  K "string" "(tvar \<times> kind) list" "(var \<times> ty) list"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   500
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   501
 bv :: "pat \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   502
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   503
 "bv (K s ts vs) = (atoms (set (map fst ts))) \<union> (atoms (set (map fst vs)))"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   504
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   505
(*
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   506
compat (K s ts vs) pi (K s' ts' vs') ==
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   507
  s = s' & 
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   508
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   509
*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   510
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   511
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   512
(*thm bv_raw.simps*)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   513
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   514
(* example 3 from Peter Sewell's bestiary *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   515
nominal_datatype exp =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   516
  VarP "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   517
| AppP "exp" "exp"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   518
| LamP x::"name" e::"exp" bind x in e
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   519
| LetP x::"name" p::"pat" e1::"exp" e2::"exp" bind x in e2, bind "bp p" in e1
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   520
and pat =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   521
  PVar "name"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   522
| PUnit
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   523
| PPair "pat" "pat"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   524
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   525
  bp :: "pat \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   526
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   527
  "bp (PVar x) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   528
| "bp (PUnit) = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   529
| "bp (PPair p1 p2) = bp p1 \<union> bp p2"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   530
thm alpha_exp_raw_alpha_pat_raw.intros
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   531
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   532
(* example 6 from Peter Sewell's bestiary *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   533
nominal_datatype exp6 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   534
  EVar name
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   535
| EPair exp6 exp6
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   536
| ELetRec x::name p::pat6 e1::exp6 e2::exp6 bind x in e1, bind x in e2, bind "bp6 p" in e1
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   537
and pat6 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   538
  PVar' name
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   539
| PUnit'
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   540
| PPair' pat6 pat6
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   541
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   542
  bp6 :: "pat6 \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   543
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   544
  "bp6 (PVar' x) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   545
| "bp6 (PUnit') = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   546
| "bp6 (PPair' p1 p2) = bp6 p1 \<union> bp6 p2"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   547
thm alpha_exp6_raw_alpha_pat6_raw.intros
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   548
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   549
(* example 7 from Peter Sewell's bestiary *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   550
nominal_datatype exp7 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   551
  EVar name
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   552
| EUnit
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   553
| EPair exp7 exp7
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   554
| ELetRec l::lrbs e::exp7 bind "b7s l" in e, bind "b7s l" in l
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   555
and lrb =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   556
  Assign name exp7
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   557
and lrbs =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   558
  Single lrb
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   559
| More lrb lrbs
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   560
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   561
  b7 :: "lrb \<Rightarrow> atom set" and
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   562
  b7s :: "lrbs \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   563
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   564
  "b7 (Assign x e) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   565
| "b7s (Single a) = b7 a"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   566
| "b7s (More a as) = (b7 a) \<union> (b7s as)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   567
thm alpha_exp7_raw_alpha_lrb_raw_alpha_lrbs_raw.intros
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   568
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   569
(* example 8 from Peter Sewell's bestiary *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   570
nominal_datatype exp8 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   571
  EVar name
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   572
| EUnit
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   573
| EPair exp8 exp8
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   574
| ELetRec l::lrbs8 e::exp8 bind "b_lrbs8 l" in e, bind "b_lrbs8 l" in l
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   575
and fnclause =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   576
  K x::name p::pat8 e::exp8 bind "b_pat p" in e
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   577
and fnclauses =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   578
  S fnclause
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   579
| ORs fnclause fnclauses
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   580
and lrb8 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   581
  Clause fnclauses
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   582
and lrbs8 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   583
  Single lrb8
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   584
| More lrb8 lrbs8
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   585
and pat8 =
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   586
  PVar name
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   587
| PUnit
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   588
| PPair pat8 pat8
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   589
binder
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   590
  b_lrbs8 :: "lrbs8 \<Rightarrow> atom set" and
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   591
  b_pat :: "pat8 \<Rightarrow> atom set" and
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   592
  b_fnclauses :: "fnclauses \<Rightarrow> atom set" and
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   593
  b_fnclause :: "fnclause \<Rightarrow> atom set" and
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   594
  b_lrb8 :: "lrb8 \<Rightarrow> atom set"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   595
where
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   596
  "b_lrbs8 (Single l) = b_lrb8 l"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   597
| "b_lrbs8 (More l ls) = b_lrb8 l \<union> b_lrbs8 ls"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   598
| "b_pat (PVar x) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   599
| "b_pat (PUnit) = {}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   600
| "b_pat (PPair p1 p2) = b_pat p1 \<union> b_pat p2"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   601
| "b_fnclauses (S fc) = (b_fnclause fc)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   602
| "b_fnclauses (ORs fc fcs) = (b_fnclause fc) \<union> (b_fnclauses fcs)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   603
| "b_lrb8 (Clause fcs) = (b_fnclauses fcs)"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   604
| "b_fnclause (K x pat exp8) = {atom x}"
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   605
thm alpha_exp8_raw_alpha_fnclause_raw_alpha_fnclauses_raw_alpha_lrb8_raw_alpha_lrbs8_raw_alpha_pat8_raw.intros
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   606
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   607
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   608
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   609
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   610
(* example 9 from Peter Sewell's bestiary *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   611
(* run out of steam at the moment *)
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   612
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   613
end
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   614
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   615
c0cb30581f58 added a test-file for compatibility
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   616