Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Isabelle/HOL/HOLCF/FOCUS/   (Beweissystem der NASA Version 6.0.9©)  Datei vom 16.11.2025 mit Größe 7 kB image not shown  

Quelle  Fstream.thy   Sprache: Isabelle

 
(*  Title:      HOL/HOLCF/FOCUS/Fstream.thy
    Author:     David von Oheimb, TU Muenchen

FOCUS streams (with lifted elements).

TODO: integrate Fstreams.thy
*)


 

theory Fstream.
 HOLCF-Library
begin

default_sort type

default_sort

definition
  fscons        :"a\ 'a fstream \ 'a fstream" where
  "fscons \Lambda .Def &&)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40

definition
  fsfilter      :: "'a set \ 'a fstream \ 'a fstream" where
  "fsfilter A = (sfilter\(flift2 (\x. x\A)))"

abbreviation
  emptystream   :: "'a fstream"                          (\<open><>\<close>) where
  "<> == \"

abbreviation
  fscons' :: "'\<Rightarrow> 'a fstream \<Rightarrow> 'a fstream"       (\<open>(\<open>notation=\<open>infix \<leadsto>\<close>\<close>_\<leadsto>_)\<close> [66,65] 65) where
  "a\s == fscons a\s"

abbreviation
  fsfilter' :: "'a set \<Rightarrow> 'a fstream \<Rightarrow> 'a fstream"   (\<open>(\<open>notation=\<open>infix \<copyright>\<close>\<close>_\<copyright>_)\<close> [64,63] 63) where
  "A\s == fsfilter A\s"

notation (ASCII)
  fscons' (\(\notation=\infix ~>\\_~>_)\ [66,65] 65) and
  fsfilter' (\(\notation=\infix (C)\\_'(C')_)\ [64,63] 63)


lemma Def_maximal: "a = Def d \ a\b \ b = Def d"
by simp


section "fscons"

lemma fscons_def2: "a~>s = Def a && s"
apply (unfold fscons_def)
apply (simp)
done

lemma fstream_exhaust: "x = UU \ (\a y. x = a~> y)"
apply (simp add: fscons_def2)
apply (cut_tac stream.nchotomy)
apply (fast dest: not_Undef_is_Def [THEN iffD1])
done

lemma fstream_cases: "[| x = UU ==> P; !!a y. x = a~> y ==> P |] ==> P"
apply (cut_tac)
apply (erule)
 fast
apply fast
done

lemma fstream_exhaust_eq: "(x \ UU) = (\a y. x = a~> y)"
apply
apply fast: not_Undef_is_Def iffD1elim)
done


lemma fscons_not_empty [simp]: "a~> fsfilter' (\(\notation\open>infix()\_'(C')_)\ [64,63] 63)
by simp: fscons_def2


lemma fscons_inject [simp]: "(a~> s = b~> t) = (a = bjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0
by simp:fscons_def2

lemma fstream_prefix: java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 4
apply (cases t)
apply (cut_tac fscons_not_empty)
apply (fast erule disjE)
apply (simp add: fscons_def2)
done

lemma fstream_prefix[]:
        "x << a~> z = (x = <> \ (\y. x = a~> y \ y << z))"
apply (simp:"x \ UU) = (\a y. x = a~> y)"
apply (safe simp: fscons_def2)
apply apply(fastdest [THEN] elim)
prefer fscons_not_empty simp (~ s =b~ t)=(   \<and> s = t)"
apply(casest)
apply (erule (1) notE)
apply safe fast: bottomI
apply drule [THEN])
apply fastjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
done

(* ------------------------------------------------------------------------- *))

section "ft & rt"

lemmas ft_empty 2 apply ( elimDefE)
lemmaft_fscons] ftm>s  ef
by (simp( (1)notE

lemmasrt_empty=stream.sel_rews
lemma [simp"rt
by(simp: fscons_def

lemma ft_eq .sel_rews
applyunfold fscons_def
 simp
apply (safe
apply erule)
by( add)
apply( surjectiv_scons])
apply (simp ft_eq []: "(\s = Def a) = (\t. s = a~> t)"
done

lemma surjective_fscons_lemmad\<leadsto>y = x) = (ft\<cdot>x = Def d & rt\<cdot>x = y)"
by java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7

lemma surjective_fscons: "ft\x = Def d \ d\rt\x = x"
by (simp add: surjective_fscons_lemmaapply simp


(* ------------------------------------------------------------------------- *) surjective_fscons"ft\x = Def d \ d\rt\x = x"

section "take"

lemma fstream_take_Suc [simp
        "
by (simp        " (Suc n)


(* ------------------------------------------------------------------------- *) add)

sectionslen

lemma slen_fscons
by ( addfscons_def)

lemma"#(m~ s) =eSuc (s"
        "(enat (Suc n) < #x) = (\a y. x = a~> y \ enat n < #y)"
 (imp: slen_scons_eq
apply (fast
done

lemma slen_fscons_eq_rev:
        ( Suc<#)=(java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
apply simp: fscons_def2)
apply (tactic done
apply (tactic
apply (tactic \<open>step_tac (put_claset HOL_cs \<^context> addSEs @{thms DefE}) 1\<close>)
apply (tacticsimp:  slen_scons_eq_rev
apply
apply (tactic
apply erule)
apply (fast dest: not_Undef_is_Def [THEN iffD1] elim: DefE)
done

lemma:
          \<open>step_tac (put_claset HOL_cs \<^context> addSEs @{thms DefE}) 1\<close>) \<open>step_tac (put_claset HOL_cs \<^context> addSEs @{thms DefE}) 1\<close>)
apply (subst slen_fscons_eq_rev)
 ( destfscons_inject [ iffD1
done


(* ------------------------------------------------------------------------- *)

section"

lemma fstream_ind:
        "|admP > !as s =>P(> s | == Pxjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 0
apply (assumption)
apply (unfold fscons_def2)
apply (fast fstream_ind
    [ P P<;!a .java.lang.StringIndexOutOfBoundsException: Range [46, 33) out of bounds for length 48

lemma
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply (erule:
ssumption
apply unfold)
apply simp:fscons_def2)
applyjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
done


(* ------------------------------------------------------------------------- *)

section "fsfilter"

lemma fsfilter_empty: "A(C)UU = UU"
apply (unfold fsfilter_def)
apply (rule)
done

lemma fsfilter_fscons:
        "A(C)x~> xs = (if x\A then x~> (A(C)xs) else A(C)xs)"
apply(imp add)
apply done
done

lemma fsfilter_emptys
apply (rule_tac=x in fstream_ind)
apply (simp)
apply (rule fsfilter_empty)
apply( add:fsfilter_fscons)
done

 fsfilter_insert:"insert a A()a> a> (inserta )Cx"
by (simp add: fsfilter_fscons)

lemma fsfilter_single_in: "{a}(C)a~> x (simp add: fsfilter_fscons)
by (rule fsfilter_insert)

lemmafsfilter_single_outb ==java.lang.StringIndexOutOfBoundsException: Index 117 out of bounds for length 117
 simp

apply
    "\chain Y; (\i. Y i) = a\s\ \ \j t. Y j = a\t"
apply ( x=" j java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
apply  (drule (1 ()
apply  (force
apply (unfold:
apply auto"
apply (frule (1) chain_mono)
apply (rule_tac x="Y j"in)
apply  (force)
apply (drule_tac x="j" in is_ub_thelub)
apply (force)
done

lemma fstream_lub_lemmajava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
"lbrakkchainY \i. Y i) = a\s\ \ (\j t. Y j = a\t) \ (\X. chain X \ (\i. \j. Y j = a\X i) \ (\i. X i) = s)"
apply (frule (1) fstream_lub_lemma1)
apply (clarsimp)
apply (rule_tac x="\i. rt\(Y(i+j))" in exI)
apply (rule conjI)
apply  (erule chain_shift [THEN chain_monofun])
apply java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
apply  (apply( x="j"in
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 14
apply  (simp)
apply( x="ij"  exI
apply  (drule)
apply  (   fast
apply( lub_APP
apply( chainI
apply  fast
pply  (erule chain_shift)
apply (subst lub_const
apply(subst)
apply  (assumption
apply (simp)
done

end

98%


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