src/HOL/Tools/meson.ML
changeset 32760 ea6672bff5dd
parent 32740 9dd0a2f83429
child 32955 4a78daeb012b
equal deleted inserted replaced
32759:1476fe841023 32760:ea6672bff5dd
   317 
   317 
   318 (*Conjunctive normal form, adding clauses from th in front of ths (for foldr).
   318 (*Conjunctive normal form, adding clauses from th in front of ths (for foldr).
   319   Strips universal quantifiers and breaks up conjunctions.
   319   Strips universal quantifiers and breaks up conjunctions.
   320   Eliminates existential quantifiers using skoths: Skolemization theorems.*)
   320   Eliminates existential quantifiers using skoths: Skolemization theorems.*)
   321 fun cnf skoths ctxt (th,ths) =
   321 fun cnf skoths ctxt (th,ths) =
   322   let val ctxtr = ref ctxt
   322   let val ctxtr = Unsynchronized.ref ctxt
   323       fun cnf_aux (th,ths) =
   323       fun cnf_aux (th,ths) =
   324         if not (can HOLogic.dest_Trueprop (prop_of th)) then ths (*meta-level: ignore*)
   324         if not (can HOLogic.dest_Trueprop (prop_of th)) then ths (*meta-level: ignore*)
   325         else if not (has_conns ["All","Ex","op &"] (prop_of th))
   325         else if not (has_conns ["All","Ex","op &"] (prop_of th))
   326         then nodups ctxt th :: ths (*no work to do, terminate*)
   326         then nodups ctxt th :: ths (*no work to do, terminate*)
   327         else case head_of (HOLogic.dest_Trueprop (concl_of th)) of
   327         else case head_of (HOLogic.dest_Trueprop (concl_of th)) of