src/HOL/Lattices.thy
 changeset 25102 db3e412c4cb1 parent 25062 af5ef0d4d655 child 25206 9c84ec7217a9
```     1.1 --- a/src/HOL/Lattices.thy	Fri Oct 19 16:20:27 2007 +0200
1.2 +++ b/src/HOL/Lattices.thy	Fri Oct 19 19:45:29 2007 +0200
1.3 @@ -30,9 +30,6 @@
1.4  context lower_semilattice
1.5  begin
1.6
1.7 -lemmas antisym_intro [intro!] = antisym
1.8 -lemmas (in -) [rule del] = antisym_intro
1.9 -
1.10  lemma le_infI1[intro]:
1.11    assumes "a \<sqsubseteq> x"
1.12    shows "a \<sqinter> b \<sqsubseteq> x"
1.13 @@ -58,11 +55,11 @@
1.14  lemmas (in -) [rule del] = le_infE
1.15
1.16  lemma le_inf_iff [simp]:
1.17 - "x \<sqsubseteq> y \<sqinter> z = (x \<sqsubseteq> y \<and> x \<sqsubseteq> z)"
1.18 +  "x \<sqsubseteq> y \<sqinter> z = (x \<sqsubseteq> y \<and> x \<sqsubseteq> z)"
1.19  by blast
1.20
1.21  lemma le_iff_inf: "(x \<sqsubseteq> y) = (x \<sqinter> y = x)"
1.22 -by(blast dest:eq_iff[THEN iffD1])
1.23 +  by (blast intro: antisym dest: eq_iff [THEN iffD1])
1.24
1.25  end
1.26
1.27 @@ -73,9 +70,6 @@
1.28  context upper_semilattice
1.29  begin
1.30
1.31 -lemmas antisym_intro [intro!] = antisym
1.32 -lemmas (in -) [rule del] = antisym_intro
1.33 -
1.34  lemma le_supI1[intro]: "x \<sqsubseteq> a \<Longrightarrow> x \<sqsubseteq> a \<squnion> b"
1.35    by (rule order_trans) auto
1.36  lemmas (in -) [rule del] = le_supI1
1.37 @@ -92,13 +86,12 @@
1.38    by (blast intro: order_trans)
1.39  lemmas (in -) [rule del] = le_supE
1.40
1.41 -
1.42  lemma ge_sup_conv[simp]:
1.43 - "x \<squnion> y \<sqsubseteq> z = (x \<sqsubseteq> z \<and> y \<sqsubseteq> z)"
1.44 +  "x \<squnion> y \<sqsubseteq> z = (x \<sqsubseteq> z \<and> y \<sqsubseteq> z)"
1.45  by blast
1.46
1.47  lemma le_iff_sup: "(x \<sqsubseteq> y) = (x \<squnion> y = y)"
1.48 -by(blast dest:eq_iff[THEN iffD1])
1.49 +  by (blast intro: antisym dest: eq_iff [THEN iffD1])
1.50
1.51  end
1.52
1.53 @@ -113,25 +106,25 @@
1.54  begin
1.55
1.56  lemma inf_commute: "(x \<sqinter> y) = (y \<sqinter> x)"
1.57 -by blast
1.58 +  by (blast intro: antisym)
1.59
1.60  lemma inf_assoc: "(x \<sqinter> y) \<sqinter> z = x \<sqinter> (y \<sqinter> z)"
1.61 -by blast
1.62 +  by (blast intro: antisym)
1.63
1.64  lemma inf_idem[simp]: "x \<sqinter> x = x"
1.65 -by blast
1.66 +  by (blast intro: antisym)
1.67
1.68  lemma inf_left_idem[simp]: "x \<sqinter> (x \<sqinter> y) = x \<sqinter> y"
1.69 -by blast
1.70 +  by (blast intro: antisym)
1.71
1.72  lemma inf_absorb1: "x \<sqsubseteq> y \<Longrightarrow> x \<sqinter> y = x"
1.73 -by blast
1.74 +  by (blast intro: antisym)
1.75
1.76  lemma inf_absorb2: "y \<sqsubseteq> x \<Longrightarrow> x \<sqinter> y = y"
1.77 -by blast
1.78 +  by (blast intro: antisym)
1.79
1.80  lemma inf_left_commute: "x \<sqinter> (y \<sqinter> z) = y \<sqinter> (x \<sqinter> z)"
1.81 -by blast
1.82 +  by (blast intro: antisym)
1.83
1.84  lemmas inf_ACI = inf_commute inf_assoc inf_left_commute inf_left_idem
1.85
1.86 @@ -142,25 +135,25 @@
1.87  begin
1.88
1.89  lemma sup_commute: "(x \<squnion> y) = (y \<squnion> x)"
1.90 -by blast
1.91 +  by (blast intro: antisym)
1.92
1.93  lemma sup_assoc: "(x \<squnion> y) \<squnion> z = x \<squnion> (y \<squnion> z)"
1.94 -by blast
1.95 +  by (blast intro: antisym)
1.96
1.97  lemma sup_idem[simp]: "x \<squnion> x = x"
1.98 -by blast
1.99 +  by (blast intro: antisym)
1.100
1.101  lemma sup_left_idem[simp]: "x \<squnion> (x \<squnion> y) = x \<squnion> y"
1.102 -by blast
1.103 +  by (blast intro: antisym)
1.104
1.105  lemma sup_absorb1: "y \<sqsubseteq> x \<Longrightarrow> x \<squnion> y = x"
1.106 -by blast
1.107 +  by (blast intro: antisym)
1.108
1.109  lemma sup_absorb2: "x \<sqsubseteq> y \<Longrightarrow> x \<squnion> y = y"
1.110 -by blast
1.111 +  by (blast intro: antisym)
1.112
1.113  lemma sup_left_commute: "x \<squnion> (y \<squnion> z) = y \<squnion> (x \<squnion> z)"
1.114 -by blast
1.115 +  by (blast intro: antisym)
1.116
1.117  lemmas sup_ACI = sup_commute sup_assoc sup_left_commute sup_left_idem
1.118
1.119 @@ -170,10 +163,10 @@
1.120  begin
1.121
1.122  lemma inf_sup_absorb: "x \<sqinter> (x \<squnion> y) = x"
1.123 -by(blast intro: antisym inf_le1 inf_greatest sup_ge1)
1.124 +  by (blast intro: antisym inf_le1 inf_greatest sup_ge1)
1.125
1.126  lemma sup_inf_absorb: "x \<squnion> (x \<sqinter> y) = x"
1.127 -by(blast intro: antisym sup_ge1 sup_least inf_le1)
1.128 +  by (blast intro: antisym sup_ge1 sup_least inf_le1)
1.129
1.130  lemmas ACI = inf_ACI sup_ACI
1.131
1.132 @@ -182,10 +175,10 @@
1.133  text{* Towards distributivity *}
1.134
1.135  lemma distrib_sup_le: "x \<squnion> (y \<sqinter> z) \<sqsubseteq> (x \<squnion> y) \<sqinter> (x \<squnion> z)"
1.136 -by blast
1.137 +  by blast
1.138
1.139  lemma distrib_inf_le: "(x \<sqinter> y) \<squnion> (x \<sqinter> z) \<sqsubseteq> x \<sqinter> (y \<squnion> z)"
1.140 -by blast
1.141 +  by blast
1.142
1.143
1.144  text{* If you have one of them, you have them all. *}
1.145 @@ -293,10 +286,10 @@
1.146    by (rule distrib_lattice_min_max)
1.147
1.148  lemma inf_min: "inf = (min \<Colon> 'a\<Colon>{lower_semilattice, linorder} \<Rightarrow> 'a \<Rightarrow> 'a)"
1.149 -  by (rule ext)+ auto
1.150 +  by (rule ext)+ (auto intro: antisym)
1.151
1.152  lemma sup_max: "sup = (max \<Colon> 'a\<Colon>{upper_semilattice, linorder} \<Rightarrow> 'a \<Rightarrow> 'a)"
1.153 -  by (rule ext)+ auto
1.154 +  by (rule ext)+ (auto intro: antisym)
1.155
1.156  lemmas le_maxI1 = min_max.sup_ge1
1.157  lemmas le_maxI2 = min_max.sup_ge2
1.158 @@ -313,7 +306,7 @@
1.159    undesirable.
1.160  *}
1.161
1.162 -lemmas [rule del] = min_max.antisym_intro min_max.le_infI min_max.le_supI
1.163 +lemmas [rule del] = min_max.le_infI min_max.le_supI
1.164    min_max.le_supE min_max.le_infE min_max.le_supI1 min_max.le_supI2
1.165    min_max.le_infI1 min_max.le_infI2
1.166
1.167 @@ -330,10 +323,10 @@
1.168  begin
1.169
1.170  lemma Inf_Sup: "\<Sqinter>A = \<Squnion>{b. \<forall>a \<in> A. b \<le> a}"
1.171 -  by (auto intro: Inf_lower Inf_greatest Sup_upper Sup_least)
1.172 +  by (auto intro: antisym Inf_lower Inf_greatest Sup_upper Sup_least)
1.173
1.174  lemma Sup_Inf:  "\<Squnion>A = \<Sqinter>{b. \<forall>a \<in> A. a \<le> b}"
1.175 -  by (auto intro: Inf_lower Inf_greatest Sup_upper Sup_least)
1.176 +  by (auto intro: antisym Inf_lower Inf_greatest Sup_upper Sup_least)
1.177
1.178  lemma Inf_Univ: "\<Sqinter>UNIV = \<Squnion>{}"
1.179    unfolding Sup_Inf by auto
1.180 @@ -453,6 +446,9 @@
1.181  end
1.182  *}
1.183
1.184 +context complete_lattice
1.185 +begin
1.186 +
1.187  lemma le_SUPI: "i : A \<Longrightarrow> M i \<le> (SUP i:A. M i)"
1.188    by (auto simp add: SUPR_def intro: Sup_upper)
1.189
1.190 @@ -466,10 +462,12 @@
1.191    by (auto simp add: INFI_def intro: Inf_greatest)
1.192
1.193  lemma SUP_const[simp]: "A \<noteq> {} \<Longrightarrow> (SUP i:A. M) = M"
1.194 -  by (auto intro: order_antisym SUP_leI le_SUPI)
1.195 +  by (auto intro: antisym SUP_leI le_SUPI)
1.196
1.197  lemma INF_const[simp]: "A \<noteq> {} \<Longrightarrow> (INF i:A. M) = M"
1.198 -  by (auto intro: order_antisym INF_leI le_INFI)
1.199 +  by (auto intro: antisym INF_leI le_INFI)
1.200 +
1.201 +end
1.202
1.203
1.204  subsection {* Bool as lattice *}
```