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

Quelle  NatTrans.thy

  Sprache: Isabelle
 

(*  Title:       Category theory using Isar and Locales
    Author:      Greg O'Keefe, June, July, August 2003
    License: LGPL

Define natural transformation, prove that the identity arrow function is one.
*)


section Natural Transformations

theory NatTrans
imports Functors
begin

(* guess the third axiom is implied by the fifth *)
locale natural_transformation = two_cats +
  fixes F and G and u
  assumes "Functor F : AA BB"
  and "Functor G : AA BB"
  and "u : ob AA ar BB"
  and "u extensional (ob AA)"
  and "AOb. u A Hom (F<o> A) (G<o> A)" 
  and "AOb. BOb. fHom A B. (G<a> f) (u A) = (u B) (F<a> f)"

abbreviation
  nt_syn  (_ : _ ==> _ in Func '(_ , _ ') [81]) where
  "u : F ==> G in Func(AA, BB) natural_transformation AA BB F G u"

(* is this doing what I think its doing? *)
locale endoNT = natural_transformation + one_cat

theorem (in endoNT) id_restrict_natural:
  "(λAOb. Id A) : (id_func AA) ==> (id_func AA) in Func(AA,AA)"
proof (intro natural_transformation.intro natural_transformation_axioms.intro 
    two_cats.intro ballI)
  show "(λAOb. Id A) : Ob Ar"
    by (rule funcsetI) auto
  show "(λAOb. Id A) extensional (Ob)"
    by (rule restrict_extensional)
  fix A 
  assume A: "A Ob" 
  hence "Id A Hom A A" ..
  thus "(λXOb. Id X) A Hom ((id_func AA)<o> A) ((id_func AA)<o> A)"
    using A by (simp add: id_func_def) 
  fix B and f
  assume B: "B Ob" 
    and "f Hom A B"
  hence "f Ar" and "A = Dom f" and "B = Cod f" and "Dom f Ob" and "Cod f Ob"
    using A by (simp_all add: hom_def)
  thus "(id_func AA)<a> f (λAOb. Id A) A
      = (λAOb. Id A) B (id_func AA)<a> f"
    by (simp add:  id_func_def)
qed (auto intro: id_func_functor, unfold_locales, unfold_locales)

end

Messung V0.5 in Prozent
C=71 H=96 G=84

¤ Dauer der Verarbeitung: 0.2 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 und die Messung sind noch experimentell.