# HG changeset patch # User wenzelm # Date 1631390282 -7200 # Node ID 54279cfcf03751e0afc00279a51647e136a12dd8 # Parent 39c98371606f222b5a3e3fe0fee7b5ef702e8bad more antiquotations; diff -r 39c98371606f -r 54279cfcf037 src/FOL/fologic.ML --- a/src/FOL/fologic.ML Sat Sep 11 21:26:10 2021 +0200 +++ b/src/FOL/fologic.ML Sat Sep 11 21:58:02 2021 +0200 @@ -37,52 +37,52 @@ structure FOLogic: FOLOGIC = struct -val oT = Type(\<^type_name>\o\,[]); +val oT = \<^Type>\o\; -val Trueprop = Const(\<^const_name>\Trueprop\, oT-->propT); +val Trueprop = \<^Const>\Trueprop\; fun mk_Trueprop P = Trueprop $ P; -fun dest_Trueprop (Const (\<^const_name>\Trueprop\, _) $ P) = P +fun dest_Trueprop \<^Const_>\Trueprop for P\ = P | dest_Trueprop t = raise TERM ("dest_Trueprop", [t]); (* Logical constants *) -val not = Const (\<^const_name>\Not\, oT --> oT); -val conj = Const(\<^const_name>\conj\, [oT,oT]--->oT); -val disj = Const(\<^const_name>\disj\, [oT,oT]--->oT); -val imp = Const(\<^const_name>\imp\, [oT,oT]--->oT) -val iff = Const(\<^const_name>\iff\, [oT,oT]--->oT); +val not = \<^Const>\Not\; +val conj = \<^Const>\conj\; +val disj = \<^Const>\disj\; +val imp = \<^Const>\imp\; +val iff = \<^Const>\iff\; fun mk_conj (t1, t2) = conj $ t1 $ t2 and mk_disj (t1, t2) = disj $ t1 $ t2 and mk_imp (t1, t2) = imp $ t1 $ t2 and mk_iff (t1, t2) = iff $ t1 $ t2; -fun dest_imp (Const(\<^const_name>\imp\,_) $ A $ B) = (A, B) +fun dest_imp \<^Const_>\imp for A B\ = (A, B) | dest_imp t = raise TERM ("dest_imp", [t]); -fun dest_conj (Const (\<^const_name>\conj\, _) $ t $ t') = t :: dest_conj t' +fun dest_conj \<^Const_>\conj for t t'\ = t :: dest_conj t' | dest_conj t = [t]; -fun dest_iff (Const(\<^const_name>\iff\,_) $ A $ B) = (A, B) +fun dest_iff \<^Const_>\iff for A B\ = (A, B) | dest_iff t = raise TERM ("dest_iff", [t]); -fun eq_const T = Const (\<^const_name>\eq\, [T, T] ---> oT); +fun eq_const T = \<^Const>\eq T\; fun mk_eq (t, u) = eq_const (fastype_of t) $ t $ u; -fun dest_eq (Const (\<^const_name>\eq\, _) $ lhs $ rhs) = (lhs, rhs) +fun dest_eq \<^Const_>\eq _ for lhs rhs\ = (lhs, rhs) | dest_eq t = raise TERM ("dest_eq", [t]) -fun all_const T = Const (\<^const_name>\All\, [T --> oT] ---> oT); +fun all_const T = \<^Const>\All T\; fun mk_all (Free (x, T), P) = all_const T $ absfree (x, T) P; -fun exists_const T = Const (\<^const_name>\Ex\, [T --> oT] ---> oT); +fun exists_const T = \<^Const>\Ex T\; fun mk_exists (Free (x, T), P) = exists_const T $ absfree (x, T) P; -(* binary oprations and relations *) +(* binary operations and relations *) fun mk_binop c (t, u) = let val T = fastype_of t in diff -r 39c98371606f -r 54279cfcf037 src/FOL/simpdata.ML --- a/src/FOL/simpdata.ML Sat Sep 11 21:26:10 2021 +0200 +++ b/src/FOL/simpdata.ML Sat Sep 11 21:58:02 2021 +0200 @@ -9,16 +9,16 @@ fun mk_meta_eq th = (case Thm.concl_of th of - _ $ (Const(\<^const_name>\eq\,_)$_$_) => th RS @{thm eq_reflection} - | _ $ (Const(\<^const_name>\iff\,_)$_$_) => th RS @{thm iff_reflection} + _ $ \<^Const_>\eq _ for _ _\ => th RS @{thm eq_reflection} + | _ $ \<^Const_>\iff for _ _\ => th RS @{thm iff_reflection} | _ => error "conclusion must be a =-equality or <->"); fun mk_eq th = (case Thm.concl_of th of - Const(\<^const_name>\Pure.eq\,_)$_$_ => th - | _ $ (Const(\<^const_name>\eq\,_)$_$_) => mk_meta_eq th - | _ $ (Const(\<^const_name>\iff\,_)$_$_) => mk_meta_eq th - | _ $ (Const(\<^const_name>\Not\,_)$_) => th RS @{thm iff_reflection_F} + \<^Const_>\Pure.eq _ for _ _\ => th + | _ $ \<^Const_>\eq _ for _ _\ => mk_meta_eq th + | _ $ \<^Const_>\iff for _ _\ => mk_meta_eq th + | _ $ \<^Const_>\Not for _\ => th RS @{thm iff_reflection_F} | _ => th RS @{thm iff_reflection_T}); (*Replace premises x=y, X<->Y by X==Y*) @@ -40,7 +40,7 @@ let fun atoms th = (case Thm.concl_of th of - Const(\<^const_name>\Trueprop\,_) $ p => + \<^Const_>\Trueprop for p\ => (case head_of p of Const(a,_) => (case AList.lookup (op =) pairs a of @@ -57,11 +57,11 @@ structure Quantifier1 = Quantifier1 ( (*abstract syntax*) - fun dest_eq (Const (\<^const_name>\eq\, _) $ s $ t) = SOME (s, t) + fun dest_eq \<^Const_>\eq _ for s t\ = SOME (s, t) | dest_eq _ = NONE - fun dest_conj (Const (\<^const_name>\conj\, _) $ s $ t) = SOME (s, t) + fun dest_conj \<^Const_>\conj for s t\ = SOME (s, t) | dest_conj _ = NONE - fun dest_imp (Const (\<^const_name>\imp\, _) $ s $ t) = SOME (s, t) + fun dest_imp \<^Const_>\imp for s t\ = SOME (s, t) | dest_imp _ = NONE val conj = FOLogic.conj val imp = FOLogic.imp