src/ZF/Induct/Multiset.ML
changeset 13535 007559e981c7
parent 13339 0f89104dd377
child 13612 55d32e76ef4e
equal deleted inserted replaced
13534:ca6debb89d77 13535:007559e981c7
   204 by (rewrite_goals_tac [normalize_def, mset_of_def]);
   204 by (rewrite_goals_tac [normalize_def, mset_of_def]);
   205 by Auto_tac;
   205 by Auto_tac;
   206 by (res_inst_tac [("x", "{x:A . 0<f`x}")] exI 1);
   206 by (res_inst_tac [("x", "{x:A . 0<f`x}")] exI 1);
   207 by (auto_tac (claset() addIs [Collect_subset RS subset_Finite,
   207 by (auto_tac (claset() addIs [Collect_subset RS subset_Finite,
   208                               funrestrict_type], simpset()));
   208                               funrestrict_type], simpset()));
   209 qed "normalize_multiset";
   209 qed "multiset_normalize";
   210 
   210 
   211 (** Typechecking rules for union and difference of multisets **)
   211 (** Typechecking rules for union and difference of multisets **)
   212 
   212 
   213 Goal "[| n:nat; m:nat |] ==> 0 < m #+ n <-> (0 < m | 0 < n)";
   213 Goal "[| n:nat; m:nat |] ==> 0 < m #+ n <-> (0 < m | 0 < n)";
   214 by (induct_tac "n" 1);
   214 by (induct_tac "n" 1);
   229 
   229 
   230 (* difference *)
   230 (* difference *)
   231 
   231 
   232 Goalw [mdiff_def]
   232 Goalw [mdiff_def]
   233 "multiset(M) ==> multiset(M -# N)";
   233 "multiset(M) ==> multiset(M -# N)";
   234 by (res_inst_tac [("A", "mset_of(M)")] normalize_multiset 1);
   234 by (res_inst_tac [("A", "mset_of(M)")] multiset_normalize 1);
   235 by (asm_simp_tac (simpset() addsimps [multiset_set_of_Finite]) 2);
   235 by (asm_simp_tac (simpset() addsimps [multiset_set_of_Finite]) 2);
   236 by (auto_tac (claset(), simpset() addsimps [mset_of_def, multiset_def]));
   236 by (auto_tac (claset(), simpset() addsimps [mset_of_def, multiset_def]));
   237 by (auto_tac (claset() addSIs [lam_type], 
   237 by (auto_tac (claset() addSIs [lam_type], 
   238            simpset() addsimps [multiset_fun_iff]));
   238            simpset() addsimps [multiset_fun_iff]));
   239 qed "mdiff_multiset";
   239 qed "mdiff_multiset";