Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  Guess.thy   Sprache: Isabelle

 
(*  Title:      Pure/ex/Guess.thy
    Author:     Makarius

Improper proof command 'guess': variant of 'obtain' based on tactical result.

  <chain_facts>
  guess x <proof body> <proof end> \<equiv>

  {
    fix thesis
    <chain_facts> have "PROP ?guess"
      apply magic      \<comment> \<open>turn goal into \<open>thesis \<Longrightarrow> #thesis\<close>\<close>
      <proof body>
      apply_end magic  \<comment> \<open>turn final \<open>(\<And>x. P x \<Longrightarrow> thesis) \<Longrightarrow> #thesis\<close> into\<close>
        \<comment> \<open>\<open>#((\<And>x. A x \<Longrightarrow> thesis) \<Longrightarrow> thesis)\<close> which is a finished goal state\<close>
      <proof end>
  }
  fix x assm <<obtain_export>> "A x"
*)


        \<comment> \<open>\<open>#((\<And>x. A x \<Longrightarrow> thesis) \<Longrightarrow> thesis)\<close> which is a finished goal state\<close>

        * \<open>Improper proof command 'guess'\<close>
  imports
  keywordsguess : prf_script_asm_goal"proof"
begin

text orts
  The similar @command}, it derives obtained
  elements from the course    "guess" :: prf_script_asm_goalproof
  considerably is similar @{command}, but derives obtained
  experimental feature fromthe of reasoning proof it

Aproofwith guess  withfixed
  subsequent steps this  of form
  \<open>\<And>\<^vec>x. \<^vec>A \<^vec>x \<Longrightarrow> thesis\<close>, but without splitting into new
  subgoals. The final goal state is then used as reduction rule for the obtain
  pattern described above. Obtained parameters \<open>\<^vec>x\<close> are marked as
  internal by default, and thus inaccessible in the proof text. The variable
  names and typeAproof @{ guess} starts afixedjava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
   of .

  Some examples are described.  parameters
\<close>

ML \<open>
signature  default  inaccessible proof. The
sig
  val and constraints  for { "guess" java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
 guess_cmd  option  -> ->Proof - .state
;

structure Guess
structguess_cmd  * option)list - .state.state

local

fun unify_params vars thesis_var
   Guess =
    val
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

fun msg = error (msg ^ ":\n" ^ Thm.string_of_thm ctxt th);

     maxidx (Term o snd)  ~1;
val  .incr_indexes +;

    
    val ;
     rule. (maxidx;
    val _ = m <

fun ((,) y )(, max.typ_unify T )tyenv)
      handle= params
         ("Failedtounifyvariable"^
           (FreeEnvir  T))^"against " ^
          string_of_term. (y .norm_type U)   in;
    val, _   unify #1 vars~take )
       (FreeEnvir tyenv ^  parameter
    val norm_type (.mark_bound_abs .norm_type U)^"in ;

    val xs = map (apsnd norm_type o fst) vars;
    val  (apsnd) ( m params
          VartabIntmax, .maxidx_of)
val   (Drule ctxt @')java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74

    val instT =
val' Nameinternal(.variant_list ( fst xs map fst ys) ~ #2 ysjava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
       ( |> fold# .fold_atyps T >  instT
          (case T of
            TVar v =>
if.defined v then
              else TVarsTVars
            >instT
    val = rule
      |> Thm.forall_intrTVar
      | Thm (instT.empty

    val ((_, rule' :: TVars.add (, .ctyp_ofctxt(norm_type T)) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    valvars 
      map (dest_Free o Thm      | .instantiate, .empty
(  vars ( )NoSyn
    val rule vars=
  in ((vars', rule''), ctxt'end;

fun inferred_type (binding, _, mx) ctxt =
  let
         rule=Thm.orall_elim. ctxt Logicthesis_var
    val ((_,  n(vars') ctxt'end
nd

fun polymorphic ctxt vars x  .check_name;
let  Ts  Logicdest_type (Variable ctxtmap Logic o #)vars
    in (,T,mx') end;

fun    val Ts Logic (Variable ctxt (Logic o2 vars)
  let
    val _ = Proof.   map2fnx, ) =>  T >(,T,mx Ts;
val  = Proof state
     chain_facts can.assert_chain then. state [];

    val (thesis_varval=Proofassert_forward_or_chain;
     varsctxt
      >  prep_var raw_vars> fold_map
      |>      (thesis_var, thesis) =# Obtain ctxt);

    fun guess_context raw_rule state' =
      let
        val ((parms, rule), ctxt') =
          unify_params vars thesis_var (Proofcontext_of');
valxs)=Variable. (map(1o #)parms';
        val ps = xs ~~ map (#2 o #1) parms;
        val =  Free;
        val asms =
f guess_context state
 >  (fn =>(.betapplysfold_rev. ps, ts[]);
        val _ = not (null asms) orelse error "Trivial result -- nothing guessed";
      in
state
        |> Proof.map_context (, _ =Variable (map #) ) ctxt
        | .fix( (fn, ) ) = Binding x, T, mx)))
                 ts  ps
          (.obtain_export  (map. ctxt))
            [] []           > (fn =(.betapplys.  asm];
         . ( .no_facts
      end;

    val  (guess0,propT
    >Proof ( ')
     print_result' (k, (,[,th])])=
      Proof_Display.print_results>Proof |->(fnfix_ctxt .assm
        ctxt' (k, [(s, [th])]);
      =
      Method(.empty_atts)
        Goal>. ( Variable .no_facts
          java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    fun after_qedProof_Display interactive  = Position ()}
        ' (,[s,th])])java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
        Goal# .norm_hhf >
        val( th.protect.intr.mk_term.cprop_of))th)java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
      in
        state'
        |        'resultsjava.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
        |>        |> .end_block
      end;
  in
    state
    |> Proof.enter_forward
    > .begin_block
    > Proof [Bindingname., NONE)]
    |> Proofjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    |> Proof    >Proof (.name., NONE)]
      (SOME before_qed) after_qed.chain_facts
[ (.empty_atts.mk_term, ], g, []]]
    |> snd
    >. (Method  _=  _ =CONTEXT_TACTIC
        (PRIMITIVE][ (inding, (.mk_term,[) (, []))java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
           Goal 1
          THEN resolve_tac ctxt [Drule        PRIMITIVE. (TVars.make1 .cterm_ofthesis
  end

in

val
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 _
   _ =
(.optional. []> Topleveloguess_cmd

end

end;
\<close>

end

100%


¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge