equal
deleted
inserted
replaced
2150 fun err() = error("Failed congruence proof!") |
2150 fun err() = error("Failed congruence proof!") |
2151 |
2151 |
2152 in case prover thm' of |
2152 in case prover thm' of |
2153 None => err() |
2153 None => err() |
2154 | Some(thm2) => (case check_conv(thm2,prop',ders) of |
2154 | Some(thm2) => (case check_conv(thm2,prop',ders) of |
2155 None => err() | some => some) |
2155 None => err() | Some trec => trec) |
2156 end; |
2156 end; |
2157 |
2157 |
2158 fun bottomc ((simprem,useprem,mutsimp),prover,sign_ref,maxidx) = |
2158 fun bottomc ((simprem,useprem,mutsimp),prover,sign_ref,maxidx) = |
2159 let |
2159 let |
2160 fun botc fail skel mss trec = |
2160 fun botc fail skel mss trec = |
2215 in case h of |
2215 in case h of |
2216 Const(a,_) => |
2216 Const(a,_) => |
2217 (case assoc_string(fst congs,a) of |
2217 (case assoc_string(fst congs,a) of |
2218 None => appc() |
2218 None => appc() |
2219 | Some(cong) => |
2219 | Some(cong) => |
2220 (congc (prover mss,sign_ref,maxidx) cong trec |
2220 (* post processing: some partial applications h t1 ... tj, j <= length ts, |
2221 handle Pattern.MATCH => appc() ) ) |
2221 may be a redex. Example: map (%x.x) = (%xs.xs) wrt map_cong *) |
|
2222 (let val ctrec as (t,etc) = |
|
2223 congc (prover mss,sign_ref,maxidx) cong trec |
|
2224 in case t of |
|
2225 l$r => |
|
2226 let val dVar = Var(("",0),dummyT) |
|
2227 val skel = |
|
2228 list_comb(h,replicate (length ts) dVar) |
|
2229 in case botc true skel mss (l,etc) of |
|
2230 None => Some ctrec |
|
2231 | Some(l',etc') => Some(l'$r,etc') |
|
2232 end |
|
2233 | _ => error "congc result" |
|
2234 end |
|
2235 handle Pattern.MATCH => appc() ) ) |
2222 | _ => appc() |
2236 | _ => appc() |
2223 end) |
2237 end) |
2224 | _ => None) |
2238 | _ => None) |
2225 |
2239 |
2226 and impc args = |
2240 and impc args = |