# HG changeset patch # User haftmann # Date 1591284622 0 # Node ID 2e7df6774373015ced80571b5faee7b0ad67f2e5 # Parent 4e0a58818edc72b7cb6444e182d8ba31ca1b0329 more rules for FOL also diff -r 4e0a58818edc -r 2e7df6774373 src/FOL/FOL.thy --- a/src/FOL/FOL.thy Thu Jun 04 15:30:22 2020 +0000 +++ b/src/FOL/FOL.thy Thu Jun 04 15:30:22 2020 +0000 @@ -344,7 +344,7 @@ (*intuitionistic simprules only*) val IFOL_ss = put_simpset FOL_basic_ss \<^context> - addsimps @{thms meta_simps IFOL_simps int_ex_simps int_all_simps} + addsimps @{thms meta_simps IFOL_simps int_ex_simps int_all_simps subst_all subst_all'} addsimprocs [\<^simproc>\defined_All\, \<^simproc>\defined_Ex\] |> Simplifier.add_cong @{thm imp_cong} |> simpset_of; diff -r 4e0a58818edc -r 2e7df6774373 src/FOL/IFOL.thy --- a/src/FOL/IFOL.thy Thu Jun 04 15:30:22 2020 +0000 +++ b/src/FOL/IFOL.thy Thu Jun 04 15:30:22 2020 +0000 @@ -827,6 +827,36 @@ \(P \ Q \ R) \ (P \ R) \ (Q \ R)\ by iprover+ +lemma subst_all: + \(\x. x = a \ PROP P(x)) \ PROP P(a)\ +proof (rule equal_intr_rule) + assume *: \\x. x = a \ PROP P(x)\ + show \PROP P(a)\ + by (rule *) (rule refl) +next + fix x + assume \PROP P(a)\ and \x = a\ + from \x = a\ have \x \ a\ + by (rule eq_reflection) + with \PROP P(a)\ show \PROP P(x)\ + by simp +qed + +lemma subst_all': + \(\x. a = x \ PROP P(x)) \ PROP P(a)\ +proof (rule equal_intr_rule) + assume *: \\x. a = x \ PROP P(x)\ + show \PROP P(a)\ + by (rule *) (rule refl) +next + fix x + assume \PROP P(a)\ and \a = x\ + from \a = x\ have \a \ x\ + by (rule eq_reflection) + with \PROP P(a)\ show \PROP P(x)\ + by simp +qed + subsubsection \Conversion into rewrite rules\