Nominal/Ex3.thy
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Tue, 23 Mar 2010 08:45:08 +0100
changeset 1597 af34dd3418fe
child 1598 2406350c358f
permissions -rw-r--r--
Move example3 out.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1597
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     1
theory Ex3
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     2
imports "Parser"
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     3
begin
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     4
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     5
atom_decl name
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     7
ML {* val _ = recursive := false  *}
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     8
nominal_datatype trm0 =
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     9
  Var0 "name"
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    10
| App0 "trm0" "trm0"
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    11
| Lam0 x::"name" t::"trm0"          bind x in t
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    12
| Let0 p::"pat0" "trm0" t::"trm0"   bind "f0 p" in t
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    13
and pat0 =
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    14
  PN0
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    15
| PS0 "name"
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    16
| PD0 "pat0" "pat0"
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    17
binder
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    18
  f0::"pat0 \<Rightarrow> atom set"
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    19
where
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    20
  "f0 PN0 = {}"
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    21
| "f0 (PS0 x) = {atom x}"
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    22
| "f0 (PD0 p1 p2) = (f0 p1) \<union> (f0 p2)"
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    23
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    24
thm trm0_pat0.fv
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    25
thm trm0_pat0.eq_iff
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    26
thm trm0_pat0.bn
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    27
thm trm0_pat0.perm
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    28
thm trm0_pat0.induct
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    29
thm trm0_pat0.distinct
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    30
thm trm0_pat0.fv[simplified trm0_pat0.supp,no_vars]
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    31
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    32
end
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    33
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    34
af34dd3418fe Move example3 out.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    35