Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active July 15, 2023 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenwebb/e0b3e2231362250928cfc75eb399f90f to your computer and use it in GitHub Desktop.
Save kenwebb/e0b3e2231362250928cfc75eb399f90f to your computer and use it in GitHub Desktop.
Xholon - Mathematical Objects

Xholon - Mathematical Ojects

List and describe all the mathematical objects in Xholon.

This will include ojects of type:

  • set
  • list
  • poset, toset
  • arrow, function, morphism
  • category
  • group
  • ...

Include official math definitions.

Sets

<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Fri Jul 14 2023 23:22:13 GMT-0400 (GMT-04:00)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Xholon - Mathematical Objects
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: e0b3e2231362250928cfc75eb399f90f
Keywords:
My Notes
--------
14 July 2023
See brief notes in my notebook for 13 July 2023.
Use Xholon visit() to generate Sets, etc.
Use Julia to regenerate the Xholon tree
- given the set of all Xholon nodes; a list
+ the set of all BT parent-child pairs
maybe write it as Julia data structures
- data frames
- Catlab formats
References
----------
(1) https://www.primordion.com/Xholon/gwt/wb/editwb.html?app=568ffc4faf650b8e8ef4317bc0bc561b&src=gist
Xholon visit - experiments
]]></Notes>
<markdown><![CDATA[
##Xholon - Mathematical Ojects
List and describe all the mathematical objects in Xholon.
Provide a JS function that generates each mathematical object from the Xholon tree.
This will include ojects of type:
- set
- list
- poset, toset
- arrow, function, morphism
- category
- group
- ...
Include official math definitions.
###Sets
* set of all nodes in the complete Xholon tree
* set of all BT parent-child pairs
* set of all XML-type parent-child pairs
###Morphisms
* can be represented as pairs
]]></markdown>
<_-.XholonClass>
<PhysicalSystem/>
<Block/>
<Experiment>
<One/>
<Two/>
<Three/>
<Four/>
<Five/>
<Six/>
<Seven/>
</Experiment>
</_-.XholonClass>
<xholonClassDetails>
<!--<Block>
<port name="height" connector="Height"/>
</Block>-->
</xholonClassDetails>
<PhysicalSystem>
<Block/>
<Experiment/>
<One/>
</PhysicalSystem>
<Experimentbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
// functions for use with visit()
const funk = x => x + 5;
// build child-parent pair
const buildPair = node => `[${node.name().substring(0, 5)}, ${node.parent() ? node.parent().name().substring(0, 5) : "null"}]`;
var me, count, arrId, arrName, arrPairs, setId, beh = {
postConfigure: function() {
me = this.cnode.parent();
me.println(funk(6));
count = 0;
arrId = [];
arrName = [];
arrPairs = [];
$wnd.xh.root().append(this.cnode.remove());
//me.visit(this.cnode); // 1
$wnd.xh.root().visit(this.cnode); // 4
//$wnd.xh.app().visit(this.cnode); // 485
me.println(count); // 4
me.println(arrId); // 0,45,46,47
me.println(arrName); // lots
me.println(arrPairs); //
setId = new Set(arrId);
me.println(setId); //
},
//act: function() {
//me.println(this.toString());
//},
visit: function(visitor) {
count++;
arrId.push(visitor.id());
arrName.push(visitor.name().substring(0, 5));
//const a = visitor.name().substring(0, 5);
//const b = visitor.parent() ? visitor.parent().name().substring(0, 5) : "null";
//arrPairs.push(`[${a}, ${b}]`);
arrPairs.push(buildPair(visitor));
return true;
}
}
//# sourceURL=Experimentbehavior.js
]]></Experimentbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Experiment</title>
<rect id="PhysicalSystem/Experiment" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>Experiment</title>
<rect id="PhysicalSystem/Experiment" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment