src/FOL/fologic.ML
changeset 4466 305390f23734
parent 4349 50403e5a44c0
child 6140 af32e2c3f77a
equal deleted inserted replaced
4465:7ba65fe66c73 4466:305390f23734
     8 signature FOLOGIC =
     8 signature FOLOGIC =
     9 sig
     9 sig
    10   val oT: typ
    10   val oT: typ
    11   val mk_Trueprop: term -> term
    11   val mk_Trueprop: term -> term
    12   val dest_Trueprop: term -> term
    12   val dest_Trueprop: term -> term
       
    13   val dest_imp	       : term -> term*term
    13   val conj: term
    14   val conj: term
    14   val disj: term
    15   val disj: term
    15   val imp: term
    16   val imp: term
    16   val eq_const: typ -> term
    17   val eq_const: typ -> term
    17   val all_const: typ -> term
    18   val all_const: typ -> term
    38 
    39 
    39 val conj = Const("op &", [oT,oT]--->oT)
    40 val conj = Const("op &", [oT,oT]--->oT)
    40 and disj = Const("op |", [oT,oT]--->oT)
    41 and disj = Const("op |", [oT,oT]--->oT)
    41 and imp = Const("op -->", [oT,oT]--->oT);
    42 and imp = Const("op -->", [oT,oT]--->oT);
    42 
    43 
       
    44 fun dest_imp (Const("op -->",_) $ A $ B) = (A, B)
       
    45   | dest_imp  t = raise TERM ("dest_imp", [t]);
       
    46 
    43 fun eq_const T = Const ("op =", [T, T] ---> oT);
    47 fun eq_const T = Const ("op =", [T, T] ---> oT);
    44 fun mk_eq (t, u) = eq_const (fastype_of t) $ t $ u;
    48 fun mk_eq (t, u) = eq_const (fastype_of t) $ t $ u;
    45 
    49 
    46 fun all_const T = Const ("All", [T --> oT] ---> oT);
    50 fun all_const T = Const ("All", [T --> oT] ---> oT);
    47 fun mk_all (Free(x,T),P) = all_const T $ (absfree (x,T,P));
    51 fun mk_all (Free(x,T),P) = all_const T $ (absfree (x,T,P));