Theory Distributive_Law_base

theory Distributive_Law_base
imports FreeAlg_base
header{* The initial distributive law *}

(*<*)
(* This is similar to Distributive_Law, but uses a particular law Λ_base: *)
(*>*)

theory Distributive_Law_base
imports FreeAlg_base
begin

definition Λ_base :: "('a * 'a F) Σ_base => 'a ΣΣ_base F"
where "Λ_base ≡ Rep_Σ_base o Σ_base_map (\<oo>\<pp>_base o Abs_Σ_base o F_map leaf_base o snd)"

lemma Λ_base_transfer[transfer_rule]:
  "(Σ_base_rel (rel_prod R (F_rel R)) ===> F_rel (ΣΣ_base_rel R)) Λ_base Λ_base"
  unfolding Λ_base_def by transfer_prover

theorem Λ_base_natural: "Λ_base o Σ_base_map (f ** F_map f) = F_map (ΣΣ_base_map f) o Λ_base"
  using Λ_base_transfer[of "BNF_Def.Grp UNIV f"]
  unfolding Σ_base.rel_Grp F_rel_Grp prod.rel_Grp ΣΣ_base.rel_Grp
  unfolding Grp_def rel_fun_def by auto

end