---
i read much of the page https://en.wikipedia.org/wiki/Predicate_functor_logic . The primitives, which are functions on predicates, listed there are (where 'z' represents any number of additional variables):
- identity (I): I(Pxyz) iff Pxxz iff Pyyz (not sure that i completely understand this one; perhaps Wikipedia meant "I(Pxyz) iff (Pxz iff Pyz))"? that would make perfect sense)
- padding: add a variable to the beginning of the argument list
- cropping: remove the beginning variable from the argument list
- reflection: duplicate the beginning variable from the argument list
- cartesian product: i don't quite understand this one, but whatever it is, it looks like it can be built out of the others
- major inversion: rotates the variables in the argument list to the right
- minor inversion: swap first two variables
- permutation: rotate the SECOND thru last variables to the left
so for our purposes here (collecting primitives useful in programming languages), except for I, these are like Forth operators on the argument list. A lambda calculus-y formalism, with variables, can already express all these, in a manner similar to the Forth notation used to show what stack operators do. So i don't think we need to think much more about this for Oot, except perhaps to remember:
- in logic, we might want operators that apply directly to predicates and transform them
- these transformations might be Forth-ish rearrangements of the argument list to the predicate, so we should make that easy and general
- this increases the evidence that we should just have a syntax like the Forth notation for rearranging stuff, and that this syntax should be able to be easily used rearrange function (and predicate) argument lists
- regarding I (identity), we want a way to test the identity of two predicates when one of the arguments is set to, first x1, and then x2
i've added these to ootLogicNotes1 and ootMetaprogrammingNotes2.
---