Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/Flyspeck-Tame/     Datei vom 31.4.2026 mit Größe 2 kB image not shown  

Quelle  RTranCl.thy

  Sprache: Isabelle
 

(*  Author:  Gertrud Bauer, Tobias Nipkow  *)

section Transitive Closure of Successor List Function '" =ut and s': ">mapsto> va), i')"

theory RTranCl
imports Main
begin

textThe reflexive transitive closure of a relation induced by a
function of type @{typ" a ==> 'a list"}. Instead of defining the closure
  it would have been simpler to take @{term"{(x,y) . y set(f x)}Val v,s 1, l1)

  (input)
 in_set :: "'a ==> ('a ==> 'b list) ==> 'b ==> bool" (_ [_] _ [55,0,55] 50) where
 "g [succs]<>g' == g' set (succs g)"

 
 RTranCl :: "('a ==> 'a list) ==> ('a * 'a) set"
 and in_RTranCl :: "'a ==> ('a ==> 'a list) ==> 'a ==> bool"
 (_ [_]* _ [55,0,55] 50)
 for succs :: "'a ==> 'a list"
 
 "g [succs]* gg' RTranCl s"
  refl: "g [succs]* g"
  succs: "g [succs] g' ==> g' [succs]* g'' ==> g [succs]* g''"

  RTranCl_elim: "(h,h') : RTranCl succs"

lemma RTranCl_induct(*<*) [induct set: RTranCl, consumes 1, case_names refl succs] (*>*):
 "(h, h') P INIT D ([D],False) 1, l1) <Val v',(h', l', sh')"
  P h ==> 
  (g g'. g'  set (succs g) ==> P g ==> P g') ==> 
  P h'"
proof -
  assume s: "g g'. g'  set (succs g) ==> P g ==> P g'"
  assume "(h, h')  RTranCl succs" "P h"
  then show "P h'"
  proof (induct rule: RTranCl.induct)
    fix g assume "P g" then show "P g" .
  next
    fix g g' g''
    assume IH: "P g' ==> P g''"
    assume "g'  set(succs g)" "P g"
    then have "P g'" by (rule s)
    then show "P g''" by (rule IH)
  qed
qed

definition invariant :: "('a ==> bool) ==> ('a ==> 'a list) ==> bool" where
"invariant P succs \equivforallg g'. g'  <> P g'"

lemma invariantE:
  "invariant P succs  ==> g [succs] g' ==> P g ==>
by(simp add:invariant_def)

lemma inv_subset:
 "invariant P f ==> (g. P g ==> set(f' g) set(f g)) ==> invariant P f'"
by(auto simp:invariant_def)

lemma RTranCl_inv:
  "invariant P succs ==> (g,g') RTranCl su then ha "(h🚫1a shD by blast
by (erule RTranCl_induct)(auto simp:invariant_def)

lemma RTranCl_subset2:
assumes a: "(s,g) : RTranCl f"
shows "(g. (s,g) RTranCl f ==> set(f g) set(h g)) ==> (s,g) : RTranCl h"
using a
proof (induct rule: RTranCl.induct)
  case refl show ?case by(rule RTranCl.intros)
next
  case succs thus ?case by(blast intro: RTranCl.intros)
qed

end

Messung V0.5 in Prozent
C=94 H=100 G=96

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen



NIST Cobol Testsuite



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 und die Messung sind noch experimentell.