src/HOL/Tools/set_comprehension_pointfree.ML
changeset 49875 0adcb5cd4eba
parent 49874 72b6d5fb407f
child 49896 a39deedd5c3f
equal deleted inserted replaced
49874:72b6d5fb407f 49875:0adcb5cd4eba
   244     etac @{thm disjE} THEN' rtac @{thm UnI1}
   244     etac @{thm disjE} THEN' rtac @{thm UnI1}
   245     THEN' tac1_of_formula fm1
   245     THEN' tac1_of_formula fm1
   246     THEN' rtac @{thm UnI2}
   246     THEN' rtac @{thm UnI2}
   247     THEN' tac1_of_formula fm2
   247     THEN' tac1_of_formula fm2
   248   | tac1_of_formula (Atom _) =
   248   | tac1_of_formula (Atom _) =
   249     (REPEAT_DETERM1 o (rtac @{thm SigmaI}
   249     REPEAT_DETERM1 o (rtac @{thm SigmaI}
       
   250       ORELSE' (rtac @{thm vimageI2} THEN'
       
   251         TRY o Simplifier.simp_tac (HOL_basic_ss addsimps [@{thm prod.cases}])) 
   250       ORELSE' rtac @{thm UNIV_I}
   252       ORELSE' rtac @{thm UNIV_I}
   251       ORELSE' rtac @{thm iffD2[OF Compl_iff]}
   253       ORELSE' rtac @{thm iffD2[OF Compl_iff]}
   252       ORELSE' atac))
   254       ORELSE' atac)
   253 
   255 
   254 fun tac2_of_formula (Int (fm1, fm2)) =
   256 fun tac2_of_formula (Int (fm1, fm2)) =
   255     TRY o etac @{thm IntE}
   257     TRY o etac @{thm IntE}
   256     THEN' TRY o rtac @{thm conjI}
   258     THEN' TRY o rtac @{thm conjI}
   257     THEN' (fn i => tac2_of_formula fm2 (i + 1))
   259     THEN' (fn i => tac2_of_formula fm2 (i + 1))
   263     THEN' tac2_of_formula fm2
   265     THEN' tac2_of_formula fm2
   264   | tac2_of_formula (Atom _) =
   266   | tac2_of_formula (Atom _) =
   265     TRY o REPEAT_DETERM1 o
   267     TRY o REPEAT_DETERM1 o
   266       (dtac @{thm iffD1[OF mem_Sigma_iff]}
   268       (dtac @{thm iffD1[OF mem_Sigma_iff]}
   267        ORELSE' etac @{thm conjE}
   269        ORELSE' etac @{thm conjE}
       
   270        ORELSE' (etac @{thm vimageE}
       
   271         THEN' TRY o Simplifier.full_simp_tac (HOL_basic_ss addsimps [@{thm prod.cases}])
       
   272         THEN' TRY o hyp_subst_tac)
   268        ORELSE' etac @{thm ComplE}
   273        ORELSE' etac @{thm ComplE}
   269        ORELSE' atac)
   274        ORELSE' atac)
   270 
   275 
   271 fun tac ctxt fm =
   276 fun tac ctxt fm =
   272   let
   277   let