|
The Miser Project Applicative-Procedure λ-Abstraction |
orcmid.github.io>
miser>
lambda>
index.html>
0.7.2 2026-05-01T00:41Z |
In the oMiser computational model, every ob has an applicative interpretation as a script. Whether viewed as “just an ob” or as a purposive script depends on what usage is intended for it, on the context in which it is encountered.
In some cases, intention as a script is likely, since scripts have features that are unexpected in “just” obs. In essence, however, the plain/script intention is revealed only in how an ob is employed in a computation, and every ob can occur as either or both at various points in a script-driven computation.
λ-Abstraction is a systematic approach to transforming script forms into other scripts that can be applied to operands that are then used as scripts, as data, or as both. This is an important and powerful mechanism demonstrated by representations and the abstraction operations here.
| Views on Abstraction |
|---|
| “We call the symbol λx an abstraction operator, and speak of the function which is denoted by (λx M) as obtained from the expression M by abstraction.” |
| – Alonzo Church [Church1941: p.7] |
| “This process [of extracting common features] can be regarded as a repeated abstraction … and under certain circumstances such abstracting processes can be repeatedly piled on top of one another. Here ‘abstract’ has to be understood in the literal meaning of the word as ‘removing’, as leaving aside everything inessential for the context in question or for a particular purpose … .” |
| – Hans Reichardt [VNR1977: Introduction,p.11] |
| “A high-level computer language abstracts away the machine [so that] the programmer need not be an expert in the machinations of computer hardware … in order to successfully program a computer. High-level languages (HLLs) automate, hide, or otherwise abstract away the underlying operations of the machine … .” |
| – Mark Jones Lorenzo [Lorenzo2019: Introduction, p.13] |
| “Abstraction is about digging deep into a situation to find out what is at its core making it tick. Another way to think of it is about stripping away irrelevant details, or rather, stripping away details that are irrelevant to what we’re thinking about.” |
| – Eugenia Cheng, The Joy of Abstraction [Cheng2023: 2.3 Forgetting Details] |
| “Abstraction is a verb: to abstract is to identify the basic principles and laws of a process so that it can be studied without regard to physical implementation; the abstraction can then guide many implementations. Abstraction is also a noun: An abstraction is a mental construct that unifies a set of objects. Objects of an abstraction have their own logic of relations with each other that does not require knowledge of lower-level details.” |
| – Peter J. Denning. Abstractions [Denning2025: What is Abstraction?] |
Here, the views of Alonzo Church and Peter Denning will be favored. A view of Aristotle will also be adapted: In portrayal of abstractions there are also incidentals (sometimes called accidentals) that accompany expression and manifestation of abstractions. Incidentals are unavoidable, especially in treatment of computation. It is unfortunate whenever incidentals intrude on grasping what might be considered as the pure abstraction. Keep that in mind.
The challenge at the oMiser/oFrugal level is the fact that there are only obs and every ob has an applicative interpretation; any ob can have an intended operational use as both data and script. The computational accomplishment of abstraction for oMiser straddles that ambiguity/flexibility of interpretation.
Pure abstraction operations on obs depend on an ob and its structure without consideration of anything other than the ob “as-is.” The result from Frugalese
σ.s M
(sigma s applied to M) is an ob such that, taken as a script applied to operand N,
(σ.s M) N
determines a form of ob M with N substituted everywhere s occurs in M. This is based strictly on ob structure and not on any interpretation of M as anything but just an ob.
Evaluation of (σ.s M) determines an ob different than M having no occurrences of s. (σ.s M) has s abstracted away (from M) in the sense expressed by Alonzo Church, quoted above. And the result is a script for an an applicative function. It is assured that
((σ.s M) s) = M as-is.
Also, if s does not occur in M, ((σ.s M) N) = M regardless of definite ob, N.
In some situations, the s in M can be though of as a variable, although there are no variables, as such, in oMiser applicative scripts. What (σ.s M) accomplishes is to effectively make s “variable” in M by abstracting it away, establishing a script that will substitute any ob for the occurrences of s in M.
This is distinct from how variables are considered in conventional programming languages and in mathematics.
The script for σ, applied to an operand ob, x, derives a new script that will abstract x from any given next operand. In the oMiser implementation of σ, operand x can be any ob, although usual practice is to use lindies (literal symbols) in the handy form σ.x. The operation comes down to matching patterns and rewriting obs to a new form that satisfies the definition of (σ.s M).
The rewriting aspect is more evident with the handy companion functions, δ(s, N) and subst(N, s):
δ(s, N) M = subst(N, s) M = (σ.s M) N = σ(s, M, N) = ((σ s) M) N
illustrating various Frugalese forms for achieving the same result, given definite s, N, and M.
The variations are convenient in different settings, including where the operands are determined and “fixed” in different applicative cases.
Keep in mind that, in oFrugal for example,
δ(s, N) M = (( δ(s) N) M)
and the intermediate forms δ(s) and ( δ(s) N) may be useful for reuse in multiple situations.
Such intermediate forms, subst(.ARG) for example, are known as Curried
forms. They will be employed heavily in the development of oFrugal utility
scripts, including those for applicative-procedure abstraction.
In Frugalese, σ.s M and the companion functions are expressed as follows.
def σ.s M = if M = s
then .arg
else if is-individual(M)
then ` M
else if is-enclosure(M)
then let R = σ.s .a M
in if is-enclosure(R)
then ` M
else .e :: R
else let R = σ.s .a M,
S = σ.s .b M
in if is-enclosure(R) ∧ is-enclosure(S)
then ` M
else .c :: R :: S;
def subst(N, s) M = (σ.s M) N;
def δ(s, N) = subst(N, s);
An important feature of σ.s M is that the result is an enclosure (of M)
when there is no occurrence of s in M. This is useful as a kind of
has no s check, avoiding recreating portions of m that have nothing to be
abstracted and made substitutable.
The derivation of oFrugal scripts for applicative functions σ, subst, and δ is narrated in the file oSigma.
Symbolic forms are obs, comprised of lindies, the have the form of applicative oMiser scripts but are just that, the form without any intrinsic operational significance.
Symbolic forms are distinguished by the obaptheory predicate is-symbolic-form(x) [obaptheory: Obap3(a,b)].
When symbolic forms are evaluated as scripts for applicative expressions, the results are simply the symbolic forms themselves [obaptheory: Obap3].
For example, oFrugal expressions
alpha(x) beta(y) ` zed
and
(alpha :: x) :: (beta :: y) :: ` zed
result in the same ob canonical form (the second).
Symbolic forms can be regarded as pseudocode for applicative expressions. Transformation into an applicative-operation script is by abstracting away symbolic terms of that pseudocode.
Learning to operate with them is best explored by examination of worked examples.
[Author’s Note]: Brief introduction to the two forms. I also have to cope with having changed computers and needing to wrestle Visual Studio Code into working properly on a fresh setup. I am looking at what the settings are on my laptop to see how to get some of the same behaviors
I also need to decide how much of the oSigma.txt and oLambda.txt to show, along with introduction of Frugalese and how it is handled.
This placeholder links to raw materials and notes, including text files. There will be organized folios of content as consolidation of documentation on the web progresses.
| ID | Status | Started | Topic |
|---|---|---|---|
| sigma | 0.6.1 2026-04-21 | 2024-05-05 | σ.s M, subst(L, s), δ(s, L) definitions (authoritative) |
| lambda | 0.5.0 2025-06-12 | 2024-06-20 | λ.x & ρ.p Abstraction Operations (authoritative) |
Using a GitHub account, discuss Miser Project topics in the Discussion section. Propose improvements and removal of defects in Miser Project documentation and software in the Issues section. There are also relevant projects from time to time. For any security concerns, please consult the project security policy.
|
|
You are navigating the Miser Project on Github |
created 2024-01-25 by orcmid |