Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/HOL/HOLCF/Tutorial/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 2 kB image not shown  

Quelle  New_Domain.thy

  Sprache: Isabelle
 

(*  Title:      HOL/HOLCF/Tutorial/New_Domain.thy
    Author:     Brian Huffman
*)


section Definitional domain package

theory New_Domain
imports HOLCF
begin

text 
 UPDATE: The definitional back-end is now the default mode of the domain
 package. This file should be merged with Domain_ex.thy.
 


text 
 Provided that domain is the default sort, the new_domain
 package should work with any type definition supported by the old
 domain package.
 


domain 'a llist = LNil | LCons (lazy 'a) (lazy "'a llist")

text 
 The difference is that the new domain package is completely
 definitional, and does not generate any axioms. The following type
 and constant definitions are not produced by the old domain package.
 


thm type_definition_llist
thm llist_abs_def llist_rep_def

text 
 The new domain package also adds support for indirect recursion with
 user-defined datatypes. This definition of a tree datatype uses
 indirect recursion through the lazy list type constructor.
 


domain 'a ltree = Leaf (lazy 'a) | Branch (lazy "'a ltree llist")

text 
 For indirect-recursive definitions, the domain package is not able to
 generate a high-level induction rule. (It produces a warning
 message instead.) The low-level reach lemma (now proved as a
 theorem, no longer generated as an axiom) can be used to derive
 other induction rules.
 


thm ltree.reach

text 
 The definition of the take function uses map functions associated with
 each type constructor involved in the definition. A map function
 for the lazy list type has been generated by the new domain package.
 


thm ltree.take_rews
thm llist_map_def

lemma ltree_induct:
  fixes P :: "'a ltree ==> bool"
  assumes adm: "adm P"
  assumes bot: "P "
  assumes Leaf: "x. P (Leafx)"
  assumes Branch: "f l. x. P (fx) ==> P (Branch(llist_mapfl))"
  shows "P x"
proof -
  have "P (i. ltree_take ix)"
  using adm
  proof (rule admD)
    fix i
    show "P (ltree_take ix)"
    proof (induct i arbitrary: x)
      case (0 x)
      show "P (ltree_take 0x)" by (simp add: bot)
    next
      case (Suc n x)
      show "P (ltree_take (Suc n)x)"
        apply (cases x)
        apply (simp add: bot)
        apply (simp add: Leaf)
        apply (simp add: Branch Suc)
        done
    qed
  qed (simp add: ltree.chain_take)
  thus ?thesis
    by (simp add: ltree.reach)
qed

end

Messung V0.5 in Prozent
C=82 H=82 G=81

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-10) ¤

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