diff -r 8c3eec5812d8 -r ae44f16dcea5 src/HOL/BNF_Def.thy --- a/src/HOL/BNF_Def.thy Tue Feb 16 17:01:40 2016 +0100 +++ b/src/HOL/BNF_Def.thy Tue Feb 16 22:28:19 2016 +0100 @@ -235,6 +235,36 @@ lemma diag_imp_eq_le: "(\x. x \ A \ R x x) \ \x y. x \ A \ y \ A \ x = y \ R x y" by blast +definition eq_onp :: "('a \ bool) \ 'a \ 'a \ bool" + where "eq_onp R = (\x y. R x \ x = y)" + +lemma eq_onp_Grp: "eq_onp P = BNF_Def.Grp (Collect P) id" + unfolding eq_onp_def Grp_def by auto + +lemma eq_onp_to_eq: "eq_onp P x y \ x = y" + by (simp add: eq_onp_def) + +lemma eq_onp_top_eq_eq: "eq_onp top = op =" + by (simp add: eq_onp_def) + +lemma eq_onp_same_args: "eq_onp P x x = P x" + using assms by (auto simp add: eq_onp_def) + +lemma eq_onp_eqD: "eq_onp P = Q \ P x = Q x x" + unfolding eq_onp_def by blast + +lemma Ball_Collect: "Ball A P = (A \ (Collect P))" + by auto + +lemma eq_onp_mono0: "\x\A. P x \ Q x \ \x\A. \y\A. eq_onp P x y \ eq_onp Q x y" + unfolding eq_onp_def by auto + +lemma eq_onp_True: "eq_onp (\_. True) = (op =)" + unfolding eq_onp_def by simp + +lemma Ball_image_comp: "Ball (f ` A) g = Ball A (g o f)" + by auto + ML_file "Tools/BNF/bnf_util.ML" ML_file "Tools/BNF/bnf_tactics.ML" ML_file "Tools/BNF/bnf_def_tactics.ML"