friend_of_corec f1 :: "r ==> r"where "f1 r = R (rhd r) (f1 (R (rhd r) (rtl r)))" sorry
friend_of_corec f2 :: "r ==> r"where "f2 r = R (rhd r) (f1 (f2 (rtl r)))" sorry
friend_of_corec f3 :: "r ==> r"where "f3 r = R (rhd r) (f3 (rtl r))" sorry
corec id_rx :: "r ==> r"where "id_rx r = f1 (f2 (f3 (R (rhd r) (id_rx (rtl r)))))"
subsection‹The Polymorphic Version›
codatatype 'a s = S (shd: 'a) (stl: "'a s")
corec id_s :: "'a s ==> 'a s"where "id_s s = S (shd s) (id_s (stl s))"
corec id_s' :: "'b s ==> 'b s"where "id_s' s = S (shd s) (id_s' (stl s))"
corec id_s'' :: "'w s ==> 'w s"where "id_s'' s = S (shd s) (id_s'' (stl s))"
(* Registers polymorphic and nonpolymorphic friends in an alternating fashion. *)
consts
g1 :: "'a ==> 'a s ==> 'a s"
g2 :: "nat ==> nat s ==> nat s"
g3 :: "'a ==> 'a s ==> 'a s"
g4 :: "'a ==> 'a s ==> 'a s"
g5 :: "nat ==> nat s ==> nat s"
friend_of_corec g3 :: "'b ==> 'b s ==> 'b s"where "g3 x s = S (shd s) (g3 x (stl s))" sorry
friend_of_corec g1 :: "'w ==> 'w s ==> 'w s"where "g1 x s = S (shd s) (g1 x (stl s))" sorry
friend_of_corec g2 :: "nat ==> nat s ==> nat s"where "g2 x s = S (shd s) (g1 x (stl s))" sorry
friend_of_corec g4 :: "'a ==> 'a s ==> 'a s"where "g4 x s = S (shd s) (g1 x (g4 x (stl s)))" sorry
friend_of_corec g5 :: "nat ==> nat s ==> nat s"where "g5 x s = S (shd s) (g2 x (g5 x (stl s)))" sorry
corec id_nat_s :: "nat s ==> nat s"where "id_nat_s s = g1 undefined (g2 undefined (g3 undefined (S (shd s) (id_nat_s (stl s)))))"
friend_of_corec h1 where "h1 x = ACons undefined undefined"sorry
friend_of_corec h2 where "h2 x = (case x of ACons a t ==> ACons a (h1 (h2 t)) | BCons b t ==> BCons b (h1 (h2 t)))" sorry
friend_of_corec h3 where "h3 x = (case x of ACons a t ==> ACons a (h1 (h3 t)) | BCons b t ==> BCons b (h1 (h3 t)))" sorry
friend_of_corec h4 where "h4 x = (case x of ACons a t ==> ACons a (h1 (h4 t)) | BCons b t ==> BCons b (h1 (h4 t)))" sorry
corec (friend) h5 where "h5 x = (case x of ACons a t ==> ACons a (h1 (h2 (h3 (h4 (h5 t))))) | BCons b t ==> BCons b (h1 (h2 (h3 (h4 (h5 t))))))"
corec (friend) h6 :: "(nat, nat) ABstream ==> (nat, nat) ABstream"where "h6 x = (case x of ACons a t ==> ACons a (h6 (h1 (h2 (h3 (h4 (h5 (h6 t))))))) | BCons b t ==> BCons b (h1 (h2 (h3 (h4 (h5 (h6 t)))))))"
end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-05-03)
¤
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.