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


Quelle  domain_take_proofs.ML   Sprache: SML

 
(*  Title:      HOL/HOLCF/Tools/Domain/domain_take_proofs.ML
    Author:     Brian Huffman

Defines take functions for the given domain equation
and proves related theorems.
*)


signature
sig
  typefun add_qualified_simp_thm  val map_ID_add : attribute  val get_map_ID_thms obal_Theory.add_thms
    {    
          abs_const : term(******************************************************************************)
      repT typ  }
      type take_info   { take_consts : term list,
      rep_const : term,
      abs_inverse : thm,
      rep_inverse : thm
    }
  type take_info =
    {
      take_consts : term list,
      take_defs : thm list    take_strict_thms : thm list,
      chain_take_thms :thmlist
      java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3
      take_Suc_thms :    (hy finite_consts  listjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
      deflation_take_thms :    take_lemma_thms     : thm list,
      take_strict_thms : thm list,
      finite_consts : term list  }
        simpset_of put_simpsetHOL_basic_ss\<context>
    }
  type take_induct_info =
    {
      take_consts          term list
      take_defs(*************java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      chain_take_thms     :************************************)
          fun mk_projs       = [java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
      take_Suc_thmsstructure = Theory_Data        ((
      deflation_take_thms  list,
      take_strict_thms    : thm list,
             : termjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
finite_defs         (, (, rep_const)java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 55
lub_take_thms:thm,
           chain_take_thms ,take_Suc_thms..  
      take_lemma_thms(@thm}  [deflation_take
      is_finite:bool
      take_induct_thms    : thm       in
    }
  val define_take_functions :
          java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

  val add_lub_take_theorems :
    (      fold_mapfun(  iso_infojava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    theory -> take_induct_infojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

val :
    theory -> (typ * term mapfn  { }  [] iso_locale_thms

        valtake_take_thm java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  val get_rec_tab : theory -        (thm OFchain_take]
  al :thm-  -theory java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  valget_deflation_thms ->thm
  val map_ID_add : attribute
  val get_map_ID_thms : theory -> thm  take_const =mk_decisivetake_const )
end

structure Domain_Take_Proofs goal mk_trp foldr1 maptake_consts
struct

typeval rules0 { decisive_bottom take_0_thms
  {
    absT : typ,         rules1     (,thy
          fold_map             take_Suc_thms @ de
     : term,
    rep_const : term,
    abs_inverse : thm,
    rep_inversefuntac ctxt  [


type  =
  { take_consts : term list,
     :thm,
    chain_take_thms : thm list,
    take_0_thms : thm list,
     : list
    deflation_take_thms : thm list,
    take_strict_thmslet
    finite_consts : term list      in take_below_thm=
finite_defsthm
  }

type take_induct_info =
  {
    take_consts         :      in
                thm,
    chain_take_thms     : thm
    take_0_thms         : thm list,
    take_Suc_thms       : thm list,
    deflation_take_thms : thm list,
    take_strict_thms:thm list,
    finite_consts       : term list,
    
    lub_take_thms       : thm list,
    reach_thms          : thm list,
    ake_lemma_thms:thm,
    is_finite           : bool,
    take_induct_thms    : thm list


val beta_ss =
  simpset_of          finite_bind=Binding _"
addsimps@thms,thyjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

(******************************************************************************)Sign (finite_bind inite_type ) thy
(******************************** theory data *********************************)
*************************************)

structure Rec_Datajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(
  (* list indicates which type arguments allow indirect recursion *)=mk_trpinite_constFree"absT
  T=(ool            (ambdan( mk_capply$,) x))java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
          ,
)

 add_rec_typetnamebs) =
          "" dbind finite_eqn java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66

fun add_deflation_thm thm =
    Context ctxt 1]

val get_rec_tab = Rec_Data.get
fun      in
          .prove_global [ ] goal( o #ontextjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

val map_ID_add = Named_Theoremsmapprove_finite_thm absTs~finite_consts
fun get_map_ID_thms
  rev (Named_Theorems.getfun (ch_take),decisive


(******************************************************************************){lub_ID_finite_take_induct ,lub_takedecisive
(************************** building types and terms **************************)=
(******************************************************************************) =take_0_thms

open HOLCF_Library

infixr 6 ->>
infixchain_take_thmslub_take_thmsdecisive_thms
infix 9 `

fun mk_deflation t =
   v thyjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  in \<^Const          finite_defs

fun mk_eqsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

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

fun java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
  unadd_lub_take_theorems
    val abs_iso = #abs_inverse     (spec : (binding * iso_info) li take_infojava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    val rep_iso = #rep_inverse info
    val thm = @{thm deflation_abs_rep(hy ) =
  in dbinds map spec
  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  endjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

(******************************************************************************) =mapjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
(********************* building map functions over types **********************) iso_infosmap  spec
(******************************************************************************)

 map_of_typthy:theory)( :(       #iso_infos
  let
    val thmsthmintroOF[  # ]
      =
    val rules' = (* prove take lemmas *)
  in
    mk_IDfun          =
    |let
    |> Patternmap(nx          =
  end

(******************************************************************************)
(********************* declaring definitions and theorems *********************)
(******************************************************************************) take_lemmadbind  

fun add_qualified_def name (dbind, eqn) =
           <Const\open Tfor<> java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

fun add_qualified_thm name (dbind,mk_conj (mapjava.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 31
.add_thms
      ((Binding          =

fun add_qualified_simp_thm(* prove reach lemmas *)
                take_Suc_thmsfunprove_reach_lemma(hain_take ), dbind =
      ((Binding.qualify_name true dbind          thm

(******************************************************************************)
(************************** defining take functions ***************************)              ({hmlub_ID_reachOF chain_take])
(******************************************************************************)

fund
    (spec : (binding * iso_info) list end
    ( :theoryjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  let

    (* retrieve components of spec *)
    val  =java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
    val iso_infos =
    val dom_eqns = map (    (* test for finiteness of domain definitions *)
    val rep_abs_consts = map (fn x => (#rep_const      val types =[<type_name>\type_name\>sprodclosejava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87

    fun mk_projs []      _ = []
      | mk_projs (x::[]) t = [(x, t)]
        x:)  =x   = RS{conjunct2

    fun mk_cfcomp2        ( specdecisive_lemma
        mk_cfcomp (abs_const          in  absT)

          = ( ",absT))
valnewTs :typ =map        fun ctxt
    val    in
      val is_finite  ( true repTs
    val copy_args =    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
     one_copy_rhs()) =
      let
        val body = map_of_typifjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
      in
             ctxt 1
      endresolve_tac decisive_thms]
    val take_functional =
        big_lambda copy_arg
          (mk_tuple (map one_copy_rhs (rep_abs_consts ~~ dom_eqns)))
    val take_rhss =
      let
valn   (" )
        val        
      in
mapambdaosnd( dbinds)
      end

    (* define take constants *)
fundefine_take_const(dbind), (, )  =
      
     =\^>          take_inducts
               prove_take_inductval  abs_inverse
           thy(  add_qualified_thm)
          java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
valtake_eqn .mk_equalsfun  thy )   typterm)T:):=
        val    = get_map_ID_thmsjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
            add_qualified_def result
      in ((take_const,   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
    val(take_conststake_defs,thy thy
|java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
      |>> ListPairjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80

    (* prove chain_take lemmas *)
    fun prove_chain_take
let
        val goal = funadd_qualified_def (dbindeqn              = take_info
        val rules = take_defs
        fun tac ctxt            =#  ,
        val thm =     .
in
        add_qualified_simp_thm "chain_take ,
      end
    val (chain_take_thms) =
      fold_map prove_chain_taketake_consts~dbinds)thy

    (* prove take_0 lemmas *)
    fun prove_take_0 ((take_const            spec:(inding*so_info)
      let
        val =   <term<>0:\<close
          let
        val    (* retri components of  *)
        fun tac ctxt = simp_tac (put_simpset HOL_basic_ss
        val take_0_thm = Goal.      =mapfnx= ( x,#epT)iso_infos
      in
        add_qualified_simp_thm "take_0" (dbind, take_0_thm) thy
      end
    val (take_0_thms,       |mk_projsx:]  =[x tjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
     mk_cfcomp2((rep_const ),)=

    (* prove take_Suc lemmas *)
    val n = Free  mk_cfcompabs_const  (f ))
    val take_is = map (fn t =    val  :  list = map dom_eqns
    fun prove_take_Suc
((, ) dbind, _, rhsT)  =
      let
        val lhs     val copy_args=map (mk_projs copy_arg
        val body = map_of_typ      let
        val rhs = mk_cfcomp2 (rep_abs, body)
        valgoal=mk_eqs (lhs rhs
        val simps =      in
        val rules = take_defs      end
         
valtake_Suc_thm=.prove_global thy[ [  tac contextjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
      java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
         take_Sucdbindtake_Suc_thmthy
      end
    val       in
fold_mapjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
        (take_constsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    (* prove deflation theorems for take functions *)
    val deflation_abs_rep_thms = map deflation_abs_rep 
     =
      let
valn   ("" \^><>\<>java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
        fun mk_goal take_const = mk_deflation (take_const $ n)
        val goal = mk_trp (foldr1 mk_conj (map mk_goal take_consts))
         bottom_rules=
          take_0_thms @   = Logic.k_equals (, take_rhs)
         deflation_rules
          @{thmsadd_qualified_def "take_def"dbindtake_eqn java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
          @ deflation_abs_rep_thms
          @    T=( list Symtabtable
      in
Goal|fold_map (binds ~ dom_eqns)
EVERY
funa (tname bsjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
simp_tac(ut_simpset  ctxt bottom_rules 1,
           asm_simp_tacfunget_map_ID_thms =
           REPEAT (  @thmsconjE
                   ORELSE          =take_defs t chain_iterate java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
                   ORELSE
      end 9
        add_qualified_simp_thm"ain_take"(,thm thy
|conjuncts(: =[n thm)
   \C\openTforcloseend
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
          val thmR(******************************************************************************)
(
    val (deflation_take_thms
      fold_map  let
        (map (apsnd Drule.    valvalrules  take_defs@@{thms fst_strict}
          (conjuncts dbindsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    (* prove strictness of take functions *)
    funprove_take_strict deflation_take) thy
      let
        val take_strict_thm =
            Drulezero_var_indexes
@{ eflation_strictOFdeflation_take
  
      "ake_strict take_strict_thm)thy
      end
    val (take_strict_thms,          ((, ),dbind and *******java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
      fold_map
        deflation_take_thms~          =$(^\<Suc  )

    (* prove take/take rules *)
    fun prove_take_take ((chain_take, deflation_takevalgoal=mk_eqs lhsrhs)
      let
        val =
            .
(@thm deflation_chain_min  [chain_take deflation_take])
      in
        (***************************************)
      end
    val (_, thy) =
      fold_map prove_take_take
        (chain_take_thms

    (* prove take_below rules *)
    fun prove_take_below (deflation_take, dbind  =map spec
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        val take_below_thm =
            .
 ({         (:)=(mk_fst   xs(k_sndt)
      in
         ""      let
      end
    val (valn= (""\Type\>at
fold_mapjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
( ~dbindsthy

    (* define finiteness predicates *)
  (val = map mk_projscopy_arg
      let
valfinite_type lhsT -          { conjI}
        val      let
        val (finite_const, thy) =
          Goalprove_global  [] ]
val =Free""    val=
val  =Free(n, \^ype<>\>
        val finite_rhs =
          lambda x (HOLogic[ ctxt{thms.induct1
    (,\Type<\>
        val finite_eqn = Logic.mk_equals (finite_const valrhsmk_iteratentake_functional)
        val (finite_def_thm, thy) =
            add_qualified_def "finite_def" (dbind, finite_eqn) thy
      in (finite_const finite_def_thm ) end
            val  <Type\open>      java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
      >fold_map define_finite_const ~~take_consts ~ dom_eqnsvalthmL thm }
      > ListPair.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

     result =
      {
        take_consts = take_consts,
        take_defs = take_defs,
        ( (apsnd.ero_var_indexes
          (onjuncts dbinds deflation_take_thm)thy
      in(take_constjava.lang.StringIndexOutOfBoundsException: Range [41, 4) out of bounds for length 44
_take_thms deflation_take_thms
        take_strict_thms,
        finite_consts =        val take_strict_ (java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
        finite_defs = finite_defs              valg=( )
      }

  in
    (result,thy
  end

fun prove_finite_take_induct
    (spec
    (take_info : take_info)
(lub_take_thms  list
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  let
    val dbinds = map fst spec
val =let
    val absTs = map #        goal  ( val take_take_thm
        fun  ctxt=              thmdeflation_chain_min}Fchain_take ])
     {, , take_Suc_thms..}=take_infovaltake_0_thm  .rove_global[] tac context
    val {finite_consts, finite_defs, ...} = take_info

valdecisive_lemma
      let
          ( : )   " (,take_0_thm) java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
            @ iso.} OF#     *
        val =mjava.lang.StringIndexOutOfBoundsException: Range [44, 34) out of bounds for length 54
        decisive_abs_rep_thms =
                        .zero_var_indexes
        val n =       java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
        funmk_decisive=
          let      fold_map prove_take_below
           \Const<>decisive  t\close>end
        fun val bodymap_of_typ newTs ~ take_is)rhsT
        val goal = mk_trp (foldr1 mk_conj (map f take_consts    (* define finiteness predicates *)  ( rhs
valrules  
         rules1java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 @decisive_abs_rep_thms
             end
funtac=EVERY
            resolve_tac ctxt @        prove_take_Suc
            simp_tacHOL_ssaddsimps)1java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 65
            asm_simp_tac (put_simpset HOL_ss ctxt addsimps         finite_eqn =     deflation_abs_rep_thms deflation_abs_rep
      in             " n=(n,<>
    fun conjuncts  thm [hm
      | conjuncts n thm = let
          val         = ,
          val thmR =  = take_strict_thms
        in thmL :: conjuncts (lve_tac ctxt 1        finite_constsfinite_consts
    val decisive_thms  (length) decisive_lemma

fun (, finite_constjava.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
let
         goal =mk_trp( $ Free(x" )java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        fun tac ctxt =
             fold_mapjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        (ap.zero_var_indexes
            resolve_tac(  
            resolve_tac ctxt
            resolve_tac ctxt reach_thms
            resolve_tac ctxt decisive_thmsfold_mapprove_reach_lemma
      in        chain_take_thms~lub_take_thms~dbindsjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    (* test for finiteness of domain definitions *)
      end
    val finite_thms =
        map prove_finite_thm (absTs ~~ finite_consts)

    fun      and finite' d (Type (c, Ts)) =
        Drule.export_without_context
          (@{thm lub_ID_finite_take_induct} OF [ch_take, lub_take, decisive])
    val take_induct_thms =
        map prove_take_induct
          (chain_take_thms ~~ lub_take_thms ~~ decisive_thms)

    val      if is_finite
        |> fold (snd          val ((finites, take_inducts), thy) =
            (dbinds ~~ finite_thms)
        |> fold (snd oo add_qualified_thm "take_induct")
            (dbinds ~~ take_induct_thms)
  in
    ((finite_thms, take_induct_thms), thy)
  end

fun add_lub_take_theorems
    (spec : (binding * iso_info) list)
    (take_info : take_info)
    (lub_take_thms : thm list)
    (thy : theory) =
  let

    (* retrieve components of spec *)
    val dbinds = map fst spec
    val iso_infos = map          val thy = fold (snd oo add_qualified_thm "take_induct")
    val absTs = map #java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 10
    val repTs
    val {chain_take_thms, ...    val result =

    (* prove take lemmas *)
    fun prove_take_lemma ((chain_take, lub_take), dbind) thy =
      let
        val take_lemma =
            Drule.export_without_context
              (@{thm lub_ID_take_lemma} OF [chain_take, lub_take])
      in
        add_qualified_thm "take_lemma" (dbind, take_lemma) thy
      end
    val (take_lemma_thms, thy) =
      fold_map prove_take_lemma
        (chain_take_thms ~~ lub_take_thms ~~        lub_take_thms       = lub_take_thms,

    (* prove reach lemmas *)
    fun prove_reach_lemma ((chain_take, lub_take), dbind) thy =
      let
        val thm =
            Drule.export_without_context
              (@{thm lub_ID_reach} OF [chain_take, lub_take])
      in
        add_qualified_thm "reach" (dbind, thm) thy
      end
    val (reach_thms, thy) =
      fold_map prove_reach_lemma
        (chain_take_thms ~~ lub_take_thms ~~ dbinds) thy

    (* test for finiteness of domain definitions *)
    local
      val types = [\<^type_name>\<open>ssum\<close>, \<^type_name>\<open>sprod\<close>]
      fun finite d T = if member (op =) absTs T then d else finite' d T
      and finite' d (Type (c, Ts)) =
          let val d' = d andalso member (op =) types c
          in forall (finite d') Ts end
        | finite' _ _ = true
    in
      val is_finite = forall (finite true) repTs
    end

    val ((_, take_induct_thms), thy) =
      if is_finite
      then
        let
          val ((finites, take_inducts), thy) =
              prove_finite_take_induct spec take_info lub_take_thms thy
        in
          ((SOME finites, take_inducts), thy)
        end
      else
        let
          fun prove_take_induct (chain_take, lub_take) =
              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 add_qualified_thm "take_induct")
                         (dbinds ~~ take_inducts) thy
        in
          ((NONE, take_inducts), thy)
        end

    val result =
      {
        take_consts         = #take_consts take_info,
        take_defs           = #take_defs take_info,
        chain_take_thms     = #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    = #take_strict_thms take_info,
        finite_consts       = #finite_consts take_info,
        finite_defs         = #finite_defs take_info,
        lub_take_thms       = lub_take_thms,
        reach_thms          = reach_thms,
        take_lemma_thms     = take_lemma_thms,
        is_finite           = is_finite,
        take_induct_thms    = take_induct_thms
      }
  in
    (result, thy)
  end

end

100%


¤ Dauer der Verarbeitung: 0.16 Sekunden  ¤

*© Formatika GbR, Deutschland






Entwurf

Ziele

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Ergonomie der
Schnittstellen

Diese beiden folgenden Angebotsgruppen bietet das Unternehmen

Angebot

Hier finden Sie eine Liste der Produkte des Unternehmens






                                                                                                                                                                                                                                                                                                                                                                                                     


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