561 background processes. It generates calls to the "metis" method if |
559 background processes. It generates calls to the "metis" method if |
562 successful. These can be pasted into the proof. Users do not have to |
560 successful. These can be pasted into the proof. Users do not have to |
563 wait for the automatic provers to return. WARNING: does not really |
561 wait for the automatic provers to return. WARNING: does not really |
564 work with multi-threading. |
562 work with multi-threading. |
565 |
563 |
566 * Localized monotonicity predicate in theory "Orderings"; integrated |
|
567 lemmas max_of_mono and min_of_mono with this predicate. |
|
568 INCOMPATIBILITY. |
|
569 |
|
570 * Class "div" now inherits from class "times" rather than "type". |
|
571 INCOMPATIBILITY. |
|
572 |
|
573 * New "auto_quickcheck" feature tests outermost goal statements for |
564 * New "auto_quickcheck" feature tests outermost goal statements for |
574 potential counter-examples. Controlled by ML references |
565 potential counter-examples. Controlled by ML references |
575 auto_quickcheck (default true) and auto_quickcheck_time_limit (default |
566 auto_quickcheck (default true) and auto_quickcheck_time_limit (default |
576 5000 milliseconds). Fails silently if statements is outside of |
567 5000 milliseconds). Fails silently if statements is outside of |
577 executable fragment, or any other codgenerator problem occurs. |
568 executable fragment, or any other codgenerator problem occurs. |
578 |
569 |
579 * Internal reorganisation of `size' of datatypes: size theorems |
570 * New constant "undefined" with axiom "undefined x = undefined". |
580 "foo.size" are no longer subsumed by "foo.simps" (but are still |
571 |
581 simplification rules by default!); theorems "prod.size" now named |
572 * Added class "HOL.eq", allowing for code generation with polymorphic |
582 "*.size" |
573 equality. |
583 |
|
584 * The transitivity reasoner for partial and linear orders is set up |
|
585 for locales "order" and "linorder" generated by the new class package |
|
586 (instead of axiomatic type classes used before). Instances of the |
|
587 reasoner are available in all contexts importing or interpreting these |
|
588 locales. Method "order" invokes the reasoner separately; the reasoner |
|
589 is also integrated with the Simplifier as a solver. Diagnostic |
|
590 command 'print_orders' shows the available instances of the reasoner |
|
591 in the current context. |
|
592 |
|
593 * Formulation of theorem "dense" changed slightly due to integration |
|
594 with new class dense_linear_order. |
|
595 |
|
596 * HOL/Finite_Set: "name-space" locales Lattice, Distrib_lattice, |
|
597 Linorder etc. have disappeared; operations defined in terms of |
|
598 fold_set now are named Inf_fin, Sup_fin. INCOMPATIBILITY. |
|
599 |
|
600 * HOL/Nat: neq0_conv no longer declared as iff. INCOMPATIBILITY. |
|
601 |
|
602 * HOL-Word: New extensive library and type for generic, fixed size |
|
603 machine words, with arithemtic, bit-wise, shifting and rotating |
|
604 operations, reflection into int, nat, and bool lists, automation for |
|
605 linear arithmetic (by automatic reflection into nat or int), including |
|
606 lemmas on overflow and monotonicity. Instantiated to all appropriate |
|
607 arithmetic type classes, supporting automatic simplification of |
|
608 numerals on all operations. |
|
609 |
|
610 * Library/Boolean_Algebra: locales for abstract boolean algebras. |
|
611 |
|
612 * Library/Numeral_Type: numbers as types, e.g. TYPE(32). |
|
613 |
|
614 * Code generator library theories: |
|
615 - Code_Integer represents HOL integers by big integer literals in target |
|
616 languages. |
|
617 - Code_Char represents HOL characters by character literals in target |
|
618 languages. |
|
619 - Code_Char_chr like Code_Char, but also offers treatment of character |
|
620 codes; includes Code_Integer. |
|
621 - Executable_Set allows to generate code for finite sets using lists. |
|
622 - Executable_Rat implements rational numbers as triples (sign, enumerator, |
|
623 denominator). |
|
624 - Executable_Real implements a subset of real numbers, namly those |
|
625 representable by rational numbers. |
|
626 - Efficient_Nat implements natural numbers by integers, which in general will |
|
627 result in higher efficency; pattern matching with 0/Suc is eliminated; |
|
628 includes Code_Integer. |
|
629 - Code_Index provides an additional datatype index which is mapped to |
|
630 target-language built-in integers. |
|
631 - Code_Message provides an additional datatype message_string} which is isomorphic to |
|
632 strings; messages are mapped to target-language strings. |
|
633 |
|
634 * New package for inductive predicates |
|
635 |
|
636 An n-ary predicate p with m parameters z_1, ..., z_m can now be defined via |
|
637 |
|
638 inductive |
|
639 p :: "U_1 => ... => U_m => T_1 => ... => T_n => bool" |
|
640 for z_1 :: U_1 and ... and z_n :: U_m |
|
641 where |
|
642 rule_1: "... ==> p z_1 ... z_m t_1_1 ... t_1_n" |
|
643 | ... |
|
644 |
|
645 with full support for type-inference, rather than |
|
646 |
|
647 consts s :: "U_1 => ... => U_m => (T_1 * ... * T_n) set" |
|
648 |
|
649 abbreviation p :: "U_1 => ... => U_m => T_1 => ... => T_n => bool" |
|
650 where "p z_1 ... z_m x_1 ... x_n == (x_1, ..., x_n) : s z_1 ... z_m" |
|
651 |
|
652 inductive "s z_1 ... z_m" |
|
653 intros |
|
654 rule_1: "... ==> (t_1_1, ..., t_1_n) : s z_1 ... z_m" |
|
655 ... |
|
656 |
|
657 For backward compatibility, there is a wrapper allowing inductive |
|
658 sets to be defined with the new package via |
|
659 |
|
660 inductive_set |
|
661 s :: "U_1 => ... => U_m => (T_1 * ... * T_n) set" |
|
662 for z_1 :: U_1 and ... and z_n :: U_m |
|
663 where |
|
664 rule_1: "... ==> (t_1_1, ..., t_1_n) : s z_1 ... z_m" |
|
665 | ... |
|
666 |
|
667 or |
|
668 |
|
669 inductive_set |
|
670 s :: "U_1 => ... => U_m => (T_1 * ... * T_n) set" |
|
671 and p :: "U_1 => ... => U_m => T_1 => ... => T_n => bool" |
|
672 for z_1 :: U_1 and ... and z_n :: U_m |
|
673 where |
|
674 "p z_1 ... z_m x_1 ... x_n == (x_1, ..., x_n) : s z_1 ... z_m" |
|
675 | rule_1: "... ==> p z_1 ... z_m t_1_1 ... t_1_n" |
|
676 | ... |
|
677 |
|
678 if the additional syntax "p ..." is required. |
|
679 |
|
680 Numerous examples can be found in the subdirectories src/HOL/Auth, |
|
681 src/HOL/Bali, src/HOL/Induct, and src/HOL/MicroJava. |
|
682 |
|
683 INCOMPATIBILITIES: |
|
684 |
|
685 - Since declaration and definition of inductive sets or predicates |
|
686 is no longer separated, abbreviations involving the newly |
|
687 introduced sets or predicates must be specified together with the |
|
688 introduction rules after the 'where' keyword (see above), rather |
|
689 than before the actual inductive definition. |
|
690 |
|
691 - The variables in induction and elimination rules are now |
|
692 quantified in the order of their occurrence in the introduction |
|
693 rules, rather than in alphabetical order. Since this may break |
|
694 some proofs, these proofs either have to be repaired, e.g. by |
|
695 reordering the variables a_i_1 ... a_i_{k_i} in Isar 'case' |
|
696 statements of the form |
|
697 |
|
698 case (rule_i a_i_1 ... a_i_{k_i}) |
|
699 |
|
700 or the old order of quantification has to be restored by explicitly adding |
|
701 meta-level quantifiers in the introduction rules, i.e. |
|
702 |
|
703 | rule_i: "!!a_i_1 ... a_i_{k_i}. ... ==> p z_1 ... z_m t_i_1 ... t_i_n" |
|
704 |
|
705 - The format of the elimination rules is now |
|
706 |
|
707 p z_1 ... z_m x_1 ... x_n ==> |
|
708 (!!a_1_1 ... a_1_{k_1}. x_1 = t_1_1 ==> ... ==> x_n = t_1_n ==> ... ==> P) |
|
709 ==> ... ==> P |
|
710 |
|
711 for predicates and |
|
712 |
|
713 (x_1, ..., x_n) : s z_1 ... z_m ==> |
|
714 (!!a_1_1 ... a_1_{k_1}. x_1 = t_1_1 ==> ... ==> x_n = t_1_n ==> ... ==> P) |
|
715 ==> ... ==> P |
|
716 |
|
717 for sets rather than |
|
718 |
|
719 x : s z_1 ... z_m ==> |
|
720 (!!a_1_1 ... a_1_{k_1}. x = (t_1_1, ..., t_1_n) ==> ... ==> P) |
|
721 ==> ... ==> P |
|
722 |
|
723 This may require terms in goals to be expanded to n-tuples |
|
724 (e.g. using case_tac or simplification with the split_paired_all |
|
725 rule) before the above elimination rule is applicable. |
|
726 |
|
727 - The elimination or case analysis rules for (mutually) inductive |
|
728 sets or predicates are now called "p_1.cases" ... "p_k.cases". The |
|
729 list of rules "p_1_..._p_k.elims" is no longer available. |
|
730 |
|
731 * Case-expressions allow arbitrary constructor-patterns (including |
|
732 "_") and take their order into account, like in functional |
|
733 programming. Internally, this is translated into nested |
|
734 case-expressions; missing cases are added and mapped to the predefined |
|
735 constant "undefined". In complicated cases printing may no longer show |
|
736 the original input but the internal form. Lambda-abstractions allow |
|
737 the same form of pattern matching: "% pat1 => e1 | ..." is an |
|
738 abbreviation for "%x. case x of pat1 => e1 | ..." where x is a new |
|
739 variable. |
|
740 |
|
741 * IntDef: The constant "int :: nat => int" has been removed; now "int" |
|
742 is an abbreviation for "of_nat :: nat => int". The simplification |
|
743 rules for "of_nat" have been changed to work like "int" did |
|
744 previously. Potential INCOMPATIBILITY: |
|
745 - "of_nat (Suc m)" simplifies to "1 + of_nat m" instead of "of_nat m + 1" |
|
746 - of_nat_diff and of_nat_mult are no longer default simp rules |
|
747 |
|
748 * Method "algebra" solves polynomial equations over (semi)rings using |
|
749 Groebner bases. The (semi)ring structure is defined by locales and the |
|
750 tool setup depends on that generic context. Installing the method for |
|
751 a specific type involves instantiating the locale and possibly adding |
|
752 declarations for computation on the coefficients. The method is |
|
753 already instantiated for natural numbers and for the axiomatic class |
|
754 of idoms with numerals. See also the paper by Chaieb and Wenzel at |
|
755 CALCULEMUS 2007 for the general principles underlying this |
|
756 architecture of context-aware proof-tools. |
|
757 |
|
758 * Method "ferrack" implements quantifier elimination over |
|
759 special-purpose dense linear orders using locales (analogous to |
|
760 "algebra"). The method is already installed for class |
|
761 {ordered_field,recpower,number_ring} which subsumes real, hyperreal, |
|
762 rat, etc. |
|
763 |
|
764 * Former constant "List.op @" now named "List.append". Use ML |
|
765 antiquotations @{const_name List.append} or @{term " ... @ ... "} to |
|
766 circumvent possible incompatibilities when working on ML level. |
|
767 |
574 |
768 * Some renaming of class constants due to canonical name prefixing in |
575 * Some renaming of class constants due to canonical name prefixing in |
769 the new 'class' package: |
576 the new 'class' package: |
770 |
577 |
771 HOL.abs ~> HOL.minus_class.abs |
578 HOL.abs ~> HOL.abs_class.abs |
772 HOL.divide ~> HOL.divide_class.divide |
579 HOL.divide ~> HOL.divide_class.divide |
|
580 0 ~> HOL.zero_class.zero |
|
581 1 ~> HOL.one_class.one |
|
582 op + ~> HOL.plus_class.plus |
|
583 op - ~> HOL.minus_class.minus |
|
584 uminus ~> HOL.minus_class.uminus |
|
585 op * ~> HOL.times_class.times |
|
586 op < ~> HOL.ord_class.less |
|
587 op <= > HOL.ord_class.less_eq |
773 Nat.power ~> Power.power_class.power |
588 Nat.power ~> Power.power_class.power |
774 Nat.size ~> Nat.size_class.size |
589 Nat.size ~> Nat.size_class.size |
775 Numeral.number_of ~> Numeral.number_class.number_of |
590 Numeral.number_of ~> Numeral.number_class.number_of |
776 FixedPoint.Inf ~> Lattices.complete_lattice_class.Inf |
591 FixedPoint.Inf ~> Lattices.complete_lattice_class.Inf |
777 FixedPoint.Sup ~> Lattices.complete_lattice_class.Sup |
592 FixedPoint.Sup ~> Lattices.complete_lattice_class.Sup |
778 Orderings.min ~> Orderings.ord_class.min |
593 Orderings.min ~> Orderings.ord_class.min |
779 Orderings.max ~> Orderings.ord_class.max |
594 Orderings.max ~> Orderings.ord_class.max |
780 |
595 Divides.op div ~> Divides.div_class.div |
781 INCOMPATIBILITY. |
596 Divides.op mod ~> Divides.div_class.mod |
|
597 Divides.op dvd ~> Divides.div_class.dvd |
|
598 |
|
599 INCOMPATIBILITY. Adaptions may be required in the following cases: |
|
600 |
|
601 a) User-defined constants using any of the names "plus", "minus", |
|
602 "times", "less" or "less_eq". The standard syntax translations for |
|
603 "+", "-" and "*" may go wrong. INCOMPATIBILITY: use more specific |
|
604 names. |
|
605 |
|
606 b) Variables named "plus", "minus", "times", "less", "less_eq" |
|
607 INCOMPATIBILITY: use more specific names. |
|
608 |
|
609 c) Permutative equations (e.g. "a + b = b + a") |
|
610 Since the change of names also changes the order of terms, permutative |
|
611 rewrite rules may get applied in a different order. Experience shows |
|
612 that this is rarely the case (only two adaptions in the whole Isabelle |
|
613 distribution). INCOMPATIBILITY: rewrite proofs |
|
614 |
|
615 d) ML code directly refering to constant names |
|
616 This in general only affects hand-written proof tactics, simprocs and |
|
617 so on. INCOMPATIBILITY: grep your sourcecode and replace names. |
|
618 Consider using @{const_name} antiquotation. |
782 |
619 |
783 * New class "default" with associated constant "default". |
620 * New class "default" with associated constant "default". |
784 |
|
785 * New constant "undefined" with axiom "undefined x = undefined". |
|
786 |
|
787 * primrec: missing cases mapped to "undefined" instead of "arbitrary". |
|
788 |
|
789 * New function listsum :: 'a list => 'a for arbitrary monoids. |
|
790 Special syntax: "SUM x <- xs. f x" (and latex variants) |
|
791 |
|
792 * New syntax for Haskell-like list comprehension (input only), eg. |
|
793 [(x,y). x <- xs, y <- ys, x ~= y], see also src/HOL/List.thy. |
|
794 |
|
795 * The special syntax for function "filter" has changed from [x : |
|
796 xs. P] to [x <- xs. P] to avoid an ambiguity caused by list |
|
797 comprehension syntax, and for uniformity. INCOMPATIBILITY. |
|
798 |
|
799 * [a..b] is now defined for arbitrary linear orders. It used to be |
|
800 defined on nat only, as an abbreviation for [a..<Suc b] |
|
801 INCOMPATIBILITY. |
|
802 |
|
803 * Renamed lemma "set_take_whileD" to "set_takeWhileD". |
|
804 |
|
805 * New functions "sorted" and "sort" in src/HOL/List.thy. |
|
806 |
621 |
807 * Function "sgn" is now overloaded and available on int, real, complex |
622 * Function "sgn" is now overloaded and available on int, real, complex |
808 (and other numeric types), using class "sgn". Two possible defs of |
623 (and other numeric types), using class "sgn". Two possible defs of |
809 sgn are given as equational assumptions in the classes sgn_if and |
624 sgn are given as equational assumptions in the classes sgn_if and |
810 sgn_div_norm; ordered_idom now also inherits from sgn_if. |
625 sgn_div_norm; ordered_idom now also inherits from sgn_if. |
811 INCOMPATIBILITY. |
626 INCOMPATIBILITY. |
812 |
627 |
813 * New lemma collection field_simps (an extension of ring_simps) for |
628 * Locale "partial_order" now unified with class "order" (cf. theory |
814 manipulating (in)equations involving division. Multiplies with all |
629 Orderings), added parameter "less". INCOMPATIBILITY. |
815 denominators that can be proved to be non-zero (in equations) or |
630 |
816 positive/negative (in inequations). |
631 * Renamings in classes "order" and "linorder": facts "refl", "trans" and |
817 |
632 "cases" to "order_refl", "order_trans" and "linorder_cases", to avoid |
818 * Lemma collections ring_eq_simps, group_eq_simps and ring_distrib |
633 clashes with HOL "refl" and "trans". INCOMPATIBILITY. |
819 have been improved and renamed to ring_simps, group_simps and |
634 |
820 ring_distribs. Removed lemmas field_xyz in theory Ring_and_Field |
635 * Classes "order" and "linorder": potential INCOMPATIBILITY due to |
821 because they were subsumed by lemmas xyz. INCOMPATIBILITY. |
636 changed order of proof goals in instance proofs. |
822 |
637 |
823 * Theory Library/Commutative_Ring: switched from recdef to function |
638 * The transitivity reasoner for partial and linear orders is set up |
824 package; constants add, mul, pow now curried. Infix syntax for |
639 for classes "order" and "linorder". Instances of the reasoner are available |
825 algebraic operations. |
640 in all contexts importing or interpreting the corresponding locales. |
826 |
641 Method "order" invokes the reasoner separately; the reasoner |
827 * More uniform lattice theory development in HOL. |
642 is also integrated with the Simplifier as a solver. Diagnostic |
|
643 command 'print_orders' shows the available instances of the reasoner |
|
644 in the current context. |
|
645 |
|
646 * Localized monotonicity predicate in theory "Orderings"; integrated |
|
647 lemmas max_of_mono and min_of_mono with this predicate. |
|
648 INCOMPATIBILITY. |
|
649 |
|
650 * Formulation of theorem "dense" changed slightly due to integration |
|
651 with new class dense_linear_order. |
|
652 |
|
653 * Uniform lattice theory development in HOL. |
828 |
654 |
829 constants "meet" and "join" now named "inf" and "sup" |
655 constants "meet" and "join" now named "inf" and "sup" |
830 constant "Meet" now named "Inf" |
656 constant "Meet" now named "Inf" |
831 |
657 |
832 classes "meet_semilorder" and "join_semilorder" now named |
658 classes "meet_semilorder" and "join_semilorder" now named |
938 listsp_meet_eq ~> listsp_inf_eq |
764 listsp_meet_eq ~> listsp_inf_eq |
939 |
765 |
940 meet_min ~> inf_min |
766 meet_min ~> inf_min |
941 join_max ~> sup_max |
767 join_max ~> sup_max |
942 |
768 |
943 * Renamed classes "order" and "linorder": facts "refl", "trans" and |
769 * Added syntactic class "size"; overloaded constant "size" now has |
944 "cases" to "order_refl", "order_trans" and "linorder_cases", to avoid |
770 type "'a::size ==> bool" |
945 clashes with HOL "refl" and "trans". INCOMPATIBILITY. |
771 |
946 |
772 * Internal reorganisation of `size' of datatypes: size theorems |
947 * Classes "order" and "linorder": potential INCOMPATIBILITY due to |
773 "foo.size" are no longer subsumed by "foo.simps" (but are still |
948 changed order of proof goals instance proofs. |
774 simplification rules by default!); theorems "prod.size" now named |
949 |
775 "*.size". |
950 * Locale "partial_order" now unified with class "order" (cf. theory |
776 |
951 Orderings), added parameter "less". INCOMPATIBILITY. |
777 * Class "div" now inherits from class "times" rather than "type". |
|
778 INCOMPATIBILITY. |
|
779 |
|
780 * HOL/Finite_Set: "name-space" locales Lattice, Distrib_lattice, |
|
781 Linorder etc. have disappeared; operations defined in terms of |
|
782 fold_set now are named Inf_fin, Sup_fin. INCOMPATIBILITY. |
|
783 |
|
784 * HOL/Nat: neq0_conv no longer declared as iff. INCOMPATIBILITY. |
|
785 |
|
786 * HOL-Word: New extensive library and type for generic, fixed size |
|
787 machine words, with arithemtic, bit-wise, shifting and rotating |
|
788 operations, reflection into int, nat, and bool lists, automation for |
|
789 linear arithmetic (by automatic reflection into nat or int), including |
|
790 lemmas on overflow and monotonicity. Instantiated to all appropriate |
|
791 arithmetic type classes, supporting automatic simplification of |
|
792 numerals on all operations. |
|
793 |
|
794 * Library/Boolean_Algebra: locales for abstract boolean algebras. |
|
795 |
|
796 * Library/Numeral_Type: numbers as types, e.g. TYPE(32). |
|
797 |
|
798 * Code generator library theories: |
|
799 - Code_Integer represents HOL integers by big integer literals in target |
|
800 languages. |
|
801 - Code_Char represents HOL characters by character literals in target |
|
802 languages. |
|
803 - Code_Char_chr like Code_Char, but also offers treatment of character |
|
804 codes; includes Code_Integer. |
|
805 - Executable_Set allows to generate code for finite sets using lists. |
|
806 - Executable_Rat implements rational numbers as triples (sign, enumerator, |
|
807 denominator). |
|
808 - Executable_Real implements a subset of real numbers, namly those |
|
809 representable by rational numbers. |
|
810 - Efficient_Nat implements natural numbers by integers, which in general will |
|
811 result in higher efficency; pattern matching with 0/Suc is eliminated; |
|
812 includes Code_Integer. |
|
813 - Code_Index provides an additional datatype index which is mapped to |
|
814 target-language built-in integers. |
|
815 - Code_Message provides an additional datatype message_string} which is isomorphic to |
|
816 strings; messages are mapped to target-language strings. |
|
817 |
|
818 * New package for inductive predicates |
|
819 |
|
820 An n-ary predicate p with m parameters z_1, ..., z_m can now be defined via |
|
821 |
|
822 inductive |
|
823 p :: "U_1 => ... => U_m => T_1 => ... => T_n => bool" |
|
824 for z_1 :: U_1 and ... and z_n :: U_m |
|
825 where |
|
826 rule_1: "... ==> p z_1 ... z_m t_1_1 ... t_1_n" |
|
827 | ... |
|
828 |
|
829 with full support for type-inference, rather than |
|
830 |
|
831 consts s :: "U_1 => ... => U_m => (T_1 * ... * T_n) set" |
|
832 |
|
833 abbreviation p :: "U_1 => ... => U_m => T_1 => ... => T_n => bool" |
|
834 where "p z_1 ... z_m x_1 ... x_n == (x_1, ..., x_n) : s z_1 ... z_m" |
|
835 |
|
836 inductive "s z_1 ... z_m" |
|
837 intros |
|
838 rule_1: "... ==> (t_1_1, ..., t_1_n) : s z_1 ... z_m" |
|
839 ... |
|
840 |
|
841 For backward compatibility, there is a wrapper allowing inductive |
|
842 sets to be defined with the new package via |
|
843 |
|
844 inductive_set |
|
845 s :: "U_1 => ... => U_m => (T_1 * ... * T_n) set" |
|
846 for z_1 :: U_1 and ... and z_n :: U_m |
|
847 where |
|
848 rule_1: "... ==> (t_1_1, ..., t_1_n) : s z_1 ... z_m" |
|
849 | ... |
|
850 |
|
851 or |
|
852 |
|
853 inductive_set |
|
854 s :: "U_1 => ... => U_m => (T_1 * ... * T_n) set" |
|
855 and p :: "U_1 => ... => U_m => T_1 => ... => T_n => bool" |
|
856 for z_1 :: U_1 and ... and z_n :: U_m |
|
857 where |
|
858 "p z_1 ... z_m x_1 ... x_n == (x_1, ..., x_n) : s z_1 ... z_m" |
|
859 | rule_1: "... ==> p z_1 ... z_m t_1_1 ... t_1_n" |
|
860 | ... |
|
861 |
|
862 if the additional syntax "p ..." is required. |
|
863 |
|
864 Numerous examples can be found in the subdirectories src/HOL/Auth, |
|
865 src/HOL/Bali, src/HOL/Induct, and src/HOL/MicroJava. |
|
866 |
|
867 INCOMPATIBILITIES: |
|
868 |
|
869 - Since declaration and definition of inductive sets or predicates |
|
870 is no longer separated, abbreviations involving the newly |
|
871 introduced sets or predicates must be specified together with the |
|
872 introduction rules after the 'where' keyword (see above), rather |
|
873 than before the actual inductive definition. |
|
874 |
|
875 - The variables in induction and elimination rules are now |
|
876 quantified in the order of their occurrence in the introduction |
|
877 rules, rather than in alphabetical order. Since this may break |
|
878 some proofs, these proofs either have to be repaired, e.g. by |
|
879 reordering the variables a_i_1 ... a_i_{k_i} in Isar 'case' |
|
880 statements of the form |
|
881 |
|
882 case (rule_i a_i_1 ... a_i_{k_i}) |
|
883 |
|
884 or the old order of quantification has to be restored by explicitly adding |
|
885 meta-level quantifiers in the introduction rules, i.e. |
|
886 |
|
887 | rule_i: "!!a_i_1 ... a_i_{k_i}. ... ==> p z_1 ... z_m t_i_1 ... t_i_n" |
|
888 |
|
889 - The format of the elimination rules is now |
|
890 |
|
891 p z_1 ... z_m x_1 ... x_n ==> |
|
892 (!!a_1_1 ... a_1_{k_1}. x_1 = t_1_1 ==> ... ==> x_n = t_1_n ==> ... ==> P) |
|
893 ==> ... ==> P |
|
894 |
|
895 for predicates and |
|
896 |
|
897 (x_1, ..., x_n) : s z_1 ... z_m ==> |
|
898 (!!a_1_1 ... a_1_{k_1}. x_1 = t_1_1 ==> ... ==> x_n = t_1_n ==> ... ==> P) |
|
899 ==> ... ==> P |
|
900 |
|
901 for sets rather than |
|
902 |
|
903 x : s z_1 ... z_m ==> |
|
904 (!!a_1_1 ... a_1_{k_1}. x = (t_1_1, ..., t_1_n) ==> ... ==> P) |
|
905 ==> ... ==> P |
|
906 |
|
907 This may require terms in goals to be expanded to n-tuples |
|
908 (e.g. using case_tac or simplification with the split_paired_all |
|
909 rule) before the above elimination rule is applicable. |
|
910 |
|
911 - The elimination or case analysis rules for (mutually) inductive |
|
912 sets or predicates are now called "p_1.cases" ... "p_k.cases". The |
|
913 list of rules "p_1_..._p_k.elims" is no longer available. |
|
914 |
|
915 * Case-expressions allow arbitrary constructor-patterns (including |
|
916 "_") and take their order into account, like in functional |
|
917 programming. Internally, this is translated into nested |
|
918 case-expressions; missing cases are added and mapped to the predefined |
|
919 constant "undefined". In complicated cases printing may no longer show |
|
920 the original input but the internal form. Lambda-abstractions allow |
|
921 the same form of pattern matching: "% pat1 => e1 | ..." is an |
|
922 abbreviation for "%x. case x of pat1 => e1 | ..." where x is a new |
|
923 variable. |
|
924 |
|
925 * IntDef: The constant "int :: nat => int" has been removed; now "int" |
|
926 is an abbreviation for "of_nat :: nat => int". The simplification |
|
927 rules for "of_nat" have been changed to work like "int" did |
|
928 previously. Potential INCOMPATIBILITY: |
|
929 - "of_nat (Suc m)" simplifies to "1 + of_nat m" instead of "of_nat m + 1" |
|
930 - of_nat_diff and of_nat_mult are no longer default simp rules |
|
931 |
|
932 * Method "algebra" solves polynomial equations over (semi)rings using |
|
933 Groebner bases. The (semi)ring structure is defined by locales and the |
|
934 tool setup depends on that generic context. Installing the method for |
|
935 a specific type involves instantiating the locale and possibly adding |
|
936 declarations for computation on the coefficients. The method is |
|
937 already instantiated for natural numbers and for the axiomatic class |
|
938 of idoms with numerals. See also the paper by Chaieb and Wenzel at |
|
939 CALCULEMUS 2007 for the general principles underlying this |
|
940 architecture of context-aware proof-tools. |
|
941 |
|
942 * Method "ferrack" implements quantifier elimination over |
|
943 special-purpose dense linear orders using locales (analogous to |
|
944 "algebra"). The method is already installed for class |
|
945 {ordered_field,recpower,number_ring} which subsumes real, hyperreal, |
|
946 rat, etc. |
|
947 |
|
948 * Former constant "List.op @" now named "List.append". Use ML |
|
949 antiquotations @{const_name List.append} or @{term " ... @ ... "} to |
|
950 circumvent possible incompatibilities when working on ML level. |
|
951 |
|
952 * primrec: missing cases mapped to "undefined" instead of "arbitrary". |
|
953 |
|
954 * New function listsum :: 'a list => 'a for arbitrary monoids. |
|
955 Special syntax: "SUM x <- xs. f x" (and latex variants) |
|
956 |
|
957 * New syntax for Haskell-like list comprehension (input only), eg. |
|
958 [(x,y). x <- xs, y <- ys, x ~= y], see also src/HOL/List.thy. |
|
959 |
|
960 * The special syntax for function "filter" has changed from [x : |
|
961 xs. P] to [x <- xs. P] to avoid an ambiguity caused by list |
|
962 comprehension syntax, and for uniformity. INCOMPATIBILITY. |
|
963 |
|
964 * [a..b] is now defined for arbitrary linear orders. It used to be |
|
965 defined on nat only, as an abbreviation for [a..<Suc b] |
|
966 INCOMPATIBILITY. |
|
967 |
|
968 * Renamed lemma "set_take_whileD" to "set_takeWhileD". |
|
969 |
|
970 * New functions "sorted" and "sort" in src/HOL/List.thy. |
|
971 |
|
972 * New lemma collection field_simps (an extension of ring_simps) for |
|
973 manipulating (in)equations involving division. Multiplies with all |
|
974 denominators that can be proved to be non-zero (in equations) or |
|
975 positive/negative (in inequations). |
|
976 |
|
977 * Lemma collections ring_eq_simps, group_eq_simps and ring_distrib |
|
978 have been improved and renamed to ring_simps, group_simps and |
|
979 ring_distribs. Removed lemmas field_xyz in theory Ring_and_Field |
|
980 because they were subsumed by lemmas xyz. INCOMPATIBILITY. |
|
981 |
|
982 * Theory Library/Commutative_Ring: switched from recdef to function |
|
983 package; constants add, mul, pow now curried. Infix syntax for |
|
984 algebraic operations. |
952 |
985 |
953 * Dropped redundant lemma def_imp_eq in favor of meta_eq_to_obj_eq. |
986 * Dropped redundant lemma def_imp_eq in favor of meta_eq_to_obj_eq. |
954 INCOMPATIBILITY. |
987 INCOMPATIBILITY. |
955 |
988 |
956 * Dropped redundant lemma if_def2 in favor of if_bool_eq_conj. |
989 * Dropped redundant lemma if_def2 in favor of if_bool_eq_conj. |
957 INCOMPATIBILITY. |
990 INCOMPATIBILITY. |
958 |
|
959 * Added syntactic class "size"; overloaded constant "size" now has |
|
960 type "'a::size ==> bool" |
|
961 |
|
962 * Renamed constants "Divides.op div", "Divides.op mod" and "Divides.op |
|
963 dvd" to "Divides.div_class.div", "Divides.div_class.mod" and |
|
964 "Divides.dvd". INCOMPATIBILITY. |
|
965 |
991 |
966 * Method "lexicographic_order" automatically synthesizes termination |
992 * Method "lexicographic_order" automatically synthesizes termination |
967 relations as lexicographic combinations of size measures -- 'function' |
993 relations as lexicographic combinations of size measures -- 'function' |
968 package. |
994 package. |
969 |
995 |