Theory MonadicEquationalTheory
section "Monadic Equational Theory"
theory MonadicEquationalTheory
imports Category Universe
begin
record ('t,'f) Signature =
BaseTypes :: "'t set" (‹Tyı›)
BaseFunctions :: "'f set" (‹Fnı›)
SigDom :: "'f ⇒ 't" (‹sDomı›)
SigCod :: "'f ⇒ 't" (‹sCodı›)
locale Signature =
fixes S :: "('t,'f) Signature" (structure)
assumes Domt: "f ∈ Fn ⟹ sDom f ∈ Ty"
and Codt: "f ∈ Fn ⟹ sCod f ∈ Ty"
definition funsignature_abbrev (‹_ ∈ Sig _ : _ → _› ) where
"f ∈ Sig S : A → B ≡ f ∈ (BaseFunctions S) ∧ A ∈ (BaseTypes S) ∧ B ∈ (BaseTypes S) ∧
(SigDom S f) = A ∧ (SigCod S f) = B ∧ Signature S"
lemma funsignature_abbrevE[elim]:
"⟦f ∈ Sig S : A → B ; ⟦f ∈ (BaseFunctions S) ; A ∈ (BaseTypes S) ; B ∈ (BaseTypes S) ;
(SigDom S f) = A ; (SigCod S f) = B ; Signature S⟧ ⟹ R⟧ ⟹ R"
by (simp add: funsignature_abbrev_def)