src/HOL/Induct/PropLog.ML
changeset 5184 9b8547a9496a
parent 5143 b94cd208f073
child 5223 4cb05273f764
equal deleted inserted replaced
5183:89f162de39cf 5184:9b8547a9496a
   100 qed "imp_false";
   100 qed "imp_false";
   101 
   101 
   102 (*This formulation is required for strong induction hypotheses*)
   102 (*This formulation is required for strong induction hypotheses*)
   103 Goal "hyps p tt |- (if tt[p] then p else p->false)";
   103 Goal "hyps p tt |- (if tt[p] then p else p->false)";
   104 by (rtac (split_if RS iffD2) 1);
   104 by (rtac (split_if RS iffD2) 1);
   105 by (PropLog.pl.induct_tac "p" 1);
   105 by (induct_tac "p" 1);
   106 by (ALLGOALS (simp_tac (simpset() addsimps [thms_I, thms.H])));
   106 by (ALLGOALS (simp_tac (simpset() addsimps [thms_I, thms.H])));
   107 by (fast_tac (claset() addIs [weaken_left_Un1, weaken_left_Un2, 
   107 by (fast_tac (claset() addIs [weaken_left_Un1, weaken_left_Un2, 
   108 			      weaken_right, imp_false]
   108 			      weaken_right, imp_false]
   109                        addSEs [false_imp]) 1);
   109                        addSEs [false_imp]) 1);
   110 qed "hyps_thms_if";
   110 qed "hyps_thms_if";
   138 (*** Completeness -- lemmas for reducing the set of assumptions ***)
   138 (*** Completeness -- lemmas for reducing the set of assumptions ***)
   139 
   139 
   140 (*For the case hyps(p,t)-insert(#v,Y) |- p;
   140 (*For the case hyps(p,t)-insert(#v,Y) |- p;
   141   we also have hyps(p,t)-{#v} <= hyps(p, t-{v}) *)
   141   we also have hyps(p,t)-{#v} <= hyps(p, t-{v}) *)
   142 Goal "hyps p (t-{v}) <= insert (#v->false) ((hyps p t)-{#v})";
   142 Goal "hyps p (t-{v}) <= insert (#v->false) ((hyps p t)-{#v})";
   143 by (PropLog.pl.induct_tac "p" 1);
   143 by (induct_tac "p" 1);
   144 by (ALLGOALS Simp_tac);
   144 by (ALLGOALS Simp_tac);
   145 by (Fast_tac 1);
   145 by (Fast_tac 1);
   146 qed "hyps_Diff";
   146 qed "hyps_Diff";
   147 
   147 
   148 (*For the case hyps(p,t)-insert(#v -> false,Y) |- p;
   148 (*For the case hyps(p,t)-insert(#v -> false,Y) |- p;
   149   we also have hyps(p,t)-{#v->false} <= hyps(p, insert(v,t)) *)
   149   we also have hyps(p,t)-{#v->false} <= hyps(p, insert(v,t)) *)
   150 Goal "hyps p (insert v t) <= insert (#v) (hyps p t-{#v->false})";
   150 Goal "hyps p (insert v t) <= insert (#v) (hyps p t-{#v->false})";
   151 by (PropLog.pl.induct_tac "p" 1);
   151 by (induct_tac "p" 1);
   152 by (ALLGOALS Simp_tac);
   152 by (ALLGOALS Simp_tac);
   153 by (Fast_tac 1);
   153 by (Fast_tac 1);
   154 qed "hyps_insert";
   154 qed "hyps_insert";
   155 
   155 
   156 (** Two lemmas for use with weaken_left **)
   156 (** Two lemmas for use with weaken_left **)
   167 by (induct_tac "p" 1);
   167 by (induct_tac "p" 1);
   168 by (ALLGOALS Asm_simp_tac);
   168 by (ALLGOALS Asm_simp_tac);
   169 qed "hyps_finite";
   169 qed "hyps_finite";
   170 
   170 
   171 Goal "hyps p t <= (UN v. {#v, #v->false})";
   171 Goal "hyps p t <= (UN v. {#v, #v->false})";
   172 by (PropLog.pl.induct_tac "p" 1);
   172 by (induct_tac "p" 1);
   173 by (ALLGOALS Simp_tac);
   173 by (ALLGOALS Simp_tac);
   174 by (Blast_tac 1);
   174 by (Blast_tac 1);
   175 qed "hyps_subset";
   175 qed "hyps_subset";
   176 
   176 
   177 val Diff_weaken_left = subset_refl RSN (2, Diff_mono) RS weaken_left;
   177 val Diff_weaken_left = subset_refl RSN (2, Diff_mono) RS weaken_left;