equal
deleted
inserted
replaced
85 prop: term} |
85 prop: term} |
86 val crep_thm : thm -> {sign: Sign.sg, der: deriv, maxidx: int, |
86 val crep_thm : thm -> {sign: Sign.sg, der: deriv, maxidx: int, |
87 shyps: sort list, hyps: cterm list, |
87 shyps: sort list, hyps: cterm list, |
88 prop: cterm} |
88 prop: cterm} |
89 val sign_of_thm : thm -> Sign.sg |
89 val sign_of_thm : thm -> Sign.sg |
90 val stamps_of_thm : thm -> string ref list |
|
91 val transfer : theory -> thm -> thm |
90 val transfer : theory -> thm -> thm |
92 val tpairs_of : thm -> (term * term) list |
91 val tpairs_of : thm -> (term * term) list |
93 val prems_of : thm -> term list |
92 val prems_of : thm -> term list |
94 val nprems_of : thm -> int |
93 val nprems_of : thm -> int |
95 val concl_of : thm -> term |
94 val concl_of : thm -> term |
409 (*errors involving theorems*) |
408 (*errors involving theorems*) |
410 exception THM of string * int * thm list; |
409 exception THM of string * int * thm list; |
411 |
410 |
412 |
411 |
413 fun sign_of_thm (Thm {sign_ref, ...}) = Sign.deref sign_ref; |
412 fun sign_of_thm (Thm {sign_ref, ...}) = Sign.deref sign_ref; |
414 val stamps_of_thm = #stamps o Sign.rep_sg o sign_of_thm; |
|
415 |
413 |
416 (*merge signatures of two theorems; raise exception if incompatible*) |
414 (*merge signatures of two theorems; raise exception if incompatible*) |
417 fun merge_thm_sgs |
415 fun merge_thm_sgs |
418 (th1 as Thm {sign_ref = sgr1, ...}, th2 as Thm {sign_ref = sgr2, ...}) = |
416 (th1 as Thm {sign_ref = sgr1, ...}, th2 as Thm {sign_ref = sgr2, ...}) = |
419 Sign.merge_refs (sgr1, sgr2) handle TERM (msg, _) => raise THM (msg, 0, [th1, th2]); |
417 Sign.merge_refs (sgr1, sgr2) handle TERM (msg, _) => raise THM (msg, 0, [th1, th2]); |
750 (* Equality *) |
748 (* Equality *) |
751 |
749 |
752 (* Definition of the relation =?= *) |
750 (* Definition of the relation =?= *) |
753 val flexpair_def = fix_shyps [] [] |
751 val flexpair_def = fix_shyps [] [] |
754 (Thm{sign_ref= Sign.self_ref Sign.proto_pure, |
752 (Thm{sign_ref= Sign.self_ref Sign.proto_pure, |
755 der = Join(Axiom(pure_thy, "flexpair_def"), []), |
753 der = Join(Axiom(Theory.proto_pure, "flexpair_def"), []), |
756 shyps = [], |
754 shyps = [], |
757 hyps = [], |
755 hyps = [], |
758 maxidx = 0, |
756 maxidx = 0, |
759 prop = term_of (read_cterm Sign.proto_pure |
757 prop = term_of (read_cterm Sign.proto_pure |
760 ("(?t =?= ?u) == (?t == ?u::?'a::{})", propT))}); |
758 ("(?t =?= ?u) == (?t == ?u::?'a::{})", propT))}); |