From: john s. <sk...@us...> - 2015-04-28 13:37:27
|
On 28/04/2015, at 11:26 AM, john skaller wrote: > However \prod (f,g,h) still can't be defined, i have ravel (f,g,h) in the > library for up to 5 cases. I'm giving up: I'm defining it directly in the compiler. And sum too. Now, to get the mediating morphism of a product, <f,g> for many n, we note that <f,g> = x.dup2.( \prod (f,g) ) So the aim is to now define: fun dup[N,T] (x:T):T^N => x,x,x,...,x // n times which is just an array length N filled with x's... I guess that is already in the library under another name. (as an array constructor?) The function is also called \diag printed as a \delta. The sum version is called \nabla, it takes n x's and produces a single x. -- john skaller sk...@us... http://felix-lang.org |