2573 lemmas Min_singleton [simp] = fold1_singleton_def [OF Min_def] |
2573 lemmas Min_singleton [simp] = fold1_singleton_def [OF Min_def] |
2574 lemmas Max_singleton [simp] = fold1_singleton_def [OF Max_def] |
2574 lemmas Max_singleton [simp] = fold1_singleton_def [OF Max_def] |
2575 lemmas Min_insert [simp] = ACIf.fold1_insert_idem_def [OF ACIf_min Min_def] |
2575 lemmas Min_insert [simp] = ACIf.fold1_insert_idem_def [OF ACIf_min Min_def] |
2576 lemmas Max_insert [simp] = ACIf.fold1_insert_idem_def [OF ACIf_max Max_def] |
2576 lemmas Max_insert [simp] = ACIf.fold1_insert_idem_def [OF ACIf_max Max_def] |
2577 |
2577 |
2578 lemma Min_in [simp]: |
2578 lemma Min_in [simp,noatp]: |
2579 shows "finite A \<Longrightarrow> A \<noteq> {} \<Longrightarrow> Min A \<in> A" |
2579 shows "finite A \<Longrightarrow> A \<noteq> {} \<Longrightarrow> Min A \<in> A" |
2580 using ACf.fold1_in [OF ACf_min] |
2580 using ACf.fold1_in [OF ACf_min] |
2581 by (fastsimp simp: Min_def min_def) |
2581 by (fastsimp simp: Min_def min_def) |
2582 |
2582 |
2583 lemma Max_in [simp]: |
2583 lemma Max_in [simp,noatp]: |
2584 shows "finite A \<Longrightarrow> A \<noteq> {} \<Longrightarrow> Max A \<in> A" |
2584 shows "finite A \<Longrightarrow> A \<noteq> {} \<Longrightarrow> Max A \<in> A" |
2585 using ACf.fold1_in [OF ACf_max] |
2585 using ACf.fold1_in [OF ACf_max] |
2586 by (fastsimp simp: Max_def max_def) |
2586 by (fastsimp simp: Max_def max_def) |
2587 |
2587 |
2588 lemma Min_antimono: "\<lbrakk> M \<subseteq> N; M \<noteq> {}; finite N \<rbrakk> \<Longrightarrow> Min N \<^loc>\<le> Min M" |
2588 lemma Min_antimono: "\<lbrakk> M \<subseteq> N; M \<noteq> {}; finite N \<rbrakk> \<Longrightarrow> Min N \<^loc>\<le> Min M" |
2589 by (simp add: Min_def ACIfSLlin.fold1_antimono [OF ACIfSLlin_min]) |
2589 by (simp add: Min_def ACIfSLlin.fold1_antimono [OF ACIfSLlin_min]) |
2590 |
2590 |
2591 lemma Max_mono: "\<lbrakk> M \<subseteq> N; M \<noteq> {}; finite N \<rbrakk> \<Longrightarrow> Max M \<^loc>\<le> Max N" |
2591 lemma Max_mono: "\<lbrakk> M \<subseteq> N; M \<noteq> {}; finite N \<rbrakk> \<Longrightarrow> Max M \<^loc>\<le> Max N" |
2592 by (simp add: Max_def ACIfSLlin.fold1_antimono [OF ACIfSLlin_max]) |
2592 by (simp add: Max_def ACIfSLlin.fold1_antimono [OF ACIfSLlin_max]) |
2593 |
2593 |
2594 lemma Min_le [simp]: "\<lbrakk> finite A; A \<noteq> {}; x \<in> A \<rbrakk> \<Longrightarrow> Min A \<^loc>\<le> x" |
2594 lemma Min_le [simp,noatp]: "\<lbrakk> finite A; A \<noteq> {}; x \<in> A \<rbrakk> \<Longrightarrow> Min A \<^loc>\<le> x" |
2595 by (simp add: Min_def ACIfSL.fold1_belowI [OF ACIfSL_min]) |
2595 by (simp add: Min_def ACIfSL.fold1_belowI [OF ACIfSL_min]) |
2596 |
2596 |
2597 lemma Max_ge [simp]: "\<lbrakk> finite A; A \<noteq> {}; x \<in> A \<rbrakk> \<Longrightarrow> x \<^loc>\<le> Max A" |
2597 lemma Max_ge [simp,noatp]: "\<lbrakk> finite A; A \<noteq> {}; x \<in> A \<rbrakk> \<Longrightarrow> x \<^loc>\<le> Max A" |
2598 by (simp add: Max_def ACIfSL.fold1_belowI [OF ACIfSL_max]) |
2598 by (simp add: Max_def ACIfSL.fold1_belowI [OF ACIfSL_max]) |
2599 |
2599 |
2600 lemma Min_ge_iff [simp]: |
2600 lemma Min_ge_iff [simp,noatp]: |
2601 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> x \<^loc>\<le> Min A \<longleftrightarrow> (\<forall>a\<in>A. x \<^loc>\<le> a)" |
2601 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> x \<^loc>\<le> Min A \<longleftrightarrow> (\<forall>a\<in>A. x \<^loc>\<le> a)" |
2602 by (simp add: Min_def ACIfSL.below_fold1_iff [OF ACIfSL_min]) |
2602 by (simp add: Min_def ACIfSL.below_fold1_iff [OF ACIfSL_min]) |
2603 |
2603 |
2604 lemma Max_le_iff [simp]: |
2604 lemma Max_le_iff [simp,noatp]: |
2605 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> Max A \<^loc>\<le> x \<longleftrightarrow> (\<forall>a\<in>A. a \<^loc>\<le> x)" |
2605 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> Max A \<^loc>\<le> x \<longleftrightarrow> (\<forall>a\<in>A. a \<^loc>\<le> x)" |
2606 by (simp add: Max_def ACIfSL.below_fold1_iff [OF ACIfSL_max]) |
2606 by (simp add: Max_def ACIfSL.below_fold1_iff [OF ACIfSL_max]) |
2607 |
2607 |
2608 lemma Min_gr_iff [simp]: |
2608 lemma Min_gr_iff [simp,noatp]: |
2609 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> x \<^loc>< Min A \<longleftrightarrow> (\<forall>a\<in>A. x \<^loc>< a)" |
2609 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> x \<^loc>< Min A \<longleftrightarrow> (\<forall>a\<in>A. x \<^loc>< a)" |
2610 by (simp add: Min_def ACIfSLlin.strict_below_fold1_iff [OF ACIfSLlin_min]) |
2610 by (simp add: Min_def ACIfSLlin.strict_below_fold1_iff [OF ACIfSLlin_min]) |
2611 |
2611 |
2612 lemma Max_less_iff [simp]: |
2612 lemma Max_less_iff [simp,noatp]: |
2613 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> Max A \<^loc>< x \<longleftrightarrow> (\<forall>a\<in>A. a \<^loc>< x)" |
2613 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> Max A \<^loc>< x \<longleftrightarrow> (\<forall>a\<in>A. a \<^loc>< x)" |
2614 by (simp add: Max_def ACIfSLlin.strict_below_fold1_iff [OF ACIfSLlin_max]) |
2614 by (simp add: Max_def ACIfSLlin.strict_below_fold1_iff [OF ACIfSLlin_max]) |
2615 |
2615 |
2616 lemma Min_le_iff: |
2616 lemma Min_le_iff [noatp]: |
2617 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> Min A \<^loc>\<le> x \<longleftrightarrow> (\<exists>a\<in>A. a \<^loc>\<le> x)" |
2617 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> Min A \<^loc>\<le> x \<longleftrightarrow> (\<exists>a\<in>A. a \<^loc>\<le> x)" |
2618 by (simp add: Min_def ACIfSLlin.fold1_below_iff [OF ACIfSLlin_min]) |
2618 by (simp add: Min_def ACIfSLlin.fold1_below_iff [OF ACIfSLlin_min]) |
2619 |
2619 |
2620 lemma Max_ge_iff: |
2620 lemma Max_ge_iff [noatp]: |
2621 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> x \<^loc>\<le> Max A \<longleftrightarrow> (\<exists>a\<in>A. x \<^loc>\<le> a)" |
2621 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> x \<^loc>\<le> Max A \<longleftrightarrow> (\<exists>a\<in>A. x \<^loc>\<le> a)" |
2622 by (simp add: Max_def ACIfSLlin.fold1_below_iff [OF ACIfSLlin_max]) |
2622 by (simp add: Max_def ACIfSLlin.fold1_below_iff [OF ACIfSLlin_max]) |
2623 |
2623 |
2624 lemma Min_less_iff: |
2624 lemma Min_less_iff [noatp]: |
2625 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> Min A \<^loc>< x \<longleftrightarrow> (\<exists>a\<in>A. a \<^loc>< x)" |
2625 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> Min A \<^loc>< x \<longleftrightarrow> (\<exists>a\<in>A. a \<^loc>< x)" |
2626 by (simp add: Min_def ACIfSLlin.fold1_strict_below_iff [OF ACIfSLlin_min]) |
2626 by (simp add: Min_def ACIfSLlin.fold1_strict_below_iff [OF ACIfSLlin_min]) |
2627 |
2627 |
2628 lemma Max_gr_iff: |
2628 lemma Max_gr_iff [noatp]: |
2629 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> x \<^loc>< Max A \<longleftrightarrow> (\<exists>a\<in>A. x \<^loc>< a)" |
2629 "\<lbrakk> finite A; A \<noteq> {} \<rbrakk> \<Longrightarrow> x \<^loc>< Max A \<longleftrightarrow> (\<exists>a\<in>A. x \<^loc>< a)" |
2630 by (simp add: Max_def ACIfSLlin.fold1_strict_below_iff [OF ACIfSLlin_max]) |
2630 by (simp add: Max_def ACIfSLlin.fold1_strict_below_iff [OF ACIfSLlin_max]) |
2631 |
2631 |
2632 lemma Min_Un: "\<lbrakk>finite A; A \<noteq> {}; finite B; B \<noteq> {}\<rbrakk> |
2632 lemma Min_Un: "\<lbrakk>finite A; A \<noteq> {}; finite B; B \<noteq> {}\<rbrakk> |
2633 \<Longrightarrow> Min (A \<union> B) = min (Min A) (Min B)" |
2633 \<Longrightarrow> Min (A \<union> B) = min (Min A) (Min B)" |