Nominal/Ex/Term8.thy
author Christian Urban <urbanc@in.tum.de>
Tue, 04 May 2010 14:38:07 +0100
changeset 2048 20be95dce643
parent 2045 6800fcaafa2a
child 2082 0854af516f14
permissions -rw-r--r--
increased step counter so that all steps go through
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2045
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     1
theory Term8
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     2
imports "../NewParser"
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     3
begin
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     4
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     5
(* example 8 from Terms.thy *)
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     7
atom_decl name
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     8
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     9
nominal_datatype foo =
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    10
  Foo0 "name"
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    11
| Foo1 b::"bar" f::"foo" bind_set "bv b" in f
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    12
and bar =
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    13
  Bar0 "name"
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    14
| Bar1 "name" s::"name" b::"bar" bind_set s in b
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    15
binder
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    16
  bv
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    17
where
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    18
  "bv (Bar0 x) = {}"
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    19
| "bv (Bar1 v x b) = {atom v}"
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    20
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    21
end
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    22
6800fcaafa2a Separate Term8, as it may work soon.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    23