Not signed in (Sign In)

Not signed in

Want to take part in these discussions? Sign in if you have an account, or apply for one below

  • Sign in using OpenID

Discussion Tag Cloud

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome to nForum
If you want to take part in these discussions either sign in now (if you have an account), apply for one now (if you don't).
    • CommentRowNumber1.
    • CommentAuthorKeithEPeterson
    • CommentTimeNov 24th 2016
    • (edited Nov 30th 2016)

    In programming, legal contract drafting, making jokes and filling in madlibs, students cheating on essays, and large scale substitution in math, (even closure operations?), aren’t all these things are instances of applying template, but how does templating work from an n-POV?

    My instincts tell me it’s an Operad of some sort, given how composition of templates ought to behave. Is there a Linguistic Operad of sorts that handles instances of templating?

    Edit: In linguistics language, I’m asking about ’phrasal templating’ and it’s categorical semantics.

    • CommentRowNumber2.
    • CommentAuthorDavidRoberts
    • CommentTimeNov 24th 2016

    Going out on a limb, it might relate to Spivak’s ologs.

    • CommentRowNumber3.
    • CommentAuthorRodMcGuire
    • CommentTimeNov 25th 2016

    Start with a setActsetAct - the action of a set PP on a set VV - act: P×VVP \times V \to V.

    For a fixed set of property names these form the category setActs(P)setActs(P) with the obvious PP preserving concrete morphisms (whose structure may be uninteresting).

    Enhance a setAct AA with a distinguished point of its objects VV called rootroot giving the structure rA\langle \, r A\rangle, and say that rA\langle r \, A\rangle has the property of being rooted if every object is accessible from the root using a path from the free monoid P *P^*.

    Rooted setActs form the category rSetActs(P)rSetActs(P) which is the quotient object lattice of (P)\bot(P) the free rooted setAction of PP - an infinite tree with edges labeled from PP. (P)\top(P) is the one object “rose” with PP arcs - its free category (P) *\top(P)^* is just the one object free monoid P *P^*.

    This category contains some objects that can be displayed as similar to simple JavaScript objects, e.g. in rSetActs({name,first,last,a,b})rSetActs(\{name,\, first,\, last,\, a,\, b\})

    {name:{first:John,last:Smith}}\{name: \{first: John, last: Smith\}\}

    The join in this lattice can give such as:

    {name:{first:John}}{name:{last:Smith}}={name:{first:John,last:Smith}}\{name: \{first: John\}\} \vee \{name: \{last: Smith\}\} = \{name: \{first: John, last: Smith\}\}

    (The join here might be more specifically called rootJoin because it equates the roots of its arguments. An “atomic” object such as JohnJohn actually corresponds to a coAtom of the lattice and the lattice has an infinite number of them. In JavaScript trying to access a property that is not present returns the distinguished value unknownunknown. In this variation unknown properties correspond to \bot)

    For an object (act) in both SetActs(P)SetActs(P) and rSetActs(P)rSetActs(P), hom(v,w)hom(v,w) is the set of all paths from vv to ww. This set can be empty or encoded as a regular expression / Kleene algebra. hom(v,w)hom(v,w) is biRooted containing both the root vv and a coRoot ww. A biRooted act will be displayed as rAcr\langle r\, A\, cr\rangle,

    The set of all homs internal to the objects, allHoms(setAct(P))allHoms(setAct(P)), is obviously a Heyting lattice (biHeyting?, Boolean?) which enriches every variety of setAct.

    By adding biRoot structure to any setAct we can form the category biSetActs(P)biSetActs(P) where the objects are restricted to being rooted. This is at least a Heyting lattice that contains allHoms(setActs(P))allHoms(setActs(P)) as a sub lattice.

    biSetAct(P)biSetAct(P) has an additional monoid? structure: the operator ++ called conJoin (with unit the empty path ee\langle e \bot e\rangle) which vaguely behaves as:

    aAb+bBc=aCc\langle a A b\rangle + \langle b B c\rangle = \langle a C c\rangle

    This conJoining essentially gives A with its coRoot joined to B’s root and its coRoot changed to correspond to B’s.

    For a JavaScript like example we have

    {name:{first:*,last:Smith}}+*John={name:{first:*John,last:Smith}}\{name: \{first: *, last: Smith\}\} + *John = \{name: \{first: *John, last: Smith\}\}

    where the * in an object is used to indicate its coRoot.

    I believe I have this all worked out for when setActions are restricted to being quasi-finite which means that an act has a finite number of objects not isomorpic to \bot. In particular hom(v,w)hom(v,w) in an act AA contains all objects found on paths from vv to ww - those off any such path are become \bots. A hom(v,w)hom(v,w) has the property that all of its non-\bot objects drain to ww via some path. General biRooted objects don’t have this property.

    In the above discussion I am somewhat conflating an act AA which is an edge labeled quiver with its free category A *A^* in which the morphisms are paths. A more precise discussion would distinguish these.

    • CommentRowNumber4.
    • CommentAuthorKeithEPeterson
    • CommentTimeNov 29th 2016
    • (edited Nov 29th 2016)
    Actually, now that I think about it, a template can be viewed as a diagram with some internal elements being global sections/generalized elements, which upholds typing.
    • CommentRowNumber5.
    • CommentAuthorKeithEPeterson
    • CommentTimeNov 30th 2016
    • (edited Nov 30th 2016)

    Scrap what I said above. The thing I was looking for is called a “Generic Zipper”, it’s a sort of “derivative” of data-types.

    PDF: Scrap Your Zippers- Michael D. Adams

    • CommentRowNumber6.
    • CommentAuthorTodd_Trimble
    • CommentTimeNov 30th 2016
    • (edited Nov 30th 2016)

    Keith, if you set the formatting to Markdown+Itex, then you can create a link like so: Scrap Your Zippers. See the Source for the syntax.

    • CommentRowNumber7.
    • CommentAuthorRodMcGuire
    • CommentTimeNov 30th 2016

    A zipper appears to be a data structure implementing some of the rooted bi-pointed acts I discussed above.

    The Wikipedia article talks about a path to a hole. Above I talked about all paths to a hole which turns out to be a bi-rooted act itself (and a regular expression / Kleene algebra). I’m not familiar enough with zippers to know if they can handle my potentially cyclic data structures or if anybody has given them lattice ordering.

    Complementary to conJoin defined above there is the conMeet “-” monoidial operator with \top as its unit. Replacing the coPoint in an act requires two steps: “removing” it by conMeeting with \bot followed by conJoining in the replacement value .

    {first:*John,last:Smith}*+*Mary={first:*Mary,last:Smith}\{first: *John, last: Smith\} - *\bot + *Mary = \{first: *Mary, last: Smith\}

    And just for another example here is appending linked lists analogous to the use of difference lists in Prolog.

    [Johnlikes|*]+[toeat|*]+[pie|*]=[Johnlikestoeatpie|*][John\, likes | *] + [to \,eat | *] + [pie | *] = [John\, likes\, to\, eat\, pie | *] {h:Johnt:{h:likest:*}}+{h:tot:{h:eatt:*}}+{h:piet:*}\{h:John t:\{h:likes t:*\}\} + \{h:to t:\{h:eat t:*\}\} + \{h: pie t:*\} ={h:Johnt:{h:likest:{h:tot:{h:eatt:{h:piet:*}}}}}= \{h:John t:\{h:likes t:\{h:to t:\{h:eat t:\{h: pie t:*\}\}\}\}\}
    • CommentRowNumber8.
    • CommentAuthorKeithEPeterson
    • CommentTimeNov 30th 2016
    Yeah, your post made me dive deeper into the net to understand what you were meaning. The Haskell community has done everything already it seems... >_>
    • CommentRowNumber9.
    • CommentAuthorKeithEPeterson
    • CommentTimeDec 25th 2016

    Is there a notion of \mathcal{E}-acts, for an arbitrary topos \mathcal{E}, or is this confined to just bi-heyting topoi?

    • CommentRowNumber10.
    • CommentAuthorRodMcGuire
    • CommentTimeDec 25th 2016

    you should ignore what I said about the category Kleene(P) (as what enriches various act categories) as being obviously Heyting - I was getting levels confused.

    There are several different ways to define Kleene algebras. I haven’t worked out which one I’m talking about.

    I came across this paper a while back: Pippenger - Regular languages and Stone Duality, where he says:

    it is well known that the regular languages over a fixed alphabet form a Boolean algebra and that the “implicit operations” with a fixed number of operands form a Stone space.

    I should work on understanding this paper or the work derived from it.