<br><br><div class="gmail_quote">On Thu, Oct 13, 2011 at 7:54 AM, Alan Jeffrey <span dir="ltr">&lt;<a href="mailto:ajeffrey@bell-labs.com">ajeffrey@bell-labs.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
A function (f : Beh A -&gt; Beh B) is causal whenever it respects =t, i.e. (forall t . a =t b =&gt; f a =t f b).<br></blockquote><div><br></div><div>Yes. Function outputs only depend on the past values of the input function. </div>
<div> </div><div>Your solutions for double and weird are accurate. Double is lifting the future at each instant into the present, which is obviously not causal. And the `weird` function presumes you already have a obtained a complete view of a behavior at each instant. </div>
<div><br></div><div>The `problem` such as it exists: you will be unable to causally construct the argument to the `weird` function, except by modeling a nested/simulated world (i.e. modeling one FRP system within another). This is not an unrealistic endeavor, e.g. one might model the future position of a thrown baseball in order to predict it. In this sense, `weird` is not weird.</div>
<div><br></div><div>If you want first-class behaviors or behavior transformers, those will need a different abstraction than &#39;nested&#39; behaviors. Nested != First Class. You&#39;d have special functions to lift a first-class behavior as an argument (e.g. add a phantom type to prohibit non-causal observation), and to lower it into the main system for sampling (e.g. ArrowApply).</div>
<div><br></div><div>`Deep` causality is not so much an issue, since it often makes perfect sense to simulate one FRP behavior within another. </div><div><br></div><div>Regards,</div><div><br></div><div>Dave</div><div><br>
</div></div>