Nominal/Ex/LF.thy
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Tue, 18 May 2010 17:56:41 +0200
changeset 2160 8c24ee88b8e8
parent 2120 2786ff1df475
child 2311 4da5c5c29009
permissions -rw-r--r--
more on subst
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2083
9568f9f31822 tuned file names for examples
Christian Urban <urbanc@in.tum.de>
parents: 2082
diff changeset
     1
theory LF
2059
c615095827e9 Move LF to NewParser. Just works.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1773
diff changeset
     2
imports "../NewParser"
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     3
begin
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     4
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     5
atom_decl name
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
atom_decl ident
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     7
1348
2e2a3cd58f64 Ported LF to the parser interface.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1344
diff changeset
     8
nominal_datatype kind =
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     9
    Type
2099
9454feb74b45 fixing bind_set problem
Christian Urban <urbanc@in.tum.de>
parents: 2083
diff changeset
    10
  | KPi "ty" n::"name" k::"kind"  bind_set n in k
1348
2e2a3cd58f64 Ported LF to the parser interface.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1344
diff changeset
    11
and ty =
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    12
    TConst "ident"
1348
2e2a3cd58f64 Ported LF to the parser interface.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1344
diff changeset
    13
  | TApp "ty" "trm"
2099
9454feb74b45 fixing bind_set problem
Christian Urban <urbanc@in.tum.de>
parents: 2083
diff changeset
    14
  | TPi "ty" n::"name" t::"ty"    bind_set n in t
1348
2e2a3cd58f64 Ported LF to the parser interface.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1344
diff changeset
    15
and trm =
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    16
    Const "ident"
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    17
  | Var "name"
1348
2e2a3cd58f64 Ported LF to the parser interface.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1344
diff changeset
    18
  | App "trm" "trm"
2099
9454feb74b45 fixing bind_set problem
Christian Urban <urbanc@in.tum.de>
parents: 2083
diff changeset
    19
  | Lam "ty" n::"name" t::"trm"   bind_set n in t
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
    20
1553
4355eb3b7161 Automatically derive support for datatypes with at-most one binding per constructor.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 1547
diff changeset
    21
thm kind_ty_trm.supp
994
333c24bd595d More in the LF example in the new nominal way, all is clear until support.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 993
diff changeset
    22
2082
0854af516f14 cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents: 2059
diff changeset
    23
0854af516f14 cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents: 2059
diff changeset
    24
0854af516f14 cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents: 2059
diff changeset
    25
0854af516f14 cleaned up a bit the examples; added equivariance to all examples
Christian Urban <urbanc@in.tum.de>
parents: 2059
diff changeset
    26
985
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    27
end
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    28
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    29
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    30
ef8a2b0b237a Ported existing part of LF to new permutations and alphas.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    31