Nominal/Ex/ExNotRsp.thy
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Mon, 12 Apr 2010 17:05:19 +0200
changeset 1813 69fff336dd18
parent 1773 c0eac04ae3b4
child 2082 0854af516f14
permissions -rw-r--r--
Porting lemmas from Quotient package FSet to new FSet.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1600
e33e37fd4c7d More reorganization.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1594
diff changeset
     1
theory ExNotRsp
1773
c0eac04ae3b4 added README and moved examples into separate directory
Christian Urban <urbanc@in.tum.de>
parents: 1600
diff changeset
     2
imports "../Parser"
1589
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     3
begin
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     4
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     5
atom_decl name
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     7
(* example 6 from Terms.thy *)
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     8
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     9
nominal_datatype trm6 =
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    10
  Vr6 "name"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    11
| Lm6 x::"name" t::"trm6"         bind x in t
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    12
| Lt6 left::"trm6" right::"trm6"  bind "bv6 left" in right
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    13
binder
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    14
  bv6
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    15
where
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    16
  "bv6 (Vr6 n) = {}"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    17
| "bv6 (Lm6 n t) = {atom n} \<union> bv6 t"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    18
| "bv6 (Lt6 l r) = bv6 l \<union> bv6 r"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    19
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    20
(* example 7 from Terms.thy *)
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    21
nominal_datatype trm7 =
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    22
  Vr7 "name"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    23
| Lm7 l::"name" r::"trm7"   bind l in r
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    24
| Lt7 l::"trm7" r::"trm7"   bind "bv7 l" in r
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    25
binder
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    26
  bv7
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    27
where
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    28
  "bv7 (Vr7 n) = {atom n}"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    29
| "bv7 (Lm7 n t) = bv7 t - {atom n}"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    30
| "bv7 (Lt7 l r) = bv7 l \<union> bv7 r"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    31
*)
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    32
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    33
(* example 9 from Terms.thy *)
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    34
nominal_datatype lam9 =
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    35
  Var9 "name"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    36
| Lam9 n::"name" l::"lam9" bind n in l
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    37
and bla9 =
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    38
  Bla9 f::"lam9" s::"lam9" bind "bv9 f" in s
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    39
binder
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    40
  bv9
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    41
where
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    42
  "bv9 (Var9 x) = {}"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    43
| "bv9 (Lam9 x b) = {atom x}"
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    44
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    45
end
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    46
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    47
6542026b95cd Move Non-respectful examples to NotRsp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    48