# HG changeset patch # User wenzelm # Date 1286829757 -3600 # Node ID c7f3efe59e4e1aec67401a03725035ff4d2c6d91 # Parent 3eb0694e6fcb8a250937a6ccff5cedc5cdc9e655 more examples; diff -r 3eb0694e6fcb -r c7f3efe59e4e doc-src/IsarImplementation/Thy/Proof.thy --- a/doc-src/IsarImplementation/Thy/Proof.thy Mon Oct 11 21:10:50 2010 +0100 +++ b/doc-src/IsarImplementation/Thy/Proof.thy Mon Oct 11 21:42:37 2010 +0100 @@ -52,11 +52,25 @@ operation of exporting results from a context: a type variable @{text "\"} is considered fixed as long as it occurs in some fixed term variable of the context. For example, exporting @{text "x: - term, \: type \ x\<^isub>\ = x\<^isub>\"} produces in the first step - @{text "x: term \ x\<^isub>\ = x\<^isub>\"} for fixed @{text "\"}, - and only in the second step @{text "\ ?x\<^isub>?\<^isub>\ = - ?x\<^isub>?\<^isub>\"} for schematic @{text "?x"} and @{text "?\"}. + term, \: type \ x\<^isub>\ \ x\<^isub>\"} produces in the first step @{text "x: term + \ x\<^isub>\ \ x\<^isub>\"} for fixed @{text "\"}, and only in the second step + @{text "\ ?x\<^isub>?\<^isub>\ \ ?x\<^isub>?\<^isub>\"} for schematic @{text "?x"} and @{text "?\"}. + The following Isar source text illustrates this scenario. +*} +example_proof + { + fix x -- {* all potential occurrences of some @{text "x::\"} are fixed *} + { + have "x::'a \ x" -- {* implicit type assigment by concrete occurrence *} + by (rule reflexive) + } + thm this -- {* result still with fixed type @{text "'a"} *} + } + thm this -- {* fully general result for arbitrary @{text "?x::?'a"} *} +qed + +text {* \medskip The Isabelle/Isar proof context manages the gory details of term vs.\ type variables, with high-level principles for moving the frontier between fixed and schematic variables.