init commit again

This commit is contained in:
Peter
2023-11-01 09:29:33 +01:00
parent 448147e7da
commit d6c745207b
250 changed files with 15552 additions and 1 deletions

View File

@@ -0,0 +1,58 @@
### Generating
[
Type atoms
Entity used-atom-set
Funcon initialise-generating
Funcon fresh-atom
Funcon use-atom-not-in
]
Meta-variables
T <: values
Built-in Type
atoms
/*
`atoms` is the type of values used as distinguishable tags.
Notation for individual atoms is not provided.
*/
Entity
< _ , used-atom-set(_:sets(atoms)) > ---> < _ , used-atom-set(_:sets(atoms)) >
Built-in Funcon
initialise-generating(_:=>T) : =>T
/*
The initial value of the `used-atom-set(SA)` entity is unspecified. It could
contains atoms that are reserved for internal use.
*/
Funcon
fresh-atom : =>atoms
/*
`fresh-atom` computes an atom distinct from all previously computed atoms.
*/
Rule
element-not-in(atoms, SA) ~> A
-----------------------------------------------
< fresh-atom , used-atom-set(SA) >
---> < A , used-atom-set(set-insert(A, SA)) >
Funcon
use-atom-not-in(_:sets(atoms)) : =>atoms
/*
`use-atom-not-in(SA)` computes an atom not in the set `SA`, and inserts it
in the `used-atom-set(SA')` entity, in case it was not previously used.
*/
Rule
element-not-in(atoms, SA) ~> A
--------------------------------------------------------
< use-atom-not-in(SA:sets(atoms)) , used-atom-set(SA') >
---> < A , used-atom-set(set-insert(A, SA')) >