# HG changeset patch # User berghofe # Date 1226855925 -3600 # Node ID 413695e07bd4fab1d9e22d02ff05e3e6f99b9709 # Parent aa36d05926ec9223ca1a1442dfe9524f0ba5802c Frees in PThms are now quantified in the order of their appearance in the proposition as well, to make it compatible (again) with variable order used by forall_intr_frees. diff -r aa36d05926ec -r 413695e07bd4 src/Pure/Proof/extraction.ML --- a/src/Pure/Proof/extraction.ML Sat Nov 15 21:31:37 2008 +0100 +++ b/src/Pure/Proof/extraction.ML Sun Nov 16 18:18:45 2008 +0100 @@ -125,8 +125,9 @@ fun msg d s = priority (Symbol.spaces d ^ s); -fun vars_of t = rev (fold_aterms (fn v as Var _ => insert (op =) v | _ => I) t []); -fun vfs_of t = vars_of t @ sort Term.term_ord (term_frees t); +fun vars_of t = map Var (rev (Term.add_vars t [])); +fun frees_of t = map Free (rev (Term.add_frees t [])); +fun vfs_of t = vars_of t @ frees_of t; fun forall_intr_prf (t, prf) = let val (a, T) = (case t of Var ((a, _), T) => (a, T) | Free p => p) diff -r aa36d05926ec -r 413695e07bd4 src/Pure/proofterm.ML --- a/src/Pure/proofterm.ML Sat Nov 15 21:31:37 2008 +0100 +++ b/src/Pure/proofterm.ML Sun Nov 16 18:18:45 2008 +0100 @@ -837,7 +837,8 @@ val proofs = ref 2; -fun vars_of t = rev (fold_aterms (fn v as Var _ => insert (op =) v | _ => I) t []); +fun vars_of t = map Var (rev (Term.add_vars t [])); +fun frees_of t = map Free (rev (Term.add_frees t [])); fun test_args _ [] = true | test_args is (Bound i :: ts) = @@ -895,7 +896,7 @@ val nvs = needed_vars prop; val args = map (fn (v as Var (ixn, _)) => if member (op =) nvs ixn then SOME v else NONE) (vars_of prop) @ - map SOME (sort Term.term_ord (term_frees prop)); + map SOME (frees_of prop); in proof_combt' (c (name, prop, NONE), args) end; @@ -1218,7 +1219,7 @@ val nvs = needed_vars prop; val args = map (fn (v as Var (ixn, _)) => if member (op =) nvs ixn then SOME v else NONE) (vars_of prop) @ - map SOME (sort Term.term_ord (term_frees prop)); + map SOME (frees_of prop); val proof0 = if ! proofs = 2 then