Quot/Nominal/Terms.thy
author Christian Urban <urbanc@in.tum.de>
Wed, 27 Jan 2010 14:05:42 +0100
changeset 963 caed1462c951
parent 957 080bd6f1607c
child 976 ab45b11803ca
permissions -rw-r--r--
completely ported
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
theory Terms
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
imports "Nominal2_Atoms" "Nominal2_Eqvt" "Nominal2_Supp" "../QuotMain" 
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
begin
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
atom_decl name
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
text {* primrec seems to be genarally faster than fun *}
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
section {*** lets with binding patterns ***}
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
datatype trm1 =
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
  Vr1 "name"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
| Ap1 "trm1" "trm1"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
| Lm1 "name" "trm1"        --"name is bound in trm1"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
| Lt1 "bp" "trm1" "trm1"   --"all variables in bp are bound in the 2nd trm1"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
and bp =
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
  BUnit
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
| BVr "name"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
| BPr "bp" "bp"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
(* to be given by the user *)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
primrec 
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
  bv1
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
where
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
  "bv1 (BUnit) = {}"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    26
| "bv1 (BVr x) = {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
| "bv1 (BPr bp1 bp2) = (bv1 bp1) \<union> (bv1 bp1)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
(* needs to be calculated by the package *)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
primrec 
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
  fv_trm1 and fv_bp
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
where
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    33
  "fv_trm1 (Vr1 x) = {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
| "fv_trm1 (Ap1 t1 t2) = (fv_trm1 t1) \<union> (fv_trm1 t2)"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    35
| "fv_trm1 (Lm1 x t) = (fv_trm1 t) - {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
| "fv_trm1 (Lt1 bp t1 t2) = (fv_trm1 t1) \<union> (fv_trm1 t2 - bv1 bp)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
| "fv_bp (BUnit) = {}"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    38
| "fv_bp (BVr x) = {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
| "fv_bp (BPr b1 b2) = (fv_bp b1) \<union> (fv_bp b2)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
(* needs to be stated by the package *)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
instantiation 
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    43
  trm1 and bp :: pt
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
begin
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
primrec
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    47
  permute_trm1 and permute_bp
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
where
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    49
  "permute_trm1 pi (Vr1 a) = Vr1 (pi \<bullet> a)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    50
| "permute_trm1 pi (Ap1 t1 t2) = Ap1 (permute_trm1 pi t1) (permute_trm1 pi t2)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    51
| "permute_trm1 pi (Lm1 a t) = Lm1 (pi \<bullet> a) (permute_trm1 pi t)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    52
| "permute_trm1 pi (Lt1 bp t1 t2) = Lt1 (permute_bp pi bp) (permute_trm1 pi t1) (permute_trm1 pi t2)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    53
| "permute_bp pi (BUnit) = BUnit"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    54
| "permute_bp pi (BVr a) = BVr (pi \<bullet> a)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    55
| "permute_bp pi (BPr bp1 bp2) = BPr (permute_bp pi bp1) (permute_bp pi bp2)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    56
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    57
lemma pt_trm1_bp_zero:
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    58
  fixes t::trm1
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    59
  and   b::bp
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    60
  shows "0 \<bullet> t = t"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    61
  and   "0 \<bullet> b = b"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    62
apply(induct t and b rule: trm1_bp.inducts)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    63
apply(simp_all)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    64
done
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    65
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    66
lemma pt_trm1_bp_plus:
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    67
  fixes t::trm1
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    68
  and   b::bp
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    69
  shows "((p + q) \<bullet> t) = p \<bullet> (q \<bullet> t)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    70
  and   "((p + q) \<bullet> b) = p \<bullet> (q \<bullet> b)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    71
apply(induct t and b rule: trm1_bp.inducts)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    72
apply(simp_all)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    73
done
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    74
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    75
instance
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    76
apply default
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    77
apply(simp_all add: pt_trm1_bp_zero pt_trm1_bp_plus)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    78
done
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
end
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
inductive
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
  alpha1 :: "trm1 \<Rightarrow> trm1 \<Rightarrow> bool" ("_ \<approx>1 _" [100, 100] 100)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
where
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
  a1: "a = b \<Longrightarrow> (Vr1 a) \<approx>1 (Vr1 b)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
| a2: "\<lbrakk>t1 \<approx>1 t2; s1 \<approx>1 s2\<rbrakk> \<Longrightarrow> Ap1 t1 s1 \<approx>1 Ap1 t2 s2"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    87
| a3: "\<exists>pi. (fv_trm1 t - {atom a} = fv_trm1 s - {atom b} \<and> 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    88
            (fv_trm1 t - {atom a})\<sharp>* pi \<and> 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    89
            (pi \<bullet> t) \<approx>1 s \<and> (pi \<bullet> a) = b)
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
       \<Longrightarrow> Lm1 a t \<approx>1 Lm1 b s"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    91
| a4: "\<exists>pi.(t1 \<approx>1 t2 \<and>
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    92
           (fv_trm1 s1 - fv_bp b1 = fv_trm1 s2 - fv_bp b2) \<and>
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    93
           (fv_trm1 s1 - fv_bp b1) \<sharp>* pi \<and>
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    94
           (pi \<bullet> s1 = s2)                    (* Optional: \<and> (pi \<bullet> b1 = b2) *)) 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    95
       \<Longrightarrow> Lt1 b1 t1 s1 \<approx>1 Lt1 b2 t2 s2"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    97
lemma alpha1_equivp: "equivp alpha1" 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
    98
  sorry
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
quotient_type qtrm1 = trm1 / alpha1
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
  by (rule alpha1_equivp)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
section {*** lets with single assignments ***}
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
datatype trm2 =
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
  Vr2 "name"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
| Ap2 "trm2" "trm2"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
| Lm2 "name" "trm2"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
| Lt2 "assign" "trm2"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
and assign =
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
  As "name" "trm2"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
(* to be given by the user *)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
primrec 
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
  bv2
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
where
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   118
  "bv2 (As x t) = {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
(* needs to be calculated by the package *)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
primrec
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
  fv_trm2 and fv_assign
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
where
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   124
  "fv_trm2 (Vr2 x) = {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
| "fv_trm2 (Ap2 t1 t2) = (fv_trm2 t1) \<union> (fv_trm2 t2)"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   126
| "fv_trm2 (Lm2 x t) = (fv_trm2 t) - {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
| "fv_trm2 (Lt2 as t) = (fv_trm2 t - bv2 as) \<union> (fv_assign as)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
| "fv_assign (As x t) = (fv_trm2 t)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
(* needs to be stated by the package *)
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   131
instantiation 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   132
  trm2 and assign :: pt
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
begin
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
primrec
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   136
  permute_trm2 and permute_assign
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
where
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   138
  "permute_trm2 pi (Vr2 a) = Vr2 (pi \<bullet> a)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   139
| "permute_trm2 pi (Ap2 t1 t2) = Ap2 (permute_trm2 pi t1) (permute_trm2 pi t2)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   140
| "permute_trm2 pi (Lm2 a t) = Lm2 (pi \<bullet> a) (permute_trm2 pi t)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   141
| "permute_trm2 pi (Lt2 as t) = Lt2 (permute_assign pi as) (permute_trm2 pi t)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   142
| "permute_assign pi (As a t) = As (pi \<bullet> a) (permute_trm2 pi t)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   143
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   144
lemma pt_trm2_assign_zero:
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   145
  fixes t::trm2
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   146
  and   b::assign
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   147
  shows "0 \<bullet> t = t"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   148
  and   "0 \<bullet> b = b"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   149
apply(induct t and b rule: trm2_assign.inducts)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   150
apply(simp_all)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   151
done
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   152
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   153
lemma pt_trm2_assign_plus:
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   154
  fixes t::trm2
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   155
  and   b::assign
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   156
  shows "((p + q) \<bullet> t) = p \<bullet> (q \<bullet> t)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   157
  and   "((p + q) \<bullet> b) = p \<bullet> (q \<bullet> b)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   158
apply(induct t and b rule: trm2_assign.inducts)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   159
apply(simp_all)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   160
done
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   161
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   162
instance
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   163
apply default
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   164
apply(simp_all add: pt_trm2_assign_zero pt_trm2_assign_plus)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   165
done
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   166
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   167
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
end
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170
inductive
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   171
  alpha2 :: "trm2 \<Rightarrow> trm2 \<Rightarrow> bool" ("_ \<approx>2 _" [100, 100] 100)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
where
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   173
  a1: "a = b \<Longrightarrow> (Vr2 a) \<approx>2 (Vr2 b)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   174
| a2: "\<lbrakk>t1 \<approx>2 t2; s1 \<approx>2 s2\<rbrakk> \<Longrightarrow> Ap2 t1 s1 \<approx>2 Ap2 t2 s2"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   175
| a3: "\<exists>pi. (fv_trm2 t - {atom a} = fv_trm2 s - {atom b} \<and> 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   176
            (fv_trm2 t - {atom a})\<sharp>* pi \<and> 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   177
            (pi \<bullet> t) \<approx>2 s \<and> 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   178
            (pi \<bullet> a) = b)
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   179
       \<Longrightarrow> Lm2 a t \<approx>2 Lm2 b s"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   180
| a4: "\<exists>pi. (
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   181
         fv_trm2 t1 - fv_assign b1 = fv_trm2 t2 - fv_assign b2 \<and>
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   182
         (fv_trm2 t1 - fv_assign b1) \<sharp>* pi \<and>
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   183
         pi \<bullet> t1 = t2       (* \<and> (pi \<bullet> b1 = b2) *)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   184
       ) \<Longrightarrow> Lt2 b1 t1 \<approx>2 Lt2 b2 t2"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   186
lemma alpha2_equivp: "equivp alpha2" 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   187
  sorry
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   188
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   189
quotient_type qtrm2 = trm2 / alpha2
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   190
  by (rule alpha2_equivp)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   191
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   192
section {*** lets with many assignments ***}
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   193
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   194
datatype trm3 =
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   195
  Vr3 "name"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   196
| Ap3 "trm3" "trm3"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   197
| Lm3 "name" "trm3"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   198
| Lt3 "assigns" "trm3"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   199
and assigns =
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   200
  ANil
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   201
| ACons "name" "trm3" "assigns"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   203
(* to be given by the user *)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   204
primrec 
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   205
  bv3
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   206
where
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   207
  "bv3 ANil = {}"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   208
| "bv3 (ACons x t as) = {atom x} \<union> (bv3 as)"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   209
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   210
primrec
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   211
  fv_trm3 and fv_assigns
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   212
where
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   213
  "fv_trm3 (Vr3 x) = {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   214
| "fv_trm3 (Ap3 t1 t2) = (fv_trm3 t1) \<union> (fv_trm3 t2)"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   215
| "fv_trm3 (Lm3 x t) = (fv_trm3 t) - {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   216
| "fv_trm3 (Lt3 as t) = (fv_trm3 t - bv3 as) \<union> (fv_assigns as)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   217
| "fv_assigns (ANil) = {}"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
| "fv_assigns (ACons x t as) = (fv_trm3 t) \<union> (fv_assigns as)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   219
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   220
(* needs to be stated by the package *)
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   221
instantiation
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   222
 trm3 and assigns :: pt
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   223
begin
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   224
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   225
primrec
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   226
  permute_trm3 and permute_assigns
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   227
where
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   228
  "permute_trm3 pi (Vr3 a) = Vr3 (pi \<bullet> a)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   229
| "permute_trm3 pi (Ap3 t1 t2) = Ap3 (permute_trm3 pi t1) (permute_trm3 pi t2)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   230
| "permute_trm3 pi (Lm3 a t) = Lm3 (pi \<bullet> a) (permute_trm3 pi t)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   231
| "permute_trm3 pi (Lt3 as t) = Lt3 (permute_assigns pi as) (permute_trm3 pi t)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   232
| "permute_assigns pi (ANil) = ANil"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   233
| "permute_assigns pi (ACons a t as) = ACons (pi \<bullet> a) (permute_trm3 pi t) (permute_assigns pi as)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   234
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   235
lemma pt_trm3_assigns_zero:
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   236
  fixes t::trm3
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   237
  and   b::assigns
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   238
  shows "0 \<bullet> t = t"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   239
  and   "0 \<bullet> b = b"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   240
apply(induct t and b rule: trm3_assigns.inducts)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   241
apply(simp_all)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   242
done
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   243
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   244
lemma pt_trm3_assigns_plus:
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   245
  fixes t::trm3
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   246
  and   b::assigns
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   247
  shows "((p + q) \<bullet> t) = p \<bullet> (q \<bullet> t)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   248
  and   "((p + q) \<bullet> b) = p \<bullet> (q \<bullet> b)"
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   249
apply(induct t and b rule: trm3_assigns.inducts)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   250
apply(simp_all)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   251
done
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   252
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   253
instance
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   254
apply default
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   255
apply(simp_all add: pt_trm3_assigns_zero pt_trm3_assigns_plus)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   256
done
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   257
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   258
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   259
end
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   260
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   261
inductive
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   262
  alpha3 :: "trm3 \<Rightarrow> trm3 \<Rightarrow> bool" ("_ \<approx>3 _" [100, 100] 100)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   263
where
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   264
  a1: "a = b \<Longrightarrow> (Vr3 a) \<approx>3 (Vr3 b)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   265
| a2: "\<lbrakk>t1 \<approx>3 t2; s1 \<approx>3 s2\<rbrakk> \<Longrightarrow> Ap3 t1 s1 \<approx>3 Ap3 t2 s2"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   266
| a3: "\<exists>pi. (fv_trm3 t - {atom a} = fv_trm3 s - {atom b} \<and> 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   267
             (fv_trm3 t - {atom a})\<sharp>* pi \<and> 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   268
             (pi \<bullet> t) \<approx>3 s \<and> 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   269
             (pi \<bullet> a) = b)
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   270
       \<Longrightarrow> Lm3 a t \<approx>3 Lm3 b s"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   271
| a4: "\<exists>pi. (
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   272
         fv_trm3 t1 - fv_assigns b1 = fv_trm3 t2 - fv_assigns b2 \<and>
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   273
         (fv_trm3 t1 - fv_assigns b1) \<sharp>* pi \<and>
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   274
         pi \<bullet> t1 = t2      (* \<and> (pi \<bullet> b1 = b2)  *)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   275
       ) \<Longrightarrow> Lt3 b1 t1 \<approx>3 Lt3 b2 t2"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   276
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   277
lemma alpha3_equivp: "equivp alpha3" 
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   278
  sorry
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   279
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   280
quotient_type qtrm3 = trm3 / alpha3
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   281
  by (rule alpha3_equivp)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   282
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   283
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   284
section {*** lam with indirect list recursion ***}
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   285
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   286
datatype trm4 =
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   287
  Vr4 "name"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   288
| Ap4 "trm4" "trm4 list"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   289
| Lm4 "name" "trm4"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   290
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   291
thm trm4.recs
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   292
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   293
primrec
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   294
  fv_trm4 and fv_trm4_list
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   295
where
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   296
  "fv_trm4 (Vr4 x) = {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   297
| "fv_trm4 (Ap4 t ts) = (fv_trm4 t) \<union> (fv_trm4_list ts)"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   298
| "fv_trm4 (Lm4 x t) = (fv_trm4 t) - {atom x}"
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   299
| "fv_trm4_list ([]) = {}"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   300
| "fv_trm4_list (t#ts) = (fv_trm4 t) \<union> (fv_trm4_list ts)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   301
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   302
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   303
(* needs to be stated by the package *)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   304
(* there cannot be a clause for lists, as *) 
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   305
(* permuteutations are  already defined in Nominal (also functions, options, and so on) *)
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   306
instantiation
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   307
  trm4 :: pt
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   308
begin
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   309
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   310
(* does not work yet *)
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   311
primrec
963
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   312
  permute_trm4  and permute_trm4_list
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   313
where
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   314
  "permute_trm4 pi (Vr4 a) = Vr4 (pi \<bullet> a)"
963
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   315
| "permute_trm4 pi (Ap4 t ts) = Ap4 (permute_trm4 pi t) (permute_trm4_list pi ts)"
957
080bd6f1607c mostly ported Terms.thy to new Nominal
Christian Urban <urbanc@in.tum.de>
parents: 950
diff changeset
   316
| "permute_trm4 pi (Lm4 a t) = Lm4 (pi \<bullet> a) (permute_trm4 pi t)"
963
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   317
| "permute_trm4_list pi ([]) = []"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   318
| "permute_trm4_list pi (t#ts) = (permute_trm4 pi t) # (permute_trm4_list pi ts)"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   319
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   320
lemma pt_trm4_list_zero:
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   321
  fixes t::trm4
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   322
  and   ts::"trm4 list"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   323
  shows "0 \<bullet> t = t"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   324
  and   "permute_trm4_list 0 ts = ts"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   325
apply(induct t and ts rule: trm4.inducts)
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   326
apply(simp_all)
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   327
done
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   328
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   329
lemma pt_trm4_list_plus:
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   330
  fixes t::trm4
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   331
  and   ts::"trm4 list"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   332
  shows "((p + q) \<bullet> t) = p \<bullet> (q \<bullet> t)"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   333
  and   "(permute_trm4_list (p + q) ts) = permute_trm4_list p (permute_trm4_list q ts)"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   334
apply(induct t and ts rule: trm4.inducts)
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   335
apply(simp_all)
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   336
done
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   337
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   338
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   339
instance
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   340
apply(default)
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   341
apply(simp_all add: pt_trm4_list_zero pt_trm4_list_plus)
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   342
done
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   343
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   344
end
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   345
963
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   346
(* "repairing" of the permute function *)
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   347
lemma repaired:
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   348
  fixes ts::"trm4 list"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   349
  shows "permute_trm4_list p ts = p \<bullet> ts"
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   350
  apply(induct ts)
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   351
  apply(simp_all)
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   352
  done
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   353
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   354
thm permute_trm4_permute_trm4_list.simps[simplified repaired]
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   355
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   356
inductive
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   357
    alpha4 :: "trm4 \<Rightarrow> trm4 \<Rightarrow> bool" ("_ \<approx>4 _" [100, 100] 100)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   358
and alpha4list :: "trm4 list \<Rightarrow> trm4 list \<Rightarrow> bool" ("_ \<approx>4list _" [100, 100] 100) 
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   359
where
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   360
  a1: "a = b \<Longrightarrow> (Vr4 a) \<approx>4 (Vr4 b)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   361
| a2: "\<lbrakk>t1 \<approx>4 t2; s1 \<approx>4list s2\<rbrakk> \<Longrightarrow> Ap4 t1 s1 \<approx>4 Ap4 t2 s2"
963
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   362
| a4: "\<exists>pi. (fv_trm4 t - {atom a} = fv_trm4 s - {atom b} \<and> 
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   363
            (fv_trm4 t - {atom a})\<sharp>* pi \<and> 
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   364
            (pi \<bullet> t) \<approx>4 s \<and> 
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   365
            (pi \<bullet> a) = b)
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   366
       \<Longrightarrow> Lm4 a t \<approx>4 Lm4 b s"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   367
| a5: "[] \<approx>4list []"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   368
| a6: "\<lbrakk>t \<approx>4 s; ts \<approx>4list ss\<rbrakk> \<Longrightarrow> (t#ts) \<approx>4list (s#ss)"
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   369
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   370
lemma alpha4_equivp: "equivp alpha4" sorry
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   371
lemma alpha4list_equivp: "equivp alpha4list" sorry
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   372
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   373
quotient_type 
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   374
  qtrm4 = trm4 / alpha4 and
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   375
  qtrm4list = "trm4 list" / alpha4list
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   376
  by (simp_all add: alpha4_equivp alpha4list_equivp)
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   377
963
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   378
caed1462c951 completely ported
Christian Urban <urbanc@in.tum.de>
parents: 957
diff changeset
   379
950
98764f25f012 added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   380
end