2021

[1]Mohammad Nayeem Teli

1]University of Maryland, College Park, MD

2]University of Arkansas, Fayetteville, AR

# Birds’ Eye View: Measuring Behavior and Posture of Chickens as a Metric for
Their Well-Being.

Kevin Hyekang Joo<EMAIL_ADDRESS>Shiyuan Duan<EMAIL_ADDRESS>Shawna L. Weimer
<EMAIL_ADDRESS><EMAIL_ADDRESS>[  [

###### Abstract

Chicken well-being is important for ensuring food security and better
nutrition for a growing global human population. In this research, we
represent behavior and posture as a metric to measure chicken well-being. With
the objective of detecting chicken posture and behavior in a pen, we employ
two algorithms: Mask R-CNN for instance segmentation and YOLOv4 in combination
with ResNet50 for classification. Our results indicate a weighted F1 score of
88.46% for posture and behavior detection using Mask R-CNN and an average of
91% accuracy in behavior detection and 86.5% average accuracy in posture
detection using YOLOv4. These experiments are conducted under uncontrolled
scenarios for both posture and behavior measurements. These metrics establish
a strong foundation to obtain a decent indication of individual and group
behaviors and postures. Such outcomes would help improve the overall well-
being of the chickens. The dataset used in this research is collected in-house
and will be made public after the publication as it would serve as a very
useful resource for future research. To the best of our knowledge no other
research work has been conducted in this specific setup used for this work
involving multiple behaviors and postures simultaneously.

###### keywords:

object detection, classification, behavior recognition, posture recognition

##  1 Introduction

According to the USDA, the total per capita consumption and production of the
poultry meat – specifically chicken meat – has been growing for decades and is
projected to continue to be the dominant meat consumed in the U.S.
dohlman2020usda  and the world owidmeatproduction . This growth is in line
with the United Nations’ goal for sustainable agriculture cf2015transforming .
However, for food security and improved nutrition, it is important that, as
the production and consumption of chickens increases, the health and the well-
being of the animals improve in tandem as there is a direct link between
chicken welfare and immunity BERGHMAN20162216 .

To meet the growing demands for poultry products and the welfare of the
poultry, it is very important to control the spread of diseases, which
requires monitoring chickens and their behavior. However, even broiler
companies with years of experience of working with antibiotic-free production
systems struggle to control diverse health and disease challenges, ultimately
decreasing the welfare of the birds and supply of chicken in the United States
OVIEDORONDON20191 . Current approaches to evaluate and assess the welfare of
chickens traditionally involves human caretaker observation. Based on visual
assessments of behavior and body condition, a score is assigned as a health
metric granquist:19 . However, the welfare of animals also includes affective
(mental) state that cannot be assessed by observation of body condition, but
can be assessed by observing behavior. Behavior is directly related to the
welfare of chickens BERGMANN201790 . Human observation will always include
inherent inter- and intra-observer variations along with costly and intensive
labor for human observation in welfare assessment schemes jong:16 . Therefore,
there is a need for more innovative robust technological methods to provide
accurate information that can assist humans to glean viable on-farm broiler
chicken health and welfare outcomes.

Artificial intelligence, specifically computer vision and machine learning, is
increasingly playing a bigger role in innovative solutions for animal welfare
ani6100062 ;
milosevic_ciric_lalic_milanovic_savic_omerovic_doskovic_djordjevic_andjusic_2019
; OKINDA2020184 .

In our paper, we employ computer vision techniques to address monitoring
chickens for their behavior on a custom new dataset that was also collected by
us. Our goal is to observe and analyze chickens’ behavior and posture in a pen
using a live video stream. There are three postures: sitting, standing, and
walking. Since two of these postures are stationary, we classify posture as a
binary classification problem, with stationary and walking as the two
categories. In addition, we look at the behavior of the chickens, captured
through the following behaviors: eating, foraging, preening, allo-preening,
drinking, dust-bathing, and control (no behavior or activity). Our approach to
analyze these postures and behaviors involves: detecting the chickens across
frames, identifying one of the postures, and finally associating a behavior
with the posture.

We used a two-pronged approach to localize chickens and detect their posture
and behavior. The two approaches include: Mask R-CNN kaiming ; and YOLOv4
YOLOv4  in combination with ResNet-50 resnet50 . Mask R-CNN detects objects,
in our case chickens, and simultaneously generates a high-quality segmentation
mask for each instance, which helps determine the posture and behavior as
well. However, YOLOv4 is programmed to only localize objects, the chickens in
this paper, by providing a bounding box. Our primary rationale for choosing
YOLOv4 for the object detection model is that YOLO is well known for its
rapidness in computation and effectiveness in detecting non-small (over 32x32
px) objects small ; the objects we are investigating are mostly considered
large (over 96x96 px). Therefore, in conjunction with the detection model, the
ResNet-50 classifier is used to classify the posture and behavior for the
particular chicken instance as a follow-up task. These methods are tested on a
new dataset that we collected in a pen of 20 chickens, monitored by three
cameras spanning three sections of the same pen. Each of the cameras contained
multiple chickens at any given instance. This pen did not have any dividers so
birds could freely move between cameras. An image of the pen of chickens is
shown in Figure 1.

Figure 1: Chickens in the three pens along with the features like the drinking
water, feed, dust bath and also the cameras that collect this data.

The figure also shows the locations of the three cameras that recorded the
video. A more detailed description of this dataset is in Section 3.

##  2 Related Work

###  2.1 Chicken Disease Monitoring

Computer vision algorithms have been proven to be suitable for repetitive
work, such as identifying diseased chickens Bi2018Disease . In their paper,
the authors of previous work have proposed a method of detecting chickens with
potential health issues using a non-convolution neural network method. Their
dataset was composed of 500 images of healthy chickens and 236 images of
diseased chickens, separately captured from the videos taken in the actual
feeding environment and classified into either diseased or non-diseased, using
a SVM classifier. Then, combs, eyes and their contours were also obtained in
HSV color model by the H threshold. Co-occurrence matrix of H component was
calculated from the comb to get the color feature and the texture feature
including ASM, COR, IDM, Ent 6 geometry features including A, P, R, E, C and
A/P were computed from the eye contour. Finally, all the features mentioned
above are fed into an SVM classifier to identify diseased chickens.

###  2.2 Applications of Mask R-CNN

Mask R-CNN is a Convolutional Neural Network used for image and instance
segmentation. In this work we use it for instance segmentation. It was built
on top of Faster R-CNN fasterRCNN  and consists of two stages. The first
stage, a Region Proposal Network (RPN), predicts object proposal bounding
boxes, and the second stage, an R-CNN detector, refines these proposals,
classifies them, and computes pixel-level segmentation for these proposals.
This two-stage process makes this approach a combination of object detection,
object localization, and object classification, thereby enabling it to clearly
distinguish between each object classified as similar instances.

In the domain of behavior recognition for animals and plants, Mask R-CNN has
been a popular choice s19224924 ; YU2019104846 . Li et al. attempted to
observe four pigs in a pen for signs of mounting behavior, which is
potentially detrimental to the well-being of pigs. The video of the pigs was
recorded in a top-down view, and localized through manual labeling, which was
later formatted into JSON files. Next, the labelled and pre-processed dataset
was fed into Mask R-CNN with ResNet-50 as a backbone. Beyond behavior
recognition, Mask R-CNN has been used for many other problems, including fruit
detection YU2019104846 . In the study of Yu et al., Mask R-CNN, with ResNet-50
as a backbone, was combined with Feature Pyramid Network architecture to
localize the fruit picking point and identified ripe fruits from unripe
fruits. Moreover, Tian et al. TIAN2020264  created a variation of Mask R-CNN,
called MASU R-CNN, which utilizes U-Net as a backbone, to gather detailed
information of flowers during their growth.

###  2.3 Applications of YOLO

YOLO, short for You Only Look Once, is a well-known object detector introduced
in 2016. It quickly gained popularity for its rapidness and has consistently
garnered attention through its continuous development over years yolo . One of
its family, YOLOv4 is a one-stage object detector built off of the original
models YOLOv4 . Just like other object detectors, this algorithm has two
components – a backbone and a head. The backbone is pre-trained on ImageNet
and encodes relevant information about the input. The head predicts object
classes and the bounding box coordinates. YOLOv4 also identifies a “neck”
defined as layers between the backbone and head that serve to collect feature
maps from different stages of the network. In YOLOv4, the authors combined
some of the new features such as, Weighted-Residual-Connections (WRC), Cross-
Stage-Partial-connections (CSP), Cross mini-Batch Normalization (CmBN), Self-
adversarial-training (SAT), Mish-activation, Mosaic data augmentation, and
CIoU loss, to achieve the state-of-the-art results.

YOLO has been widely utilized in a variety of fields of study, including
poultry science. A paper published by Neethirajan chickenYOLO  utilized YOLO
as a means of chicken detection. According to the paper, the authors used a
dataset comprised of 72 chickens that were from the following three breeds:
White Leghorn, Plymouth Rock, and Rhode Island Reds. The chickens were
recorded with an RGB camera at varying heights at different times of the day
under a variety of lighting conditions. Finally, a YOLO model was trained on
the videos collected in a supervised setting and yielded a chicken detection
accuracy of over 90%. However, the experiment in the paper solely involved
chicken detection and did not the behavior recognition of the detected
chickens. In addition, YOLO has also been adopted to detect and classify
behaviors of egg-laying breeder chickens yolo_egg_breeders . In the paper, the
model was utilized to observe and analyze the behaviors of roosters and hens
placed in two wired cages after recording them with cameras placed over the
cages. The entire data set consists of 10,230 photos randomly selected in a 30
days period. The sample sets are divided into training (8447 frames),
validation (939 frames) and test sets (844 frames). Using the data, chickens
were classified into one of the six following behaviors with a YOLO model in a
supervised manner: mating, standing, feeding, spreading, fighting, and
drinking. To our knowledge, this is the closest related work to our research.

##  3 Dataset

In this work, we used a new, custom, in-house-collected video dataset. Videos
were collected in May 2020 on twenty male and female broiler chickens (Redbro
and Red Ranger, Hubbard, LLC) in a 1.47m wide x 4.45m long pen. Birds were
provided a commercial diet ad libitum access to feed and water. The pen
contained 1 feeder, 2 drinkers, and 2 forms of environmental enrichment: a
dust bath (with diatomaceous earth substrate); and CDs hanging from rope
(Figure 1). The birds had been raised in a separate room in two pens prior to
the study. The enrichments were added to the pen on the day prior to video
recording. On day 62 of age, 14 continuous hours of video were recorded from
0600-2000 to a DVR from three CCTV video cameras (HemiVision Model #HM245).
Video cameras were mounted 2.59m above the pen.

Figure 2: Points used to localize a chicken using LabelMe annotation tool.

The full dataset contained 504 videos that cumulatively lasted 42 hours. These
videos were collected from three different RGB cameras mounted above the same
pen in 5-minute clips with a total of 168 videos for each camera. The videos
recorded were contiguous. The key distinction between environments is the
presence or absence of drinker, feeder, hanging CDs, and dust bath.

In order to create the ground truth data, each one of these videos needed to
be labeled frame-by-frame. However, since it is a very laborious task, we
annotated 43 videos frame-by-frame. The annotators had the prior knowledge in
poultry science and were trained in detail on poultry behavior by an expert.

The annotations in each frame contain a hand-labeled location as well as
posture and behavior information for each chicken. Here, the means of
annotations are explained by breaking the process down into two parts. For the
first part, each chicken is localized and labeled using LabelMe annotation
tool russell2008labelme . This information is then stored in a JSON format.
Each chicken is localized by identifying eight points on it as shown in Figure
2 to create the ground truth location.

The eight points are annotated in a clockwise direction, and the first and the
fifth point represent the head and the tail of the chicken, respectively. This
rule has been carefully honored by the annotators as the location of its head
and tail bear a significant meaning in pose estimation, which may be a good
new research direction. Our intention is to make the dataset publicly
available upon publication for the freedom of different pursuits by other
researchers.

Along with the polygonal location information, each chicken is assigned a
unique number, a bird ID, at the start of the video that remains consistent
across the whole video, for its potential use in tracking in future research.
In addition, this identification number is used to associate a posture and a
behavior, to be discussed later, with each chicken.

The second part involves an ethogram of pre-defined behaviors as shown in
Figure 3.

Figure 3: Ethogram: description of the pre-defined postures and behaviors.

For each localized chicken, the annotator provides the information about its
posture and behavior in an excel spreadsheet based on the frame number and the
chicken ID. The spreadsheet is then one-hot encoded into a CSV file.

Afterward, both the JSON file and CSV file go through a series of sanity
checks, such as polygonal coordinate anomaly check. This whole pipeline is
demonstrated in Figure 4.

Figure 4: Pre-processing pipeline to obtain the ground truth locations,
behavior and posture of the chickens for every frame.

To elaborate on the second part, the posture and behavior spreadsheet is
comprised of the following 15 columns (see Figure 5)

Figure 5: Sample Annotation presenting the various ground truth behaviors and
postures of birds in each frame.

: date, image, time, bird ID, walking (WLK), sitting (SIT), standing (STD),
eating (EAT), drinking (DRK), preening (PRE), allo-preening (PRA), foraging
(FOR), dust-bathing (DUB), not visible (NVS), and count. For all the postures
(WLK, SIT, STD) and behaviors (EAT, DRK, PRE, PRA, FOR, DUB) columns, we used
1 to denote that the behavior is associated with the chicken in that
particular frame, and 0 otherwise. Count represents the sum of posture,
behavior, and NVS, and was used for sanity checking (the value must be equal
to 1 or 2).

##  4 Methods

In this research, two models were used to detect chickens, and subsequently
identify their posture and behavior: Mask R-CNN and YOLOv4 in combination with
ResNet50. Mask R-CNN algorithm implementation used in this work is part of the
Detectron2 framework Detectron2018 .

###  4.1 Mask R-CNN

The chicken dataset is trained in a supervised manner. The input dataset, in
JSON and CSV formats (Figure 4), contains the following information: each
chicken’s eight-point polygonal coordinates (Figure 2), and labels for posture
and behavior.

Depending on the source, this data is categorized into three groups as
follows: videos 281 through 290 from camera 1; videos 213 through 217 & 244
through 253 from camera 2; videos 236 through 240 from camera 3. Then, each
dataset, which has been split by camera number, is divided into five folds for
cross-validation (Figure 6).

Figure 6: Dividing the camera-split dataset into five folds

For example, the camera 1’s four folds 1, 3, 4, and 5 were fed into Detectron2
for training, and the remaining fold 2 was used for testing. Afterwards, the
result was averaged across folds by camera number.

In summary, a total of fifteen experiments (i.e., three cameras * five folds)
were conducted, and three averages reported, one for each camera. We trained
two separate cross-validation models, one for posture and the other for
behavior classification. Figure 7 displays a Mask R-CNN pipeline demonstrating
the application of the algorithm for instance segmentation on our chicken
dataset.

Figure 7: Mask R-CNN pipeline Figure 8: YOLO & ResNet pipeline

###  4.2 YOLOv4

We use YOLOv4 object detector to localize chickens much like our experiments
using Mask R-CNN, albeit without labels for behavior or posture. Similar to
the previous experiments, the chicken dataset consists of the actual frames
that contain the chickens along with the JSON files describing the bounding
box of each chicken. The chickens are localized using the 8 polygonal
coordinates previously described. We performed two 5-fold cross-validation
experiments. In all, we ran 10 experiments, each with a different training and
testing set of videos as presented in Table 1.

Table 1: 5-fold cross-validated average precision of YOLOv4 in different IoU thresholds.  | Test Videos | AP:0.1 | AP:0.5 | AP:0.75
---|---|---|---|---
Camera 2 | 213 214 215 | 0.93 | 0.85 | 0.48
216 217 244 | 0.93 | 0.84 | 0.53
245 246 247 | 0.90 | 0.78 | 0.64
248 249 250 | 0.94 | 0.83 | 0.57
251 252 253 | 0.93 | 0.82 | 0.55
Camera 1 | 281 282 | 0.91 | 0.87 | 0.47
283 284 | 0.92 | 0.88 | 0.48
285 286 | 0.91 | 0.88 | 0.46
287 288 | 0.90 | 0.87 | 0.46
289 290 | 0.91 | 0.87 | 0.48

However, unlike Mask R-CNN, YOLOv4 only returns the chicken locations. Since
our goal is to detect chicken behaviors and postures, YOLOv4 is not suitable
by itself. For this research, we use ResNet-50 for both behavior and posture
classifications, post-object detection using YOLO. The complete pipeline of
our solution using YOLOv4 in combination with the ResNet-50 classifier is
presented in Figure 8 and described in the following section.

####  4.2.1 Chicken classifiers

The output of the object detection is the localization of the chicken in the
image frames. Each of these detected chickens is cropped and then processed
for posture and behavior classifications, separately.

The behavior classifier takes the YOLO-detected chicken and classifies it as
one of the five classes: control, eating, preening, allo-preening, and
foraging. The posture detector is a binary classifier that classifies each
chicken into either stationary or walking. Stationary chickens are either
sitting or standing.

We evaluated the bounding boxes detected by YOLO against the ground truth
bounding boxes based on the Intersection over Union (IoU) score between the
two. The ground truth bounding boxes are stored in an input CSV file along
with their labels. With this dataset, we are able to train our classifiers in
a supervised-learning manner.

Our classifiers have 4 major components: the preprocessing layer, the feature
extractor, the location embedding layer, and the prediction layer. The
preprocessing layer normalizes the input image and also augments the data
using random rotations (random horizontal and vertical flips are also
included). The backbone is a ResNet-50 feature extractor that is pretrained
with ImageNet dataset. The location embedding layer is a 3 layer MLP (Multi-
Layer-Perceptron) that takes four 2-dimensional vectors representing the
bounding box location with respect to the entire frame and encodes these
vectors into a 16-dimensional vector. This 16-dimensional vector is
concatenated with the output vector of the feature extractor and fed into the
prediction layer. Both posture and behavior classifiers are cross-validated in
different train-test-split settings. Each experiment has different train and
test videos. The average of train accuracy, test accuracy, and unweighted F1
scores (macro F1) are calculated and evaluated. Our dataset has an imbalance
in the number of different behaviors. To investigate this we also performed
class-wise evaluation experiments.

##  5 Results

In this section we present the experimental results for the two algorithms
discussed in the previous sections. Firstly, we present the posture and
behavior results of Mask R-CNN experiments. Secondly, we present the detection
accuracy of the YOLOv4 model we trained using Darknet library darknet13 ,
followed by the results of behavior and posture classification. In addition,
we also present the model test accuracy after cross validation and F1 scores
(weighted and unweighted). For each classifier, a precision and recall curve
is also presented.

###  5.1 Evaluation Metric

Object detection accuracy is calculated using the IoU metric. Each ground-
truth object is paired with one of the prediction bounding boxes that has the
highest IoU out of the ones whose IoU is over a certain threshold; the same
prediction bounding box is not used to pair multiple times. The process can be
summarized in the equation below:

$\begin{gathered}\max_{j}\text{ IoU}(gt_{i},pred_{j})\text{\;\;\;s.t.\;}\text{
IoU}>\alpha\end{gathered}$ (1)

where $\alpha$ is an IoU threshold ranging between 0 and 1, gt is the ground
truth chicken, pred is one of j chickens found to have an IoU of at least
$\alpha$; duplicates ignored, whichever has the highest IoU among j chickens
will be paired with i-th gt chicken, while rejecting the duplicate IoU
pairing.

###  5.2 Mask R-CNN

The performance of the model was evaluated using the popular method:
COCOEvaluation. COCOEvaluation works such that it first measures the AP at 10
different intervals – from IoU threshold of 50% until 95% at an increment of
5% – and takes the average of its performance at varying levels. However,
instead of reporting solely the average, we decided to report its AP result
for the entire 10 intervals for careful comparison.

We picked two models that effectively reflect the performance of our general
models while also capturing as much categorical information as possible. The
representative selections include, Camera 1 video with Sequence 283-284 as the
test set (i.e., Fold 2 of Camera 1 from Figure 6) and a Camera 2 video with
Sequence 248-250 as the test set (i.e., Fold 4 of Camera 2 from Figure 6).

Figure 9: Categorical distribution of the datasets used in Figure 10 and
Figure 11

The metadata provided in Fig. 9 helps convey the categorical distribution of
each dataset. The numbers in Fig. 9 represent the ground-truth counts of
chickens for each behavior category in the corresponding subset of the
dataset. It is important to note that, if there is no instance of a chicken
exhibiting a particular behavior in the test video sequence (i.e, a cell in
the test column contains 0), the line for the behavior is not plotted in the
graph.

For every category, We present the performance outcomes using a rectangular
boundary-box (bbox) and segmentation results of an object detector in Figures
10 and 11. The segmentation information is plotted in solid lines, and bbox
information in dotted lines.

Figure 10: Average Precision with respect to an IoU Threshold Figure 11:
Average Precision with respect to an IoU Threshold

It can be observed from both graphs that segmentation approach does not
necessarily outperform the bbox method encompassing the background, although
they both perform competitively well. In addition, we can mostly see the
plateau at the IoU threshold of 75%.

###  5.3 YOLOv4

The performance of YOLOv4 is evaluated based on the Average Precision (AP)
given different IoU thresholds. Results of a five-fold cross-validated
experiment is shown in Table 1. We trained 5 models for both camera 1 and
camera 2. Each model is trained on different sets of train and test videos.
Our model is proven to have an average precision of 85% when IoU is set to
0.5. This indicates that when the overlap between the bounding boxes of the
YOLO detected chickens and the actual bounding box of chickens is at least
50%, the average precision for detection is between 78-85% for Camera 2 and
around 87% for the Camera 1.

####  5.3.1 Behavior and Posture classification

Table 2 shows the test accuracy and F1 scores for posture classifier.

Table 2: This table shows accuracy and F1 scores for the posture detector on test videos Test Video # | Accuracy | Weighted F1 | Unweighted F1
---|---|---|---
213 214 215 | 88.09% | 88.46% | 82.70%
216 217 244 | 85.32% | 87.45% | 81.95%
213 214 215 | 86.55% | 88.11% | 82.05%

The best test accuracy reached by our model is 88.09% with a weighted F1 score
of 88.46%. Table 3 displays the test accuracy and macro F1 scores of the
behavior detector.

Table 3: This table shows the cross-validation results for the behavior detector Test Video | Train Accuracy | Test Accuracy | Macro F1
---|---|---|---
213 | 99.34% | 95.31% | 47.96%
214 | 99.50% | 89.61% | 52.93%
215 | 99.15% | 87.94% | 49.37%
216 | 99.31% | 91.19% | 49.43%
217 | 99.24% | 92.17% | 51.29%
244 | 99.27% | 93.12% | 47.29%
245 | 99.52% | 94.41% | 50.91%
246 | 99.35% | 90.12% | 48.83%
247 | 99.41% | 92.33% | 50.01%
248 | 99.50% | 89.81% | 49.80%
249 | 99.36% | 90.74% | 50.19%
250 | 99.47% | 91.29% | 49.97%
251 | 99.27% | 89.19% | 49.76%
252 | 99.27% | 89.19% | 49.76%
Average | 99.36% | 91.18% | 49.83%

The best test accuracy is 95.31% and the best macro F1-score is 52.93%. The
macro F1 score is considerably lower than the accuracy because our dataset is
highly unbalanced, and this problem can be better visualized in Figure 12.
Table 4 and Figure 12 shows the class-wise F1-scores for each test videos. The
average F1-scores are 95.76%, 96.85%, 15.01%, 4.57% 29.22% for CTR, EAT, FOR,
PRA, PRE, respectively.

Figure 12: Class-wise F1 scores of behavior classifier

The discrepancy is explained due to the imbalance in the various categories of
the behaviors. For an experiment like this the F1 score results are much more
reliable than the accuracy scores. The low F1 score is owing to the fact that
the number of examples of FOR, PRE and PRA are far lower than that of the CTR
and EAT categories. Due to the low precision and recall of the first three
categories, the overall F1 score is lowered. However, the effectiveness of the
overall approach is demonstrated by the precision-recall curves for two
largest behavior categories, EAT and CTR, in Figure 13.

Figure 13: Behavior classifier PR curve for eating and control Table 4: This
table shows class-wise F1 scores of behavior detector across 5 different
classes

Test Video | CTR | EAT | FOR | PRA | PRE
---|---|---|---|---|---
213 | 97.24% | 97.85% | 15.68% | 19.04% | 10.00%
214 | 91.28% | 95.67% | 14.28% | 0.00% | 45.90%
215 | 94.05% | 96.49% | 16.21% | 0.00% | 36.00%
216 | 95.66% | 97.72% | 15.25% | 0.00% | 40.70%
217 | 97.11% | 97.84% | 15.19% | 10.00% | 50.72%
244 | 96.72% | 97.88% | 16.44% | 0.00% | 43.27%
245 | 97.47% | 98.12% | 13.82% | 0.00% | 37.27%
246 | 93.95% | 95.22% | 14.63% | 14.28% | 33.63%
247 | 97.26% | 96.45% | 16.31% | 20.72% | 26.73%
248 | 96.52% | 96.77% | 13.25% | 0.00% | 20.14%
249 | 97.28% | 97.94% | 15.62% | 0.00% | 10.25%
250 | 93.26% | 95.22% | 13.91% | 0.00% | 13.95%
251 | 95.51% | 96.24% | 15.26% | 0.00% | 15.78%
252 | 97.27% | 96.44% | 14.29% | 0.00% | 24.70%
Average | 95.76% | 96.85% | 15.01% | 4.57% | 29.22%

##  6 Discussion

In this research we present behavior and posture detection as a metric to
measure the behavioral well-being of chickens. In order to obtain behaviors
and postures, we employ two approaches: Mask R-CNN and YOLOv4 with ResNet50.
Mask R-CNN is an instance segmentation object detector to obtain the behavior
and posture of chickens. YOLOv4 is an object detector that is used in
combination with ResNet50 to obtain the behaviors and postures.

The contributions of this research include:

  * •

collection of a new custom dataset to measure the behavior of chickens in a
pen using multiple cameras.

  * •

behavior and posture detection with high accuracy by applying the state-of-the
art algorithms.

  * •

laying a foundation for measuring chicken well-being through posture and
behavior metrics.

  * •

laying a foundation for understanding group behavior of the chickens.

Our results indicate a high performance of these two approaches for behavior
and posture detection of chickens despite the challenges involved. There are
many challenges in a problem like this, and we will discuss some of those
here. Firstly, to our knowledge, this is the only object detection problem in
which the object is changing its size with each day; secondly, the objects
bear uncanny resemblance; thirdly, the behaviors can be misinterpreted in a
setting like this where multiple chickens are in close proximity. For example,
preening and allo-preening as well as standing and sitting can easily be
misinterpreted. That is the reason we had to combine sitting and standing as a
single posture. Finally, since the chicken behavior cannot be controlled,
there is a huge imbalance between different types of postures and behaviors.
This problem and its impact is clearly indicated in Figure 12. The macro-F1
scores are greatly influenced by the number of examples available in the
training data. Since there are fairly reasonable number of examples of eating
and no behavior, our approaches are reasonably accurate. Measuring behaviors
and postures of individual chickens would help mark the behavior and the
posture of a group of chickens. For example, when we notice most of the
chickens in a pen are not drinking enough water or not eating much, this would
indicate a bigger problem that would require intervention and hence lead to
better well being of chickens. Acknowledgments This work was conducted when
Shawna Weimer was at the University of Maryland, College Park. The data
collection and labeling of the project was supported by the startup funds
provided to Shawna by the University of Maryland Department of Animal and
Avian Sciences. We would like to acknowledge Seungwon Oh and Ali Atai for
their initial work in the project and Ashanti Mangrum, Heidi Rinehart, Maryann
Khong, and Noelle Potter for their work in labeling the data set used in this
research.

## References

  * [1] Neila Ben Sassi, Xavier Averós, and Inma Estevez.  Technology and poultry welfare.  Animals, 6(10), 2016.
  * [2] L.R. Berghman.  Immune responses to improving welfare.  Poultry Science, 95(9):2216–2218, 2016.
  * [3] Shana Bergmann, Angela Schwarzer, Katharina Wilutzky, Helen Louton, Josef Bachmeier, Paul Schmidt, Michael Erhard, and Elke Rauch.  Behavior as welfare indicator for the rearing of broilers in an enriched husbandry environment—a field study.  Journal of Veterinary Behavior, 19:90–101, 2017.
  * [4] M. Bi, T. Zhang, X. Zhuang, and P. Jiao.  Recognition method of sick yellow feather chicken based on head features.  Nongye Jixie Xuebao/Transactions of the Chinese Society for Agricultural Machinery, 49:51–57, 01 2018.
  * [5] Alexey Bochkovskiy, Chien-Yao Wang, and Hong-Yuan Mark Liao.  Yolov4: Optimal speed and accuracy of object detection, 2020.
  * [6] ODDS Cf.  Transforming our world: the 2030 agenda for sustainable development.  United Nations: New York, NY, USA, 2015.
  * [7] I. C. de Jong, V. A. Hindle, A. Butterworth, B. Engel, P. Ferrari, H. Gunnink, T. Perez Moya, F. A. Tuyttens, and C. G. van Reenen.  Simplifying the welfare quality assessment protocol for broiler chicken welfare.  Animal : an international journal of animal bioscience, 10(1):117–127, 2016.
  * [8] Erik Dohlman, James Hansen, David Boussios, et al.  Usda agricultural projections to 2029.  USDA agricultural projections to 2029., 2020.
  * [9] Ross Girshick, Ilija Radosavovic, Georgia Gkioxari, Piotr Dollár, and Kaiming He.  Detectron.  https://github.com/facebookresearch/detectron, 2018.
  * [10] E. G. Granquist, G. Vasdal, I. C. de Jong, and R. O. Moe.  Lameness and its relationship with health and production measures in broiler chickens.  Animal : an international journal of animal bioscience, 13(10):2365–2372, 2019.
  * [11] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick.  Mask r-cnn.  In 2017 IEEE International Conference on Computer Vision (ICCV), pages 2980–2988, 2017.
  * [12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.  Deep residual learning for image recognition, 2015.
  * [13] Mate Kisantal, Zbigniew Wojna, Jakub Murawski, Jacek Naruniec, and Kyunghyun Cho.  Augmentation for small object detection, 2019.
  * [14] Dan Li, Yifei Chen, Kaifeng Zhang, and Zhenbo Li.  Mounting behaviour recognition for pigs based on deep learning.  Sensors, 19(22), 2019.
  * [15] B. Milosevic, S. Ciric, N. Lalic, V. Milanovic, Z. Savic, I. Omerovic, V. Doskovic, S. Djordjevic, and L. Andjusic.  Machine learning application in growth and health prediction of broiler chickens.  World’s Poultry Science Journal, 75(3):401–410, 2019.
  * [16] Suresh Neethirajan.  Chicktrack - a quantitative tracking tool for measuring chicken activity.  Measurement, page 110819, 2022.
  * [17] Cedric Okinda, Innocent Nyalala, Tchalla Korohou, Celestine Okinda, Jintao Wang, Tracy Achieng, Patrick Wamalwa, Tai Mang, and Mingxia Shen.  A review on computer vision systems in monitoring of poultry: A welfare perspective.  Artificial Intelligence in Agriculture, 4:184–208, 2020.
  * [18] Edgar O. Oviedo-Rondón.  Holistic view of intestinal health in poultry.  Animal Feed Science and Technology, 250:1–8, 2019.  SI: Intestinal Health.
  * [19] Joseph Redmon.  Darknet: Open source neural networks in c.  http://pjreddie.com/darknet/, 2013–2016.
  * [20] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi.  You only look once: Unified, real-time object detection, 2015.
  * [21] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun.  Faster r-cnn: Towards real-time object detection with region proposal networks.  IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(6):1137–1149, 2017.
  * [22] Hannah Ritchie and Max Roser.  Meat and dairy production.  Our World in Data, 2017.  https://ourworldindata.org/meat-production.
  * [23] Bryan C Russell, Antonio Torralba, Kevin P Murphy, and William T Freeman.  Labelme: a database and web-based tool for image annotation.  International journal of computer vision, 77(1-3):157–173, 2008\.
  * [24] Yunong Tian, Guodong Yang, Zhe Wang, En Li, and Zize Liang.  Instance segmentation of apple flowers using the improved mask r–cnn model.  Biosystems Engineering, 193:264–278, 2020.
  * [25] Juan Wang, Nan Wang, Lihua Li, and Zhenhui Ren.  Real-time behavior detection and judgment of egg breeders based on yolo v3.  Neural Computing and Applications, 2019.
  * [26] Yang Yu, Kailiang Zhang, Li Yang, and Dongxing Zhang.  Fruit detection for strawberry harvesting robot in non-structural environment based on mask-rcnn.  Computers and Electronics in Agriculture, 163:104846, 2019.


# Trees and superintegrable Lotka-Volterra families

Peter H. van der Kamp, G.R.W. Quispel and D.I. McLaren
Department of Mathematical and Physical Sciences,
La Trobe University, Victoria 3086, Australia.
Email<EMAIL_ADDRESS>

###### Abstract

To any tree on $n$ vertices we associate an $n$-dimensional Lotka-Volterra
system with $3n-2$ parameters and prove it is superintegrable, i.e. it admits
$n-1$ functionally independent integrals. We also show how these systems can
be reduced to an ($n-1$)-dimensional system which is superintegrable and
solvable by quadratures.

##  1 Introduction

This paper is concerned with trees, Lotka-Volterra systems,
superintegrability, and Darboux Polynomials. We first define these notions and
try to indicate why the reader perhaps might care.

Lotka-Volterra (LV) systems are quadratic ordinary differential equations
(ODEs) of the form

$\frac{dx_{i}}{dt}=x_{i}\left(b_{i}+\sum_{j=1}^{n}A_{ij}x_{j}\right),\quad
i=1,\dots,n\quad,$ (1)

where the vector $\mathbf{b}$ and the matrix $\mathbf{A}$ do not depend on
$\mathbf{x}$ or $t$. LV equations were introduced to describe predator-prey
systems [7, 15], and have more recently been used e.g. to study infectious
disease [3], and competition between species [9]. Cf. also [4, 8, 12, 13].
These papers and many others give some indication of the scientific interest
generated by Lotka-Volterra equations, their properties, and their
generalisations.

A Darboux Polynomial (DP) for an ODE $\frac{dx}{dt}=f(x)$ is a polynomial
$P(x)$ for which there exists another polynomial $C(x)$ (called the cofactor)
such that

$\frac{dP}{dt}:=\nabla P\cdot f=CP$ (2)

Comparing eqns (1) and (2) we see immediately that each LV system has at least
$n$ DPs (i.e. the $x_{i},\,i=1,\dots,n$). From the theory of Darboux
Polynomials [1, 2] it follows that if a homogeneous quadratic ODE possesses
$n+1$ DPs, it must have a factorisable integral (whose factors are powers of
DPs). One might say that LV systems are on the verge of possessing one or more
first integrals. In [11] we constructed families of $n$-dimensional LV systems
that possess $n-1$ additional DPs which give rise to $n-1$ first integrals. In
this paper we prove that these integrals are functionally independent, and
hence that these systems are superintegrable. A complementary study was
carried out in [6], where conditions were given for systems (1) with one
additional DP (invariant hyperplane) to be superintegrable.111The condition is
that the rank of certain matrices are low [6, Theorems 2,5]. The statement in
[6, Theorem 3, condition (12)] should read [5]: Moreover, if
rank$(B_{1})=$rank$(B_{2})=$rank$(B_{3})=3\leq N$, then differential system
(3) is completely integrable.

A tree is a connected graph which does not contain a cycle. In the next
section, we start from an undirected tree on $n$ vertices with $n-1$ edges,
and extend it to a weighted complete directed graph (digraph), which includes
both loops and multiple edges. We then use the adjacency matrix of this
digraph to define a corresponding LV system. In section 3, we establish some
properties of the minors of the adjacency matrix, which are used in section 4
to derive three-point integrals, and to factorise the exponents in the
integrals for the LV systems (which were given in [11]). In section 5, we
propose a method to solve the LV systems by introducing edge variables.
Finally in section 6 we utilise the 3-point integrals and edge-variables to
prove functional independence for $n-1$ integrals.

The number of trees on $n$ vertices is quite large, $\sim
0.5349485(0.3383219)^{-n}/n^{5/2}$ [10]. We establish an equal amount of
superintegrable $n$-dimensional LV systems with $3n-2$ parameters.

##  2 From tree to Lotka-Volterra system

Let $T$ be a tree on $n$ vertices, $1,2,\ldots,n$. Edges
$e_{1},\ldots,e_{n-1}$ are represented by ordered pairs of integers, i.e. we
have $e_{i}=(u_{i},v_{i})\in\mathbb{N}^{2}$ with $u_{i}<v_{i}$.

######  Definition 1.

We associate a weighted digraph $G$ to $T$ as follows. For all $1\leq i\leq
n$, we add a loop with weight $a_{i}$ to vertex $i$. We add weights $b_{i}$ to
edges $e_{i}=(u_{i},v_{i})$, and add reciprocal edges
$e^{\prime}_{i}=(v_{i},u_{i})$ which carry weights $c_{i}$. The adjacency
matrix of $G$ is the $n\times n$ matrix $\mathbf{A}$ with $A_{i,i}=a_{i}$, and
for each edge $e_{i}=(u_{i},v_{i})$ of $T$: $A_{u_{i},v_{i}}=b_{i}$ and
$A_{v_{i},u_{i}}=c_{i}$, and with all other entries 0.

12345678 (a) A tree on 8 vertices.

12345678$b_{1}$$c_{1}$$b_{2}$$c_{2}$$b_{3}$$c_{3}$$b_{4}$$c_{4}$$b_{5}$$c_{5}$$b_{6}$$c_{6}$$b_{7}$$c_{7}$$a_{1}$$a_{2}$$a_{3}$$a_{4}$$a_{5}$$a_{6}$$a_{7}$$a_{8}$
(b) The associated weighted digraph.

Figure 1: Associating a weighted digraph to a tree. Added edges
$(x_{i},x_{i})$ carry weights $a_{i}$, weights $b_{i}$ are connected to edges
$(u_{i},v_{i})$ where $u_{i}<v_{i}$ and weights $c_{i}$ are connected to edges
$(v_{i},u_{i})$ with $v_{i}>u_{i}$.

######  Example 2.

To the tree on 8 vertices with edges

$e_{1}=(1,2),\ e_{2}=(2,3),\ e_{3}=(2,6),\ e_{4}=(2,8),\ e_{5}=(3,4),\
e_{6}=(3,7),\ e_{7}=(5,6),$

see Figure 1(a), we associate the weighted digraph in Figure 1(b). The
adjacency matrix of the associated weighted digraph is

$\begin{pmatrix}a_{1}&b_{1}&0&0&0&0&0&0\\\
c_{1}&a_{2}&b_{2}&0&0&b_{3}&0&b_{4}\\\ 0&c_{2}&a_{3}&b_{5}&0&0&b_{6}&0\\\
0&0&c_{5}&a_{4}&0&0&0&0\\\ 0&0&0&0&a_{5}&b_{7}&0&0\\\
0&c_{3}&0&0&c_{7}&a_{6}&0&0\\\ 0&0&c_{6}&0&0&0&a_{7}&0\\\
0&c_{4}&0&0&0&0&0&a_{8}\end{pmatrix}.$

######  Definition 3.

We next associate a weighted complete digraph $\overline{G}$ to $T$. We add to
the associated weighted digraph $G$ all edges $(x,z)$ which are not already in
$G$. To assign their weight, we consider the shortest path in $T$ from $x$ to
$z$ (this exists because $T$ is connected, and is uniquely given because $T$
does not contain loops). Let the penultimate vertex be $y$. Then there is an
$i$ such that $(y,z)$ or $(z,y)$ is the $i$-th edge of $T$. If $y<z$ we assign
to edge $(x,z)$ weight $b_{i}$, if $y>z$ we assign weight $c_{i}$ to edge
$(x,z)$.

In Figure 2 we add edges to the associated digraph from Figure 1, which are
directed to vertices 1 and 2. The complete digraph can be obtained by adding
the remaining edges directed respectively to vertices $3,4,\ldots,8$.

12345678$b_{1}$$c_{1}$$b_{2}$$c_{2}$$b_{3}$$c_{3}$$b_{4}$$c_{4}$$b_{5}$$c_{5}$$b_{6}$$c_{6}$$b_{7}$$c_{7}$$a_{1}$$a_{2}$$a_{3}$$a_{4}$$a_{5}$$a_{6}$$a_{7}$$a_{8}$$c_{1}$$c_{1}$$c_{1}$$c_{1}$$c_{1}$$c_{1}$$c_{2}$$c_{3}$$c_{2}$
Figure 2:  Adding edges to the associated weighted digraph from Figure 1(b),
edges $(w,1)$ are dashed, and edges $(w,2)$ are dotted. To complete the graph,
edges $(w,i)$ with $3\leq i\leq 8$ must be added.

######  Example 4.

The adjacency matrix of the associated weighted complete digraph
$\overline{G}$ to the tree in Example 2 is

$\mathbf{A}=\begin{pmatrix}a_{{1}}&b_{{1}}&b_{{2}}&b_{{5}}&c_{{7}}&b_{{3}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&a_{{2}}&b_{{2}}&b_{{5}}&c_{{7}}&b_{{3}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&c_{{2}}&a_{{3}}&b_{{5}}&c_{{7}}&b_{{3}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&c_{{2}}&c_{{5}}&a_{{4}}&c_{{7}}&b_{{3}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&c_{{3}}&b_{{2}}&b_{{5}}&a_{{5}}&b_{{7}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&c_{{3}}&b_{{2}}&b_{{5}}&c_{{7}}&a_{{6}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&c_{{2}}&c_{{6}}&b_{{5}}&c_{{7}}&b_{{3}}&a_{{7}}&b_{{4}}\\\
c_{{1}}&c_{{4}}&b_{{2}}&b_{{5}}&c_{{7}}&b_{{3}}&b_{{6}}&a_{{8}}\end{pmatrix}.$
(3)

######  Definition 5 ($\mathbf{T}$-system).

Let $T$ be a tree on $n$ vertices, and let $\mathbf{A}$ be the adjacency
matrix of the associated weighted complete digraph of $T$. We define an
$n$-dimensional homogeneous Lotka-Volterra system by

$\frac{{\rm d}x_{i}}{{\rm d}t}=x_{i}\sum_{j}A_{i,j}x_{j},\qquad i=1,\ldots,n,$
(4)

to which we will refer as a $T$-system.

######  Example 6.

The tree in Example 2 gives rise to the T-system

$\begin{split}\dot{x_{{1}}}&=x_{{1}}\left(a_{{1}}x_{{1}}+b_{{1}}x_{{2}}+b_{{2}}x_{{3}}+b_{{5}}x_{{4}}+c_{{7}}x_{{5}}+b_{{3}}x_{{6}}+b_{{6}}x_{{7}}+b_{{4}}x_{{8}}\right)\\\
\dot{x_{{2}}}&=x_{{2}}\left(c_{{1}}x_{{1}}+a_{{2}}x_{{2}}+b_{{2}}x_{{3}}+b_{{5}}x_{{4}}+c_{{7}}x_{{5}}+b_{{3}}x_{{6}}+b_{{6}}x_{{7}}+b_{{4}}x_{{8}}\right)\\\
\dot{x_{{3}}}&=x_{{3}}\left(c_{{1}}x_{{1}}+c_{{2}}x_{{2}}+a_{{3}}x_{{3}}+b_{{5}}x_{{4}}+c_{{7}}x_{{5}}+b_{{3}}x_{{6}}+b_{{6}}x_{{7}}+b_{{4}}x_{{8}}\right)\\\
\dot{x_{{4}}}&=x_{{4}}\left(c_{{1}}x_{{1}}+c_{{2}}x_{{2}}+c_{{5}}x_{{3}}+a_{{4}}x_{{4}}+c_{{7}}x_{{5}}+b_{{3}}x_{{6}}+b_{{6}}x_{{7}}+b_{{4}}x_{{8}}\right)\\\
\dot{x_{{5}}}&=x_{{5}}\left(c_{{1}}x_{{1}}+c_{{3}}x_{{2}}+b_{{2}}x_{{3}}+b_{{5}}x_{{4}}+a_{{5}}x_{{5}}+b_{{7}}x_{{6}}+b_{{6}}x_{{7}}+b_{{4}}x_{{8}}\right)\\\
\dot{x_{{6}}}&=x_{{6}}\left(c_{{1}}x_{{1}}+c_{{3}}x_{{2}}+b_{{2}}x_{{3}}+b_{{5}}x_{{4}}+c_{{7}}x_{{5}}+a_{{6}}x_{{6}}+b_{{6}}x_{{7}}+b_{{4}}x_{{8}}\right)\\\
\dot{x_{{7}}}&=x_{{7}}\left(c_{{1}}x_{{1}}+c_{{2}}x_{{2}}+c_{{6}}x_{{3}}+b_{{5}}x_{{4}}+c_{{7}}x_{{5}}+b_{{3}}x_{{6}}+a_{{7}}x_{{7}}+b_{{4}}x_{{8}}\right)\\\
\dot{x_{{8}}}&=x_{{8}}\left(c_{{1}}x_{{1}}+c_{{4}}x_{{2}}+b_{{2}}x_{{3}}+b_{{5}}x_{{4}}+c_{{7}}x_{{5}}+b_{{3}}x_{{6}}+b_{{6}}x_{{7}}+a_{{8}}x_{{8}}\right).\end{split}$
(5)

##  3 Properties of associated weighted complete digraphs

######  Proposition 7.

Let $T$ be a tree. Its associated weighted complete digraph $\overline{G}$ has
the following nice property. Let $(u,v)$ be an edge in $T$. For all
$w\not\in\\{u,v\\}$ the edges $(u,w)$ and $(v,w)$ carry the same weight.

###### Proof.

This is clear from the construction. The shortest path from $u$ to $w$ differs
from the shortest path from $v$ to $w$ only by one edge, i.e. $(u,v)$ or
$(v,u)$. The weights only depend on the last edges of the paths, which is the
same in both cases. ∎

######  Corollary 8.

Let $T$ be a tree. The adjacency matrix $\mathbf{A}$ of its associated
weighted complete digraph $\overline{G}$ is an $n\times n$ matrix, with
elements $A_{i,i}=a_{i}$, for each edge $e_{i}=(u_{i},v_{i})\in T$ we have
$A_{u_{i},v_{i}}=b_{i}$ and $A_{v_{i},u_{i}}=c_{i}$, and for all
$w\not\in\\{u_{i},v_{i}\\}$ we have $A_{u_{i},w}=A_{v_{i},w}$.

This property of $\mathbf{A}$ guarantees the existence of additional Darboux
polynomials [11, Section 3] and hence, using the rather general method [11,
Section 2], the existence of integrals, cf. equations (9) and (10).

As the existence of a solution does not guarantee uniqueness, one wonders
whether there are other matrices $\mathbf{A}$ with the same property. We show
this is not the case.

######  Proposition 9.

In Corollary 8, the matrix $A$ with elements $A_{i,i}=a_{i}$,
$A_{u_{i},v_{i}}=b_{i}$ and $A_{v_{i},u_{i}}=c_{i}$ for each edge
$e_{i}=(u_{i},v_{i})\in T$, is uniquely defined by the condition that for all
$w\not\in\\{u_{i},v_{i}\\}$ we have $A_{u_{i},w}=A_{v_{i},w}$.

###### Proof.

In $\mathbf{A}$, there are $N=n^{2}-n-2(n-1)$ unknowns, which satisfy a system
of $(n-1)(n-2)=N$ linear equations. We claim that each equation is used to
solve for one unknown. Suppose $A_{u,v}$ is unknown. Let
$u,w_{1},\ldots,w_{r},v$ be the shortest path in $T$ from $u$ to $v$. The
weight of $(w_{r},v)$ is known. It does follows from Definition 3 that this
will also be the value of $A_{u,v}$. But the aim here is to show how it
follows from the condition. The condition tells us that
$A_{w_{r-1},v}=A_{w_{r},v}$, $A_{w_{r-2},v}=A_{w_{r-1},v}$, $\ldots$, and,
finally, that $A_{u,v}=A_{w_{1},v}$ which hence equals the weight of
$(w_{r},v)$. To find $A_{u,v}$, we have used one equation to solve for one
unknown $r$ times. ∎

######  Definition 10.

Let $\mathbf{A}^{I;J}$ denote the matrix $\mathbf{A}$ with rows $i\in I$ and
columns $j\in J$ deleted. Its determinant $|\mathbf{A}^{I;J}|$ is called a
minor.

By deleting a vertex, a tree becomes a forest with several connected
components (trees).

######  Proposition 11 (Factorisation of minors of $\mathbf{A}$).

Let $S$ denote the set of vertices of the tree which contains vertex $j$ in
the forest obtained by deleting vertex $i$. Let $m$ be the number of vertices
$k\in S$ such that $\min(i,j)<k<\max(i,j)$. Then

$|\mathbf{A}^{i;j}|=(-1)^{m}|\mathbf{A}^{S\setminus\\{j\\}\cup\\{i\\};S}|\prod_{v\in
S\setminus\\{j\\}}(a_{v}-A_{j,v}).$ (6)

###### Proof.

Denote the $i$th row of $\mathbf{A}$ by $\mathbf{A}_{i}$. If the shortest path
in $T$ from vertex $k$ to vertex $j$ passes through $m$ vertices
$k,l,\ldots,j$, then $\mathbf{A}_{k}-\mathbf{A}_{j}$ has $m$ non-zero
elements, i.e. in columns $k,l,\ldots,j$. We write $S=S_{1}+S_{2}+\cdots$,
where $S_{m}$ contains all vertices whose shortest path to $j$ contains $m+1$
vertices. Suppose $k\in S_{1}$ satisfies $k<\min(i,j)$. Then
$\mathbf{A}^{i;j}_{k}-\mathbf{A}^{i;j}_{j}$ has only 1 non-zero entry, i.e.
$a_{k}-A_{k,j}$ in column $k$ (the $j$-th column, which contained the other
non-zero entry, is deleted). Expanding the determinant in the $k$-th row,
after row-operation
$\mathbf{A}^{i;j}_{k}\mapsto\mathbf{A}^{i;j}_{k}-\mathbf{A}^{i;j}_{j}$, shows
that

$|\mathbf{A}^{i;j}|=\epsilon^{k}_{i,j}(a_{k}-A_{j,k})|\mathbf{A}^{\\{k,i\\};\\{k,j\\}}|,$
(7)

with $\epsilon^{k}_{i,j}=1$. When $k\in S_{1}$ satisfies $\max(i,j)<k$, after
row-reduction of the $k-1$ row, the same non-zero entry arises in column
$k-1$, and we find the same formula. If $\min(i,j)<k<\max(i,j)$ then we pick
up a minus sign, $\epsilon^{k}_{i,j}=-1$. Continuing the row-reduction in this
way, first for all $k\in S_{1}$, then $k\in S_{2}$, etc., yields formula (6).
∎

######  Proposition 12 (Ratios of minors of $\mathbf{A}$).

For all edges $e_{i}=(u_{i},v_{i})$ and $w\not\in\\{u_{i},v_{i}\\}$ we have

$(a_{u_{i}}-c_{i})|A^{w;u_{i}}|=(-1)^{u_{i}+v_{i}}(a_{v_{i}}-b_{i})|A^{w;v_{i}}|.$

###### Proof.

Using equation (7) we can write

$|A^{w;u_{i}}|=\epsilon^{v_{i}}_{w,u_{i}}(a_{v_{i}}-A_{u_{i},v_{i}})|A^{\\{v_{i},w\\};\\{v_{i},u_{i}\\}}|,\qquad|A^{w;v_{i}}|=\epsilon^{u_{i}}_{w,v_{i}}(a_{u_{i}}-A_{v_{i},u_{i}})|A^{\\{u_{i},w\\};\\{u_{i},v_{i}\\}}|.$

Since $(u_{i},v_{i})$ is the $i$-th edge, we have $A_{u_{i},v_{i}}=b_{i}$ and
$A_{v_{i},u_{i}}=c_{i}$. Also, the two matrices
$A^{\\{v_{i},w\\};\\{v_{i},u_{i}\\}}$ and
$A^{\\{u_{i},w\\};\\{u_{i},v_{i}\\}}$ have the same rows, but in a different
order (except when $u_{i}\neq v_{i}\pm 1$ or $w=u_{i}+1,v_{i}=w+1$ or
$w=v_{i}+1,u_{i}=w+1$). When $\epsilon^{w}_{u_{i},v_{i}}=1$ and $u_{i}-v_{i}$
modulo 2 equals 0 resp. 1 we need to interchange an odd resp. even number of
rows to make them equal. When $\epsilon^{w}_{u_{i},v_{i}}=-1$ that is the
other way around. This is summarized by

$|A^{\\{v_{i},w\\};\\{v_{i},u_{i}\\}}|=-(-1)^{u_{i}+v_{i}}\epsilon^{w}_{u_{i},v_{i}}|A^{\\{u_{i},w\\};\\{u_{i},v_{i}\\}}|.$

As
$\epsilon^{v_{i}}_{w,u_{i}}\epsilon^{u_{i}}_{w,v_{i}}\epsilon^{w}_{u_{i},v_{i}}=-1$
(if 3 numbers are distinct, then 1 of them is in between the others), the
result follows. The proposition also follows as a consequence of Proposition
15. ∎

##  4 Integrals for T-systems

######  Definition 13.

Define an $(n-1)\times n$ matrix $\mathbf{B}$ as follows: for each edge
$e_{i}=(u_{i},v_{i})\in T$, $x\in\\{u_{i},v_{i}\\}$,
$w\not\in\\{u_{i},v_{i}\\}$, let $B_{i,x}=a_{x}$, and $B_{i,w}=A_{x,w}$ with
$x=u_{i}$ or $x=v_{i}$ (which yield the same value, due to Corollary 8).

With this definition the elements of the $i$-th row of the matrix $\mathbf{B}$
contains the coefficients of the cofactor of the $i$-th Darboux polynomial,

$P_{i}=(c_{i}-a_{u_{i}})x_{u_{i}}+(a_{v_{i}}-b_{i})x_{v_{i}},$ (8)

cf. the $\Leftarrow$ part of the proof of [11, Lemma 1]. Using the method
provided in [11, Section 2], we obtain $n-1$ integrals, the $i$-th one being

$P_{i}^{|\mathbf{A}|}\prod_{k=1}^{n}x_{k}^{Z_{i,k}},$ (9)

where

$\mathbf{Z}=-\mathbf{B}\mathbf{A}^{-1}|\mathbf{A}|.$ (10)

######  Example 14.

For our running example, the matrix $\mathbf{B}$ is given by

$\mathbf{B}=\begin{pmatrix}a_{{1}}&a_{{2}}&b_{{2}}&b_{{5}}&c_{{7}}&b_{{3}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&a_{{2}}&a_{{3}}&b_{{5}}&c_{{7}}&b_{{3}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&a_{{2}}&b_{{2}}&b_{{5}}&c_{{7}}&a_{{6}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&a_{{2}}&b_{{2}}&b_{{5}}&c_{{7}}&b_{{3}}&b_{{6}}&a_{{8}}\\\
c_{{1}}&c_{{2}}&a_{{3}}&a_{{4}}&c_{{7}}&b_{{3}}&b_{{6}}&b_{{4}}\\\
c_{{1}}&c_{{2}}&a_{{3}}&b_{{5}}&c_{{7}}&b_{{3}}&a_{{7}}&b_{{4}}\\\
c_{{1}}&c_{{3}}&b_{{2}}&b_{{5}}&a_{{5}}&a_{{6}}&b_{{6}}&b_{{4}}\end{pmatrix}.$
(11)

The integrals can be calculated explicitly but, with 22 free parameters, they
would take up too much space to include them here. Considering the special
case where

$a_{i}=i,\quad b_{i}=i+5,\quad c_{i}=i+11$

we find the 7 Darboux polynomials

$11x_{1}-4x_{2},\ 11x_{2}-4x_{3},\ 12x_{2}-2x_{6},\ 13x_{2}-x_{8},\
13x_{3}-6x_{4},\ 14x_{3}-4x_{7},\ 13x_{5}-6x_{6},$

and e.g. the integral corresponding to the first edge/Darboux polynomial
(after inversion and taking an 8-th root) is

$\frac{\left(11x_{1}-4x_{2}\right)^{1393111}x_{3}^{169884}x_{4}^{22880}x_{5}^{19008}x_{6}^{92928}x_{7}^{37752}x_{8}^{123552}}{x_{1}^{1378135}x_{2}^{467252}}.$

######  Proposition 15 (Factorisation of linear combinations of minors of
$\mathbf{A}$).

Let $\mathbf{Z}=-\mathbf{B}\mathbf{A}^{-1}|\mathbf{A}|$. For all edges
$e_{i}=(u_{i},v_{i})\in T$ we have

$Z_{i,k}=\begin{cases}(-1)^{k+u_{i}}(c_{i}-a_{u_{i}})|\mathbf{A}^{k;u_{i}}|,&k\neq
v_{i}\\\ (-1)^{k+v_{i}}(b_{i}-a_{v_{i}})|\mathbf{A}^{k;v_{i}}|,&k\neq
u_{i}.\end{cases}$ (12)

Note that when $k\not\in\\{u_{i},v_{i}\\}$ the two expressions in (12) are
equal, due to Proposition 12.

###### Proof.

Let the adjugate (or cofactor) matrix of $\mathbf{A}$ be $\mathbf{C}$, i.e.
$C_{i,j}=(-1)^{i+j}|\mathbf{A}^{i;j}|$. Then we have
$\mathbf{A}^{-1}|\mathbf{A}|=\mathbf{C}^{t}$, or, for all $i,k$,

$\sum_{j}A_{i,j}C_{k,j}=\begin{cases}|\mathbf{A}|,&i=k\\\ 0,&i\neq
k.\end{cases}$ (13)

We need to show that

$-Z_{i,k}=\sum_{j}B_{i,j}C_{k,j}=\begin{cases}(a_{u_{i}}-c_{i})C_{k,u_{i}},&k\neq
v_{i}\\\ (a_{v_{i}}-b_{i})C_{k,v_{i}},&k\neq u_{i}.\end{cases}$ (14)

We notice that $B_{i,j}-A_{u_{i},j}=(a_{v_{i}}-b_{i})\delta_{j,v_{i}}$, and
$B_{i,j}-A_{v_{i},j}=(a_{u_{i}}-c_{i})\delta_{j,u_{i}}$, in terms of
Kronecker’s delta, $\delta_{i,i}=1$ and $\delta_{i,j\neq i}=0$. When $k\neq
v_{i}$ we find

$-Z_{i,k}=\sum_{j}B_{i,j}C_{k,j}-\sum_{j}A_{v_{i},j}C_{k,j}=(a_{u_{i}}-c_{i})C_{k,u_{i}}$

and, when $k\neq u_{i}$,

$-Z_{i,k}=\sum_{j}B_{i,j}C_{k,j}-\sum_{j}A_{u_{i},j}C_{k,j}=(a_{v_{i}}-b_{i})C_{k,v_{i}}.$

∎

Using the above result, it now follows that if a graph contains two adjacent
edges, the corresponding LV system possesses an integral that only depends on
the three vertices involved, and not on any of the other vertices of the
graph.

######  Corollary 16 (Three-point integrals).

Let $\mathbf{Z}=-\mathbf{B}\mathbf{A}^{-1}|\mathbf{A}|$.

  * •

Suppose $v_{i}=u_{j}$. The edges $e_{i}$ and $e_{j}$ give rise to integrals

$I_{i}=P_{i}^{|\mathbf{A}|}\prod_{k=1}^{n}x_{k}^{Z_{i,k}},\quad
I_{j}=P_{j}^{|\mathbf{A}|}\prod_{k=1}^{n}x_{k}^{Z_{j,k}},$

where

$P_{i}=(c_{i}-a_{u_{i}})x_{u_{i}}+(a_{u_{j}}-b_{i})x_{u_{j}},\quad
P_{j}=(c_{j}-a_{u_{j}})x_{u_{j}}+(a_{v_{j}}-b_{j})x_{v_{j}}.$

The ratio

$\sqrt[|\mathbf{A}|]{I_{i}^{a_{u_{j}}-c_{j}}/I_{j}^{a_{u_{j}}-b_{i}}}=\left(P_{i}/x_{u_{i}}\right)^{a_{u_{j}}-c_{j}}\left(P_{j}/x_{v_{j}}\right)^{b_{i}-a_{u_{j}}}$
(15)

depends on $x_{u_{i}}/x_{u_{j}},x_{u_{j}}/x_{v_{j}}$ only.

  * •

When $v_{i}=v_{j}$ then

$\sqrt[|\mathbf{A}|]{{I_{i}^{a_{v_{j}}-c_{j}}}/{I_{j}^{a_{v_{j}}-b_{i}}}}=\left(P_{i}/x_{u_{i}}\right)^{a_{v_{j}}-b_{j}}\left(P_{j}/x_{u_{j}}\right)^{b_{i}-a_{v_{j}}}$
(16)

depends on $x_{u_{i}}/x_{v_{j}},x_{v_{j}}/x_{u_{j}}$ only.

  * •

And, when $u_{i}=u_{j}$ then

$\sqrt[|\mathbf{A}|]{{I_{i}^{a_{u_{j}}-c_{j}}}/{I_{j}^{a_{u_{j}}-b_{i}}}}=\left(P_{i}/x_{v_{i}}\right)^{a_{u_{j}}-c_{j}}\left(P_{j}/x_{v_{j}}\right)^{c_{i}-a_{u_{j}}}$
(17)

depends on $x_{v_{i}}/x_{u_{j}},x_{u_{j}}/x_{v_{j}}$ only.

###### Proof.

We provide a proof for (15), the cases (16) and (17) are similar. Note that
when $u_{i}=v_{j}$ the case (15) applies after interchanging $i$ and $j$.

We simplify the ratio

$\displaystyle\frac{I_{i}^{a_{u_{j}}-c_{j}}}{I_{j}^{a_{u_{j}}-b_{i}}}$
$\displaystyle=\frac{P_{i}^{|\mathbf{A}|(a_{u_{j}}-c_{j})}}{P_{j}^{|\mathbf{A}|(a_{u_{j}}-b_{i})}}\prod_{k=1}^{n}x_{k}^{(a_{u_{j}}-c_{j})Z_{i,k}-(a_{u_{j}}-b_{i})Z_{j,k}}$
$\displaystyle=\frac{P_{i}^{|\mathbf{A}|(a_{u_{j}}-c_{j})}}{P_{j}^{|\mathbf{A}|(a_{u_{j}}-b_{i})}}\prod_{k\in\\{u_{i},v_{j}\\}}x_{k}^{(a_{u_{j}}-c_{j})Z_{i,k}-(a_{u_{j}}-b_{i})Z_{j,k}}$
(18)

as we have, due to Proposition 15, for $k\neq\\{u_{i},v_{j}\\}$,

$\displaystyle(a_{u_{j}}-c_{j})Z_{i,k}-(a_{u_{j}}-b_{i})Z_{j,k}$
$\displaystyle=(a_{u_{j}}-c_{j})(-1)^{k+u_{j}}(b_{i}-a_{u_{j}})|\mathbf{A}^{k;u_{j}}|$
$\displaystyle\ \ \
-(a_{u_{j}}-b_{i})(-1)^{k+u_{j}}(c_{j}-a_{u_{j}})|\mathbf{A}^{k;u_{j}}|$
$\displaystyle=0.$

The exponent of $x_{u_{i}}$ in (18) can be written as

$(a_{u_{j}}-c_{j})Z_{i,u_{i}}-(a_{u_{j}}-b_{i})Z_{j,u_{i}}=(c_{j}-a_{u_{j}})|\mathbf{A}|.$

This can be seen by subtracting the $u_{j}$-th row of $\mathbf{A}$ from the
$u_{i}$-th row, expanding the determinant in the $u_{i}$-th row, i.e.

$|\mathbf{A}|=(a_{u_{i}}-c_{i})|\mathbf{A}^{u_{i};u_{i}}|+(-1)^{u_{i}+u_{j}}(b_{i}-a_{u_{j}})|\mathbf{A}^{u_{i};u_{j}}|,$

and using Proposition 15. Similarly, it can be shown that the exponent of
$x_{v_{j}}$ in (18) can be written as

$(a_{u_{j}}-c_{j})Z_{i,v_{j}}-(a_{u_{j}}-b_{i})Z_{j,v_{j}}=(a_{u_{j}}-b_{i})|\mathbf{A}|.$

The result follows by combining terms and taking the $|\mathbf{A}|$-th root. ∎

######  Example 17.

The T-system (5) has the following integrals (which do not take up too much
space), related to the pairs of adjacent edges $(e_{1},e_{4}),\
(e_{3},e_{4}),\ (e_{3},e_{7}),\ (e_{2},e_{3}),\ (e_{2},e_{5}),\
(e_{2},e_{6})$:

$\begin{split}&\left(\left(c_{1}-a_{1}\right)+\left(a_{2}-b_{1}\right)\dfrac{x_{2}}{x_{1}}\right)^{a_{2}-c_{4}}\left(\left(c_{4}-a_{2}\right)\dfrac{x_{2}}{x_{8}}+\left(a_{8}-b_{4}\right)\right)^{b_{1}-a_{2}},\\\
&\left(\left(c_{3}-a_{2}\right)\dfrac{x_{2}}{x_{6}}+\left(a_{6}-b_{3}\right)\right)^{a_{2}-c_{4}}\left(\left(c_{4}-a_{2}\right)\dfrac{x_{2}}{x_{8}}+\left(a_{8}-b_{4}\right)\right)^{c_{3}-a_{2}},\\\
&\left(\left(c_{3}-a_{2}\right)+\left(a_{6}-b_{3}\right)\dfrac{x_{6}}{x_{2}}\right)^{a_{6}-b_{7}}\left(\left(c_{7}-a_{5}\right)+\left(a_{6}-b_{7}\right)\dfrac{x_{6}}{x_{5}}\right)^{b_{3}-a_{6}},\\\
&\left(\left(c_{2}-a_{2}\right)\dfrac{x_{2}}{x_{3}}+\left(a_{3}-b_{2}\right)\right)^{a_{2}-c_{3}}\left(\left(c_{3}-a_{2}\right)\dfrac{x_{2}}{x_{6}}+\left(a_{6}-b_{3}\right)\right)^{c_{2}-a_{2}},\\\
&\left(\left(c_{2}-a_{2}\right)+\left(a_{3}-b_{2}\right)\dfrac{x_{3}}{x_{2}}\right)^{a_{3}-c_{5}}\left(\left(c_{5}-a_{3}\right)\dfrac{x_{3}}{x_{4}}+\left(a_{4}-b_{5}\right)\right)^{b_{2}-a_{3}},\\\
&\left(\left(c_{2}-a_{2}\right)+\left(a_{3}-b_{2}\right)\dfrac{x_{3}}{x_{2}}\right)^{a_{3}-c_{6}}\left(\left(c_{6}-a_{3}\right)\dfrac{x_{3}}{x_{7}}+\left(a_{7}-b_{6}\right)\right)^{b_{2}-a_{3}}.\end{split}$
(19)

We reiterate that 3-point integrals are local, in the sense that they depend
on only a subset of the variables. To prove that they are invariant, we only
need the differential equations which describe the evolution of the subset of
variables. Local integrals were employed before in [14].

##  5 Solution by quadratures using edge-variables

Given a tree $T$ on $n$ vertices, we introduce for each edge
$e_{i}=(u_{i},v_{i})$ a so-called edge variable $y_{i}=x_{u_{i}}/x_{v_{i}}$.
With edge variables $y_{1},\ldots,y_{n-1}$, and a distinguished vertex
variable $x_{k}$, we can express the vertex variables as follows.

$x_{i}=x_{k}\prod_{j\in{\cal E}_{i}^{k}}y_{j}^{\epsilon_{j}},$ (20)

where $j\in{\cal E}_{i}^{k}$ iff either $e_{j}=(u_{j},v_{j})$ (with
$u_{j}<v_{j}$) or $e_{j}^{\prime}=(v_{j},u_{j})$ is an edge in the directed
tall tree which is the shortest path from $x_{i}$ to $x_{k}$, and if it is
$e_{j}$ then $\epsilon_{j}=1$, if it is $e_{j}^{\prime}$ then
$\epsilon_{j}=-1$.

######  Proposition 18.

A T-system can be written in edge variables, and the distinguished $x_{k}$, as

$\dot{y_{i}}=x_{k}\left(\prod_{j\in{\cal
E}_{u_{i}}^{k}}y_{j}^{\epsilon_{j}}\right)\left(\left(a_{u_{i}}-c_{i}\right)y_{i}-a_{v_{i}}+b_{i}\right),\qquad
i=1,\ldots,n-1$

and

$\dot{x_{k}}=x_{k}^{2}\sum_{i=1}^{n}d_{i}\prod_{j\in{\cal
E}_{i}^{k}}y_{j}^{\epsilon_{j}}$

with $d_{k}=a_{k}$ and, for $i\neq k$,

$d_{i}=\begin{cases}b_{j}&\text{ if }e_{j}=(w,x_{i})\\\ c_{j}&\text{ if
}e_{j}=(x_{i},w),\end{cases}$

where $x_{i},w,\ldots,x_{k}$ is the shortest path from $x_{i}$ to $x_{k}$.

###### Proof.

Firstly, we have $\begin{aligned}
\dot{y_{i}}&=\frac{\dot{x_{u_{i}}}}{x_{v_{i}}}-\frac{x_{u_{i}}}{x_{v_{i}}^{2}}\dot{x_{v_{i}}}\\\
&=y_{i}\left(a_{{u_{i}}}x_{u_{i}}+b_{i}x_{v_{i}}-c_{i}x_{u_{i}}-a_{{v_{i}}}x_{v_{i}}\right)\\\
&=x_{u_{i}}\left(\left(a_{{u_{i}}}-c_{i}\right)y_{i}-a_{{v_{i}}}+b_{i}\right),\\\
&=x_{k}\left(\prod_{j\in{\cal
E}_{u_{i}}^{k}}y_{j}^{\epsilon_{j}}\right)\left(\left(a_{{u_{i}}}-c_{i}\right)y_{i}-a_{{v_{i}}}+b_{i}\right).\end{aligned}$

Next we consider the equation for $x_{k}$. From Definition 3

$\dot{x_{k}}=x_{k}\sum_{i=1}^{n}d_{i}x_{i},$

and the result follows from (20). ∎

######  Example 19.

Choosing $x_{8}$ as the distinguished variable, the vertex variables relate to
the edge variables by

$\frac{x_{1}}{x_{8}}=y_{1}y_{4},\ \frac{x_{2}}{x_{8}}=y_{4}x_{8},\
\frac{x_{3}}{x_{8}}=\frac{y_{4}}{y_{2}},\
\frac{x_{4}}{x_{8}}=\frac{y_{4}}{y_{2}y_{5}},\
\frac{x_{5}}{x_{8}}=\frac{y_{7}y_{4}}{y_{3}},\
\frac{x_{6}}{x_{8}}=\frac{y_{4}}{y_{3}},\
\frac{x_{7}}{x_{8}}=\frac{y_{4}}{y_{2}y_{6}}$

Using edge variables, the system (5) transforms into

$\begin{pmatrix}\dot{y_{1}}\\\ \dot{y_{2}}\\\ \dot{y_{3}}\\\ \dot{y_{4}}\\\
\dot{y_{5}}\\\ \dot{y_{6}}\\\
\dot{y_{7}}\end{pmatrix}=y_{4}x_{8}\begin{pmatrix}y_{1}\left(a_{1}y_{1}-c_{1}y_{1}-a_{2}+b_{1}\right)\\\
a_{2}y_{2}-c_{2}y_{2}-a_{3}+b_{2}\\\ a_{2}y_{3}-c_{3}y_{3}-a_{6}+b_{3}\\\
a_{2}y_{4}-c_{4}y_{4}-a_{8}+b_{4}\\\
\left(a_{3}y_{5}-c_{5}y_{5}-a_{4}+b_{5}\right)/y_{2}\\\
\left(a_{3}y_{6}-c_{6}y_{6}-a_{7}+b_{6}\right)/y_{2}\\\
y_{7}\left(a_{5}y_{7}-c_{7}y_{7}-a_{6}+b_{7}\right)/y_{3}\end{pmatrix},$ (21)

together with

$\dot{x_{8}}=y_{4}x_{8}^{2}\left(c_{1}y_{1}+c_{4}+\frac{c_{7}y_{7}}{y_{3}}+\frac{a_{8}}{y_{4}}+\frac{b_{2}}{y_{2}}+\frac{b_{3}}{y_{3}}+\frac{b_{5}}{y_{2}y_{5}}+\frac{b_{6}}{y_{2}y_{6}}\right).$
(22)

The integrals (19) are expressed in edge variables as

$\begin{split}&\left(\left(c_{1}-a_{1}\right)+\left(a_{2}-b_{1}\right)/y_{1}\right)^{a_{2}-c_{4}}\left(\left(c_{4}-a_{2}\right)y_{4}+\left(a_{8}-b_{4}\right)\right)^{b_{1}-a_{2}},\\\
&\left(\left(c_{3}-a_{2}\right)y_{3}+\left(a_{6}-b_{3}\right)\right)^{a_{2}-c_{4}}\left(\left(c_{4}-a_{2}\right)y_{4}+\left(a_{8}-b_{4}\right)\right)^{c_{3}-a_{2}},\\\
&\left(\left(c_{3}-a_{2}\right)+\left(a_{6}-b_{3}\right)/y_{3}\right)^{a_{6}-b_{7}}\left(\left(c_{7}-a_{5}\right)+\left(a_{6}-b_{7}\right)/y_{7}\right)^{b_{3}-a_{6}},\\\
&\left(\left(c_{2}-a_{2}\right)y_{2}+\left(a_{3}-b_{2}\right)\right)^{a_{2}-c_{3}}\left(\left(c_{3}-a_{2}\right)y_{3}+\left(a_{6}-b_{3}\right)\right)^{c_{2}-a_{2}},\\\
&\left(\left(c_{2}-a_{2}\right)+\left(a_{3}-b_{2}\right)/y_{2}\right)^{a_{3}-c_{5}}\left(\left(c_{5}-a_{3}\right)y_{5}+\left(a_{4}-b_{5}\right)\right)^{b_{2}-a_{3}},\\\
&\left(\left(c_{2}-a_{2}\right)+\left(a_{3}-b_{2}\right)/y_{2}\right)^{a_{3}-c_{6}}\left(\left(c_{6}-a_{3}\right)y_{6}+\left(a_{7}-b_{6}\right)\right)^{b_{2}-a_{3}}.\end{split}$
(23)

######  Theorem 20.

Each $T$-system, where $T$ is a tree on $n$ vertices, reduces to an
$(n-1)$-dimensional edge system which is superintegrable, and solvable by
quadratures.

######  Example 21.

Denote the r.h.s. of the combined system (21,22) by $f$, so that

$(\dot{y},\dot{x_{8}})=f=ag,$ (24)

with $a=y_{4}x_{8}$. Let us denote the 6 integrals (23) of the $T$-system by
$K_{i}$. They are integrals of (24), i.e. we have $f\cdot\nabla K_{i}=0$. But
then, since $f=ag$, we have $g\cdot\nabla K_{i}=0$ and hence the integrals are
also integrals of the system

$(\dot{y},\dot{x_{8}})=g.$ (25)

Because the integrals depend on the $y$-variables only, and the first seven
components of $g$ do not depend on $x_{8}$, we find that the 7-dimensional
system

$\begin{pmatrix}\dot{y_{1}}\\\ \dot{y_{2}}\\\ \dot{y_{3}}\\\ \dot{y_{4}}\\\
\dot{y_{5}}\\\ \dot{y_{6}}\\\
\dot{y_{7}}\end{pmatrix}=\begin{pmatrix}y_{1}\left((a_{1}-c_{1})y_{1}-a_{2}+b_{1}\right)\\\
(a_{2}-c_{2})y_{2}-a_{3}+b_{2}\\\ (a_{2}-c_{3})y_{3}-a_{6}+b_{3}\\\
(a_{2}-c_{4})y_{4}-a_{8}+b_{4}\\\
\left((a_{3}-c_{5})y_{5}-a_{4}+b_{5}\right)/y_{2}\\\
\left((a_{3}-c_{6})y_{6}-a_{7}+b_{6}\right)/y_{2}\\\
y_{7}\left((a_{5}-c_{7})y_{7}-a_{6}+b_{7}\right)/y_{3}\end{pmatrix},$ (26)

admits 6 functionally independent integrals and hence is superintegrable.

###### Proof of Theorem 20..

We rewrite the $T$-system in variables $(y,x_{k})$, cf. Proposition 18, as

$\begin{split}\dot{y_{i}}&=x_{k}f_{i},\quad i=1,\ldots,n-1\\\
\dot{x_{k}}&=x_{k}^{2}g,\end{split}$ (27)

where $f_{i},g$ do not depend on $x_{k}$. The $n-2$ three-point integrals
given in Corollary 16 depend on the $y$-variables only and they are
functionally independent integrals of the $(n-1)$-dimensional system

$\dot{y_{i}}=f_{i},\quad i=1,\ldots,n-1.$

We note that one may divide each $f_{i}$ by the greatest common divisor of all
the $f_{i}$ (which is nontrivial if $x_{k}$ is at the end of a branch of the
tree).

Each equation of the edge system is either of the form

$\dot{y}=p(\alpha y+\beta)\quad\text{ or }\quad\dot{y}=py(\alpha y+\beta),$
(28)

where $\alpha,\beta$ are constants, and $p$ is a function of $t$. In the first
case we get

$\frac{\dot{y}}{\alpha y+\beta}=p\Rightarrow\frac{\ln(\alpha
y+\beta)}{\alpha}=\int p.$

In the second case we get, with $z=1/y$,

$p=\frac{\dot{y}}{y(\alpha y+\beta)}=-\frac{\dot{z}}{\alpha+\beta
z}\Rightarrow\frac{\ln(\alpha+\beta/y)}{\beta}=-\int p.$

Starting at the distinguished variable $x_{k}$, the equations for the edge
variables connected to $x_{k}$ are of the form (28). Once these equations have
been solved, one considers the edges one step further away from $x_{k}$, and
this process can be continued. ∎

######  Example 22.

In the system (26), the first 4 equations are of the form (28). We obtain

$\displaystyle
y_{1}=\frac{a_{2}-b_{1}}{C_{1}{\mathrm{e}}^{\left(a_{2}-b_{1}\right)t}+a_{1}-c_{1}},$
$\displaystyle
y_{2}=C_{2}{\mathrm{e}}^{\left(a_{2}-c_{2}\right)t}+\frac{a_{3}-b_{2}}{a_{2}-c_{2}},$
$\displaystyle
y_{3}=C_{3}{\mathrm{e}}^{\left(a_{2}-c_{3}\right)t}+\frac{a_{6}-b_{3}}{a_{2}-c_{3}},$
$\displaystyle
y_{4}=C_{4}{\mathrm{e}}^{\left(a_{2}-c_{4}\right)t}+\frac{a_{8}-b_{4}}{a_{2}-c_{4}}.$

Given the solutions for $y_{2}$ and $y_{3}$ we find

$\displaystyle y_{5}$
$\displaystyle=C_{5}\left(C_{2}+{\frac{\left(a_{{3}}-b_{{2}}\right){{\rm
e}^{-\left(a_{{2}}-c_{{2}}\right)t}}}{a_{{2}}-c_{{2}}}}\right)^{-{\frac{a_{{3}}-c_{{5}}}{a_{{3}}-b_{{2}}}}}-{\frac{b_{{5}}-a_{{4}}}{a_{{3}}-c_{{5}}}}$
$\displaystyle y_{6}$
$\displaystyle=C_{6}\left(C_{2}+{\frac{\left(a_{{3}}-b_{{2}}\right){{\rm
e}^{-\left(a_{{2}}-c_{{2}}\right)t}}}{a_{{2}}-c_{{2}}}}\right)^{-{\frac{a_{{3}}-c_{{6}}}{a_{{3}}-b_{{2}}}}}-{\frac{b_{{6}}-a_{{7}}}{a_{{3}}-c_{{6}}}}$
$\displaystyle y_{7}$
$\displaystyle={(b_{{7}}-a_{{6}})\left(C_{7}\left(C_{3}+{\frac{\left(a_{{6}}-b_{{3}}\right){{\rm
e}^{-\left(a_{{2}}-c_{{3}}\right)t}}}{a_{{2}}-c_{{3}}}}\right)^{{\frac{b_{{7}}-a_{{6}}}{a_{{6}}-b_{{3}}}}}-a_{{5}}+c_{{7}}\right)^{-1}}.$

Once a solution to the $n-1$ dimensional edge system has been found, one may
retrieve a solution to the original $T$-system as follows. Let the $T$-system,
cf. (27), be

$\begin{split}\dot{y_{i}}&=hf_{i},\quad i=1,\ldots,n-1\\\
\dot{x_{k}}&=x_{k}hg,\end{split}$ (29)

and suppose a solution to the edge system

$\dot{y_{i}}=f_{i},\quad i=1,\ldots,n-1$ (30)

is known. One first determines the solution to $\dot{x_{k}}=x_{k}g(y)$, from
$\ln(x_{k})=\int g$. With $z=(y,x_{k})$ and $w=(f,x_{k}g)$ we then have the
solution, $z(\tau)$ to

$\frac{dz}{d\tau}=w(z).$ (31)

We seek to find a solution to

$\frac{dz}{dt}=h(z)w(z).$ (32)

From (31) and (32) we obtain

$\frac{dt}{d\tau}=\frac{1}{h(z(\tau))}\implies
t=\int\frac{1}{h(z(\tau))}d\tau:=u(\tau).$

Inverting $u$ we find $\tau=u^{-1}(t)$ and the solution to (32) is
$z(u^{-1}(t))$.

##  6 Existence of $n-1$ functionally independent integrals

######  Theorem 23.

The $n$-dimensional $T$-system (4) admits $n-1$ functionally independent
integrals.

###### Proof.

Pick an edge of $T$, call it $\bar{e}_{n-1}$. Let $T_{n-1}\subset T$ be the
subtree on 2 vertices with edge $\bar{e}_{n-1}$. Choose an edge
$\bar{e}_{n-2}\in T$ which is adjacent to $T_{n-1}$. Let $T_{n-1}\subset T$ be
the subtree on 3 vertices with edges $\bar{e}_{n-1},\bar{e}_{n-2}$. Continue
the process, i.e. choose edges $\bar{e}_{n-i}\in T$ adjacent to $T_{n-i+1}$,
and let $T_{n-i}\subset T$ be the tree on $i+1$ vertices with edges
$\bar{e}_{n-1},\ldots,\bar{e}_{n-i}$, for $i=3,\ldots,n-1$, so that $T_{1}=T$.
Now consider the set $K=\\{K_{1},K_{2},\ldots,K_{n-1}\\}$, where $K_{1}$ is
any integral of the form (9), and $K_{i}$, $i>1$, is the 3-point integral
which depends on edge-variable $\bar{y}_{i-1}$ and the edge-variable of the
edge it is adjacent to in $T_{i}$. The integral $K_{1}$ can be written in
terms of a distinguished variable $x_{k}$ and the edge-variables
$\bar{y}_{1},\ldots,\bar{y}_{n-1}$. By construction, the Jacobian determinant
of $K$ with respect to these variables is upper-triangular and hence the $n-1$
integrals are functionally independent. ∎

######  Example 24.

For the $T$-system (5), if we choose

$\displaystyle\bar{e}_{7}=(3,7),\quad$
$\displaystyle\bar{e}_{6}=(2,3),\quad\bar{e}_{5}=(3,4),\quad\bar{e}_{4}=(2,6),$
$\displaystyle\bar{e}_{3}=(5,6),\quad$
$\displaystyle\bar{e}_{2}=(2,8),\quad\bar{e}_{1}=(1,2),\quad$

the integrals $K_{2},\ldots,K_{7}$ correspond to (19) and the Jacobian takes
the form

$\begin{pmatrix}\ast&\ast&\ast&\ast&\ast&\ast&\ast&\ast\\\
0&\ast&\ast&0&0&0&0&0\\\ 0&0&\ast&0&\ast&0&0&0\\\ 0&0&0&\ast&\ast&0&0&0\\\
0&0&0&0&\ast&0&\ast&0\\\ 0&0&0&0&0&\ast&\ast&0\\\
0&0&0&0&0&0&\ast&\ast\end{pmatrix}.$

## References

  * [1] Darboux, Mémoire sur les équations différentielles algébriques du premier ordre et du premier degré, Bull. Sci. Math. 1 (1878) 60-96, 123-144, 151-200.
  * [2] A. Goriely, Integrability and Nonintegrability of Dynamical Systems (2001) World Scientific, section 2.5.
  * [3] R.D. Holt and J. Pickering, Infectious disease and species coexistence: A model of Lotka-Volterra form, The American Naturalist 126 (1985), 196-211.
  * [4] A. Kolmogorov, Sulla teoria di Volterra della lotta per l’essistenza, Giornale Istituto Ital. Attuari 7 (1936) 74-80.
  * [5] J. Llibre, private communication.
  * [6] J. Llibre, R. Ramírez, V. Ramírez, Integrability of a class of $N$–dimensional Lotka–Volterra and Kolmogorov systems, J. Differential Equations 269 (2020) 2503-2531.
  * [7] A.J. Lotka, Analytical Theory of Biological Populations, The Plenum Series on Demographic Methods and Population Analysis, Plenum Press, New York, 1998. Translated from the 1939 French edition and with an introduction by David P. Smith and Hélène Rossert.
  * [8] R.S. Maier, The integration of three-dimensional Lotka-Volterra systems, Proc. Roy. Soc. A 469 (2013) 20120693.
  * [9] R.M. May, W.J. Leonard, Nonlinear Aspects of Competition Between Three Species, Siam J. Appl. Math. 29(2) (1975) 243-253.
  * [10] R. Otter, The Number of Trees, The Annals of Mathematics 2nd ser. 49(3) (1948) 583-599.
  * [11] G.R.W. Quispel, B. Tapley, D.I. McLaren, P.H. van der Kamp, Linear Darboux polynomials for Lotka-Volterra systems, trees and superintegrable families, J. Phys. A: Math. Theor. 56 (2023) 315201.
  * [12] S. Smale, On the differential equations of species in competition, J. Math. Biology 3 (1976) 5-7.
  * [13] P.H. van der Kamp, T.E. Kouloukas, G.R.W. Quispel, D.T. Tran and P. Vanhaecke, Integrable and superintegrable systems associated with multi-sums of products, Proc. R. Soc. A 470 (2014) 20140481.
  * [14] P.H. van der Kamp, D.I. McLaren and G.R.W. Quispel, On a quadratic Poisson algebra, and superintegrable, Liouville integrable, and nonholonomically integrable Lotka-Volterra systems, in preparation.
  * [15] V. Volterra, Leçons sur la théorie mathématique de la lutte pour la vie, Les Grands Classiques Gauthier-Villars. Editions Jacques Gabay, Sceaux, 1990. Reprint of the 1931 original.


* Curien and Munch-Maccagnoni (2010) Pierre-Louis Curien and Guillaume Munch-Maccagnoni. 2010\.  The Duality of Computation under Focus. In _Theoretical Computer Science_ , Cristian S. Calude and Vladimiro Sassone (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 165–181.
  * Downen and Ariola (2014) Paul Downen and Zena M. Ariola. 2014.  The Duality of Construction. In _Proceedings of the 23rd European Symposium on Programming Languages and Systems - Volume 8410_ _(ESOP ’14)_. Springer, Berlin, Heidelberg, 249–269.  https://doi.org/10.1007/978-3-642-54833-8_14
  * Downen and Ariola (2018a) Paul Downen and Zena M. Ariola. 2018a.  Beyond Polarity: Towards a Multi-Discipline Intermediate Language with Sharing. In _27th EACSL Annual Conference on Computer Science Logic (CSL 2018)_ _(Leibniz International Proceedings in Informatics (LIPIcs), Vol. 119)_ , Dan Ghica and Achim Jung (Eds.). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 21:1–21:23.  https://doi.org/10.4230/LIPIcs.CSL.2018.21
  * Downen and Ariola (2018b) Paul Downen and Zena M. Ariola. 2018b.  A tutorial on computational classical logic and the sequent calculus.  _Journal of Functional Programming_ 28 (2018).  https://doi.org/10.1017/S0956796818000023
  * Downen and Ariola (2020) Paul Downen and Zena M. Ariola. 2020.  Compiling With Classical Connectives.  _Logical Methods in Computer Science_ Volume 16, Issue 3 (Aug. 2020).  https://doi.org/10.23638/LMCS-16(3:13)2020
  * Downen et al. (2015) Paul Downen, Philip Johnson-Freyd, and Zena M. Ariola. 2015\.  Structures for structural recursion. In _Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming_ (Vancouver, BC, Canada) _(ICFP 2015)_. Association for Computing Machinery, New York, NY, USA, 127–139.  https://doi.org/10.1145/2784731.2784762
  * Downen et al. (2016) Paul Downen, Luke Maurer, Zena M Ariola, and Simon Peyton Jones. 2016\.  Sequent calculus as a compiler intermediate language. In _Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming_. 74–88.
  * Downen et al. (2019) Paul Downen, Zachary Sullivan, Zena M. Ariola, and Simon Peyton Jones. 2019.  Codata in Action. In _European Symposium on Programming_ _(ESOP ’19)_. Springer, 119–146.  https://doi.org/10.1007/978-3-030-17184-1_5
  * Felleisen (1987) Matthias Felleisen. 1987\.  Reflections on Landin’s J-operator: A Partly Historical Note.  _Computer Languages_ 12, 3 (1987), 197–207.  https://doi.org/10.1016/0096-0551(87)90022-1
  * Felleisen et al. (1987) Matthias Felleisen, Daniel P. Friedman, Eugene Kohlbecker, and Bruce Duba. 1987.  A syntactic theory of sequential control.  _Theoretical Computer Science_ 52, 3 (1987), 205–237.  https://doi.org/10.1016/0304-3975(87)90109-5
  * Filinski (1989) Andrzej Filinski. 1989\.  Declarative Continuations: an Investigation of Duality in Programming Language Semantics. In _Category Theory and Computer Science_. Springer-Verlag, Berlin, Heidelberg, 224–249.
  * Gentzen (1935a) Gerhard Gentzen. 1935a.  Untersuchungen über das logische Schließen. I.  _Mathematische Zeitschrift_ 35 (1935), 176–210.
  * Gentzen (1935b) Gerhard Gentzen. 1935b.  Untersuchungen über das logische Schließen. II.  _Mathematische Zeitschrift_ 39 (1935), 405–431.
  * Gentzen (1969) Gerhard Gentzen. 1969\.  _The collected papers of Gerhard Gentzen_.  North-Holland Publishing Co., Amsterdam.
  * Girard (1987) Jean-Yves Girard. 1987\.  Linear Logic.  _Theoretical Computer Science_ 50, 1 (1987), 1–101.  https://doi.org/10.1016/0304-3975(87)90045-4
  * Goetz et al. (2014) Brian Goetz et al. 2014\.  _JSR 335: Lambda Expressions for the Java Programming Language_.  https://jcp.org/en/jsr/detail?id=335
  * Griffin (1989) Timothy G. Griffin. 1989\.  A Formulae-as-Type Notion of Control. In _Proceedings of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages_ (San Francisco, California, USA) _(POPL ’90)_. Association for Computing Machinery, New York, NY, USA, 47–58.  https://doi.org/10.1145/96709.96714
  * Hagino (1989) Tatsuya Hagino. 1989\.  Codatatypes in ML.  _Journal of Symbolic Computation_ 8, 6 (1989), 629–650.  https://doi.org/10.1016/S0747-7171(89)80065-3
  * Landin (1965) Peter John Landin. 1965\.  Correspondence between ALGOL 60 and Church’s Lambda-notation: part I.  _Commun. ACM_ 8, 2 (feb 1965), 89–101.  https://doi.org/10.1145/363744.363749
  * Levy (1999) Paul Blain Levy. 1999\.  Call-by-Push-Value: A Subsuming Paradigm. In _Proceedings of the 4th International Conference on Typed Lambda Calculi and Applications_ _(TLCA ’99)_. Springer-Verlag, Berlin, Heidelberg, 228–242.
  * Maurer et al. (2017) Luke Maurer, Paul Downen, Zena M. Ariola, and Simon Peyton Jones. 2017.  Compiling without Continuations. In _Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation_ (Barcelona, Spain) _(PLDI 2017)_. Association for Computing Machinery, New York, NY, USA, 482–494.  https://doi.org/10.1145/3062341.3062380
  * Miquey (2019) Étienne Miquey. 2019\.  A Classical Sequent Calculus with Dependent Types.  _ACM Trans. Program. Lang. Syst._ 41, 2, Article 8 (mar 2019), 47 pages.  https://doi.org/10.1145/3230625
  * Munch-Maccagnoni (2009) Guillaume Munch-Maccagnoni. 2009\.  Focalisation and Classical Realisability. In _Computer Science Logic: 23rd international Workshop, CSL 2009, 18th Annual Conference of the EACSL_ (Coimbra, Portugal) _(CSL ’09)_ , Erich Grädel and Reinhard Kahle (Eds.). Springer, Berlin, Heidelberg, 409–423.  https://doi.org/10.1007/978-3-642-04027-6_30
  * Munch-Maccagnoni (2013) Guillaume Munch-Maccagnoni. 2013\.  _Syntax and Models of a non-Associative Composition of Programs and Proofs_.  Ph. D. Dissertation. Univ. Paris Diderot.
  * Negri and Von Plato (2001) Sara Negri and Jan Von Plato. 2001.  _Structural Proof Theory_.  Cambridge University Press.  https://doi.org/10.1017/CBO9780511527340
  * Ostermann et al. (2022) Klaus Ostermann, David Binder, Ingo Skupin, Tim Süberkrüb, and Paul Downen. 2022\.  Introduction and Elimination, Left and Right.  _Proc. ACM Program. Lang._ 6, ICFP, Article 106 (2022), 28 pages.  https://doi.org/10.1145/3547637
  * Parigot (1992) Michel Parigot. 1992\.  $\lambda$$\mu$-Calculus: An algorithmic interpretation of classical natural deduction. In _Logic Programming and Automated Reasoning_ , Andrei Voronkov (Ed.). Springer, Berlin, Heidelberg, 190–201.
  * Reynolds (1972) John Charles Reynolds. 1972\.  Definitional Interpreters for Higher-Order Programming Languages. In _ACMConf_ (Boston). Association for Computing Machinery, New York, NY, USA, 717–740.  https://doi.org/10.1145/800194.805852
  * Spiwack (2014) Arnaud Spiwack. 2014\.  A Dissection of L. (2014).  Unpublished draft.
  * Sørensen and Urzyczyn (2006) Morten Heine Sørensen and Paweł Urzyczyn. 2006.  _Lectures on the Curry-Howard Isomorphism_. Studies in Logic and the Foundations of Mathematics, Vol. 149.  Elsevier.
  * Thielecke (1998) Hayo Thielecke. 1998\.  An Introduction to Landin‘s “A Generalization of Jumps and Labels”.  _Higher Order Symbol. Comput._ 11, 2 (sep 1998), 117–123.  https://doi.org/10.1023/A:1010060315625
  * Troelstra and Schwichtenberg (2000) Anne Sjerp Troelstra and Helmut Schwichtenberg. 2000.  _Basic Proof Theory, Second Edition_.  Cambridge University Press.
  * Wadler (1990) Philip Wadler. 1990\.  Linear Types Can Change the World!. In _Programming Concepts and Methods_. North-Holland.
  * Wadler (2003) Philip Wadler. 2003\.  Call-by-value is dual to call-by-name. In _Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming_ (Uppsala, Sweden) _(ICFP ’03)_. Association for Computing Machinery, New York, NY, USA, 189–201.  https://doi.org/10.1145/944705.944723
  * Wadler (2005) Philip Wadler. 2005\.  Call-by-Value Is Dual to Call-by-Name - Reloaded. In _Term Rewriting and Applications, 16th International Conference, RTA 2005, Nara, Japan, April 19-21, 2005, Proceedings_ _(Lecture Notes in Computer Science, Vol. 3467)_ , Jürgen Giesl (Ed.). Springer, 185–203.  https://doi.org/10.1007/978-3-540-32033-3_15
  * Wright and Felleisen (1994) Andrew K. Wright and Matthias Felleisen. 1994.  A Syntactic Approach to Type Soundness.  _Information and Computation_ 115, 1 (11 1994), 38–94.  https://doi.org/10.1006/inco.1994.1093
  * Zeilberger (2008) Noam Zeilberger. 2008\.  On the Unity of Duality.  _Annals of Pure and Applied Logic_ 153, 1-3 (2008), 66–96.  https://doi.org/10.1016/j.apal.2008.01.001
  * Zeilberger (2009) Noam Zeilberger. 2009\.  _The Logical Basis of Evaluation Order and Pattern-Matching_.  Ph. D. Dissertation. Carnegie Mellon University, USA.  Advisor(s) Pfenning, Frank and Lee, Peter.
  * Zhang et al. (2016) Yizhou Zhang, Guido Salvaneschi, Quinn Beightol, Barbara Liskov, and Andrew C. Myers. 2016\.  Accepting Blame for Safe Tunneled Exceptions. In _Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation_ (Santa Barbara, CA, USA) _(PLDI ’16)_. Association for Computing Machinery, New York, NY, USA, 281–295.  https://doi.org/10.1145/2908080.2908086