src/FOL/eqrule_FOL_data.ML
changeset 15531 08c8dad8e399
parent 15481 fc075ae929e4
child 15570 8d8c70b41bab
equal deleted inserted replaced
15530:6f43714517ee 15531:08c8dad8e399
    15 (* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- *)
    15 (* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- *)
    16 structure ZF_EqRuleData : EQRULE_DATA =
    16 structure ZF_EqRuleData : EQRULE_DATA =
    17 struct
    17 struct
    18 
    18 
    19 fun mk_eq th = case concl_of th of
    19 fun mk_eq th = case concl_of th of
    20         Const("==",_)$_$_       => Some (th)
    20         Const("==",_)$_$_       => SOME (th)
    21     |   _$(Const("op <->",_)$_$_) => Some (th RS iff_reflection)
    21     |   _$(Const("op <->",_)$_$_) => SOME (th RS iff_reflection)
    22     |   _$(Const("op =",_)$_$_) => Some (th RS eq_reflection)
    22     |   _$(Const("op =",_)$_$_) => SOME (th RS eq_reflection)
    23     |   _ => None;
    23     |   _ => NONE;
    24 
    24 
    25 val tranformation_pairs =
    25 val tranformation_pairs =
    26   [("op -->", [mp]), ("op &", [conjunct1,conjunct2]),
    26   [("op -->", [mp]), ("op &", [conjunct1,conjunct2]),
    27    ("All", [spec]), ("True", []), ("False", [])];
    27    ("All", [spec]), ("True", []), ("False", [])];
    28 
    28 
    35         (case Thm.concl_of th of
    35         (case Thm.concl_of th of
    36            Const("Trueprop",_) $ p =>
    36            Const("Trueprop",_) $ p =>
    37              (case Term.head_of p of
    37              (case Term.head_of p of
    38                 Const(a,_) =>
    38                 Const(a,_) =>
    39                   (case Library.assoc(pairs,a) of
    39                   (case Library.assoc(pairs,a) of
    40                      Some(rls) => flat (map atoms ([th] RL rls))
    40                      SOME(rls) => flat (map atoms ([th] RL rls))
    41                    | None => [th])
    41                    | NONE => [th])
    42               | _ => [th])
    42               | _ => [th])
    43          | _ => [th])
    43          | _ => [th])
    44   in atoms end;
    44   in atoms end;
    45 
    45 
    46 val prep_meta_eq = 
    46 val prep_meta_eq =