equal
deleted
inserted
replaced
126 fun myfoldr f [x] = x |
126 fun myfoldr f [x] = x |
127 | myfoldr f (x::xs) = f (x,myfoldr f xs) |
127 | myfoldr f (x::xs) = f (x,myfoldr f xs) |
128 | myfoldr f [] = error "SpecificationPackage.process_spec internal error" |
128 | myfoldr f [] = error "SpecificationPackage.process_spec internal error" |
129 |
129 |
130 val sg = sign_of thy |
130 val sg = sign_of thy |
131 fun typ_equiv t u = |
131 fun typ_equiv t u = Sign.typ_instance sg (t,u) andalso Sign.typ_instance sg (u,t); |
132 let |
|
133 val tsig = Sign.tsig_of sg |
|
134 in |
|
135 Type.typ_instance(tsig,t,u) andalso |
|
136 Type.typ_instance(tsig,u,t) |
|
137 end |
|
138 |
132 |
139 val cprops = map (Thm.read_cterm sg o rpair Term.propT o snd) alt_props |
133 val cprops = map (Thm.read_cterm sg o rpair Term.propT o snd) alt_props |
140 val ss = empty_ss setmksimps single addsimps [thm "HOL.atomize_imp",thm "HOL.atomize_all"] |
134 val ss = empty_ss setmksimps single addsimps [thm "HOL.atomize_imp",thm "HOL.atomize_all"] |
141 val rew_imps = map (Simplifier.full_rewrite ss) cprops |
135 val rew_imps = map (Simplifier.full_rewrite ss) cprops |
142 val props' = map (HOLogic.dest_Trueprop o term_of o snd o dest_equals o cprop_of) rew_imps |
136 val props' = map (HOLogic.dest_Trueprop o term_of o snd o dest_equals o cprop_of) rew_imps |