header{* The initial distributive law *}
theory Stream_Distributive_Law0
imports Stream_FreeAlg0
begin
definition Λ0 :: "('a * 'a F) Σ0 => 'a ΣΣ0 F"
where "Λ0 ≡ Rep_Σ0 o Σ0_map (\<oo>\<pp>0 o Abs_Σ0 o F_map leaf0 o snd)"
lemma Λ0_transfer[transfer_rule]:
"(Σ0_rel (rel_prod R (F_rel R)) ===> F_rel (ΣΣ0_rel R)) Λ0 Λ0"
unfolding Λ0_def by transfer_prover
theorem Λ0_natural: "Λ0 o Σ0_map (f ** F_map f) = F_map (ΣΣ0_map f) o Λ0"
using Λ0_transfer[of "BNF_Def.Grp UNIV f"]
unfolding Σ0.rel_Grp F_rel_Grp prod.rel_Grp ΣΣ0.rel_Grp
unfolding Grp_def rel_fun_def by auto
end