Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/Z_Toolkit/   (Sammlung formaler Beweise Version 2026-5©)  Datei vom 31.4.2026 mit Größe 2 kB image not shown  

Quellcode-Bibliothek Relation_Lib.thy

  Sprache: Isabelle
 

section  Meta-theory for Relation Library

theory Relation_Lib
  imports
    Countable_Set_Extra Positive Infinity Enum_Type Record_Default_Instance Def_Const
    Relation_Extra Partial_Fun Partial_Inj Finite_Fun Finite_Inj Total_Fun List_Extra
    Bounded_List Tabulate_Command
begin 

text  This theory marks the boundary between reusable library utilities and the creation of the
 Z notation. We avoid overriding any HOL syntax up until this point, but we do supply some optional
 bundles.


lemma if_eqE [elim!]: "[ (if b then e else f) = v; [ b; e = v ] ==> P; [ ¬ b; f = v ] ==> P ] ==> P"
  by (cases b, auto)

bundle Z_Type_Syntax
begin

type_notation bool ("𝔹")
type_notation nat ("")
type_notation int ("")
type_notation rat ("")
type_notation real ("")

type_notation set (" _" [999999)

type_notation tfun (infixr "" 0)

notation Pow ("")
notation Fpow ("𝔽")

end

class refine =
  fixes ref_by :: "'a ==> 'a ==> bool" (infix "" 50)
  and sref_by :: "'a ==> 'a ==> bool"  (infix "" 50)
  assumes ref_by_order: "class.preorder () ()"

interpretation ref_preorder: preorder "()" "()"
  by (fact ref_by_order)

lemma ref_by_trans [trans]: "[ P Q; Q R ] ==> P R"
  using ref_preorder.dual_order.trans by auto

abbreviation (input) refines (infix "🚫" 50where "Q 🚫 P P Q"
abbreviation (input) srefines (infix "🪙" 50where "Q 🪙 P P Q"

instantiation "bool" :: refine
begin

definition "ref_by_bool P Q = (Q P)"
definition "sref_by_bool P Q = (¬ Q P)"

instance by (intro_classes, unfold_locales, auto simp add: ref_by_bool_def sref_by_bool_def)

end

instantiation "fun" :: (type, refine) refine
begin

definition ref_by_fun :: "('a ==> 'b) ==> ('a ==> 'b) ==> bool" where "ref_by_fun f g = ( x. f(x) g(x))"
definition sref_by_fun :: "('a ==> 'b) ==> ('a ==> 'b) ==> bool" where "sref_by_fun f g = (f g ¬ (g f))"

instance 
  by (intro_classes, unfold_locales)
     (auto simp add: ref_by_fun_def sref_by_fun_def ref_preorder.less_le_not_le intro: ref_preorder.order.trans)
end

end

Messung V0.5 in Prozent
C=73 H=97 G=85

¤ 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.0.2Bemerkung:  ¤

*Bot Zugriff






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