src/HOL/MicroJava/J/JBasis.ML
changeset 8082 381716a86fcb
parent 8011 d14c4e9e9c8e
child 8083 f0d4165bc534
equal deleted inserted replaced
8081:1c8de414b45d 8082:381716a86fcb
    65 
    65 
    66 val not_None_tac = EVERY' [dtac (not_None_eq RS iffD1),rotate_tac ~1,etac exE,
    66 val not_None_tac = EVERY' [dtac (not_None_eq RS iffD1),rotate_tac ~1,etac exE,
    67 		rotate_tac ~1,asm_full_simp_tac 
    67 		rotate_tac ~1,asm_full_simp_tac 
    68 	(simpset() delsimps [split_paired_All,split_paired_Ex])];
    68 	(simpset() delsimps [split_paired_All,split_paired_Ex])];
    69 
    69 
       
    70 Goal "{y. x = Some y} \\<subseteq> {the x}";
       
    71 by Auto_tac;
       
    72 qed "some_subset_the";
       
    73 
    70 fun ex_ftac thm = EVERY' [forward_tac [thm], REPEAT o (etac exE), rotate_tac ~1,
    74 fun ex_ftac thm = EVERY' [forward_tac [thm], REPEAT o (etac exE), rotate_tac ~1,
    71   asm_full_simp_tac (simpset() delsimps [split_paired_All,split_paired_Ex])];
    75   asm_full_simp_tac (simpset() delsimps [split_paired_All,split_paired_Ex])];
    72 
    76 
    73 val optionE = prove_goal thy 
    77 val optionE = prove_goal thy 
    74        "\\<lbrakk> opt = None \\<Longrightarrow> P;  \\<And>x. opt = Some x \\<Longrightarrow> P \\<rbrakk> \\<Longrightarrow> P" 
    78        "\\<lbrakk> opt = None \\<Longrightarrow> P;  \\<And>x. opt = Some x \\<Longrightarrow> P \\<rbrakk> \\<Longrightarrow> P" 
   112 by  (auto_tac (claset() addDs [fst_in_set_lemma],simpset()));
   116 by  (auto_tac (claset() addDs [fst_in_set_lemma],simpset()));
   113 qed_spec_mp "unique_append";
   117 qed_spec_mp "unique_append";
   114 
   118 
   115 Goal "unique l --> inj f --> unique (map (%(k,x). (f k, g k x)) l)";
   119 Goal "unique l --> inj f --> unique (map (%(k,x). (f k, g k x)) l)";
   116 by (induct_tac "l" 1);
   120 by (induct_tac "l" 1);
   117 by  (auto_tac (claset() addDs [fst_in_set_lemma],simpset()));
   121 by  (auto_tac (claset() addDs [fst_in_set_lemma],simpset()addsimps[inj_eq]));
   118 qed_spec_mp "unique_map_inj";
   122 qed_spec_mp "unique_map_inj";
   119 
   123 
   120 Goal "\\<And>l. unique l \\<Longrightarrow> unique (map (split (\\<lambda>k. Pair (k, C))) l)";
   124 Goal "\\<And>l. unique l \\<Longrightarrow> unique (map (split (\\<lambda>k. Pair (k, C))) l)";
   121 by(etac unique_map_inj 1);
   125 by(etac unique_map_inj 1);
   122 by(rtac injI 1);
   126 by(rtac injI 1);