equal
deleted
inserted
replaced
2140 | NONE => raise Fail "unconstrainT_proof: missing constraint"); |
2140 | NONE => raise Fail "unconstrainT_proof: missing constraint"); |
2141 |
2141 |
2142 val typ = #unconstrain_typ ucontext {strip_sorts = true}; |
2142 val typ = #unconstrain_typ ucontext {strip_sorts = true}; |
2143 val typ_sort = #unconstrain_typ ucontext {strip_sorts = false}; |
2143 val typ_sort = #unconstrain_typ ucontext {strip_sorts = false}; |
2144 |
2144 |
2145 fun ofclass (ty, c) = |
2145 fun ofclass (T, c) = |
2146 let val ty' = Same.commit typ_sort ty; |
2146 let |
2147 in the_single (of_sort_proof algebra classrel_proof arity_proof hyp_map (ty', [c])) end; |
2147 val T' = Same.commit typ_sort T; |
|
2148 val [p] = of_sort_proof algebra classrel_proof arity_proof hyp_map (T', [c]) |
|
2149 in p end; |
2148 in |
2150 in |
2149 Same.commit (map_proof_same (Term_Subst.map_types_same typ) typ ofclass) |
2151 Same.commit (map_proof_same (Term_Subst.map_types_same typ) typ ofclass) |
2150 #> fold_rev (implies_intr_proof o snd) (#constraints ucontext) |
2152 #> fold_rev (implies_intr_proof o snd) (#constraints ucontext) |
2151 end; |
2153 end; |
2152 |
2154 |