-directCode: fix handling of paths within the Code
 in particular, this makes PatternView work when the
 domain is ['a {}, 'b <a>]
-replace singleton with fromArray
remove random crap in code_list.xml
html junk
document invariants of map, add note about the bug in it
Tree: fix typo in doc
add missing "implements Serializable" to Relation.Label_
WIP: List relations in MainActivity
  - TODO reimplement canonicality in terms of
    LinkTree and implement canonicalCode/canonicalRelation
    in terms of it
implement linking to existing relations
allow replacing the focused relation with any relation, adapting the domain/codomain if necessary

this affords a straightforward way to define negation on a pair:
  given:
  <code> bool <is> ['t, 'f]
  (bool -> bool) negate <is> ['f -> 't, 't -> 'f]
  <code> boolPair <is> ['a bool, 'b bool]

  the following steps can be taken:
  (... -> []);
  (... -> {'a [], 'b []});
  (... -> {'a [] | negate, 'b []});
  (... -> {'a [] | negate, 'b [] | negate});
  (... -> {'a $.a | negate, 'b [] | negate});
  (... -> {'a $.a | negate, 'b $.b | negate});
remember to get rid of multiple interfaces shit
when replacing label, if the subrelation's codomain is unchanged,
keep the same subrelation, otherwise replace it with a dummy
- implement linking to other parts of the relation
- change replaceRelationAt to take a relation or
  path instead of just a relation
RelationPath: handle when path points to another path
RelationNodeEditor: handle when selected relation is a path
                    when showing domain/codomain buttons
addRelationToMenu: pass the enclosing abstraction's code to renderRelation
RelationEditor: reset the path when replacing a label
addRelationToMenu: dont call enclosingAbstraction when path points to a path
ProjectionMenu: use rerooted codes instead of subcodes
-implement extendUnion/extendComposition for relation references
-implement selecting a relation reference
-replaceRelationAt -> replaceRelationOrPathAt
  -remove RelationEditor.move instead of evaluating whether it still works
adjust relation paths after extendUnion/extendComposition

-refactor some functions in ListUtils
-RelationPath:
  -replace constructor with recursive function
  -render relation reference
-inAbstraction: allow path to designate a relation or reference