| author | Christian Urban <urbanc@in.tum.de> |
| Sat, 12 May 2012 22:24:04 +0100 | |
| branch | Nominal2-Isabelle2012 |
| changeset 3171 | f5057aabf5c0 |
| parent 2950 | 0911cb7bf696 |
| permissions | -rw-r--r-- |
| 1600 | 1 |
theory ExPS3 |
|
2454
9ffee4eb1ae1
renamed NewParser to Nominal2
Christian Urban <urbanc@in.tum.de>
parents:
2436
diff
changeset
|
2 |
imports "../Nominal2" |
| 1600 | 3 |
begin |
4 |
||
5 |
(* example 3 from Peter Sewell's bestiary *) |
|
6 |
||
7 |
atom_decl name |
|
8 |
||
9 |
nominal_datatype exp = |
|
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents:
2053
diff
changeset
|
10 |
Var "name" |
|
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents:
2053
diff
changeset
|
11 |
| App "exp" "exp" |
|
2950
0911cb7bf696
changed bind to binds in specifications; bind will cause trouble with Monad_Syntax
Christian Urban <urbanc@in.tum.de>
parents:
2454
diff
changeset
|
12 |
| Lam x::"name" e::"exp" binds x in e |
|
0911cb7bf696
changed bind to binds in specifications; bind will cause trouble with Monad_Syntax
Christian Urban <urbanc@in.tum.de>
parents:
2454
diff
changeset
|
13 |
| Let x::"name" p::"pat" e1::"exp" e2::"exp" binds (set) x in e2, binds (set) "bp p" in e1 |
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents:
2053
diff
changeset
|
14 |
and pat = |
| 1600 | 15 |
PVar "name" |
16 |
| PUnit |
|
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents:
2053
diff
changeset
|
17 |
| PPair "pat" "pat" |
| 1600 | 18 |
binder |
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents:
2053
diff
changeset
|
19 |
bp :: "pat \<Rightarrow> atom set" |
| 1600 | 20 |
where |
|
1656
c9d3dda79fe3
Removed remaining cheats + some cleaning.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1604
diff
changeset
|
21 |
"bp (PVar x) = {atom x}"
|
|
c9d3dda79fe3
Removed remaining cheats + some cleaning.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1604
diff
changeset
|
22 |
| "bp (PUnit) = {}"
|
|
c9d3dda79fe3
Removed remaining cheats + some cleaning.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1604
diff
changeset
|
23 |
| "bp (PPair p1 p2) = bp p1 \<union> bp p2" |
| 1600 | 24 |
|
|
2436
3885dc2669f9
cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents:
2120
diff
changeset
|
25 |
|
|
3885dc2669f9
cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents:
2120
diff
changeset
|
26 |
thm exp_pat.distinct |
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents:
2053
diff
changeset
|
27 |
thm exp_pat.induct |
|
2436
3885dc2669f9
cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents:
2120
diff
changeset
|
28 |
thm exp_pat.exhaust |
|
3885dc2669f9
cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents:
2120
diff
changeset
|
29 |
thm exp_pat.fv_defs |
|
3885dc2669f9
cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents:
2120
diff
changeset
|
30 |
thm exp_pat.bn_defs |
|
3885dc2669f9
cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents:
2120
diff
changeset
|
31 |
thm exp_pat.perm_simps |
|
3885dc2669f9
cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents:
2120
diff
changeset
|
32 |
thm exp_pat.eq_iff |
|
3885dc2669f9
cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents:
2120
diff
changeset
|
33 |
thm exp_pat.fv_bn_eqvt |
|
3885dc2669f9
cleaned up (almost completely) the examples
Christian Urban <urbanc@in.tum.de>
parents:
2120
diff
changeset
|
34 |
thm exp_pat.size_eqvt |
|
2082
0854af516f14
cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents:
2053
diff
changeset
|
35 |
|
| 1600 | 36 |
|
37 |
end |
|
38 |
||
39 |
||
40 |