(* Title: HOL/UNITY/Comp/TimerArray.thy Author: Lawrence C Paulson, Cambridge University Computer Laboratory Copyright 1998 University of Cambridge A trivial example of reasoning about an array of processes *)
theory TimerArray imports"../UNITY_Main"begin
type_synonym 'a state = "nat * 'a"(*second component allows new variables*)
definition count :: "'a state => nat" where"count s = fst s"
definition decr :: "('a state * 'a state) set" where"decr = (UN n uu. {((Suc n, uu), (n,uu))})"
(*Demonstrates induction, but not used in the following proof*) lemma Timer_leadsTo_zero: "Timer ∈ UNIV leadsTo {s. count s = 0}" apply (rule_tac f = count in lessThan_induct, simp) apply (case_tac "m") apply (force intro!: subset_imp_leadsTo) apply (unfold Timer_def, ensures_tac "decr") done
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.