src/Pure/pure_thy.ML
changeset 19775 06cb6743adf6
parent 19629 c107e7a79559
child 20057 058e913bac71
equal deleted inserted replaced
19774:5fe7731d0836 19775:06cb6743adf6
    19   val thms: xstring -> thm list
    19   val thms: xstring -> thm list
    20   structure ProtoPure:
    20   structure ProtoPure:
    21     sig
    21     sig
    22       val thy: theory
    22       val thy: theory
    23       val prop_def: thm
    23       val prop_def: thm
       
    24       val term_def: thm
    24       val conjunction_def: thm
    25       val conjunction_def: thm
    25     end
    26     end
    26 end;
    27 end;
    27 
    28 
    28 signature PURE_THY =
    29 signature PURE_THY =
   583     ("_DDDOT",   "aprop",                 Delimfix "\\<dots>"),
   584     ("_DDDOT",   "aprop",                 Delimfix "\\<dots>"),
   584     ("_bigimpl", "[asms, prop] => prop",  Mixfix ("((1\\<lbrakk>_\\<rbrakk>)/ \\<Longrightarrow> _)", [0, 1], 1)),
   585     ("_bigimpl", "[asms, prop] => prop",  Mixfix ("((1\\<lbrakk>_\\<rbrakk>)/ \\<Longrightarrow> _)", [0, 1], 1)),
   585     ("_DDDOT",   "logic",                 Delimfix "\\<dots>")]
   586     ("_DDDOT",   "logic",                 Delimfix "\\<dots>")]
   586   |> Theory.add_modesyntax ("", false)
   587   |> Theory.add_modesyntax ("", false)
   587    [("prop", "prop => prop", Mixfix ("_", [0], 0)),
   588    [("prop", "prop => prop", Mixfix ("_", [0], 0)),
       
   589     ("ProtoPure.term", "'a => prop", Delimfix "TERM _"),
   588     ("ProtoPure.conjunction", "prop => prop => prop", InfixrName ("&&", 2))]
   590     ("ProtoPure.conjunction", "prop => prop => prop", InfixrName ("&&", 2))]
   589   |> Theory.add_modesyntax ("HTML", false)
   591   |> Theory.add_modesyntax ("HTML", false)
   590    [("_lambda",  "[pttrns, 'a] => logic", Mixfix ("(3\\<lambda>_./ _)", [0, 3], 3))]
   592    [("_lambda",  "[pttrns, 'a] => logic", Mixfix ("(3\\<lambda>_./ _)", [0, 3], 3))]
   591   |> Theory.add_consts
   593   |> Theory.add_consts
   592    [("==", "'a => 'a => prop", InfixrName ("==", 2)),
   594    [("==", "'a => 'a => prop", InfixrName ("==", 2)),
   603      Const (Term.dummy_patternN, aT)]
   605      Const (Term.dummy_patternN, aT)]
   604   |> Theory.add_trfuns Syntax.pure_trfuns
   606   |> Theory.add_trfuns Syntax.pure_trfuns
   605   |> Theory.add_trfunsT Syntax.pure_trfunsT
   607   |> Theory.add_trfunsT Syntax.pure_trfunsT
   606   |> Sign.local_path
   608   |> Sign.local_path
   607   |> Theory.add_consts
   609   |> Theory.add_consts
   608    [("conjunction", "prop => prop => prop", NoSyn)]
   610    [("term", "'a => prop", NoSyn),
       
   611     ("conjunction", "prop => prop => prop", NoSyn)]
   609   |> (add_defs false o map Thm.no_attributes)
   612   |> (add_defs false o map Thm.no_attributes)
   610    [("prop_def", "prop(A) == A"),
   613    [("prop_def", "prop(A) == A"),
       
   614     ("term_def", "term(x) == (!!A. PROP A ==> PROP A)"),
   611     ("conjunction_def",
   615     ("conjunction_def",
   612       "conjunction(A, B) == (!!C. (PROP A ==> PROP B ==> PROP C) ==> PROP C)")] |> snd
   616       "conjunction(A, B) == (!!C. (PROP A ==> PROP B ==> PROP C) ==> PROP C)")] |> snd
   613   |> Sign.hide_consts false ["conjunction"]
   617   |> Sign.hide_consts false ["conjunction", "term"]
   614   |> add_thmss [(("nothing", []), [])] |> snd
   618   |> add_thmss [(("nothing", []), [])] |> snd
   615   |> Theory.add_axioms_i Proofterm.equality_axms
   619   |> Theory.add_axioms_i Proofterm.equality_axms
   616   |> Theory.end_theory;
   620   |> Theory.end_theory;
   617 
   621 
   618 structure ProtoPure =
   622 structure ProtoPure =
   619 struct
   623 struct
   620   val thy = proto_pure;
   624   val thy = proto_pure;
   621   val prop_def = get_axiom thy "prop_def";
   625   val prop_def = get_axiom thy "prop_def";
       
   626   val term_def = get_axiom thy "term_def";
   622   val conjunction_def = get_axiom thy "conjunction_def";
   627   val conjunction_def = get_axiom thy "conjunction_def";
   623 end;
   628 end;
   624 
   629 
   625 end;
   630 end;
   626 
   631