src/HOL/Transitive_Closure.thy
author paulson
Wed Jan 24 17:10:50 2007 +0100 (2007-01-24)
changeset 22172 e7d6cb237b5e
parent 22080 7bf8868ab3e4
child 22262 96ba62dff413
permissions -rw-r--r--
some new lemmas
     1 (*  Title:      HOL/Transitive_Closure.thy
     2     ID:         $Id$
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     4     Copyright   1992  University of Cambridge
     5 *)
     6 
     7 header {* Reflexive and Transitive closure of a relation *}
     8 
     9 theory Transitive_Closure
    10 imports Inductive
    11 uses "~~/src/Provers/trancl.ML"
    12 begin
    13 
    14 text {*
    15   @{text rtrancl} is reflexive/transitive closure,
    16   @{text trancl} is transitive closure,
    17   @{text reflcl} is reflexive closure.
    18 
    19   These postfix operators have \emph{maximum priority}, forcing their
    20   operands to be atomic.
    21 *}
    22 
    23 consts
    24   rtrancl :: "('a \<times> 'a) set => ('a \<times> 'a) set"    ("(_^*)" [1000] 999)
    25 
    26 inductive "r^*"
    27   intros
    28     rtrancl_refl [intro!, Pure.intro!, simp]: "(a, a) : r^*"
    29     rtrancl_into_rtrancl [Pure.intro]: "(a, b) : r^* ==> (b, c) : r ==> (a, c) : r^*"
    30 
    31 consts
    32   trancl :: "('a \<times> 'a) set => ('a \<times> 'a) set"    ("(_^+)" [1000] 999)
    33 
    34 inductive "r^+"
    35   intros
    36     r_into_trancl [intro, Pure.intro]: "(a, b) : r ==> (a, b) : r^+"
    37     trancl_into_trancl [Pure.intro]: "(a, b) : r^+ ==> (b, c) : r ==> (a,c) : r^+"
    38 
    39 abbreviation
    40   reflcl :: "('a \<times> 'a) set => ('a \<times> 'a) set"  ("(_^=)" [1000] 999) where
    41   "r^= == r \<union> Id"
    42 
    43 notation (xsymbols)
    44   rtrancl  ("(_\<^sup>*)" [1000] 999) and
    45   trancl  ("(_\<^sup>+)" [1000] 999) and
    46   reflcl  ("(_\<^sup>=)" [1000] 999)
    47 
    48 notation (HTML output)
    49   rtrancl  ("(_\<^sup>*)" [1000] 999) and
    50   trancl  ("(_\<^sup>+)" [1000] 999) and
    51   reflcl  ("(_\<^sup>=)" [1000] 999)
    52 
    53 
    54 subsection {* Reflexive-transitive closure *}
    55 
    56 lemma r_into_rtrancl [intro]: "!!p. p \<in> r ==> p \<in> r^*"
    57   -- {* @{text rtrancl} of @{text r} contains @{text r} *}
    58   apply (simp only: split_tupled_all)
    59   apply (erule rtrancl_refl [THEN rtrancl_into_rtrancl])
    60   done
    61 
    62 lemma rtrancl_mono: "r \<subseteq> s ==> r^* \<subseteq> s^*"
    63   -- {* monotonicity of @{text rtrancl} *}
    64   apply (rule subsetI)
    65   apply (simp only: split_tupled_all)
    66   apply (erule rtrancl.induct)
    67    apply (rule_tac [2] rtrancl_into_rtrancl, blast+)
    68   done
    69 
    70 theorem rtrancl_induct [consumes 1, induct set: rtrancl]:
    71   assumes a: "(a, b) : r^*"
    72     and cases: "P a" "!!y z. [| (a, y) : r^*; (y, z) : r; P y |] ==> P z"
    73   shows "P b"
    74 proof -
    75   from a have "a = a --> P b"
    76     by (induct "%x y. x = a --> P y" a b) (iprover intro: cases)+
    77   thus ?thesis by iprover
    78 qed
    79 
    80 lemmas rtrancl_induct2 =
    81   rtrancl_induct[of "(ax,ay)" "(bx,by)", split_format (complete),
    82                  consumes 1, case_names refl step]
    83 
    84 lemma reflexive_rtrancl: "reflexive (r^*)"
    85   by (unfold refl_def) fast
    86 
    87 lemma trans_rtrancl: "trans(r^*)"
    88   -- {* transitivity of transitive closure!! -- by induction *}
    89 proof (rule transI)
    90   fix x y z
    91   assume "(x, y) \<in> r\<^sup>*"
    92   assume "(y, z) \<in> r\<^sup>*"
    93   thus "(x, z) \<in> r\<^sup>*" by induct (iprover!)+
    94 qed
    95 
    96 lemmas rtrancl_trans = trans_rtrancl [THEN transD, standard]
    97 
    98 lemma rtranclE:
    99   assumes major: "(a::'a,b) : r^*"
   100     and cases: "(a = b) ==> P"
   101       "!!y. [| (a,y) : r^*; (y,b) : r |] ==> P"
   102   shows P
   103   -- {* elimination of @{text rtrancl} -- by induction on a special formula *}
   104   apply (subgoal_tac "(a::'a) = b | (EX y. (a,y) : r^* & (y,b) : r)")
   105    apply (rule_tac [2] major [THEN rtrancl_induct])
   106     prefer 2 apply blast
   107    prefer 2 apply blast
   108   apply (erule asm_rl exE disjE conjE cases)+
   109   done
   110 
   111 lemma rtrancl_Int_subset: "[| Id \<subseteq> s; r O (r^* \<inter> s) \<subseteq> s|] ==> r^* \<subseteq> s"
   112   apply (rule subsetI)
   113   apply (rule_tac p="x" in PairE, clarify)
   114   apply (erule rtrancl_induct, auto) 
   115   done
   116 
   117 lemma converse_rtrancl_into_rtrancl:
   118   "(a, b) \<in> r \<Longrightarrow> (b, c) \<in> r\<^sup>* \<Longrightarrow> (a, c) \<in> r\<^sup>*"
   119   by (rule rtrancl_trans) iprover+
   120 
   121 text {*
   122   \medskip More @{term "r^*"} equations and inclusions.
   123 *}
   124 
   125 lemma rtrancl_idemp [simp]: "(r^*)^* = r^*"
   126   apply auto
   127   apply (erule rtrancl_induct)
   128    apply (rule rtrancl_refl)
   129   apply (blast intro: rtrancl_trans)
   130   done
   131 
   132 lemma rtrancl_idemp_self_comp [simp]: "R^* O R^* = R^*"
   133   apply (rule set_ext)
   134   apply (simp only: split_tupled_all)
   135   apply (blast intro: rtrancl_trans)
   136   done
   137 
   138 lemma rtrancl_subset_rtrancl: "r \<subseteq> s^* ==> r^* \<subseteq> s^*"
   139 by (drule rtrancl_mono, simp)
   140 
   141 lemma rtrancl_subset: "R \<subseteq> S ==> S \<subseteq> R^* ==> S^* = R^*"
   142   apply (drule rtrancl_mono)
   143   apply (drule rtrancl_mono, simp)
   144   done
   145 
   146 lemma rtrancl_Un_rtrancl: "(R^* \<union> S^*)^* = (R \<union> S)^*"
   147   by (blast intro!: rtrancl_subset intro: r_into_rtrancl rtrancl_mono [THEN subsetD])
   148 
   149 lemma rtrancl_reflcl [simp]: "(R^=)^* = R^*"
   150   by (blast intro!: rtrancl_subset intro: r_into_rtrancl)
   151 
   152 lemma rtrancl_r_diff_Id: "(r - Id)^* = r^*"
   153   apply (rule sym)
   154   apply (rule rtrancl_subset, blast, clarify)
   155   apply (rename_tac a b)
   156   apply (case_tac "a = b", blast)
   157   apply (blast intro!: r_into_rtrancl)
   158   done
   159 
   160 theorem rtrancl_converseD:
   161   assumes r: "(x, y) \<in> (r^-1)^*"
   162   shows "(y, x) \<in> r^*"
   163 proof -
   164   from r show ?thesis
   165     by induct (iprover intro: rtrancl_trans dest!: converseD)+
   166 qed
   167 
   168 theorem rtrancl_converseI:
   169   assumes r: "(y, x) \<in> r^*"
   170   shows "(x, y) \<in> (r^-1)^*"
   171 proof -
   172   from r show ?thesis
   173     by induct (iprover intro: rtrancl_trans converseI)+
   174 qed
   175 
   176 lemma rtrancl_converse: "(r^-1)^* = (r^*)^-1"
   177   by (fast dest!: rtrancl_converseD intro!: rtrancl_converseI)
   178 
   179 lemma sym_rtrancl: "sym r ==> sym (r^*)"
   180   by (simp only: sym_conv_converse_eq rtrancl_converse [symmetric])
   181 
   182 theorem converse_rtrancl_induct[consumes 1]:
   183   assumes major: "(a, b) : r^*"
   184     and cases: "P b" "!!y z. [| (y, z) : r; (z, b) : r^*; P z |] ==> P y"
   185   shows "P a"
   186 proof -
   187   from rtrancl_converseI [OF major]
   188   show ?thesis
   189     by induct (iprover intro: cases dest!: converseD rtrancl_converseD)+
   190 qed
   191 
   192 lemmas converse_rtrancl_induct2 =
   193   converse_rtrancl_induct[of "(ax,ay)" "(bx,by)", split_format (complete),
   194                  consumes 1, case_names refl step]
   195 
   196 lemma converse_rtranclE:
   197   assumes major: "(x,z):r^*"
   198     and cases: "x=z ==> P"
   199       "!!y. [| (x,y):r; (y,z):r^* |] ==> P"
   200   shows P
   201   apply (subgoal_tac "x = z | (EX y. (x,y) : r & (y,z) : r^*)")
   202    apply (rule_tac [2] major [THEN converse_rtrancl_induct])
   203     prefer 2 apply iprover
   204    prefer 2 apply iprover
   205   apply (erule asm_rl exE disjE conjE cases)+
   206   done
   207 
   208 ML_setup {*
   209   bind_thm ("converse_rtranclE2", split_rule
   210     (read_instantiate [("x","(xa,xb)"), ("z","(za,zb)")] (thm "converse_rtranclE")));
   211 *}
   212 
   213 lemma r_comp_rtrancl_eq: "r O r^* = r^* O r"
   214   by (blast elim: rtranclE converse_rtranclE
   215     intro: rtrancl_into_rtrancl converse_rtrancl_into_rtrancl)
   216 
   217 lemma rtrancl_unfold: "r^* = Id Un r O r^*"
   218   by (auto intro: rtrancl_into_rtrancl elim: rtranclE)
   219 
   220 
   221 subsection {* Transitive closure *}
   222 
   223 lemma trancl_mono: "!!p. p \<in> r^+ ==> r \<subseteq> s ==> p \<in> s^+"
   224   apply (simp only: split_tupled_all)
   225   apply (erule trancl.induct)
   226   apply (iprover dest: subsetD)+
   227   done
   228 
   229 lemma r_into_trancl': "!!p. p : r ==> p : r^+"
   230   by (simp only: split_tupled_all) (erule r_into_trancl)
   231 
   232 text {*
   233   \medskip Conversions between @{text trancl} and @{text rtrancl}.
   234 *}
   235 
   236 lemma trancl_into_rtrancl: "(a, b) \<in> r^+ ==> (a, b) \<in> r^*"
   237   by (erule trancl.induct) iprover+
   238 
   239 lemma rtrancl_into_trancl1: assumes r: "(a, b) \<in> r^*"
   240   shows "!!c. (b, c) \<in> r ==> (a, c) \<in> r^+" using r
   241   by induct iprover+
   242 
   243 lemma rtrancl_into_trancl2: "[| (a,b) : r;  (b,c) : r^* |]   ==>  (a,c) : r^+"
   244   -- {* intro rule from @{text r} and @{text rtrancl} *}
   245   apply (erule rtranclE, iprover)
   246   apply (rule rtrancl_trans [THEN rtrancl_into_trancl1])
   247    apply (assumption | rule r_into_rtrancl)+
   248   done
   249 
   250 lemma trancl_induct [consumes 1, induct set: trancl]:
   251   assumes a: "(a,b) : r^+"
   252   and cases: "!!y. (a, y) : r ==> P y"
   253     "!!y z. (a,y) : r^+ ==> (y, z) : r ==> P y ==> P z"
   254   shows "P b"
   255   -- {* Nice induction rule for @{text trancl} *}
   256 proof -
   257   from a have "a = a --> P b"
   258     by (induct "%x y. x = a --> P y" a b) (iprover intro: cases)+
   259   thus ?thesis by iprover
   260 qed
   261 
   262 lemmas trancl_induct2 =
   263   trancl_induct[of "(ax,ay)" "(bx,by)", split_format (complete),
   264                  consumes 1, case_names base step]
   265 
   266 lemma trancl_trans_induct:
   267   assumes major: "(x,y) : r^+"
   268     and cases: "!!x y. (x,y) : r ==> P x y"
   269       "!!x y z. [| (x,y) : r^+; P x y; (y,z) : r^+; P y z |] ==> P x z"
   270   shows "P x y"
   271   -- {* Another induction rule for trancl, incorporating transitivity *}
   272   by (iprover intro: r_into_trancl major [THEN trancl_induct] cases)
   273 
   274 inductive_cases tranclE: "(a, b) : r^+"
   275 
   276 lemma trancl_Int_subset: "[| r \<subseteq> s; r O (r^+ \<inter> s) \<subseteq> s|] ==> r^+ \<subseteq> s"
   277   apply (rule subsetI)
   278   apply (rule_tac p="x" in PairE, clarify)
   279   apply (erule trancl_induct, auto) 
   280   done
   281 
   282 lemma trancl_unfold: "r^+ = r Un r O r^+"
   283   by (auto intro: trancl_into_trancl elim: tranclE)
   284 
   285 lemma trans_trancl[simp]: "trans(r^+)"
   286   -- {* Transitivity of @{term "r^+"} *}
   287 proof (rule transI)
   288   fix x y z
   289   assume xy: "(x, y) \<in> r^+"
   290   assume "(y, z) \<in> r^+"
   291   thus "(x, z) \<in> r^+" by induct (insert xy, iprover)+
   292 qed
   293 
   294 lemmas trancl_trans = trans_trancl [THEN transD, standard]
   295 
   296 lemma trancl_id[simp]: "trans r \<Longrightarrow> r^+ = r"
   297 apply(auto)
   298 apply(erule trancl_induct)
   299 apply assumption
   300 apply(unfold trans_def)
   301 apply(blast)
   302 done
   303 
   304 lemma rtrancl_trancl_trancl: assumes r: "(x, y) \<in> r^*"
   305   shows "!!z. (y, z) \<in> r^+ ==> (x, z) \<in> r^+" using r
   306   by induct (iprover intro: trancl_trans)+
   307 
   308 lemma trancl_into_trancl2: "(a, b) \<in> r ==> (b, c) \<in> r^+ ==> (a, c) \<in> r^+"
   309   by (erule transD [OF trans_trancl r_into_trancl])
   310 
   311 lemma trancl_insert:
   312   "(insert (y, x) r)^+ = r^+ \<union> {(a, b). (a, y) \<in> r^* \<and> (x, b) \<in> r^*}"
   313   -- {* primitive recursion for @{text trancl} over finite relations *}
   314   apply (rule equalityI)
   315    apply (rule subsetI)
   316    apply (simp only: split_tupled_all)
   317    apply (erule trancl_induct, blast)
   318    apply (blast intro: rtrancl_into_trancl1 trancl_into_rtrancl r_into_trancl trancl_trans)
   319   apply (rule subsetI)
   320   apply (blast intro: trancl_mono rtrancl_mono
   321     [THEN [2] rev_subsetD] rtrancl_trancl_trancl rtrancl_into_trancl2)
   322   done
   323 
   324 lemma trancl_converseI: "(x, y) \<in> (r^+)^-1 ==> (x, y) \<in> (r^-1)^+"
   325   apply (drule converseD)
   326   apply (erule trancl.induct)
   327   apply (iprover intro: converseI trancl_trans)+
   328   done
   329 
   330 lemma trancl_converseD: "(x, y) \<in> (r^-1)^+ ==> (x, y) \<in> (r^+)^-1"
   331   apply (rule converseI)
   332   apply (erule trancl.induct)
   333   apply (iprover dest: converseD intro: trancl_trans)+
   334   done
   335 
   336 lemma trancl_converse: "(r^-1)^+ = (r^+)^-1"
   337   by (fastsimp simp add: split_tupled_all
   338     intro!: trancl_converseI trancl_converseD)
   339 
   340 lemma sym_trancl: "sym r ==> sym (r^+)"
   341   by (simp only: sym_conv_converse_eq trancl_converse [symmetric])
   342 
   343 lemma converse_trancl_induct:
   344   assumes major: "(a,b) : r^+"
   345     and cases: "!!y. (y,b) : r ==> P(y)"
   346       "!!y z.[| (y,z) : r;  (z,b) : r^+;  P(z) |] ==> P(y)"
   347   shows "P a"
   348   apply (rule major [THEN converseI, THEN trancl_converseI [THEN trancl_induct]])
   349    apply (rule cases)
   350    apply (erule converseD)
   351   apply (blast intro: prems dest!: trancl_converseD)
   352   done
   353 
   354 lemma tranclD: "(x, y) \<in> R^+ ==> EX z. (x, z) \<in> R \<and> (z, y) \<in> R^*"
   355   apply (erule converse_trancl_induct, auto)
   356   apply (blast intro: rtrancl_trans)
   357   done
   358 
   359 lemma irrefl_tranclI: "r^-1 \<inter> r^* = {} ==> (x, x) \<notin> r^+"
   360   by (blast elim: tranclE dest: trancl_into_rtrancl)
   361 
   362 lemma irrefl_trancl_rD: "!!X. ALL x. (x, x) \<notin> r^+ ==> (x, y) \<in> r ==> x \<noteq> y"
   363   by (blast dest: r_into_trancl)
   364 
   365 lemma trancl_subset_Sigma_aux:
   366     "(a, b) \<in> r^* ==> r \<subseteq> A \<times> A ==> a = b \<or> a \<in> A"
   367   by (induct rule: rtrancl_induct) auto
   368 
   369 lemma trancl_subset_Sigma: "r \<subseteq> A \<times> A ==> r^+ \<subseteq> A \<times> A"
   370   apply (rule subsetI)
   371   apply (simp only: split_tupled_all)
   372   apply (erule tranclE)
   373   apply (blast dest!: trancl_into_rtrancl trancl_subset_Sigma_aux)+
   374   done
   375 
   376 lemma reflcl_trancl [simp]: "(r^+)^= = r^*"
   377   apply safe
   378    apply (erule trancl_into_rtrancl)
   379   apply (blast elim: rtranclE dest: rtrancl_into_trancl1)
   380   done
   381 
   382 lemma trancl_reflcl [simp]: "(r^=)^+ = r^*"
   383   apply safe
   384    apply (drule trancl_into_rtrancl, simp)
   385   apply (erule rtranclE, safe)
   386    apply (rule r_into_trancl, simp)
   387   apply (rule rtrancl_into_trancl1)
   388    apply (erule rtrancl_reflcl [THEN equalityD2, THEN subsetD], fast)
   389   done
   390 
   391 lemma trancl_empty [simp]: "{}^+ = {}"
   392   by (auto elim: trancl_induct)
   393 
   394 lemma rtrancl_empty [simp]: "{}^* = Id"
   395   by (rule subst [OF reflcl_trancl]) simp
   396 
   397 lemma rtranclD: "(a, b) \<in> R^* ==> a = b \<or> a \<noteq> b \<and> (a, b) \<in> R^+"
   398   by (force simp add: reflcl_trancl [symmetric] simp del: reflcl_trancl)
   399 
   400 lemma rtrancl_eq_or_trancl:
   401   "(x,y) \<in> R\<^sup>* = (x=y \<or> x\<noteq>y \<and> (x,y) \<in> R\<^sup>+)"
   402   by (fast elim: trancl_into_rtrancl dest: rtranclD)
   403 
   404 text {* @{text Domain} and @{text Range} *}
   405 
   406 lemma Domain_rtrancl [simp]: "Domain (R^*) = UNIV"
   407   by blast
   408 
   409 lemma Range_rtrancl [simp]: "Range (R^*) = UNIV"
   410   by blast
   411 
   412 lemma rtrancl_Un_subset: "(R^* \<union> S^*) \<subseteq> (R Un S)^*"
   413   by (rule rtrancl_Un_rtrancl [THEN subst]) fast
   414 
   415 lemma in_rtrancl_UnI: "x \<in> R^* \<or> x \<in> S^* ==> x \<in> (R \<union> S)^*"
   416   by (blast intro: subsetD [OF rtrancl_Un_subset])
   417 
   418 lemma trancl_domain [simp]: "Domain (r^+) = Domain r"
   419   by (unfold Domain_def) (blast dest: tranclD)
   420 
   421 lemma trancl_range [simp]: "Range (r^+) = Range r"
   422   by (simp add: Range_def trancl_converse [symmetric])
   423 
   424 lemma Not_Domain_rtrancl:
   425     "x ~: Domain R ==> ((x, y) : R^*) = (x = y)"
   426   apply auto
   427   by (erule rev_mp, erule rtrancl_induct, auto)
   428 
   429 
   430 text {* More about converse @{text rtrancl} and @{text trancl}, should
   431   be merged with main body. *}
   432 
   433 lemma single_valued_confluent:
   434   "\<lbrakk> single_valued r; (x,y) \<in> r^*; (x,z) \<in> r^* \<rbrakk>
   435   \<Longrightarrow> (y,z) \<in> r^* \<or> (z,y) \<in> r^*"
   436 apply(erule rtrancl_induct)
   437  apply simp
   438 apply(erule disjE)
   439  apply(blast elim:converse_rtranclE dest:single_valuedD)
   440 apply(blast intro:rtrancl_trans)
   441 done
   442 
   443 lemma r_r_into_trancl: "(a, b) \<in> R ==> (b, c) \<in> R ==> (a, c) \<in> R^+"
   444   by (fast intro: trancl_trans)
   445 
   446 lemma trancl_into_trancl [rule_format]:
   447     "(a, b) \<in> r\<^sup>+ ==> (b, c) \<in> r --> (a,c) \<in> r\<^sup>+"
   448   apply (erule trancl_induct)
   449    apply (fast intro: r_r_into_trancl)
   450   apply (fast intro: r_r_into_trancl trancl_trans)
   451   done
   452 
   453 lemma trancl_rtrancl_trancl:
   454     "(a, b) \<in> r\<^sup>+ ==> (b, c) \<in> r\<^sup>* ==> (a, c) \<in> r\<^sup>+"
   455   apply (drule tranclD)
   456   apply (erule exE, erule conjE)
   457   apply (drule rtrancl_trans, assumption)
   458   apply (drule rtrancl_into_trancl2, assumption, assumption)
   459   done
   460 
   461 lemmas transitive_closure_trans [trans] =
   462   r_r_into_trancl trancl_trans rtrancl_trans
   463   trancl_into_trancl trancl_into_trancl2
   464   rtrancl_into_rtrancl converse_rtrancl_into_rtrancl
   465   rtrancl_trancl_trancl trancl_rtrancl_trancl
   466 
   467 declare trancl_into_rtrancl [elim]
   468 
   469 declare rtranclE [cases set: rtrancl]
   470 declare tranclE [cases set: trancl]
   471 
   472 
   473 
   474 
   475 
   476 subsection {* Setup of transitivity reasoner *}
   477 
   478 ML_setup {*
   479 
   480 structure Trancl_Tac = Trancl_Tac_Fun (
   481   struct
   482     val r_into_trancl = thm "r_into_trancl";
   483     val trancl_trans  = thm "trancl_trans";
   484     val rtrancl_refl = thm "rtrancl_refl";
   485     val r_into_rtrancl = thm "r_into_rtrancl";
   486     val trancl_into_rtrancl = thm "trancl_into_rtrancl";
   487     val rtrancl_trancl_trancl = thm "rtrancl_trancl_trancl";
   488     val trancl_rtrancl_trancl = thm "trancl_rtrancl_trancl";
   489     val rtrancl_trans = thm "rtrancl_trans";
   490 
   491   fun decomp (Trueprop $ t) =
   492     let fun dec (Const ("op :", _) $ (Const ("Pair", _) $ a $ b) $ rel ) =
   493         let fun decr (Const ("Transitive_Closure.rtrancl", _ ) $ r) = (r,"r*")
   494               | decr (Const ("Transitive_Closure.trancl", _ ) $ r)  = (r,"r+")
   495               | decr r = (r,"r");
   496             val (rel,r) = decr rel;
   497         in SOME (a,b,rel,r) end
   498       | dec _ =  NONE
   499     in dec t end;
   500 
   501   end);
   502 
   503 change_simpset (fn ss => ss
   504   addSolver (mk_solver "Trancl" (fn _ => Trancl_Tac.trancl_tac))
   505   addSolver (mk_solver "Rtrancl" (fn _ => Trancl_Tac.rtrancl_tac)));
   506 
   507 *}
   508 
   509 (* Optional methods *)
   510 
   511 method_setup trancl =
   512   {* Method.no_args (Method.SIMPLE_METHOD' Trancl_Tac.trancl_tac) *}
   513   {* simple transitivity reasoner *}
   514 method_setup rtrancl =
   515   {* Method.no_args (Method.SIMPLE_METHOD' Trancl_Tac.rtrancl_tac) *}
   516   {* simple transitivity reasoner *}
   517 
   518 end