Brenda the Bank manager knows the privacy laws.
If a client leaves the bank, their data leaves with them, like they where never there!
db = ... // bank database
db2 = add(db,x) // Operation adds client
db3 = remove(db2,x) // Operation removes client
d == db3 // Leave no Trace.
\(d\boxplus x\)
\(d\boxminus x\)
\(d = (d \boxplus x)\boxminus x\)
x == find(add(db,x),x)
\(x=(d\boxplus x)\cap x\)
add(db,x) == add(add(db,x),x)
\(d\boxplus x=(d\boxplus x)\boxplus x\)
Adding works
Adding happens once
None == find(remove(db,x),x)
\(\emptyset=(d\boxminus x)\cap x\)
Removing works
add(add(db,x),y) == add(add(db,y),x)
\((d\boxplus x)\boxplus y=(d\boxplus y)\boxplus x\)
Adding commutes
The "Algebra of the API"
Used to design software and test it.
Alarmed by ransomware the IT department make snapshots of all database transactions to be restore everything identically after an attack.
transactions(db)+1 == transactions(add(db,x))
transactions(db)+1 == transactions(remove(db,x))
\(\#(d)+1 = \#(d\boxplus x)\)
\(\#(d)+1=\#(d\boxminus x)\)
Log Transactions Laws
\[\#(d) = \#( (d\boxplus x)\boxminus x) = \#(d\boxplus x)+1=\#(d)+2\]
\[0=2\]
But it might go by too fast to be noticed...
Consistency is a
solved problem. Use GAP4
Algebra rewriting is "solved" on homogeneous algebra, e.g.
\[*:A\times A\to A\]
Most applications are heterogeneous, e.g.
\[*:A\times B\to C\]
Operads overshot the generality end up with topology questions not algebra.
Disagree about equality.
Equality you begin with
E.g. IT/Software company
Coarser equality e.g. bank manager
Equivalence Relations
IT keeps two notions of equal.
Manager axioms are true under \(\equiv\) only.
Implement \(\equiv\) by a function \[\pi:DBSnaps\to DB\qquad \pi(d,actions)=d\] that makes technical IT data private to management system.
More disagree about equality.
Equality you begin with
E.g. IT/Software company
Refined equality, e.g. power company
Coarser equality e.g. bank manager
Equivalence Relations
What?
\[x=y\Longleftrightarrow (\forall P)(P(x)\Leftrightarrow P(y))\]
Coarser equality
looks at fixed \(P_i\)
Liebniz:
only \[x=x\]
Equivalence Relations are removing properties
Refine is to add properties
\[\begin{aligned} DB[X] & = 0:DB \\ & \mid (d:DB)\boxplus (x:X)\\ & \mid (d:DB)\boxminus (x:X)\\ & / \text{refl}(d): (d=_{DB}d)\\ & / \text{priv}(x): (d=_{DB} (d\boxplus x)\boxminus x)\\ & / duplicate(d):(d=_{BD} copy(d))\end{aligned}\]
\[\begin{aligned} DB[X] & = 0:DB \\ & \mid (d:DB)\boxplus (x:X)\\ & \mid (d:DB)\boxminus (x:X)\\ & / \text{refl}(d): (d=_{DB}d)\\ & / duplicate(d):(d=_{BD} copy(d))\end{aligned}\]
\[\begin{aligned} DB[X] & = 0:DB \\ & \mid (d:DB)\boxplus (x:X)\\ & \mid (d:DB)\boxminus (x:X)\\ & / \text{refl}(d): (d=_{DB}d)\end{aligned}\]
So equals is not absolute but variable.
New problem:
When frontal assualt fails, go the other direction!
1. Relax equality until it is easy.
2. Do the successive refinement with groupoid isomorphism.