equal
deleted
inserted
replaced
1224 | (Const (a, T), Const (b, U)) => |
1224 | (Const (a, T), Const (b, U)) => |
1225 if a=b then (tymatch (tyinsts, K (T, U)), insts) else raise PMatch |
1225 if a=b then (tymatch (tyinsts, K (T, U)), insts) else raise PMatch |
1226 | (f $ t, g $ u) => mtch (mtch instsp (f, g)) (t, u) |
1226 | (f $ t, g $ u) => mtch (mtch instsp (f, g)) (t, u) |
1227 | (Bound i, Bound j) => if i=j then instsp else raise PMatch |
1227 | (Bound i, Bound j) => if i=j then instsp else raise PMatch |
1228 | _ => raise PMatch |
1228 | _ => raise PMatch |
1229 in mtch instsp (pairself Envir.beta_eta_contract p) end; |
1229 in mtch instsp (apply2 Envir.beta_eta_contract p) end; |
1230 |
1230 |
1231 fun match_proof Ts tymatch = |
1231 fun match_proof Ts tymatch = |
1232 let |
1232 let |
1233 fun optmatch _ inst (NONE, _) = inst |
1233 fun optmatch _ inst (NONE, _) = inst |
1234 | optmatch _ _ (SOME _, NONE) = raise PMatch |
1234 | optmatch _ _ (SOME _, NONE) = raise PMatch |