110 val triv_goal: thm |
110 val triv_goal: thm |
111 val rev_triv_goal: thm |
111 val rev_triv_goal: thm |
112 val implies_intr_goals: cterm list -> thm -> thm |
112 val implies_intr_goals: cterm list -> thm -> thm |
113 val freeze_all: thm -> thm |
113 val freeze_all: thm -> thm |
114 val mk_triv_goal: cterm -> thm |
114 val mk_triv_goal: cterm -> thm |
115 val add_tvarsT: (indexname * sort) list * typ -> (indexname * sort) list |
|
116 val add_tvars: (indexname * sort) list * term -> (indexname * sort) list |
|
117 val add_vars: (indexname * typ) list * term -> (indexname * typ) list |
|
118 val add_frees: (string * typ) list * term -> (string * typ) list |
|
119 val tvars_of_terms: term list -> (indexname * sort) list |
115 val tvars_of_terms: term list -> (indexname * sort) list |
120 val vars_of_terms: term list -> (indexname * typ) list |
116 val vars_of_terms: term list -> (indexname * typ) list |
121 val tvars_of: thm -> (indexname * sort) list |
117 val tvars_of: thm -> (indexname * sort) list |
122 val vars_of: thm -> (indexname * typ) list |
118 val vars_of: thm -> (indexname * typ) list |
123 val unvarifyT: thm -> thm |
119 val unvarifyT: thm -> thm |
124 val unvarify: thm -> thm |
120 val unvarify: thm -> thm |
125 val tvars_intr_list: string list -> thm -> thm |
121 val tvars_intr_list: string list -> thm -> thm * (string * indexname) list |
126 val remdups_rl: thm |
122 val remdups_rl: thm |
127 val conj_intr: thm -> thm -> thm |
123 val conj_intr: thm -> thm -> thm |
128 val conj_intr_list: thm list -> thm |
124 val conj_intr_list: thm list -> thm |
129 val conj_elim: thm -> thm * thm |
125 val conj_elim: thm -> thm * thm |
130 val conj_elim_list: thm -> thm list |
126 val conj_elim_list: thm -> thm list |
792 |
788 |
793 (*shorthand for instantiating just one variable in the current theory*) |
789 (*shorthand for instantiating just one variable in the current theory*) |
794 fun inst x t = read_instantiate_sg (sign_of (the_context())) [(x,t)]; |
790 fun inst x t = read_instantiate_sg (sign_of (the_context())) [(x,t)]; |
795 |
791 |
796 |
792 |
797 (* collect vars *) |
793 (* collect vars in left-to-right order *) |
798 |
794 |
799 val add_tvarsT = foldl_atyps (fn (vs, TVar v) => v ins vs | (vs, _) => vs); |
795 fun tvars_of_terms ts = rev (foldl Term.add_tvars ([], ts)); |
800 val add_tvars = foldl_types add_tvarsT; |
796 fun vars_of_terms ts = rev (foldl Term.add_vars ([], ts)); |
801 val add_vars = foldl_aterms (fn (vs, Var v) => v ins vs | (vs, _) => vs); |
|
802 val add_frees = foldl_aterms (fn (vs, Free v) => v ins vs | (vs, _) => vs); |
|
803 |
|
804 fun tvars_of_terms ts = rev (foldl add_tvars ([], ts)); |
|
805 fun vars_of_terms ts = rev (foldl add_vars ([], ts)); |
|
806 |
797 |
807 fun tvars_of thm = tvars_of_terms [#prop (Thm.rep_thm thm)]; |
798 fun tvars_of thm = tvars_of_terms [#prop (Thm.rep_thm thm)]; |
808 fun vars_of thm = vars_of_terms [#prop (Thm.rep_thm thm)]; |
799 fun vars_of thm = vars_of_terms [#prop (Thm.rep_thm thm)]; |
809 |
800 |
810 |
801 |