2083
|
1 |
theory Modules
|
2454
|
2 |
imports "../Nominal2"
|
1599
|
3 |
begin
|
|
4 |
|
2481
3a5ebb2fcdbf
made supp proofs more robust by not using the standard induction; renamed some example files
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
5 |
(*
|
3a5ebb2fcdbf
made supp proofs more robust by not using the standard induction; renamed some example files
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
6 |
example from Leroy'96 about modules
|
3a5ebb2fcdbf
made supp proofs more robust by not using the standard induction; renamed some example files
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
7 |
|
3a5ebb2fcdbf
made supp proofs more robust by not using the standard induction; renamed some example files
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
8 |
see OTT example by Owens
|
3a5ebb2fcdbf
made supp proofs more robust by not using the standard induction; renamed some example files
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
9 |
*)
|
1599
|
10 |
|
|
11 |
atom_decl name
|
|
12 |
|
2436
|
13 |
nominal_datatype modules:
|
|
14 |
mexp =
|
1599
|
15 |
Acc "path"
|
|
16 |
| Stru "body"
|
2950
0911cb7bf696
changed bind to binds in specifications; bind will cause trouble with Monad_Syntax
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
17 |
| Funct x::"name" "sexp" m::"mexp" binds (set) x in m
|
1599
|
18 |
| FApp "mexp" "path"
|
|
19 |
| Ascr "mexp" "sexp"
|
|
20 |
and body =
|
|
21 |
Empty
|
2950
0911cb7bf696
changed bind to binds in specifications; bind will cause trouble with Monad_Syntax
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
22 |
| Seq c::"defn" d::"body" binds (set) "cbinders c" in d
|
1599
|
23 |
and defn =
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
24 |
Type "name" "ty"
|
1599
|
25 |
| Dty "name"
|
|
26 |
| DStru "name" "mexp"
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
27 |
| Val "name" "trm"
|
1599
|
28 |
and sexp =
|
|
29 |
Sig sbody
|
|
30 |
| SFunc "name" "sexp" "sexp"
|
|
31 |
and sbody =
|
|
32 |
SEmpty
|
2950
0911cb7bf696
changed bind to binds in specifications; bind will cause trouble with Monad_Syntax
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
33 |
| SSeq C::"spec" D::"sbody" binds (set) "Cbinders C" in D
|
1599
|
34 |
and spec =
|
|
35 |
Type1 "name"
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
36 |
| Type2 "name" "ty"
|
1599
|
37 |
| SStru "name" "sexp"
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
38 |
| SVal "name" "ty"
|
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
39 |
and ty =
|
1599
|
40 |
Tyref1 "name"
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
41 |
| Tyref2 "path" "ty"
|
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
42 |
| Fun "ty" "ty"
|
1599
|
43 |
and path =
|
|
44 |
Sref1 "name"
|
|
45 |
| Sref2 "path" "name"
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
46 |
and trm =
|
1599
|
47 |
Tref1 "name"
|
|
48 |
| Tref2 "path" "name"
|
2950
0911cb7bf696
changed bind to binds in specifications; bind will cause trouble with Monad_Syntax
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
49 |
| Lam' v::"name" "ty" M::"trm" binds (set) v in M
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
50 |
| App' "trm" "trm"
|
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
51 |
| Let' "body" "trm"
|
1599
|
52 |
binder
|
|
53 |
cbinders :: "defn \<Rightarrow> atom set"
|
|
54 |
and Cbinders :: "spec \<Rightarrow> atom set"
|
|
55 |
where
|
|
56 |
"cbinders (Type t T) = {atom t}"
|
|
57 |
| "cbinders (Dty t) = {atom t}"
|
|
58 |
| "cbinders (DStru x s) = {atom x}"
|
|
59 |
| "cbinders (Val v M) = {atom v}"
|
|
60 |
| "Cbinders (Type1 t) = {atom t}"
|
|
61 |
| "Cbinders (Type2 t T) = {atom t}"
|
|
62 |
| "Cbinders (SStru x S) = {atom x}"
|
|
63 |
| "Cbinders (SVal v T) = {atom v}"
|
|
64 |
|
2436
|
65 |
|
2593
25dcb2b1329e
ordered raw_bn_info to agree with the order of the raw_bn_functions; started alpha_bn proof
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
66 |
thm modules.perm_bn_alpha
|
25dcb2b1329e
ordered raw_bn_info to agree with the order of the raw_bn_functions; started alpha_bn proof
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
67 |
thm modules.perm_bn_simps
|
25dcb2b1329e
ordered raw_bn_info to agree with the order of the raw_bn_functions; started alpha_bn proof
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
68 |
thm modules.bn_finite
|
25dcb2b1329e
ordered raw_bn_info to agree with the order of the raw_bn_functions; started alpha_bn proof
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
69 |
|
2436
|
70 |
thm modules.distinct
|
|
71 |
thm modules.induct
|
|
72 |
thm modules.exhaust
|
|
73 |
thm modules.fv_defs
|
|
74 |
thm modules.bn_defs
|
|
75 |
thm modules.perm_simps
|
|
76 |
thm modules.eq_iff
|
|
77 |
thm modules.fv_bn_eqvt
|
|
78 |
thm modules.size_eqvt
|
2481
3a5ebb2fcdbf
made supp proofs more robust by not using the standard induction; renamed some example files
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
79 |
thm modules.supp
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
80 |
|
1599
|
81 |
|
|
82 |
end
|
|
83 |
|
|
84 |
|
|
85 |
|