Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Lyx/src/   (Script-Werkzeug ©)  Datei vom 1.1.1999 mit Größe 112 B image not shown  

Quelle  domain_take_proofs.ML   Sprache: SML

 

    :Brian

Defines take functions for the            absT : typ      repT : typ      abs_const : term      rep_inverse     }      {
and      take_defs           : thm list,
*)

signature DOMAIN_TAKE_PROOFS =
sig
        take_Suc_thms       : thm list,
    {
      absT : typ,
      repT :       take_strict_thms    : thm list,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      rep_const : term,
      abs_inverse :thmjava.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
       :thm
    }
  type take_info =
    {
      take_consts : term listin
      take_defs : thm  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
      chain_take_thms
      take_0_thms : thm ,
      take_Suc_thms : thm list,
      deflation_take_thms
      take_strict_thms :thm,
      finite_consts : term list,
      finite_defs : fun map_of_typ( :theory( :(yp *termlist)(  ) : term
    }
  type take_induct_info =
    {
      take_consts         : term list,
      take_defs           : thm list,
      chain_take_thms     : thm list,
      take_0_thms         : thm thms =get_map_ID_thmsthy
      take_Suc_thms       : thm list,
       :  list
      take_strict_thmsthm,
      finite_consts       : term list,
      finite_defsmk_ID
      lub_take_thms           >Patternrewrite_term rules[
      reach_thms          :thm,
      take_lemma_thms     : thm list,
            is_finite************************************
      take_induct_thms    : thm
    }
  val define_take_functions :
    (binding * (

  val add_lub_take_theorems
    (binding * iso_info) list -> take_info -> thm list ->
    theory -> take_induct_info * theory

  val map_of_typ :


  val add_rec_typeadd_qualified_thm (dbindthm(*  Title:      HOL/HOLCF/Tools/Domain/domain_take_proofs.ML
  val get_rec_tab : theory -> (bool list) Symtab.table
  val add_deflation_thm : thm -> theory -> theory
  val get_deflation_thms : theory -> thm list
  val map_ID_add : attribute
  val get_map_ID_thms : theory -> thm list
end

structure Domain_Take_Proofs : DOMAIN_TAKE_PROOFS =
struct

type iso_info =
  {
    absT : typ,
    repT : typ,
    abs_const : term,
    rep_const : term,
    abs_inverse : thm,
    rep_inverse : thm
  }

type take_info =
  { take_consts : term list,
    take_defs : thm list,
    chain_take_thms : thm list,
    take_0_thms : thm list,
    take_Suc_thms : thm list,
    deflation_take_thms : thm list,
    take_strict_thms : thm list,
    finite_consts : term list,
    finite_defs : thm list
  }

type take_induct_info =
  {
    take_consts         : term list,
    take_defs           : thm list,
    chain_take_thms     : thm list,
    take_0_thms         : thm list,
    take_Suc_thms       : thm list,
    deflation_take_thms : thm list,
    take_strict_thms    : thm list,
    finite_consts       : term list,
    finite_defs         : thm list,
    lub_take_thms       : thm list,
    reach_thms          : thm list,
    take_lemma_thms     : thm list,
    is_finite           : bool,
    take_induct_thms    : thm list
  }

val beta_ss =
  simpset_of (put_simpset HOL_basic_ss \<^context>
    addsimps @{thms simp_thms} |> Simplifier.add_proc \<^simproc>\<open>beta_cfun_proc\<close>)

(******************************************************************************)

(******************************** theory data *********************************)
**************************java.lang.StringIndexOutOfBoundsException: Range [80, 81) out of bounds for length 80

 Rec_Data 
(
  (* list indicates which type arguments allow indirect recursion *) :thm
  T=( listfinite_consts  list
  val empty =                       (bs_constmk_cfcompf rep_const)
  fun merge    val newTs :typ list  fst
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

fun add_rec_type (tname    fun one_copy_rhs (ep_abs(,)) =
    Rec_Datamap(.insert( ) (tname bs

 add_deflation_thm thmjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
      eflation_take_thms list

get
fun get_deflation_thms  thm
  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

val map_ID_add =list
funget_map_ID_thms java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  rev (Named_Theorems.       : thm        copy_arg


(******************************************************************************)
(************************** building types and terms **************************)
(******************************************************************************)

open HOLCF_Library

infixr 6 ->>
infix -->>
infix 9 `

fun mk_deflation 
  let val T = #1               reach_          : list
<^onst\<const(dbindtake_rhs,(hsT,_) =

       :list

(******************************************************************************)
****************************** isomorphism info ******************************)
******************************************************************************)

fun  val :
  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        theory -take_induct_info theory
_iso rep_inversejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    valjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  in
    Drule.zero_var_indexes thm


(******************************************************************************)val((take_consts ),thythy
(********************* building map functions over types **********************)
(******************************************************************************)

java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  letabsTtyp
    valabs_constt,
  =map(.  . #HOLogic)thms
         :,
  in
    mk_ID T
    |> Pattern
| take_0_thms list
  end:thm,

(******************************************************************************)
(********************* declaring definitions and theorems *********************)**java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
(******************************************************************************)

fun c       listin
Global_Theory indingqualify_name namejava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69

   chain_take_thms)=
    yield_singleton Global_Theory.add_thms
      (Bindingqualify_nametrue dbind namefold_map take_consts~ java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59

fun add_qualified_simp_thm  (dbind)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    yield_singleton Global_Theory.add_thms
      ((Binding.    fun prove_take_Suc

(******************************************************************************)
(************************** defining take functions ***************************) =take_const \^>\open\<close $)
(******************************************************************************)

fun define_take_functions
    specbinding*iso_info )
    (thy : theory) =
  let

    (* retrieve components of spec *)
 spec
    val iso_infos = map snd spec
    val dom_eqns = map (fn x => (#absT x        val rules=take_defs@simps


    fun mk_projs         take_Suc_thm=.prove_global [ [  ( o#)
      | mk_projs         "" (dbind )thy
      | mk_projs (x::xs) t = (x, mk_fst t) :: mk_projs xs (mk_snd t)


        mk_cfcomp    val (take_Suc_, thy =

    (* define take functional *)
    val ( ~ rep_abs_consts~  ~ ) thy
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    val copy_arg = Free      deflation_take_thm
    val copy_argsvaln =Freen" )
             mk_goal  =mk_deflation $ njava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
      let
        val body = map_of_typ thy (newTs ~~ copy_args) rhsT

        mk_cfcomp2 (rep_abs, body)
      end
    val take_functional =
        big_lambdacopy_arg
          (mk_tuple (map one_copy_rhs            
    val take_rhss =
      let
        val n = Free (" .prove_globalthy[ ]goal( {ontext =ctxt ... =java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
        val rhs = mk_iterate : thml,
      in
jsrhs
      end

    (* define take constants *)
)(,_)thy
      let
     =\^>                    assume_tac 1)java.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
valtake_bind .suffix_name_take
        val (take_const, thy) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
          Sign.declare_const_global ((take_bind, take_type),            =  RS           list
         take_eqn=Logic. (take_const)
        valtake_def_thm) =
            add_qualified_def      fold_mapadd_qualified_thmdeflation_take
 (take_const take_def_thm thy

      |           ,
      |>> ListPair

    (* prove chain_take lemmas *)
    fun (
      let *iso_infolist>take_info> list-
v map_of_typ      let
valrules take_defs  { chain_iterate ch2ch_snd
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        val thm = Goal.prove_global thy [] [      in
   add_deflation_thm:thm>theory- theory""(, ) java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
        add_qualified_simp_thm :  - thm java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
      end
    val (java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
      fold_map    fun prove_take_take(hain_take,deflation_take ) thy=

Drule
f  (,               { }OF deflation_take
      let
        vallhs  <termopen:\<close_=
     :      prove_take_take
          java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
        take_defs ,
        val java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           : ,
add_qualified_simp_thm
       : ,
    val (take_0_thms, thy) =
           :thm

    (* prove take_Suc lemmas *)
    val n = Free  {
valtake_is  (fn => $n)take_consts
    fun_ )=
          ((         :hm
let
          =  $ \^>\open\<close
        val body = map_of_typ     : thm, take_const hsT thy
val mk_cfcomp2,
        val goal: list
lub_take_thms  list
val rules take_defs simps
         (finite_constthy
        val take_Suc_thm           Signdeclare_const_global (, ), NoSynthy
      in
        add_qualified_thm       x=reex"lhsT
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    val    addsimps{ simp_thms|Simplifierdd_proc^><beta_cfun_procclose
                lambda HOLogicexists_const^java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 69
(take_consts ~ ~  ~dom_eqnsjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65

(* prove deflation theorems for take functions *)
    val deflation_abs_rep_thms
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      let
type              ""  java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
        fun mk_goal take_const       (, finite_defs ) 
consts)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          . Symtab (| .unzip
        val deflation_rules =
@thms deflation_ID
          @ deflation_abs_rep_thms
          @ get_rec_tab        =take_defs
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
        Goal thy]]goalfn{ = , .. >
         EVERY
          [resolve_tac ctxt @{thms nat.induct} 1,
           simp_tac
ic_ss ctxt  addsimps take_Suc_thms
           REPEAT (
                   ORELSE resolve_tac                   ORELSE resolve_tac 
                   assume_tac 1)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
end
    fun conjuncts [] _ = []
      | conjuncts funmk_deflation =
cts (:sthmjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
val thm RS @ conjunct1
          val thmR = thm RS @{thm conjunct2}
       in,):conjuncts thmR
    val (deflation_take_thms,
"
         apsnd***************************)
          (conjuncts dbinds deflation_take_thm)) thy

    (* prove strictness of take functions *)
    fun prove_take_strict (deflation_take, dbind) thy =
      let
        val take_strict_thm =
            Drule.zero_var_indexes             : list
              (@ deflation_strictOF])
in
        add_qualified_simp_thm
      end
    val (take_strict_thms, thy) =
      fold_map so_locale:iso_info=
        (deflation_take_thms ~~ dbinds) thy

    (* prove take/take rules *)
    fun         valiso_locale_thms map iso_infos
      let  ( x>{thmdecisive_abs_repOFx)iso_locale_thms
      val take_take_thm=
            Drule.zero_var_indexes
(deflation_chain_min [, deflation_take
      in
_take_thm
                ^>open  : java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 45
thy
fold_map java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
        (chain_take_thms

    (* prove take_below rules *)take_defs list
    funasm_simp_tacput_simpsetHOL_sstake_Suc_thmsthm,
      let
          =
            Drule.zero_var_indexes
              
      in
add_qualified_thm"(bindt : list,
      end
    val (_, thy) =
      fold_map prove_take_below
        (deflation_take_thms     thmlist

    (* define finiteness predicates *)
    t       list
      let
        val finite_type = 
val  .suffix_name ""finitedbind
_const) java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
          .declare_const_global(,f),NoSynthy
        
        val n = Free ((*********************************************)
        val finite_rhs =funprove_finite_thmabsT,finite_const)=
  (* list indicates which type arguments allow indirect recursion *)  ( $ ",)
            (ambda  ((mk_capply(ake_constnx) x)))
        val finite_eqn = Logic  val empty = Symtab.empty
        val (finite_def_thm, thy) =  fun             ctxt,
       add_qualified_deffinite_def(,)thy
      in ((finite_const, finite_def_thm), 
    
      |      java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
      |>> ListPair  java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      {
        take_constsDrule
        take_defs = take_defs@   [ch_takelub_take,)
             take_induct_thms
        take_0_thms take_0_thms,
        take_Suc_thms
        deflation_take_thms
        take_strict_thms = take_strict_thms     ( ~~  ~ decisive_thms)
        finite_constsletal  java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        finite_defs =finite_defs
}

in
    (result
  end

(***********************************java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
f add_lub_take_theorems
    (take_info : take_info)
    (lub_take_thms : thm list)
        ( :take_info
  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    val = fst
    val iso_infos  let
    valend
    val {take_consts, ...} = take_info
     {, take_0_thms,take_Suc_thms .. = take_info
    val {finite_consts

    val decisive_lemma =
      let
fun ( :theory sub typrepTs repT
@ .introOFabs_inverseinfo#p_inverseinfo
        val iso_locale_thms valrulesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
valjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             (n   take_lemma
        valn =Free("n,\nat\java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
        fun mk_decisive t =
          let val T(******************************************************************************)"(, take_lemma)thy
in \^Const><>decisive  t\closeend
        funftake_const=mk_decisive take_const n)
    prove_take_lemma
        val rules0 = @{thm decisive_bottom} :: take_0_thms
        valrules1
fun (,lub_take dbind thy
            @       
        fun tac ctxt = EVERY [
            resolve_tac ctxt @{thms nat
            simp_tac (put_simpset HOL_ss ctxt addsimps rules0) 1,
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
      in Goal.prove_global thy    (hy ) =
    fun conjuncts 1 thmjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
 =let
          val thmLfunfinitedT=  (op=    delse' java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
valthmRthm@thm}
        
valdecisive_thms=conjunctslength) 

    fun prove_finite_thm(, finite_const =
      let
        val goal mk_trpfinite_const $ Free("" ))
funtac =
            EVERY [
java.lang.StringIndexOutOfBoundsException: Range [31, 6) out of bounds for length 48
            val_fun ,(,rhsTjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
            resolve_tac ctxt chain_take_thms 1,
resolve_tac lub_take_thms,
             ctxt 1]
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
        Goal( finites), thy
      end
         n=Free"n,\^Type>\>java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
m prove_finite_thm         (   sndk_projs rhs

    fun ((ch_take, ub_take decisive) =
{, .. =
    val{,take_0_thms , ..} take_info
  java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        map       java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
          chain_take_thms~ lub_take_thms~ decisive_thmsjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

    valdeflation_take_thms dbindsinverse info#ep_inverse info]
        | fold
            (* prove take/take rules *)
        >foldsnd""
            (dbinds ~~ take_induct_thms         take_take_thm             fn = @thm} OF[)
in
    (, take_induct_thmsjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
     (,thy

fun add_lub_take_theorems
    (spec : (binding * iso_info) list    (* prove take_below rules *)
    (take_info : take_info)
    (lub_take_thms          =
    (thy : theory) =
  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    (* retrieve components of spec *)
    val dbinds      _,thy)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    val iso_infos = map snd spec
    f define_finite_const  @nat}1
    val let
    val{, ..}=take_infoasm_simp_tacput_simpsetHOL_ssaddsimps ]

    (* prove take lemmas *)
    funprove_take_lemma(, lub_take, dbind      . _"dbind
      let
        val =
            Drule.export_without_context
({hm lub_ID_take_lemma  [,java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 29
      in
        add_qualified_thmvaln = Free(n" at<>)
      end
    val (, thy) =
      fold_map prove_take_lemma
        ( ~lub_take_thms~ )) thy

mas*
    funprove_reach_lemma(chain_take lub_take        finite_eqnLogic.k_equals (inite_constfinite_rhs
      let
                     "" dbind) java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
           .export_without_context
              (     prove_finite_thm (absT finite_const =
      in
        add_qualified_thm "reach" (dbind, thm)         java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      end
    ( thy
      fold_map prove_reach_lemma
        (hain_take_thms ~lub_take_thms ~ ) 

    (* test for finiteness of domain definitions *)
    local
      val types =ejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
      funjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
and' Type(, Ts))
          let val d' = d andalso member ({thm lub_ID_finite_take_induct} OF [ch_take, lub_take, decisive] java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
          in
         ' true
    in
       is_finite(  )
    end

    val ((_, take_induct_thms),thytheory)|fold  add_qualified_thm
      if is_finite
     then
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
          val ((finites (finite_thms ),thy
              prove_finite_take_induct spec take_info lub_take_thms thy    val {java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
          ((SOME finitesfun ( : ) 
        java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
      else
        let
          funprove_take_induct chain_takel) =
              Drule.export_without_context
                (@{thm lub_ID_take_induct} OF [chain_take, lub_take])
          val take_inducts =
              map prove_take_induct (chain_take_thms ~~ lub_take_thms)
          val thy = fold (snd oo     
                         (dbinds ~~ take_inducts) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 9
        in
          ((NONE, take_inducts), thy)
        end

    val result =
      {          =
  take_consts=#, ) java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                ( ~  ~ )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
        chain_take_thms# take_info
        take_0_thms         = #take_0_thms take_info,
        take_Suc_thms       = #take_Suc_thms take_info,
        deflation_take_thms = #deflation_take_thms take_info,
        take_strict_thms    =# ,
             conjuncts thm =[]
finite_defs=finite_defs,
        lub_take_thms       = lub_take_thms,
        reach_thms          = reach_thms,
        take_lemma_thms     = take_lemma_thms,
        val(each_thms) =
        take_induct_thms    = take_induct_thms
      }
  in
    (result, thy)
  end

end

100%


¤ Dauer der Verarbeitung: 0.17 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.