| author | wenzelm |
| Sat, 27 Nov 2021 14:31:11 +0100 | |
| changeset 74854 | 014141670774 |
| parent 74607 | 7f6178b655a8 |
| child 74888 | 1c50ddcf6a01 |
| permissions | -rw-r--r-- |
| 59975 | 1 |
(* Title: HOL/Library/Rewrite.thy |
2 |
Author: Christoph Traut, Lars Noschinski, TU Muenchen |
|
3 |
||
4 |
Proof method "rewrite" with support for subterm-selection based on patterns. |
|
5 |
*) |
|
6 |
||
| 59739 | 7 |
theory Rewrite |
8 |
imports Main |
|
9 |
begin |
|
10 |
||
| 61383 | 11 |
consts rewrite_HOLE :: "'a::{}" ("\<hole>")
|
| 59739 | 12 |
|
13 |
lemma eta_expand: |
|
| 59975 | 14 |
fixes f :: "'a::{} \<Rightarrow> 'b::{}"
|
15 |
shows "f \<equiv> \<lambda>x. f x" . |
|
| 59739 | 16 |
|
|
60054
ef4878146485
rewrite: with asm pattern, propagate also remaining assumptions to new subgoals
noschinl
parents:
60047
diff
changeset
|
17 |
lemma imp_cong_eq: |
| 61383 | 18 |
"(PROP A \<Longrightarrow> (PROP B \<Longrightarrow> PROP C) \<equiv> (PROP B' \<Longrightarrow> PROP C')) \<equiv> |
19 |
((PROP B \<Longrightarrow> PROP A \<Longrightarrow> PROP C) \<equiv> (PROP B' \<Longrightarrow> PROP A \<Longrightarrow> PROP C'))" |
|
|
60054
ef4878146485
rewrite: with asm pattern, propagate also remaining assumptions to new subgoals
noschinl
parents:
60047
diff
changeset
|
20 |
apply (intro Pure.equal_intr_rule) |
|
ef4878146485
rewrite: with asm pattern, propagate also remaining assumptions to new subgoals
noschinl
parents:
60047
diff
changeset
|
21 |
apply (drule (1) cut_rl; drule Pure.equal_elim_rule1 Pure.equal_elim_rule2; assumption)+ |
|
ef4878146485
rewrite: with asm pattern, propagate also remaining assumptions to new subgoals
noschinl
parents:
60047
diff
changeset
|
22 |
apply (drule Pure.equal_elim_rule1 Pure.equal_elim_rule2; assumption)+ |
|
ef4878146485
rewrite: with asm pattern, propagate also remaining assumptions to new subgoals
noschinl
parents:
60047
diff
changeset
|
23 |
done |
|
ef4878146485
rewrite: with asm pattern, propagate also remaining assumptions to new subgoals
noschinl
parents:
60047
diff
changeset
|
24 |
|
| 69605 | 25 |
ML_file \<open>cconv.ML\<close> |
26 |
ML_file \<open>rewrite.ML\<close> |
|
| 59739 | 27 |
|
28 |
end |