Non-formal introduction - just some motivational examples
Peano axioms
See Peano axioms for details. I will give simplified explanation:
- - zero is a natural number
- - is a natural number
So solution of this equation: forms all natural numbers.
Solution in this case can refer to (either):
- minimal solution
- unique solution
- maximal solution
Result:
Kleene closure
Classically denoted as . But also can be written in form of Chomsky rules:
So solution of this equation: forms language for Kleene closure .
Result: e.g. empty string, string “a”, string “aa” etc.
ADT list
Type signature for linked list in terms of ADT
List(T) = T * List(T) + 1
Or the same in terms of TypeScript:
Result: e.g. empty list, list with one item of type T, list with two items of type T, etc.
Conclusion
As we can see it’s all the same principles, but symbols are a bit different
Numbers | Languages | Types | Sets |
---|---|---|---|
+ | | | + | |
* | * | ||
0 | |||
1 | 1, null, |
- Algebra allows to describe “structures”
- Algebra can be applied to different areas. I skipped all details, but there are formal definitions which allow to specify exactly how operations behave, which allows to find exact correspondence between different system
- List is a graph (DAG), which brings us to idea that we can use algebra to specify graphs
Related subjects:
- Algebraic graphs
- Combinatorial species
- Algebraic property graphs
- Categorical query language
See also: