summaryrefslogtreecommitdiff
path: root/examples/math/Math.gf
blob: 35cfcbfdc2ae98299de5b15eb0f8e834bc9d2b6b (plain)
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
abstract Math = {

flags startcat = Section ;

cat 
  Section ; Label ; Context ; Typ ; Obj ; Prop ; Proof ; Var ;

fun
  SDefObj  : Label -> Context -> Obj  -> Typ -> Obj  -> Section ;
  SDefProp : Label -> Context -> Prop -> Prop -> Section ;
  SAxiom   : Label -> Context -> Prop -> Section ;
  STheorem : Label -> Context -> Prop -> Proof -> Section ;

  CEmpty : Context ;
  CObj   : Var -> Typ -> Context -> Context ;
  CProp  : Prop -> Context -> Context ;

  OVar : Var -> Obj ;

  LNone : Label ;
  LString : String -> Label ;
  VString : String -> Var ;

  V_x, V_y, V_z : Var ; --- for js

  PLink : Proof ;

-- lexicon

  Set  : Typ ;
  Nat  : Typ ;
  Zero : Obj ;
  Succ : Obj -> Obj ;
  One  : Obj ;
  Two  : Obj ;
  Even : Obj -> Prop ;
  Odd  : Obj -> Prop ;
  Prime : Obj -> Prop ;
  Divisible : Obj -> Obj -> Prop ;
  
}