Instantly share code, notes, and snippets.

🧐
infamous researcher and mathemalinguist

# Dream Scatter chakravala

🧐
infamous researcher and mathemalinguist
Last active August 10, 2020 03:59 — forked from enkimute/test_grassmann.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 using Grassmann; @basis D"1,1,1,0"; P = [ rand()*v124 + rand()*v134 + rand()*v234 + v123 for i=1:1000 ]; L = [ rand()*v12 + rand()*v13 + rand()*v14 + rand()*v23 + rand()*v24 + rand()*v34 for i=1:1000 ]; A = [ rand() for i=1:1000]; test2(L,A,P) = (LA = exp.(L.*A); LA.*P.*.~LA); R = test2(L,A,P); f(L,A,P,i) = (LA = exp(L[i]*A[i]); LA*P[i]*~LA); function test(L,A,P,R) for k ∈ 1:1000
Created October 22, 2017 20:21
Creates iterable function object for Dendriform.Grove
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 using Dendriform, ResumableFunctions @resumable function trees(g::Union{Grove,PBTree}) typeof(g) == PBTree && return ResumableFunctions.@yield g for i ∈ 1:g.size-1 ResumableFunctions.@yield PBTree(g.Y[i,:]) end return PBTree(g.Y[end,:]) end import Base.convert convert(::Type{Array{PBTree,1}},g::Grove) = [trees(g)...]
Last active October 22, 2017 21:15
Visualize dendriform grove sum commutativity using Tamari associahedron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 using Dendriform, LightGraphs, GraphPlot, Colors function highlight_sum(a::Grove,b::Grove) d = a.degr + b.degr g = DiGraph(Int(Cn(d))) for i = 1:Int(Cn(d)) u = Dendriform.posetnext(PBTree(d,i)) for t in u add_edge!(g,i,treeindex(t)) end end
Created September 15, 2017 19:59
Jones formula for n-th prime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 g(y::BigInt,x::BigInt) = BigInt((abs(y-x) + y-x)//2) r(y::BigInt,x::BigInt)::BigInt = (x==0) ? y : mod(y,x) p(n::Int) = sum(i->g(BigInt(1),g(sum(j->r((factorial(g(BigInt(j),BigInt(1))))^2,BigInt(j)),0:i),BigInt(n))),0:n^2) map(p,1:17)
Last active June 7, 2022 21:48
Ramanujan's tau function (100 years of) -> a python script