*To*: Makarius <makarius at sketis.net>*Subject*: Re: [isabelle] Modify theorem with equality assumption*From*: Manuel Eberl <eberlm at in.tum.de>*Date*: Tue, 07 Apr 2015 12:02:24 +0200*Cc*: cl-isabelle-users at lists.cam.ac.uk*In-reply-to*: <alpine.LNX.2.00.1504071148500.53483@lxbroy10.informatik.tu-muenchen.de>*References*: <551D646E.9060508@in.tum.de> <5AD61EC4-4357-4542-A826-081AB4BE3623@inria.fr> <551DB1BE.9050308@in.tum.de> <A9D5660E-91C3-413E-925D-9AECE3D68775@inria.fr> <551E6982.6090606@in.tum.de> <alpine.LNX.2.00.1504071148500.53483@lxbroy10.informatik.tu-muenchen.de>*User-agent*: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

> * What is the context where "p" in @{term "p"} comes from and belongs to? p is an abbreviation of type real defined in terms of as and bs in the locale context. > * The prop belongs to ctxt' by construction, so further contextual > operations need to use that, or a monotonic extension of it. So > Thm.cterm_of ctxt should be Thm.cterm_of ctxt'. Otherwise, one needs a > semantic proof, why ctxt is sufficient, but it merely obscures the > code. Ah, I see. > "The" repository version is undefined, until "hg id" is used. e83ecf0a0ee1. I usually make a point of pulling the latest version regularly to keep my developments up-to-date. > Another variation: fix q locally, then work with non-schematic > material inside the extended context (which is usually easier and more > robust), then export the result into the original context to make q > schematic. Is that not what I did in the end? (q being p') Cheers, Manuel On 07/04/15 11:54, Makarius wrote: > On Fri, 3 Apr 2015, Manuel Eberl wrote: > >> Yes, I do another step. I do not assume the equation directly, but >> something that implies it. A function that does what I actually asked is >> this: >> >> fun generalize_master_thm ctxt thm = >> let >> val ([p'], ctxt') = Variable.variant_fixes ["p''"] ctxt >> val p' = Free (p', HOLogic.realT) >> val prop = HOLogic.mk_Trueprop (HOLogic.mk_eq (@{term "p"}, p')) >> val cprop = Thm.cterm_of ctxt prop >> in >> thm >> |> Local_Defs.unfold ctxt' [Thm.assume cprop] >> |> Thm.implies_intr cprop >> |> rotate_prems 1 >> |> singleton (Variable.export ctxt' ctxt) >> end > > > > The main point of Thm.cterm_of acting on Proof.context in coming > Isabelle2015 is to make Isabelle/ML tool implementations more > conformant to normal context discplines, and not drop out into some > global thy value from the background. > > > Makarius

**Follow-Ups**:**Re: [isabelle] Modify theorem with equality assumption***From:*Makarius

**References**:**[isabelle] Modify theorem with equality assumption***From:*Manuel Eberl

**Re: [isabelle] Modify theorem with equality assumption***From:*Jasmin Blanchette

**Re: [isabelle] Modify theorem with equality assumption***From:*Manuel Eberl

**Re: [isabelle] Modify theorem with equality assumption***From:*Jasmin Blanchette

**Re: [isabelle] Modify theorem with equality assumption***From:*Manuel Eberl

**Re: [isabelle] Modify theorem with equality assumption***From:*Makarius

- Previous by Date: Re: [isabelle] Modify theorem with equality assumption
- Next by Date: Re: [isabelle] Modify theorem with equality assumption
- Previous by Thread: Re: [isabelle] Modify theorem with equality assumption
- Next by Thread: Re: [isabelle] Modify theorem with equality assumption
- Cl-isabelle-users April 2015 archives indexes sorted by: [ thread ] [ subject ] [ author ] [ date ]
- Cl-isabelle-users list archive Table of Contents
- More information about the Cl-isabelle-users mailing list