File: test10st_fe.ott

package info (click to toggle)
ott 0.32%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,420 kB
  • sloc: ml: 25,065; makefile: 1,393; awk: 736; lisp: 183; sh: 14; sed: 4
file content (97 lines) | stat: -rw-r--r-- 2,803 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
metavar termvar , x ::=
  {{ isa string }} {{ coq nat }} {{ coq-equality }} 
  {{ tex \mathit{[[termvar]]} }} {{ com  term variable  }} 

metavar typvar , X ::=
  {{ isa string }} {{ coq nat }} {{ coq-equality }} 
  {{ tex \mathit{[[typvar]]} }} {{ com  type variable  }} 

grammar

  t :: 't_' ::=                                         {{ com term }}
    | x                   ::   :: Var                     {{ com variable }}         
    | \ x . t             ::   :: Lam  (+ bind x in t +)  {{ com abstraction }}      
    | t t'                ::   :: App                     {{ com application }}      
    | ( t )               :: M :: paren   {{ ic [[t]] }} 
    | { t / x } t'        :: M :: tsub    {{ ic ( tsubst_t [[t]] [[x]] [[t']] ) }}

  v :: 'v_' ::=                                         {{ com  value }}
    | \ x . t             ::   :: Lam   

  T :: T_ ::=                                           {{ com type }}
    | X                   ::   :: var                     {{ com variable }}
    | T -> T'             ::   :: arrow                   {{ com function }}
    | ( T )               :: M :: paren {{ ic [[T]] }}

  G {{ tex \Gamma }} :: G_ ::= {{ isa termvar ~=> T }}
                               {{ com type environment }}
    | empty               ::   :: em 
        {{ isa empty }}
    | G , x : T           ::   :: vn 
        {{ isa [[G]]([[x]]|->[[T]]) }}


  terminals :: 'terminals_' ::=
    | \                   ::   :: lambda     {{ tex \lambda }}
    | -->                 ::   :: red        {{ tex \longrightarrow }}
    |  ->                 ::   :: arrow      {{ tex \rightarrow }}
    | |-                  ::   :: turnstile  {{ tex \vdash }}
    | in                  ::   :: in         {{ tex \in }}

  formula :: 'formula_' ::=          
    | judgement           ::   :: judgement
    | not ( formula )     ::   :: not  
       {{ isa Not([[formula]]) }}
       {{ coq not ([[formula]]) }}
    | x = x'              ::   :: eqv 
       {{ ic [[x]]=[[x']] }}
    | x : T in G          ::   :: xTG 
       {{ isa [[G]] [[x]] = Some [[T]] }}

subrules
  v <:: t

freevars
  t x :: fv

substitutions
  single t x :: tsubst 

defns
  Jtype :: '' ::= 

defn
    G |- t : T :: :: GtT :: GtT_ by
        
    x:T in G
    -------- :: value_name
    G |- x:T

    G |- t : T1->T2
    G |- t' : T1 
    ---------------- :: apply
    G |- t t' : T2

    G,x1: T1 |- t : T
    ------------------ :: lambda
    G |- \x1.t : T1->T


defns
  Jop :: '' ::=

    defn
    t1 --> t2 ::  :: E :: ''       {{ com $[[t1]]$ reduces to $[[t2]]$ }} by 


    --------------------------  :: ax_app
    (\x.t12) v2 -->  {v2/x}t12

    t1 --> t1'
    -------------- :: ctx_app_fun
    t1 t --> t1' t

    t1 --> t1'
    -------------- :: ctx_app_arg
    v t1 --> v t1'