src/HOL/Prod.ML
changeset 9020 1056cbbaeb29
parent 8703 816d8f6513be
child 9345 2f5f6824f888
equal deleted inserted replaced
9019:9c1118619d6c 9020:1056cbbaeb29
   138 (*Prevents simplification of c: much faster*)
   138 (*Prevents simplification of c: much faster*)
   139 val [prem] = goal Prod.thy
   139 val [prem] = goal Prod.thy
   140   "p=q ==> split c p = split c q";
   140   "p=q ==> split c p = split c q";
   141 by (rtac (prem RS arg_cong) 1);
   141 by (rtac (prem RS arg_cong) 1);
   142 qed "split_weak_cong";
   142 qed "split_weak_cong";
   143 
       
   144 Goal "(%u. ? x y. u = (x, y) & P (x, y)) = P"; 
       
   145 by (rtac ext 1);
       
   146 by (Fast_tac 1);
       
   147 qed "split_eta_SetCompr";
       
   148 Addsimps [split_eta_SetCompr];
       
   149 
   143 
   150 Goal "(%(x,y). f(x,y)) = f";
   144 Goal "(%(x,y). f(x,y)) = f";
   151 by (rtac ext 1);
   145 by (rtac ext 1);
   152 by (split_all_tac 1);
   146 by (split_all_tac 1);
   153 by (rtac split 1);
   147 by (rtac split 1);
   285 qed "mem_splitE";
   279 qed "mem_splitE";
   286 
   280 
   287 AddSIs [splitI, splitI2, splitI2', mem_splitI, mem_splitI2];
   281 AddSIs [splitI, splitI2, splitI2', mem_splitI, mem_splitI2];
   288 AddSEs [splitE, splitE', mem_splitE];
   282 AddSEs [splitE, splitE', mem_splitE];
   289 
   283 
       
   284 Goal "(%u. ? x y. u = (x, y) & P (x, y)) = P"; 
       
   285 by (rtac ext 1);
       
   286 by (Fast_tac 1);
       
   287 qed "split_eta_SetCompr";
       
   288 Addsimps [split_eta_SetCompr];
       
   289 
       
   290 Goal "(%u. ? x y. u = (x, y) & P x y) = split P"; 
       
   291 br ext 1;
       
   292 by (Fast_tac 1);
       
   293 qed "split_eta_SetCompr2";
       
   294 Addsimps [split_eta_SetCompr2];
       
   295 
   290 (* allows simplifications of nested splits in case of independent predicates *)
   296 (* allows simplifications of nested splits in case of independent predicates *)
   291 Goal "(%(a,b). P & Q a b) = (%ab. P & split Q ab)";
   297 Goal "(%(a,b). P & Q a b) = (%ab. P & split Q ab)";
   292 by (rtac ext 1);
   298 by (rtac ext 1);
   293 by (Blast_tac 1);
   299 by (Blast_tac 1);
   294 qed "split_part";
   300 qed "split_part";
   433 
   439 
   434 Goal "x:C ==> (A <*> C = B <*> C) = (A = B)";
   440 Goal "x:C ==> (A <*> C = B <*> C) = (A = B)";
   435 by (blast_tac (claset() addEs [equalityE]) 1);
   441 by (blast_tac (claset() addEs [equalityE]) 1);
   436 qed "Times_eq_cancel2";
   442 qed "Times_eq_cancel2";
   437 
   443 
   438 Goal "{(x,y) |x y. P x & Q x y} = (SIGMA x:Collect P. Collect (Q x))";
   444 Goal "Collect (split (%x y. P x & Q x y)) = (SIGMA x:Collect P. Collect (Q x))";
   439 by (Fast_tac 1);
   445 by (Fast_tac 1);
   440 qed "SetCompr_Sigma_eq";
   446 qed "SetCompr_Sigma_eq";
   441 
   447 
   442 (*** Complex rules for Sigma ***)
   448 (*** Complex rules for Sigma ***)
   443 
   449