diff -r c8a2755bf220 -r ff784d5a5bfb src/HOL/Nominal/Examples/Fsub.thy --- a/src/HOL/Nominal/Examples/Fsub.thy Sat Jan 05 17:00:43 2019 +0100 +++ b/src/HOL/Nominal/Examples/Fsub.thy Sat Jan 05 17:24:33 2019 +0100 @@ -49,7 +49,7 @@ text \To be polite to the eye, some more familiar notation is introduced. Because of the change in the order of arguments, one needs to use translation rules, instead of syntax annotations at the term-constructors - as given above for @{term "Arrow"}.\ + as given above for \<^term>\Arrow\.\ abbreviation Forall_syn :: "tyvrs \ ty \ ty \ ty" ("(3\_<:_./ _)" [0, 0, 10] 10) @@ -66,12 +66,12 @@ where "\X<:T. t \ trm.TAbs X t T" -text \Again there are numerous facts that are proved automatically for @{typ "ty"} - and @{typ "trm"}: for example that the set of free variables, i.e.~the \support\, +text \Again there are numerous facts that are proved automatically for \<^typ>\ty\ + and \<^typ>\trm\: for example that the set of free variables, i.e.~the \support\, is finite. However note that nominal-datatype declarations do \emph{not} define ``classical" constructor-based datatypes, but rather define $\alpha$-equivalence - classes---we can for example show that $\alpha$-equivalent @{typ "ty"}s - and @{typ "trm"}s are equal:\ + classes---we can for example show that $\alpha$-equivalent \<^typ>\ty\s + and \<^typ>\trm\s are equal:\ lemma alpha_illustration: shows "(\X<:T. Tvar X) = (\Y<:T. Tvar Y)" @@ -218,11 +218,11 @@ apply(auto simp add: fresh_prod fresh_list_cons tyvrs_fresh) done -text \Not all lists of type @{typ "env"} are well-formed. One condition - requires that in @{term "TVarB X S#\"} all free variables of @{term "S"} must be - in the @{term "ty_dom"} of @{term "\"}, that is @{term "S"} must be \closed\ - in @{term "\"}. The set of free variables of @{term "S"} is the - \support\ of @{term "S"}.\ +text \Not all lists of type \<^typ>\env\ are well-formed. One condition + requires that in \<^term>\TVarB X S#\\ all free variables of \<^term>\S\ must be + in the \<^term>\ty_dom\ of \<^term>\\\, that is \<^term>\S\ must be \closed\ + in \<^term>\\\. The set of free variables of \<^term>\S\ is the + \support\ of \<^term>\S\.\ definition "closed_in" :: "ty \ env \ bool" ("_ closed'_in _" [100,100] 100) where "S closed_in \ \ (supp S)\(ty_dom \)" @@ -594,7 +594,7 @@ text \The definition for the subtyping-relation follows quite closely what is written in the POPLmark-paper, except for the premises dealing with well-formed contexts and - the freshness constraint @{term "X\\"} in the \S_Forall\-rule. (The freshness + the freshness constraint \<^term>\X\\\ in the \S_Forall\-rule. (The freshness constraint is specific to the \emph{nominal approach}. Note, however, that the constraint does \emph{not} make the subtyping-relation ``partial"\ldots because we work over $\alpha$-equivalence classes.)\ @@ -846,28 +846,28 @@ \begin{quote} \begin{lemma}[Transitivity and Narrowing] \ \begin{enumerate} -\item If @{term "\ \ S<:Q"} and @{term "\ \ Q<:T"}, then @{term "\ \ S<:T"}. -\item If \\,X<:Q,\ \ M<:N\ and @{term "\ \ P<:Q"} then \\,X<:P,\ \ M<:N\. +\item If \<^term>\\ \ S<:Q\ and \<^term>\\ \ Q<:T\, then \<^term>\\ \ S<:T\. +\item If \\,X<:Q,\ \ M<:N\ and \<^term>\\ \ P<:Q\ then \\,X<:P,\ \ M<:N\. \end{enumerate} \end{lemma} The two parts are proved simultaneously, by induction on the size -of @{term "Q"}. The argument for part (2) assumes that part (1) has -been established already for the @{term "Q"} in question; part (1) uses -part (2) only for strictly smaller @{term "Q"}. +of \<^term>\Q\. The argument for part (2) assumes that part (1) has +been established already for the \<^term>\Q\ in question; part (1) uses +part (2) only for strictly smaller \<^term>\Q\. \end{quote} -For the induction on the size of @{term "Q"}, we use the induction-rule +For the induction on the size of \<^term>\Q\, we use the induction-rule \measure_induct_rule\: \begin{center} @{thm measure_induct_rule[of "size_ty",no_vars]} \end{center} -That means in order to show a property @{term "P a"} for all @{term "a"}, -the induct-rule requires to prove that for all @{term x} @{term "P x"} holds using the -assumption that for all @{term y} whose size is strictly smaller than -that of @{term x} the property @{term "P y"} holds.\ +That means in order to show a property \<^term>\P a\ for all \<^term>\a\, +the induct-rule requires to prove that for all \<^term>\x\ \<^term>\P x\ holds using the +assumption that for all \<^term>\y\ whose size is strictly smaller than +that of \<^term>\x\ the property \<^term>\P y\ holds.\ lemma shows subtype_transitivity: "\\S<:Q \ \\Q<:T \ \\S<:T"