equal
deleted
inserted
replaced
491 |
491 |
492 subsection {* Small finite types *} |
492 subsection {* Small finite types *} |
493 |
493 |
494 text {* We define small finite types for use in Quickcheck *} |
494 text {* We define small finite types for use in Quickcheck *} |
495 |
495 |
496 datatype (plugins only: code "quickcheck*") finite_1 = a\<^sub>1 |
496 datatype (plugins only: code "quickcheck*" extraction) finite_1 = |
|
497 a\<^sub>1 |
497 |
498 |
498 notation (output) a\<^sub>1 ("a\<^sub>1") |
499 notation (output) a\<^sub>1 ("a\<^sub>1") |
499 |
500 |
500 lemma UNIV_finite_1: |
501 lemma UNIV_finite_1: |
501 "UNIV = {a\<^sub>1}" |
502 "UNIV = {a\<^sub>1}" |
593 end |
594 end |
594 |
595 |
595 declare [[simproc del: finite_1_eq]] |
596 declare [[simproc del: finite_1_eq]] |
596 hide_const (open) a\<^sub>1 |
597 hide_const (open) a\<^sub>1 |
597 |
598 |
598 datatype (plugins only: code "quickcheck*") finite_2 = a\<^sub>1 | a\<^sub>2 |
599 datatype (plugins only: code "quickcheck*" extraction) finite_2 = |
|
600 a\<^sub>1 | a\<^sub>2 |
599 |
601 |
600 notation (output) a\<^sub>1 ("a\<^sub>1") |
602 notation (output) a\<^sub>1 ("a\<^sub>1") |
601 notation (output) a\<^sub>2 ("a\<^sub>2") |
603 notation (output) a\<^sub>2 ("a\<^sub>2") |
602 |
604 |
603 lemma UNIV_finite_2: |
605 lemma UNIV_finite_2: |
699 split: finite_2.splits) |
701 split: finite_2.splits) |
700 end |
702 end |
701 |
703 |
702 hide_const (open) a\<^sub>1 a\<^sub>2 |
704 hide_const (open) a\<^sub>1 a\<^sub>2 |
703 |
705 |
704 datatype (plugins only: code "quickcheck*") finite_3 = a\<^sub>1 | a\<^sub>2 | a\<^sub>3 |
706 datatype (plugins only: code "quickcheck*" extraction) finite_3 = |
|
707 a\<^sub>1 | a\<^sub>2 | a\<^sub>3 |
705 |
708 |
706 notation (output) a\<^sub>1 ("a\<^sub>1") |
709 notation (output) a\<^sub>1 ("a\<^sub>1") |
707 notation (output) a\<^sub>2 ("a\<^sub>2") |
710 notation (output) a\<^sub>2 ("a\<^sub>2") |
708 notation (output) a\<^sub>3 ("a\<^sub>3") |
711 notation (output) a\<^sub>3 ("a\<^sub>3") |
709 |
712 |
823 split: finite_3.splits) |
826 split: finite_3.splits) |
824 end |
827 end |
825 |
828 |
826 hide_const (open) a\<^sub>1 a\<^sub>2 a\<^sub>3 |
829 hide_const (open) a\<^sub>1 a\<^sub>2 a\<^sub>3 |
827 |
830 |
828 datatype (plugins only: code "quickcheck*") finite_4 = a\<^sub>1 | a\<^sub>2 | a\<^sub>3 | a\<^sub>4 |
831 datatype (plugins only: code "quickcheck*" extraction) finite_4 = |
|
832 a\<^sub>1 | a\<^sub>2 | a\<^sub>3 | a\<^sub>4 |
829 |
833 |
830 notation (output) a\<^sub>1 ("a\<^sub>1") |
834 notation (output) a\<^sub>1 ("a\<^sub>1") |
831 notation (output) a\<^sub>2 ("a\<^sub>2") |
835 notation (output) a\<^sub>2 ("a\<^sub>2") |
832 notation (output) a\<^sub>3 ("a\<^sub>3") |
836 notation (output) a\<^sub>3 ("a\<^sub>3") |
833 notation (output) a\<^sub>4 ("a\<^sub>4") |
837 notation (output) a\<^sub>4 ("a\<^sub>4") |
924 (simp_all add: inf_finite_4_def sup_finite_4_def uminus_finite_4_def minus_finite_4_def split: finite_4.splits) |
928 (simp_all add: inf_finite_4_def sup_finite_4_def uminus_finite_4_def minus_finite_4_def split: finite_4.splits) |
925 end |
929 end |
926 |
930 |
927 hide_const (open) a\<^sub>1 a\<^sub>2 a\<^sub>3 a\<^sub>4 |
931 hide_const (open) a\<^sub>1 a\<^sub>2 a\<^sub>3 a\<^sub>4 |
928 |
932 |
929 datatype (plugins only: code "quickcheck*") finite_5 = a\<^sub>1 | a\<^sub>2 | a\<^sub>3 | a\<^sub>4 | a\<^sub>5 |
933 datatype (plugins only: code "quickcheck*" extraction) finite_5 = |
|
934 a\<^sub>1 | a\<^sub>2 | a\<^sub>3 | a\<^sub>4 | a\<^sub>5 |
930 |
935 |
931 notation (output) a\<^sub>1 ("a\<^sub>1") |
936 notation (output) a\<^sub>1 ("a\<^sub>1") |
932 notation (output) a\<^sub>2 ("a\<^sub>2") |
937 notation (output) a\<^sub>2 ("a\<^sub>2") |
933 notation (output) a\<^sub>3 ("a\<^sub>3") |
938 notation (output) a\<^sub>3 ("a\<^sub>3") |
934 notation (output) a\<^sub>4 ("a\<^sub>4") |
939 notation (output) a\<^sub>4 ("a\<^sub>4") |