Difference between revisions of "Function"

From PKC
Jump to navigation Jump to search
Line 46: Line 46:


==Related Pages==
==Related Pages==
* [[Logically related::Data]]
* [[Logically related::Morphism]]
* [[Logically related::Function]]
* [[Logically related::Natural transformation]]
[[Category:Function]]
[[Category:Function]]
[[Category:Data]]
[[Category:Data]]
[[Logically related::Data]]
 
</noinclude>
</noinclude>

Revision as of 03:09, 5 September 2021

Functions are abstract mathematical representation of relations between the domain and codomain. It can be represented as a key-value pairs, or in the lambda calculus[1] form.

Tag Line

Data with continuation together makes function.

Function can be used as a generic building block to represent information in general. It can be thought of as a primitive kind of data structure. This argument can be substantiated by thinking of Lambda calculus as a generalized way of encoding functions in an explicit structured data format.

A Critical Observation

In most cases, people think of MediaWiki as a generic note taking or a dictionary of relevant pieces of static information. However, knowing the capabilities of modern browsers, HTML 5, JavaScript, and the server side PHP + Lua (Scribuntu) extension of MediaWiki, not to mention Semantic MediaWiki and its MySQL/MariaDB data storage/retrieval capabilities, the overall functions of MediaWiki must not be just seen as a passive data browsing tool, but a full blown programming and data creating environment. In programmer's term, MediaWiki can be configured to be a full blown Integrated Development Environment, for any subject matter. This is what PKC strives to become, it tries to raise users' awareness of data elements as functions, so that all data are also functions in a hyperlinked context. In other words, hyplerink is a kind of data-oriented function, that allows users to incrementally construct small and large functions at many locations and across many time scales. On the Internet, everyone is constructing some piece of a bigger function that they may never be directly conscientiously aware, but never-the-less, all users, all computers are incrementally constructing functions of many kinds through accumulating data elements, all in the hyperlinked fashion as articulated by Ted Nelson.

Scale-Free, Time-like Structures, and Ordered Namespace of Functions

Function as a data structure is not only universal, but it can also be designed to be Scale-free, meanningly that the formal properties of a specific Function, don't have to be bounded to a specific spacetime physical scale. However, in the space of all functions, the containment relationship in terms of what functions are classified into what sub-class(es) of functions can be studied in terms of Category Theory, and more specifically, in the field of Lattice Theory or just think of them in terms of Partially ordered sets. Thinking of named functions in terms of lattice or Partially ordered set, a.k.a. Posets, is an important mental model for both software engineering, and in everyday life. Thinking of functions as elements in Posets will give them a consistent abstraction in an ordered or time-like structure, so that it will build a generically applicable mental model for causal relations and in terms of an ordered namespace.

Function as Causal Relation

Function can be represented as a key-value pair of inputs and outputs, which defines a way to represent causal relations.

Design Principle

PKC models data assets in terms of functions, which is a kind of scale-free data representation. These functional data representation are in turn categorized into Page, File, and Service. Each category of function is treated as the primitive form of data, and can be recursively referenced to perform both computation and carry computational results. All pages in PKC are conceptualized as hyperlinked data points in a functional style. All data points or pages have their unique names. These names can be thought of as function names, and each function may have many key-value-pairs as its arguments.

Data Architecture

In PKC, data is consistently represented using one universal construct, directed relation. This also means that we can always use the same data type, directed relation to interpret and manipulate data.

Architecture = Invariant Properties

It is important to note that the word Architecture implies elements of a system that doesn't change. Therefore, this section will talk about the data elements of PKC that don't change over space and time.


Logic Model (Data Architecture) Template:LogicModel 09 5, 2021
Abstract Specification
Context Data Architecture/Context
Goal Data Architecture/Goal
Success Criteria Data Architecture/Criteria
Concrete Implementation
Given Inputs When Process is executed... Then, we get Outputs
Data Architecture/Input Data Architecture/Process Data Architecture/Output
Boundary/Safety Conditions of Data Architecture
Data Architecture/Boundary

References

  1. Abelson, Harold; Sussman, Gerald; Sussman, Julie (1985). Structure and Interpretation of Computer Programs (2nd ed.). local page: MIT Press. ISBN 0-262-51087-1. 

Related Pages

Represent Knowledge in Functions

Thinking about functions at all times in this primitive, yet generic construct, allows users to think of all functions as hyperlinks that relate objects from one to the other, revealing the topological structures, or the systematic structures of anything. Most importantly, users of PKC can think of writing down notes in various pages are effectively construction functions or conducting computational work in parallel and in an explicit functionally designed data storage. The storage packages are managed in terms of files. The availability and reliability of providing these pages and files are called services. This completes the three categories of scale-free data representation. The design principle that differentiate PKC from other hyperlink/hypermedia systems is that PKC considers data content within the system as an integral part of the system. Since every instance of PKC is tightly bound with its own content, all PKC must allow maximum freedom to all instances of PKCs. To accomplish this design principle, it needs to give full ownership and power to conduct changes to the owners of individual instances. In the most egalitarian scenario, we must reduce the barrier to entry, so PKCs should be convenient and cheap to be replicated or allowing for the creation of new instances that are independent from other instances of PKC, so that the functionality of PKCs can be easily shared across many application domains.

Implementation

Computationally, functions can almost always be thought of as a dictionary, or a lookup table/hashtable that relates a value of an input, to a value as the output of a function. This simplification is useful in the sense that all functions can be conceptualized as dictionaries/lookup tables, so that all functions can be treated as one type, which is a way to ensure structural purity, mathematically called a Monad. According the Beckman's talk on Don't fear the Monad[1], this monadic approach will help construct complexity out of simplicity.

Function as verb

It would be rather easy to imagine why functions can be thought of as verbs. They can act on inputs and transform them into outputs. In MediaWiki, once Scribunto is installed, this can be realized rather easily. Otherwise, the JavaScript functional programming that comes with most modern browsers, can also demonstrate the nature of the effects of functions being verbs.

Function as noun

Function can also considered as nouns. Many function are associated with certain unique name in a defined functional namespace, functions can also be encoded in a formalized structure, that are called anonymous functions. In this case, each function's unique structural content, defines its identity. In this case, function can be thought of as names. In a computing system that treats computation as a pure structure, all functions must have their unique structures or unique names, so that their behavior can be consistently defined and asserted within the defined computing system. It is interesting to think of numbers as a kind of namespace, then, integer numbers, floating point numbers, are two kinds of namespaces. To study the nature of these namespaces in terms of their structures, such as IEEE 754[2], the functional nature becomes rather obvious.


PKC is based on MediaWiki, which in term installs Scribunto to enable Lua programming. Lua defines functions as below:

f = function (op, a, b)
 if op == 'add' then
   return a + b
 else if op == 'sub' then
   return a - b
 end
 error("invalid operation")
end

Function represented in a Logic Model

Logic Model (Function) Template:LogicModel 09 5, 2021
Abstract Specification
Context A function is a scale-free mechanism to make decisions based on symmetry-breaking information. It can be generically represented in terms of lambda calculus.
Goal Functions can be used to manipulate information based on the mechanism of continuation/order processing/symmetry-breaking to manipulate information.
Success Criteria All functions should satisfy the conditions of being constructed from a single type of (Universal component).
Concrete Implementation
Given Inputs When Process is executed... Then, we get Outputs
Data content formats that covers the following types:
  1. Text
  2. Image
  3. 3D Model
  4. Audio
  5. Video
  6. Software pakcage
A Turing complete mechanism that can manipulate data from all places.
  1. Mapped onto a lambda calculus formalism (file-based abstraction)
  2. Human readable via popular web browsers in web page form.
  3. Composable with many computing services.
  1. Processed data content to be encoded in the universal component format.
  2. Processed results should be measurable in terms of soundness, precision, and terminability.
  3. All functional results should be associated with a hierarchy of entropy pools.
Boundary/Safety Conditions of Function
Verified and validated using built-in testing infrastructures.


References

Related Pages