1120 by (unfold Let_def) |
1120 by (unfold Let_def) |
1121 |
1121 |
1122 lemma Let_unfold: "f x \<equiv> g \<Longrightarrow> Let x f \<equiv> g" |
1122 lemma Let_unfold: "f x \<equiv> g \<Longrightarrow> Let x f \<equiv> g" |
1123 by (unfold Let_def) |
1123 by (unfold Let_def) |
1124 |
1124 |
|
1125 text {* |
|
1126 The following copy of the implication operator is useful for |
|
1127 fine-tuning congruence rules. |
|
1128 *} |
|
1129 |
|
1130 consts |
|
1131 simp_implies :: "[prop, prop] => prop" ("(_/ =simp=> _)" [2, 1] 1) |
|
1132 defs simp_implies_def: "simp_implies \<equiv> op ==>" |
|
1133 |
|
1134 lemma simp_impliesI: |
|
1135 assumes PQ: "(PROP P \<Longrightarrow> PROP Q)" |
|
1136 shows "PROP P =simp=> PROP Q" |
|
1137 apply (unfold simp_implies_def) |
|
1138 apply (rule PQ) |
|
1139 apply assumption |
|
1140 done |
|
1141 |
|
1142 lemma simp_impliesE: |
|
1143 assumes PQ:"PROP P =simp=> PROP Q" |
|
1144 and P: "PROP P" |
|
1145 and QR: "PROP Q \<Longrightarrow> PROP R" |
|
1146 shows "PROP R" |
|
1147 apply (rule QR) |
|
1148 apply (rule PQ [unfolded simp_implies_def]) |
|
1149 apply (rule P) |
|
1150 done |
|
1151 |
|
1152 lemma simp_implies_cong: |
|
1153 assumes PP' :"PROP P == PROP P'" |
|
1154 and P'QQ': "PROP P' ==> (PROP Q == PROP Q')" |
|
1155 shows "(PROP P =simp=> PROP Q) == (PROP P' =simp=> PROP Q')" |
|
1156 proof (unfold simp_implies_def, rule equal_intr_rule) |
|
1157 assume PQ: "PROP P \<Longrightarrow> PROP Q" |
|
1158 and P': "PROP P'" |
|
1159 from PP' [symmetric] and P' have "PROP P" |
|
1160 by (rule equal_elim_rule1) |
|
1161 hence "PROP Q" by (rule PQ) |
|
1162 with P'QQ' [OF P'] show "PROP Q'" by (rule equal_elim_rule1) |
|
1163 next |
|
1164 assume P'Q': "PROP P' \<Longrightarrow> PROP Q'" |
|
1165 and P: "PROP P" |
|
1166 from PP' and P have P': "PROP P'" by (rule equal_elim_rule1) |
|
1167 hence "PROP Q'" by (rule P'Q') |
|
1168 with P'QQ' [OF P', symmetric] show "PROP Q" |
|
1169 by (rule equal_elim_rule1) |
|
1170 qed |
|
1171 |
1125 subsubsection {* Actual Installation of the Simplifier *} |
1172 subsubsection {* Actual Installation of the Simplifier *} |
1126 |
1173 |
1127 use "simpdata.ML" |
1174 use "simpdata.ML" |
1128 setup "Simplifier.method_setup Splitter.split_modifiers" setup simpsetup |
1175 setup "Simplifier.method_setup Splitter.split_modifiers" setup simpsetup |
1129 setup Splitter.setup setup Clasimp.setup |
1176 setup Splitter.setup setup Clasimp.setup |