src/HOL/NumberTheory/WilsonRuss.ML
changeset 9747 043098ba5098
parent 9508 4d01dbf6ded7
child 10658 b9d43a2add79
equal deleted inserted replaced
9746:64b803edef39 9747:043098ba5098
   173 by (rewtac Let_def);
   173 by (rewtac Let_def);
   174 by Auto_tac;
   174 by Auto_tac;
   175 qed "wset_subset";
   175 qed "wset_subset";
   176 
   176 
   177 Goal "p:zprime --> a<p-#1 --> b:(wset(a,p)) --> #1<b";
   177 Goal "p:zprime --> a<p-#1 --> b:(wset(a,p)) --> #1<b";
   178 by (res_inst_tac [("u","a"),("v","p")] wset_induct 1);
   178 by (induct_thm_tac wset_induct "a p" 1);
   179 by Auto_tac;
   179 by Auto_tac;
   180 by (case_tac "b=a" 1);
   180 by (case_tac "b=a" 1);
   181 by (case_tac "b=inv p a" 2);
   181 by (case_tac "b=inv p a" 2);
   182 by (subgoal_tac "b=a | b = inv p a" 3);
   182 by (subgoal_tac "b=a | b = inv p a" 3);
   183 by (rtac wset_mem_imp_or 4);
   183 by (rtac wset_mem_imp_or 4);
   185 by (rtac inv_g_1 2);
   185 by (rtac inv_g_1 2);
   186 by Auto_tac;
   186 by Auto_tac;
   187 qed_spec_mp "wset_g_1";
   187 qed_spec_mp "wset_g_1";
   188 
   188 
   189 Goal "p:zprime --> a<p-#1 --> b:(wset(a,p)) --> b<p-#1";
   189 Goal "p:zprime --> a<p-#1 --> b:(wset(a,p)) --> b<p-#1";
   190 by (res_inst_tac [("u","a"),("v","p")] wset_induct 1);
   190 by (induct_thm_tac wset_induct "a p" 1);
   191 by Auto_tac;
   191 by Auto_tac;
   192 by (case_tac "b=a" 1);
   192 by (case_tac "b=a" 1);
   193 by (case_tac "b=inv p a" 2);
   193 by (case_tac "b=inv p a" 2);
   194 by (subgoal_tac "b=a | b = inv p a" 3);
   194 by (subgoal_tac "b=a | b = inv p a" 3);
   195 by (rtac wset_mem_imp_or 4);
   195 by (rtac wset_mem_imp_or 4);
   197 by (rtac inv_less_p_minus_1 2);
   197 by (rtac inv_less_p_minus_1 2);
   198 by Auto_tac;
   198 by Auto_tac;
   199 qed_spec_mp "wset_less";
   199 qed_spec_mp "wset_less";
   200 
   200 
   201 Goal "p:zprime --> a<p-#1 --> #1<b --> b<=a --> b:(wset(a,p))"; 
   201 Goal "p:zprime --> a<p-#1 --> #1<b --> b<=a --> b:(wset(a,p))"; 
   202 by (res_inst_tac [("u","a"),("v","p")] wset.induct 1);
   202 by (induct_thm_tac wset.induct "a p" 1);
   203 by Auto_tac;
   203 by Auto_tac;
   204 by (subgoal_tac "b=a" 1);
   204 by (subgoal_tac "b=a" 1);
   205 by (rtac zle_anti_sym 2);
   205 by (rtac zle_anti_sym 2);
   206 by (rtac wset_subset 4);
   206 by (rtac wset_subset 4);
   207 by (Asm_simp_tac 1);
   207 by (Asm_simp_tac 1);
   208 by Auto_tac;
   208 by Auto_tac;
   209 qed_spec_mp "wset_mem";
   209 qed_spec_mp "wset_mem";
   210 
   210 
   211 Goal "p:zprime --> #5<=p --> a<p-#1 --> b:(wset (a,p)) \
   211 Goal "p:zprime --> #5<=p --> a<p-#1 --> b:(wset (a,p)) \
   212 \     --> (inv p b):(wset (a,p))";
   212 \     --> (inv p b):(wset (a,p))";
   213 by (res_inst_tac [("u","a"),("v","p")] wset_induct 1);
   213 by (induct_thm_tac wset_induct "a p" 1);
   214 by Auto_tac;
   214 by Auto_tac;
   215 by (case_tac "b=a" 1);
   215 by (case_tac "b=a" 1);
   216 by (stac wset_eq 1);
   216 by (stac wset_eq 1);
   217 by (rewtac Let_def);
   217 by (rewtac Let_def);
   218 by (rtac wset_subset 3);
   218 by (rtac wset_subset 3);
   232 by (rtac inv_inv 1);
   232 by (rtac inv_inv 1);
   233 by (ALLGOALS (Asm_simp_tac));
   233 by (ALLGOALS (Asm_simp_tac));
   234 qed "wset_inv_mem_mem";
   234 qed "wset_inv_mem_mem";
   235 
   235 
   236 Goal "finite (wset (a,p))";
   236 Goal "finite (wset (a,p))";
   237 by (res_inst_tac [("u","a"),("v","p")] wset_induct 1);
   237 by (induct_thm_tac wset_induct "a p" 1);
   238 by (stac wset_eq 2);
   238 by (stac wset_eq 2);
   239 by (rewtac Let_def);
   239 by (rewtac Let_def);
   240 by Auto_tac;
   240 by Auto_tac;
   241 qed "wset_fin";
   241 qed "wset_fin";
   242 
   242 
   243 Goal "p:zprime --> #5<=p --> a<p-#1 --> [setprod (wset (a,p)) = #1](mod p)";
   243 Goal "p:zprime --> #5<=p --> a<p-#1 --> [setprod (wset (a,p)) = #1](mod p)";
   244 by (res_inst_tac [("u","a"),("v","p")] wset_induct 1);
   244 by (induct_thm_tac wset_induct "a p" 1);
   245 by (stac wset_eq 2);
   245 by (stac wset_eq 2);
   246 by (rewtac Let_def);
   246 by (rewtac Let_def);
   247 by Auto_tac;
   247 by Auto_tac;
   248 by (stac setprod_insert 1);
   248 by (stac setprod_insert 1);
   249 by (stac setprod_insert 3);
   249 by (stac setprod_insert 3);