363 end |
363 end |
364 |
364 |
365 |
365 |
366 subsection {* Bounded lattices and boolean algebras *} |
366 subsection {* Bounded lattices and boolean algebras *} |
367 |
367 |
368 class bounded_lattice = lattice + top + bot |
368 class bounded_lattice_bot = lattice + bot |
|
369 begin |
|
370 |
|
371 lemma inf_bot_left [simp]: |
|
372 "\<bottom> \<sqinter> x = \<bottom>" |
|
373 by (rule inf_absorb1) simp |
|
374 |
|
375 lemma inf_bot_right [simp]: |
|
376 "x \<sqinter> \<bottom> = \<bottom>" |
|
377 by (rule inf_absorb2) simp |
|
378 |
|
379 lemma sup_bot_left [simp]: |
|
380 "\<bottom> \<squnion> x = x" |
|
381 by (rule sup_absorb2) simp |
|
382 |
|
383 lemma sup_bot_right [simp]: |
|
384 "x \<squnion> \<bottom> = x" |
|
385 by (rule sup_absorb1) simp |
|
386 |
|
387 lemma sup_eq_bot_iff [simp]: |
|
388 "x \<squnion> y = \<bottom> \<longleftrightarrow> x = \<bottom> \<and> y = \<bottom>" |
|
389 by (simp add: eq_iff) |
|
390 |
|
391 end |
|
392 |
|
393 class bounded_lattice_top = lattice + top |
|
394 begin |
|
395 |
|
396 lemma sup_top_left [simp]: |
|
397 "\<top> \<squnion> x = \<top>" |
|
398 by (rule sup_absorb1) simp |
|
399 |
|
400 lemma sup_top_right [simp]: |
|
401 "x \<squnion> \<top> = \<top>" |
|
402 by (rule sup_absorb2) simp |
|
403 |
|
404 lemma inf_top_left [simp]: |
|
405 "\<top> \<sqinter> x = x" |
|
406 by (rule inf_absorb2) simp |
|
407 |
|
408 lemma inf_top_right [simp]: |
|
409 "x \<sqinter> \<top> = x" |
|
410 by (rule inf_absorb1) simp |
|
411 |
|
412 lemma inf_eq_top_iff [simp]: |
|
413 "x \<sqinter> y = \<top> \<longleftrightarrow> x = \<top> \<and> y = \<top>" |
|
414 by (simp add: eq_iff) |
|
415 |
|
416 end |
|
417 |
|
418 class bounded_lattice = bounded_lattice_bot + bounded_lattice_top |
369 begin |
419 begin |
370 |
420 |
371 lemma dual_bounded_lattice: |
421 lemma dual_bounded_lattice: |
372 "bounded_lattice (op \<ge>) (op >) (op \<squnion>) (op \<sqinter>) \<top> \<bottom>" |
422 "bounded_lattice (op \<ge>) (op >) (op \<squnion>) (op \<sqinter>) \<top> \<bottom>" |
373 by unfold_locales (auto simp add: less_le_not_le) |
423 by unfold_locales (auto simp add: less_le_not_le) |
374 |
|
375 lemma inf_bot_left [simp]: |
|
376 "\<bottom> \<sqinter> x = \<bottom>" |
|
377 by (rule inf_absorb1) simp |
|
378 |
|
379 lemma inf_bot_right [simp]: |
|
380 "x \<sqinter> \<bottom> = \<bottom>" |
|
381 by (rule inf_absorb2) simp |
|
382 |
|
383 lemma sup_top_left [simp]: |
|
384 "\<top> \<squnion> x = \<top>" |
|
385 by (rule sup_absorb1) simp |
|
386 |
|
387 lemma sup_top_right [simp]: |
|
388 "x \<squnion> \<top> = \<top>" |
|
389 by (rule sup_absorb2) simp |
|
390 |
|
391 lemma inf_top_left [simp]: |
|
392 "\<top> \<sqinter> x = x" |
|
393 by (rule inf_absorb2) simp |
|
394 |
|
395 lemma inf_top_right [simp]: |
|
396 "x \<sqinter> \<top> = x" |
|
397 by (rule inf_absorb1) simp |
|
398 |
|
399 lemma sup_bot_left [simp]: |
|
400 "\<bottom> \<squnion> x = x" |
|
401 by (rule sup_absorb2) simp |
|
402 |
|
403 lemma sup_bot_right [simp]: |
|
404 "x \<squnion> \<bottom> = x" |
|
405 by (rule sup_absorb1) simp |
|
406 |
|
407 lemma inf_eq_top_iff [simp]: |
|
408 "x \<sqinter> y = \<top> \<longleftrightarrow> x = \<top> \<and> y = \<top>" |
|
409 by (simp add: eq_iff) |
|
410 |
|
411 lemma sup_eq_bot_iff [simp]: |
|
412 "x \<squnion> y = \<bottom> \<longleftrightarrow> x = \<bottom> \<and> y = \<bottom>" |
|
413 by (simp add: eq_iff) |
|
414 |
424 |
415 end |
425 end |
416 |
426 |
417 class boolean_algebra = distrib_lattice + bounded_lattice + minus + uminus + |
427 class boolean_algebra = distrib_lattice + bounded_lattice + minus + uminus + |
418 assumes inf_compl_bot: "x \<sqinter> - x = \<bottom>" |
428 assumes inf_compl_bot: "x \<sqinter> - x = \<bottom>" |