src/Pure/Syntax/simple_syntax.ML
changeset 56245 84fc7dfa3cd4
parent 46214 8534f949548e
child 62751 24e2b098bf44
equal deleted inserted replaced
56244:3298b7a2795a 56245:84fc7dfa3cd4
   105   term1 env T) x
   105   term1 env T) x
   106 and term1 env T x =
   106 and term1 env T x =
   107  (enum2 "==>" (term2 env propT) >> foldr1 Logic.mk_implies ||
   107  (enum2 "==>" (term2 env propT) >> foldr1 Logic.mk_implies ||
   108   term2 env T) x
   108   term2 env T) x
   109 and term2 env T x =
   109 and term2 env T x =
   110  (equal env "==" ||
   110  (equal env ||
   111   term3 env propT -- ($$ "&&&" |-- term2 env propT) >> Logic.mk_conjunction ||
   111   term3 env propT -- ($$ "&&&" |-- term2 env propT) >> Logic.mk_conjunction ||
   112   term3 env T) x
   112   term3 env T) x
   113 and equal env eq x =
   113 and equal env x =
   114  (term3 env dummyT -- ($$ eq |-- term2 env dummyT) >> (fn (t, u) =>
   114  (term3 env dummyT -- ($$ "==" |-- term2 env dummyT) >> (fn (t, u) =>
   115    Const (eq, Term.fastype_of t --> Term.fastype_of u --> propT) $ t $ u)) x
   115    Const ("Pure.eq", Term.fastype_of t --> Term.fastype_of u --> propT) $ t $ u)) x
   116 and term3 env T x =
   116 and term3 env T x =
   117  (idt >> Free ||
   117  (idt >> Free ||
   118   var -- constraint >> Var ||
   118   var -- constraint >> Var ||
   119   $$ "CONST" |-- const -- constraint >> Const ||
   119   $$ "CONST" |-- const -- constraint >> Const ||
   120   $$ "%" |-- bind :|-- (fn v => term3 (v :: env) dummyT >> lambda (Free v)) ||
   120   $$ "%" |-- bind :|-- (fn v => term3 (v :: env) dummyT >> lambda (Free v)) ||