equal
deleted
inserted
replaced
680 apply (rule wf_less_than [THEN wf_inv_image]) |
680 apply (rule wf_less_than [THEN wf_inv_image]) |
681 done |
681 done |
682 |
682 |
683 text{* Lexicographic combinations *} |
683 text{* Lexicographic combinations *} |
684 |
684 |
685 definition |
685 definition lex_prod :: "('a \<times>'a) set \<Rightarrow> ('b \<times> 'b) set \<Rightarrow> (('a \<times> 'b) \<times> ('a \<times> 'b)) set" (infixr "<*lex*>" 80) where |
686 lex_prod :: "('a \<times>'a) set \<Rightarrow> ('b \<times> 'b) set \<Rightarrow> (('a \<times> 'b) \<times> ('a \<times> 'b)) set" (infixr "<*lex*>" 80) where |
686 "ra <*lex*> rb = {((a, b), (a', b')). (a, a') \<in> ra \<or> a = a' \<and> (b, b') \<in> rb}" |
687 [code del]: "ra <*lex*> rb = {((a, b), (a', b')). (a, a') \<in> ra \<or> a = a' \<and> (b, b') \<in> rb}" |
|
688 |
687 |
689 lemma wf_lex_prod [intro!]: "[| wf(ra); wf(rb) |] ==> wf(ra <*lex*> rb)" |
688 lemma wf_lex_prod [intro!]: "[| wf(ra); wf(rb) |] ==> wf(ra <*lex*> rb)" |
690 apply (unfold wf_def lex_prod_def) |
689 apply (unfold wf_def lex_prod_def) |
691 apply (rule allI, rule impI) |
690 apply (rule allI, rule impI) |
692 apply (simp (no_asm_use) only: split_paired_All) |
691 apply (simp (no_asm_use) only: split_paired_All) |
817 "(A, B) \<in> max_ext R \<Longrightarrow> (C, D) \<in> max_ext R \<Longrightarrow> |
816 "(A, B) \<in> max_ext R \<Longrightarrow> (C, D) \<in> max_ext R \<Longrightarrow> |
818 (A \<union> C, B \<union> D) \<in> max_ext R" |
817 (A \<union> C, B \<union> D) \<in> max_ext R" |
819 by (force elim!: max_ext.cases) |
818 by (force elim!: max_ext.cases) |
820 |
819 |
821 |
820 |
822 definition |
821 definition min_ext :: "('a \<times> 'a) set \<Rightarrow> ('a set \<times> 'a set) set" where |
823 min_ext :: "('a \<times> 'a) set \<Rightarrow> ('a set \<times> 'a set) set" |
822 "min_ext r = {(X, Y) | X Y. X \<noteq> {} \<and> (\<forall>y \<in> Y. (\<exists>x \<in> X. (x, y) \<in> r))}" |
824 where |
|
825 [code del]: "min_ext r = {(X, Y) | X Y. X \<noteq> {} \<and> (\<forall>y \<in> Y. (\<exists>x \<in> X. (x, y) \<in> r))}" |
|
826 |
823 |
827 lemma min_ext_wf: |
824 lemma min_ext_wf: |
828 assumes "wf r" |
825 assumes "wf r" |
829 shows "wf (min_ext r)" |
826 shows "wf (min_ext r)" |
830 proof (rule wfI_min) |
827 proof (rule wfI_min) |