498 Spec_Rules.retrieve ctxt (Const x) |
498 Spec_Rules.retrieve ctxt (Const x) |
499 |> sort (Spec_Rules.rough_classification_ord o apply2 #rough_classification); |
499 |> sort (Spec_Rules.rough_classification_ord o apply2 #rough_classification); |
500 |
500 |
501 val specs = |
501 val specs = |
502 if s = \<^const_name>\<open>The\<close> then |
502 if s = \<^const_name>\<open>The\<close> then |
503 [{name = "", rough_classification = Spec_Rules.Unknown, |
503 [{pos = Position.none, name = "", rough_classification = Spec_Rules.Unknown, |
504 terms = [Logic.varify_global \<^term>\<open>The\<close>], |
504 terms = [Logic.varify_global \<^term>\<open>The\<close>], |
505 rules = [@{thm theI_unique}]}] |
505 rules = [@{thm theI_unique}]}] |
506 else if s = \<^const_name>\<open>finite\<close> then |
506 else if s = \<^const_name>\<open>finite\<close> then |
507 let val card = card_of_type ctxt T in |
507 let val card = card_of_type ctxt T in |
508 if card = Inf orelse card = Fin_or_Inf then |
508 if card = Inf orelse card = Fin_or_Inf then |
509 spec_rules () |
509 spec_rules () |
510 else |
510 else |
511 [{name = "", rough_classification = Spec_Rules.equational, |
511 [{pos = Position.none, name = "", rough_classification = Spec_Rules.equational, |
512 terms = [Logic.varify_global \<^term>\<open>finite\<close>], |
512 terms = [Logic.varify_global \<^term>\<open>finite\<close>], |
513 rules = [Skip_Proof.make_thm thy (Logic.varify_global \<^prop>\<open>finite A = True\<close>)]}] |
513 rules = [Skip_Proof.make_thm thy (Logic.varify_global \<^prop>\<open>finite A = True\<close>)]}] |
514 end |
514 end |
515 else |
515 else |
516 spec_rules (); |
516 spec_rules (); |