src/Provers/classical.ML
changeset 9952 24914e42b857
parent 9941 fe05af7ec816
child 10034 4bca6b2d2589
equal deleted inserted replaced
9951:5610c4acb48d 9952:24914e42b857
  1025 
  1025 
  1026 val introN = "intro";
  1026 val introN = "intro";
  1027 val elimN = "elim";
  1027 val elimN = "elim";
  1028 val destN = "dest";
  1028 val destN = "dest";
  1029 val ruleN = "rule";
  1029 val ruleN = "rule";
  1030 val delN = "del";
       
  1031 
  1030 
  1032 val colon = Args.$$$ ":";
  1031 val colon = Args.$$$ ":";
  1033 val query = Args.$$$ "?";
  1032 val query = Args.$$$ "?";
  1034 val bang = Args.$$$ "!";
  1033 val bang = Args.$$$ "!";
  1035 val query_colon = Args.$$$ "?:";
  1034 val query_colon = Args.$$$ "?:";
  1038 fun cla_att change xtra haz safe = Attrib.syntax
  1037 fun cla_att change xtra haz safe = Attrib.syntax
  1039   (Scan.lift ((query >> K xtra || bang >> K safe || Scan.succeed haz) >> change));
  1038   (Scan.lift ((query >> K xtra || bang >> K safe || Scan.succeed haz) >> change));
  1040 
  1039 
  1041 fun cla_attr f g h = (cla_att change_global_cs f g h, cla_att change_local_cs f g h);
  1040 fun cla_attr f g h = (cla_att change_global_cs f g h, cla_att change_local_cs f g h);
  1042 
  1041 
  1043 fun del_args att = Attrib.syntax (Scan.lift (Args.$$$ delN) >> K att);
  1042 fun del_args att = Attrib.syntax (Scan.lift (Args.$$$ Args.delN) >> K att);
  1044 val rule_del_attr = (del_args rule_del_global, del_args rule_del_local);
  1043 val rule_del_attr = (del_args rule_del_global, del_args rule_del_local);
  1045 
  1044 
  1046 
  1045 
  1047 (* setup_attrs *)
  1046 (* setup_attrs *)
  1048 
  1047 
  1157   Args.$$$ elimN -- bang_colon >> K (I, safe_elim_local),
  1156   Args.$$$ elimN -- bang_colon >> K (I, safe_elim_local),
  1158   Args.$$$ elimN -- colon >> K (I, haz_elim_local),
  1157   Args.$$$ elimN -- colon >> K (I, haz_elim_local),
  1159   Args.$$$ introN -- query_colon >> K (I, xtra_intro_local),
  1158   Args.$$$ introN -- query_colon >> K (I, xtra_intro_local),
  1160   Args.$$$ introN -- bang_colon >> K (I, safe_intro_local),
  1159   Args.$$$ introN -- bang_colon >> K (I, safe_intro_local),
  1161   Args.$$$ introN -- colon >> K (I, haz_intro_local),
  1160   Args.$$$ introN -- colon >> K (I, haz_intro_local),
  1162   Args.$$$ delN -- colon >> K (I, rule_del_local)];
  1161   Args.$$$ Args.delN -- colon >> K (I, rule_del_local)];
  1163 
  1162 
  1164 fun cla_meth tac prems ctxt = Method.METHOD (fn facts =>
  1163 fun cla_meth tac prems ctxt = Method.METHOD (fn facts =>
  1165   ALLGOALS (Method.insert_tac (prems @ facts)) THEN tac (get_local_claset ctxt));
  1164   ALLGOALS (Method.insert_tac (prems @ facts)) THEN tac (get_local_claset ctxt));
  1166 
  1165 
  1167 fun cla_meth' tac prems ctxt = Method.METHOD (fn facts =>
  1166 fun cla_meth' tac prems ctxt = Method.METHOD (fn facts =>