equal
deleted
inserted
replaced
567 @{command_def "class"} & : & @{text "theory \<rightarrow> local_theory"} \\ |
567 @{command_def "class"} & : & @{text "theory \<rightarrow> local_theory"} \\ |
568 @{command_def "instantiation"} & : & @{text "theory \<rightarrow> local_theory"} \\ |
568 @{command_def "instantiation"} & : & @{text "theory \<rightarrow> local_theory"} \\ |
569 @{command_def "instance"} & : & @{text "local_theory \<rightarrow> local_theory"} \\ |
569 @{command_def "instance"} & : & @{text "local_theory \<rightarrow> local_theory"} \\ |
570 @{command_def "subclass"} & : & @{text "local_theory \<rightarrow> local_theory"} \\ |
570 @{command_def "subclass"} & : & @{text "local_theory \<rightarrow> local_theory"} \\ |
571 @{command_def "print_classes"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\ |
571 @{command_def "print_classes"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\ |
|
572 @{command_def "class_deps"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\ |
572 @{method_def intro_classes} & : & @{text method} \\ |
573 @{method_def intro_classes} & : & @{text method} \\ |
573 \end{matharray} |
574 \end{matharray} |
574 |
575 |
575 \begin{rail} |
576 \begin{rail} |
576 'class' name '=' ((superclassexpr '+' (contextelem+)) | superclassexpr | (contextelem+)) \\ |
577 'class' name '=' ((superclassexpr '+' (contextelem+)) | superclassexpr | (contextelem+)) \\ |
581 'instance' |
582 'instance' |
582 ; |
583 ; |
583 'subclass' target? nameref |
584 'subclass' target? nameref |
584 ; |
585 ; |
585 'print\_classes' |
586 'print\_classes' |
|
587 ; |
|
588 'class\_deps' |
586 ; |
589 ; |
587 |
590 |
588 superclassexpr: nameref | (nameref '+' superclassexpr) |
591 superclassexpr: nameref | (nameref '+' superclassexpr) |
589 ; |
592 ; |
590 \end{rail} |
593 \end{rail} |
634 @{text d} is proven to be subclass @{text c} and the locale @{text |
637 @{text d} is proven to be subclass @{text c} and the locale @{text |
635 c} is interpreted into @{text d} simultaneously. |
638 c} is interpreted into @{text d} simultaneously. |
636 |
639 |
637 \item @{command "print_classes"} prints all classes in the current |
640 \item @{command "print_classes"} prints all classes in the current |
638 theory. |
641 theory. |
|
642 |
|
643 \item @{command "class_deps"} visualizes all classes and their |
|
644 subclass relations as a Hasse diagram. |
639 |
645 |
640 \item @{method intro_classes} repeatedly expands all class |
646 \item @{method intro_classes} repeatedly expands all class |
641 introduction rules of this theory. Note that this method usually |
647 introduction rules of this theory. Note that this method usually |
642 needs not be named explicitly, as it is already included in the |
648 needs not be named explicitly, as it is already included in the |
643 default proof step (e.g.\ of @{command "proof"}). In particular, |
649 default proof step (e.g.\ of @{command "proof"}). In particular, |