theory Arity imports"Launchbury.HOLCF-Join-Classes" begin
typedef Arity = "UNIV :: nat set" morphisms Rep_Arity to_Arity by auto
setup_lifting type_definition_Arity
(* instantiationArity::order begin lift_definitionless_eq_Arity::"Arity\<Rightarrow>Arity\<Rightarrow>bool"is"\<lambda>xy.x\<le>y". lift_definitionless_Arity::"Arity\<Rightarrow>Arity\<Rightarrow>bool"is"\<lambda>xy.x<y". instance applystandard apply(transfer,fastforce)+ done end
*)
instantiation Arity :: po begin
lift_definition below_Arity :: "Arity ==> Arity ==> bool"is"λ x y . y ≤ x".
instance apply standard apply ((transfer, auto)+) done end
instance Arity :: chfin proof fix S :: "nat ==> Arity" assume"chain S" have"(ARG_MIN Rep_Arity x. x ∈ range S) ∈ range S" by (rule arg_min_natI) auto thenobtain n where n: "S n = (ARG_MIN Rep_Arity x. x ∈ range S)"by auto have"max_in_chain n S" proof(rule max_in_chainI) fix j assume"n ≤ j"hence"S n ⊑ S j"using‹chain S›by (metis chain_mono) also have"Rep_Arity (S n) ≤ Rep_Arity (S j)" unfolding n image_def by (metis (lifting, full_types) arg_min_nat_lemma UNIV_I mem_Collect_eq) hence"S j ⊑ S n"by transfer finally show"S n = S j". qed thus"∃n. max_in_chain n S".. qed
instance Arity :: cpo ..
lift_definition inc_Arity :: "Arity ==> Arity"is Suc.
lift_definition pred_Arity :: "Arity ==> Arity"is"(λ x . x - 1)".
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.