-
-
Save AHartNtkn/88126da50efd14a1b90a663087d149f5 to your computer and use it in GitHub Desktop.
Notebook for Hylomorphism Traces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Content-type: application/vnd.wolfram.mathematica *) | |
(*** Wolfram Notebook File ***) | |
(* http://www.wolfram.com/nb *) | |
(* CreatedBy='Mathematica 13.0' *) | |
(*CacheID: 234*) | |
(* Internal cache information: | |
NotebookFileLineBreakTest | |
NotebookFileLineBreakTest | |
NotebookDataPosition[ 158, 7] | |
NotebookDataLength[ 52367, 1347] | |
NotebookOptionsPosition[ 48362, 1283] | |
NotebookOutlinePosition[ 48757, 1299] | |
CellTagsIndexPosition[ 48714, 1296] | |
WindowFrame->Normal*) | |
(* Beginning of Notebook Content *) | |
Notebook[{ | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", | |
RowBox[{"X_", "\[CircleTimes]", "Y_"}], "]"}], "[", "f_", "]"}], "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", "y_"}], "}"}], "]"}], ":=", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", "X", "]"}], "[", "f", "]"}], "[", "x", "]"}], ",", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", "Y", "]"}], "[", "f", "]"}], "[", "y", "]"}]}], | |
"}"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", | |
RowBox[{"X_", "\[CirclePlus]", "Y_"}], "]"}], "[", "f_", "]"}], "[", | |
RowBox[{"inl", "[", "x_", "]"}], "]"}], ":=", | |
RowBox[{"inl", "[", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", "X", "]"}], "[", "f", "]"}], "[", "x", "]"}], | |
"]"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", | |
RowBox[{"X_", "\[CirclePlus]", "Y_"}], "]"}], "[", "f_", "]"}], "[", | |
RowBox[{"inr", "[", "y_", "]"}], "]"}], ":=", | |
RowBox[{"inr", "[", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", "Y", "]"}], "[", "f", "]"}], "[", "y", "]"}], | |
"]"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", "$C", "]"}], "[", "_", "]"}], "[", "x_", "]"}], ":=", | |
"x"}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", "$X", "]"}], "[", "f_", "]"}], "[", "x_", "]"}], ":=", | |
RowBox[{"f", "[", "x", "]"}]}]}], "Input", | |
CellChangeTimes->{{3.889257527792602*^9, 3.889257527793014*^9}}, | |
CellLabel->"In[1]:=",ExpressionUUID->"50f13cbc-3355-449d-b9d7-213289424d01"], | |
Cell[BoxData[ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"hylo", "[", | |
RowBox[{"F_", ",", "a_", ",", "c_"}], "]"}], "[", "x_", "]"}], ":=", | |
RowBox[{"a", "@", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", "F", "]"}], "[", | |
RowBox[{"hylo", "[", | |
RowBox[{"F", ",", "a", ",", "c"}], "]"}], "]"}], "@", | |
RowBox[{"c", "@", "x"}]}]}]}]], "Input", | |
CellChangeTimes->{{3.889257523464143*^9, 3.889257523464533*^9}}, | |
CellLabel->"In[6]:=",ExpressionUUID->"24116713-3540-4c06-8a37-1d2a169da577"], | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{"listCoalg", "[", | |
RowBox[{"{", "}"}], "]"}], ":=", | |
RowBox[{"inl", "[", "tt", "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{"listCoalg", "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", "xs___"}], "}"}], "]"}], ":=", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"x", ",", | |
RowBox[{"{", "xs", "}"}]}], "}"}], "]"}]}]}], "Input", | |
CellChangeTimes->{{3.889257517289289*^9, 3.8892575172897673`*^9}}, | |
CellLabel->"In[7]:=",ExpressionUUID->"2cc8e3b0-a564-476b-883e-35fbe0cacd50"], | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{"listAlg", "[", | |
RowBox[{"inl", "[", "tt", "]"}], "]"}], ":=", | |
RowBox[{"{", "}"}]}], "\n", | |
RowBox[{ | |
RowBox[{"listAlg", "[", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", "xs_"}], "}"}], "]"}], "]"}], ":=", | |
RowBox[{"Prepend", "[", | |
RowBox[{"xs", ",", "x"}], "]"}]}]}], "Input", | |
CellChangeTimes->{{3.88925751124749*^9, 3.8892575112478867`*^9}}, | |
CellLabel->"In[9]:=",ExpressionUUID->"ce8c6ad0-379e-4a62-9bdd-54c6ca97ca9a"], | |
Cell[CellGroupData[{ | |
Cell[BoxData[ | |
RowBox[{ | |
RowBox[{"hylo", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", "$X"}], ")"}]}], ",", "listAlg", ",", | |
"listCoalg"}], "]"}], "[", | |
RowBox[{"{", | |
RowBox[{"1", ",", "2", ",", "3"}], "}"}], "]"}]], "Input", | |
CellChangeTimes->{{3.889257630781039*^9, 3.889257630781473*^9}}, | |
CellLabel->"In[11]:=",ExpressionUUID->"ecb0ca89-3573-4f31-9928-408269c40209"], | |
Cell[BoxData[ | |
RowBox[{"{", | |
RowBox[{"1", ",", "2", ",", "3"}], "}"}]], "Output", | |
CellChangeTimes->{3.889257631406933*^9, 3.889257848100267*^9, | |
3.889258435941825*^9}, | |
CellLabel->"Out[11]=",ExpressionUUID->"86b64a36-27c1-491c-812f-f2ceaf6f04ac"] | |
}, Open ]], | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"filterAlg", "[", "p_", "]"}], "[", | |
RowBox[{"inl", "[", "tt", "]"}], "]"}], ":=", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "}"}], ",", | |
RowBox[{"{", "}"}]}], "}"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"filterAlg", "[", "p_", "]"}], "[", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", | |
RowBox[{"{", | |
RowBox[{"l1_", ",", "l2_"}], "}"}]}], "}"}], "]"}], "]"}], ":=", | |
RowBox[{"If", "[", | |
RowBox[{ | |
RowBox[{"x", "<", "p"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"Prepend", "[", | |
RowBox[{"l1", ",", "x"}], "]"}], ",", "l2"}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{"l1", ",", | |
RowBox[{"Prepend", "[", | |
RowBox[{"l2", ",", "x"}], "]"}]}], "}"}]}], "]"}]}]}], "Input", | |
CellChangeTimes->{{3.88925750219902*^9, 3.889257502199428*^9}}, | |
CellLabel->"In[12]:=",ExpressionUUID->"84207c56-cdae-499f-a7ed-e0b6f118cb54"], | |
Cell[CellGroupData[{ | |
Cell[BoxData[ | |
RowBox[{ | |
RowBox[{"hylo", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", "$X"}], ")"}]}], ",", | |
RowBox[{"filterAlg", "[", "3", "]"}], ",", "listCoalg"}], "]"}], "[", | |
RowBox[{"{", | |
RowBox[{"1", ",", "5", ",", "2", ",", "4", ",", "6"}], "}"}], | |
"]"}]], "Input", | |
CellLabel->"In[14]:=",ExpressionUUID->"37b7ffda-4dd2-4cbd-96d9-264d698aa239"], | |
Cell[BoxData[ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"1", ",", "2"}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{"5", ",", "4", ",", "6"}], "}"}]}], "}"}]], "Output", | |
CellChangeTimes->{3.889257663504974*^9, 3.889257849906103*^9, | |
3.88925843902104*^9}, | |
CellLabel->"Out[14]=",ExpressionUUID->"e6e420e2-79d2-41fa-b199-a1e78a5f5e9f"] | |
}, Open ]], | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{"filter", "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", "xs_"}], "}"}], "]"}], ":=", | |
RowBox[{"{", | |
RowBox[{"x", ",", | |
RowBox[{ | |
RowBox[{"hylo", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", "$X"}], ")"}]}], ",", | |
RowBox[{"filterAlg", "[", "x", "]"}], ",", "listCoalg"}], "]"}], "[", | |
"xs", "]"}]}], "}"}]}], "\n", | |
RowBox[{"qsCoalg", ":=", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", | |
RowBox[{"$C", "\[CirclePlus]", "$X"}], "]"}], "[", "filter", "]"}], "@*", | |
"listCoalg"}]}]}], "Input", | |
CellChangeTimes->{{3.889257495791527*^9, 3.889257495791975*^9}}, | |
CellLabel->"In[15]:=",ExpressionUUID->"8eab05b6-14bf-48ad-bbf1-56d271069b99"], | |
Cell[CellGroupData[{ | |
Cell[BoxData[ | |
RowBox[{"qsCoalg", "[", | |
RowBox[{"{", | |
RowBox[{"3", ",", "2", ",", "7", ",", "8", ",", "6", ",", "1"}], "}"}], | |
"]"}]], "Input", | |
CellChangeTimes->{{3.889257669315464*^9, 3.889257692173291*^9}}, | |
CellLabel->"In[17]:=",ExpressionUUID->"59e6a7e5-e03c-4823-99c8-795cbaa1533d"], | |
Cell[BoxData[ | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"3", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"2", ",", "1"}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{"7", ",", "8", ",", "6"}], "}"}]}], "}"}]}], "}"}], | |
"]"}]], "Output", | |
CellChangeTimes->{{3.889257684124354*^9, 3.889257692657996*^9}, | |
3.8892578514180927`*^9, 3.889258441630362*^9}, | |
CellLabel->"Out[17]=",ExpressionUUID->"d12c2eff-e08f-48bf-b782-968f6d2c11d7"] | |
}, Open ]], | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"concatAlg", "[", "n_", "]"}], "[", | |
RowBox[{"inl", "[", "tt", "]"}], "]"}], ":=", "n"}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"concatAlg", "[", "n_", "]"}], "[", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", "xs_"}], "}"}], "]"}], "]"}], ":=", | |
RowBox[{"Prepend", "[", | |
RowBox[{"xs", ",", "x"}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"concat", "[", | |
RowBox[{"n_", ",", "m_"}], "]"}], ":=", | |
RowBox[{ | |
RowBox[{"hylo", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", "$X"}], ")"}]}], ",", | |
RowBox[{"concatAlg", "[", "m", "]"}], ",", "listCoalg"}], "]"}], "[", | |
"n", "]"}]}], "\n"}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{"qsAlg", "[", | |
RowBox[{"inl", "[", "tt", "]"}], "]"}], ":=", | |
RowBox[{"{", "}"}]}], "\n", | |
RowBox[{ | |
RowBox[{"qsAlg", "[", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"n_", ",", | |
RowBox[{"{", | |
RowBox[{"l_", ",", "r_"}], "}"}]}], "}"}], "]"}], "]"}], ":=", | |
RowBox[{"concat", "[", | |
RowBox[{"l", ",", | |
RowBox[{"Prepend", "[", | |
RowBox[{"r", ",", "n"}], "]"}]}], "]"}]}]}], "Input", | |
CellChangeTimes->{{3.889257473774398*^9, 3.889257477690515*^9}, { | |
3.889257709029336*^9, 3.8892577103332663`*^9}}, | |
CellLabel->"In[18]:=",ExpressionUUID->"42bacf81-a553-4004-be13-5f696dbf3c7b"], | |
Cell[BoxData[ | |
RowBox[{ | |
RowBox[{"qs", "=", | |
RowBox[{"hylo", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", | |
RowBox[{"(", | |
RowBox[{"$X", "\[CircleTimes]", "$X"}], ")"}]}], ")"}]}], ",", | |
"qsAlg", ",", "qsCoalg"}], "]"}]}], ";"}]], "Input", | |
CellChangeTimes->{{3.889257800057803*^9, 3.889257802825197*^9}}, | |
CellLabel->"In[23]:=",ExpressionUUID->"cb180f76-efad-4546-8171-e493bd06f5a9"], | |
Cell[CellGroupData[{ | |
Cell[BoxData[{ | |
RowBox[{"RandomSample", "[", | |
RowBox[{"Range", "[", "9", "]"}], "]"}], "\[IndentingNewLine]", | |
RowBox[{"qs", "[", "%", "]"}]}], "Input", | |
CellChangeTimes->{{3.889257534349066*^9, 3.889257548109737*^9}}, | |
CellLabel->"In[24]:=",ExpressionUUID->"e46c5ea3-d1b4-4e15-a7d4-fe45cf9a6d09"], | |
Cell[BoxData[ | |
RowBox[{"{", | |
RowBox[{ | |
"2", ",", "6", ",", "7", ",", "9", ",", "3", ",", "5", ",", "4", ",", "1", | |
",", "8"}], "}"}]], "Output", | |
CellChangeTimes->{3.889257548427205*^9, 3.889257857556424*^9, | |
3.889258443980674*^9}, | |
CellLabel->"Out[24]=",ExpressionUUID->"d444709a-5db7-4815-a73c-4e87d8143640"], | |
Cell[BoxData[ | |
RowBox[{"{", | |
RowBox[{ | |
"1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", "7", ",", "8", | |
",", "9"}], "}"}]], "Output", | |
CellChangeTimes->{3.889257548427205*^9, 3.889257857556424*^9, | |
3.8892584439811487`*^9}, | |
CellLabel->"Out[25]=",ExpressionUUID->"4025de9f-2886-49ca-a77b-0571d8443c09"] | |
}, Open ]], | |
Cell[BoxData[ | |
RowBox[{"\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", | |
"\[IndentingNewLine]"}]], "Input", | |
CellChangeTimes->{{3.889257896679247*^9, | |
3.889257897213624*^9}},ExpressionUUID->"4df5a252-098a-4ee2-b38e-\ | |
12c17eae0e90"], | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"split", "[", | |
RowBox[{"f_", ",", "g_"}], "]"}], "[", "x_", "]"}], ":=", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"f", "[", "x", "]"}], ",", | |
RowBox[{"g", "[", "x", "]"}]}], "}"}]}], | |
"\[IndentingNewLine]"}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{"hyloCTrc", "[", | |
RowBox[{"F_", ",", "c_"}], "]"}], ":=", | |
RowBox[{"hylo", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CircleTimes]", "F"}], ",", | |
RowBox[{"#", "&"}], ",", | |
RowBox[{"split", "[", | |
RowBox[{ | |
RowBox[{"#", "&"}], ",", "c"}], "]"}]}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"hyloATrc", "[", | |
RowBox[{"F_", ",", "a_", ",", "c_"}], "]"}], ":=", | |
RowBox[{"hylo", "[", | |
RowBox[{"F", ",", | |
RowBox[{"split", "[", | |
RowBox[{ | |
RowBox[{"a", "@*", | |
RowBox[{ | |
RowBox[{"M", "[", "F", "]"}], "[", "First", "]"}]}], ",", | |
RowBox[{"#", "&"}]}], "]"}], ",", "c"}], "]"}]}], | |
"\[IndentingNewLine]"}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"collapse", "[", | |
RowBox[{"X_", "\[CircleTimes]", "Y_"}], "]"}], "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", "y_"}], "}"}], "]"}], ":=", | |
RowBox[{"Union", "[", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"collapse", "[", "X", "]"}], "[", "x", "]"}], ",", | |
RowBox[{ | |
RowBox[{"collapse", "[", "Y", "]"}], "[", "y", "]"}]}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"collapse", "[", | |
RowBox[{"X_", "\[CirclePlus]", "Y_"}], "]"}], "[", | |
RowBox[{"inl", "[", "x_", "]"}], "]"}], ":=", | |
RowBox[{ | |
RowBox[{"collapse", "[", "X", "]"}], "[", "x", "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"collapse", "[", | |
RowBox[{"X_", "\[CirclePlus]", "Y_"}], "]"}], "[", | |
RowBox[{"inr", "[", "y_", "]"}], "]"}], ":=", | |
RowBox[{ | |
RowBox[{"collapse", "[", "Y", "]"}], "[", "y", "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"collapse", "[", "$C", "]"}], "[", "x_", "]"}], ":=", | |
RowBox[{"{", "}"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"collapse", "[", "$X", "]"}], "[", "x_", "]"}], ":=", "x"}], | |
"\[IndentingNewLine]"}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"ConstrCoalg", "[", "F_", "]"}], "[", | |
RowBox[{"{", | |
RowBox[{"a_", ",", "r_"}], "}"}], "]"}], ":=", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"a", ",", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"M", "[", "F", "]"}], "[", "First", "]"}], "[", "r", "]"}]}], | |
"}"}], ",", "r"}], "}"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"ConstrAlg", "[", "F_", "]"}], "[", | |
RowBox[{"{", | |
RowBox[{"a_", ",", "r_"}], "}"}], "]"}], ":=", | |
RowBox[{"Union", "[", | |
RowBox[{ | |
RowBox[{"{", "a", "}"}], ",", | |
RowBox[{ | |
RowBox[{"collapse", "[", "F", "]"}], "[", "r", "]"}]}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"Constraints", "[", "F_", "]"}], ":=", | |
RowBox[{"hylo", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CircleTimes]", "F"}], ",", | |
RowBox[{"ConstrAlg", "[", "F", "]"}], ",", | |
RowBox[{"ConstrCoalg", "[", "F", "]"}]}], "]"}]}], | |
"\[IndentingNewLine]"}], "\n", | |
RowBox[{ | |
RowBox[{"CConstraints", "[", | |
RowBox[{"F_", ",", "c_"}], "]"}], ":=", | |
RowBox[{ | |
RowBox[{"Constraints", "[", "F", "]"}], "@*", | |
RowBox[{"hyloCTrc", "[", | |
RowBox[{"F", ",", "c"}], "]"}]}]}], "\n", | |
RowBox[{ | |
RowBox[{"AConstraints", "[", | |
RowBox[{"F_", ",", "a_", ",", "c_"}], "]"}], ":=", | |
RowBox[{ | |
RowBox[{"Constraints", "[", "F", "]"}], "@*", | |
RowBox[{"hyloATrc", "[", | |
RowBox[{"F", ",", "a", ",", "c"}], "]"}]}]}]}], "Input", | |
CellChangeTimes->{{3.889257459973711*^9, 3.8892574618814907`*^9}, { | |
3.88925799165065*^9, 3.8892579925658293`*^9}}, | |
CellLabel->"In[26]:=",ExpressionUUID->"c19b0b75-a3e9-4129-8573-09959fa31b35"], | |
Cell[CellGroupData[{ | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{"AConstraints", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", "$X"}], ")"}]}], ",", | |
RowBox[{"filterAlg", "[", "3", "]"}], ",", "listCoalg"}], "]"}], "[", | |
RowBox[{"{", | |
RowBox[{"1", ",", "5", ",", "6", ",", "7", ",", "2"}], "}"}], | |
"]"}], "\[IndentingNewLine]", | |
RowBox[{"%", "/.", " ", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"x_", ",", "y_"}], "}"}], ":>", | |
RowBox[{"x", "==", | |
RowBox[{ | |
RowBox[{"filterAlg", "[", "3", "]"}], "[", "y", "]"}]}]}]}]}], "Input", | |
CellChangeTimes->{{3.889257934067533*^9, 3.889257952136141*^9}, { | |
3.889258017507715*^9, 3.8892580221637297`*^9}, {3.889258062937442*^9, | |
3.889258064029726*^9}}, | |
CellLabel->"In[39]:=",ExpressionUUID->"c0da4cf9-c27e-41db-8e36-684eed5a59c0"], | |
Cell[BoxData[ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "}"}], ",", | |
RowBox[{"{", "}"}]}], "}"}], ",", | |
RowBox[{"inl", "[", "tt", "]"}]}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "2", "}"}], ",", | |
RowBox[{"{", "}"}]}], "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"2", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "}"}], ",", | |
RowBox[{"{", "}"}]}], "}"}]}], "}"}], "]"}]}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "2", "}"}], ",", | |
RowBox[{"{", "7", "}"}]}], "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"7", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "2", "}"}], ",", | |
RowBox[{"{", "}"}]}], "}"}]}], "}"}], "]"}]}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "2", "}"}], ",", | |
RowBox[{"{", | |
RowBox[{"6", ",", "7"}], "}"}]}], "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"6", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "2", "}"}], ",", | |
RowBox[{"{", "7", "}"}]}], "}"}]}], "}"}], "]"}]}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "2", "}"}], ",", | |
RowBox[{"{", | |
RowBox[{"5", ",", "6", ",", "7"}], "}"}]}], "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"5", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "2", "}"}], ",", | |
RowBox[{"{", | |
RowBox[{"6", ",", "7"}], "}"}]}], "}"}]}], "}"}], "]"}]}], "}"}], | |
",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"1", ",", "2"}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{"5", ",", "6", ",", "7"}], "}"}]}], "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"1", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "2", "}"}], ",", | |
RowBox[{"{", | |
RowBox[{"5", ",", "6", ",", "7"}], "}"}]}], "}"}]}], "}"}], | |
"]"}]}], "}"}]}], "}"}]], "Output", | |
CellChangeTimes->{{3.8892579946817913`*^9, 3.889258022497109*^9}, | |
3.8892580643794622`*^9, 3.889258447157439*^9}, | |
CellLabel->"Out[39]=",ExpressionUUID->"693e1144-1747-4f68-914a-2b9af4f37bee"], | |
Cell[BoxData[ | |
RowBox[{"{", | |
RowBox[{ | |
"True", ",", "True", ",", "True", ",", "True", ",", "True", ",", "True"}], | |
"}"}]], "Output", | |
CellChangeTimes->{{3.8892579946817913`*^9, 3.889258022497109*^9}, | |
3.8892580643794622`*^9, 3.889258447158531*^9}, | |
CellLabel->"Out[40]=",ExpressionUUID->"bbfa307b-11d6-4b8d-b528-100641a5ee35"] | |
}, Open ]], | |
Cell[CellGroupData[{ | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{"CConstraints", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", | |
RowBox[{"(", | |
RowBox[{"$X", "\[CircleTimes]", "$X"}], ")"}]}], ")"}]}], ",", | |
"qsCoalg"}], "]"}], "[", | |
RowBox[{"{", | |
RowBox[{"3", ",", "4", ",", "2", ",", "9", ",", "1"}], "}"}], | |
"]"}], "\[IndentingNewLine]", | |
RowBox[{"%", "/.", " ", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"x_", ",", "y_"}], "}"}], ":>", | |
RowBox[{"y", "==", | |
RowBox[{"qsCoalg", "[", "x", "]"}]}]}]}]}], "Input", | |
CellLabel->"In[41]:=",ExpressionUUID->"83412c11-daa9-4dd8-801f-d15a19ebab3e"], | |
Cell[BoxData[ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "}"}], ",", | |
RowBox[{"inl", "[", "tt", "]"}]}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "1", "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"1", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "}"}], ",", | |
RowBox[{"{", "}"}]}], "}"}]}], "}"}], "]"}]}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "9", "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"9", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "}"}], ",", | |
RowBox[{"{", "}"}]}], "}"}]}], "}"}], "]"}]}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"2", ",", "1"}], "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"2", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "1", "}"}], ",", | |
RowBox[{"{", "}"}]}], "}"}]}], "}"}], "]"}]}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"4", ",", "9"}], "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"4", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", "}"}], ",", | |
RowBox[{"{", "9", "}"}]}], "}"}]}], "}"}], "]"}]}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"3", ",", "4", ",", "2", ",", "9", ",", "1"}], "}"}], ",", | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"3", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"2", ",", "1"}], "}"}], ",", | |
RowBox[{"{", | |
RowBox[{"4", ",", "9"}], "}"}]}], "}"}]}], "}"}], "]"}]}], "}"}]}], | |
"}"}]], "Output", | |
CellChangeTimes->{3.889258336672966*^9, 3.889258448519286*^9}, | |
CellLabel->"Out[41]=",ExpressionUUID->"3d72b1db-bf56-4b4b-a857-5ec4de7b8250"], | |
Cell[BoxData[ | |
RowBox[{"{", | |
RowBox[{ | |
"True", ",", "True", ",", "True", ",", "True", ",", "True", ",", "True"}], | |
"}"}]], "Output", | |
CellChangeTimes->{3.889258336672966*^9, 3.889258448520482*^9}, | |
CellLabel->"Out[42]=",ExpressionUUID->"9ab3dbbb-3b2f-4207-8c09-9a3013110972"] | |
}, Open ]], | |
Cell[BoxData[ | |
RowBox[{"\[IndentingNewLine]", "\[IndentingNewLine]", | |
"\[IndentingNewLine]"}]], "Input", | |
CellChangeTimes->{{3.889258353115934*^9, | |
3.889258353682769*^9}},ExpressionUUID->"dc2c987e-da65-4d7e-9438-\ | |
5c2142734df4"], | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"filterCheck", "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", "xs_"}], "}"}], "]"}], ":=", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"filterAlgCheck", "[", | |
RowBox[{"x", ",", "#2", ",", "#1"}], "]"}], "&"}], "@@@", | |
RowBox[{ | |
RowBox[{"AConstraints", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", "$X"}], ")"}]}], ",", | |
RowBox[{"filterAlg", "[", "x", "]"}], ",", "listCoalg"}], "]"}], "[", | |
"xs", "]"}]}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{"qsCoalgCheck", "[", | |
RowBox[{ | |
RowBox[{"{", "}"}], ",", "r_"}], "]"}], ":=", | |
RowBox[{"{", | |
RowBox[{"qsCoalgEqCheck", "[", | |
RowBox[{ | |
RowBox[{"inl", "[", "tt", "]"}], ",", "r"}], "]"}], "}"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"qsCoalgCheck", "[", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"a_", ",", "as___"}], "}"}], ",", "r_"}], "]"}], ":=", | |
RowBox[{"Union", "[", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"qsCoalgEqCheck", "[", | |
RowBox[{ | |
RowBox[{"inr", "[", | |
RowBox[{"filter", "[", | |
RowBox[{"{", | |
RowBox[{"a", ",", | |
RowBox[{"{", "as", "}"}]}], "}"}], "]"}], "]"}], ",", "r"}], | |
"]"}], "}"}], ",", | |
RowBox[{"filterCheck", "[", | |
RowBox[{"{", | |
RowBox[{"a", ",", | |
RowBox[{"{", "as", "}"}]}], "}"}], "]"}]}], "]"}]}], | |
"\[IndentingNewLine]"}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"concatCheck", "[", | |
RowBox[{"n_", ",", "m_"}], "]"}], ":=", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"concatAlgCheck", "[", | |
RowBox[{"m", ",", "#2", ",", "#1"}], "]"}], "&"}], "@@@", | |
RowBox[{ | |
RowBox[{"AConstraints", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", "$X"}], ")"}]}], ",", | |
RowBox[{"concatAlg", "[", "m", "]"}], ",", "listCoalg"}], "]"}], "[", | |
"n", "]"}]}]}], "\[IndentingNewLine]"}], "\n", | |
RowBox[{ | |
RowBox[{"qsAlgCheck", "[", | |
RowBox[{ | |
RowBox[{"inl", "[", "tt", "]"}], ",", "s_"}], "]"}], ":=", | |
RowBox[{"{", | |
RowBox[{"qsAlgEqCheck", "[", | |
RowBox[{ | |
RowBox[{"inl", "[", "tt", "]"}], ",", "s"}], "]"}], "}"}]}], "\n", | |
RowBox[{ | |
RowBox[{"qsAlgCheck", "[", | |
RowBox[{ | |
RowBox[{"inr", "[", | |
RowBox[{"{", | |
RowBox[{"n_", ",", | |
RowBox[{"{", | |
RowBox[{"l_", ",", "r_"}], "}"}]}], "}"}], "]"}], ",", "s_"}], "]"}], | |
":=", | |
RowBox[{"Union", "[", | |
RowBox[{ | |
RowBox[{"{", | |
RowBox[{"qsAlgEqCheck", "[", | |
RowBox[{ | |
RowBox[{"concat", "[", | |
RowBox[{"l", ",", | |
RowBox[{"Prepend", "[", | |
RowBox[{"r", ",", "n"}], "]"}]}], "]"}], ",", "s"}], "]"}], "}"}], | |
",", | |
RowBox[{"concatCheck", "[", | |
RowBox[{"l", ",", | |
RowBox[{"Prepend", "[", | |
RowBox[{"r", ",", "n"}], "]"}]}], "]"}]}], "]"}]}]}], "Input", | |
CellChangeTimes->{{3.889257439868539*^9, 3.889257439868957*^9}, { | |
3.889258346498747*^9, 3.889258347163885*^9}}, | |
CellLabel->"In[43]:=",ExpressionUUID->"b5d27807-25e0-423a-8417-2fea0be86823"], | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{"filterAlgCheck", "[", | |
RowBox[{"p_", ",", "a_", ",", "b_"}], "]"}], ":=", | |
RowBox[{"eq", "[", | |
RowBox[{ | |
RowBox[{"ap", "[", | |
RowBox[{"\"\<filterAlgCheck\>\"", ",", | |
RowBox[{"{", | |
RowBox[{"p", ",", | |
RowBox[{ | |
RowBox[{"funConv", "[", | |
RowBox[{"$1", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", | |
RowBox[{"(", | |
RowBox[{ | |
RowBox[{"$L", "[", "$C", "]"}], "\[CircleTimes]", | |
RowBox[{"$L", "[", "$C", "]"}]}], ")"}]}], ")"}]}], "]"}], "[", | |
"a", "]"}], ",", | |
RowBox[{ | |
RowBox[{"funConv", "[", | |
RowBox[{ | |
RowBox[{"$L", "[", "$C", "]"}], "\[CircleTimes]", | |
RowBox[{"$L", "[", "$C", "]"}]}], "]"}], "[", "b", "]"}]}], | |
"}"}]}], "]"}], ",", "1"}], "]"}]}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{"concatAlgCheck", "[", | |
RowBox[{"p_", ",", "a_", ",", "b_"}], "]"}], ":=", | |
RowBox[{"eq", "[", | |
RowBox[{ | |
RowBox[{"ap", "[", | |
RowBox[{"\"\<concatAlgCheck\>\"", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"listConv", "[", "p", "]"}], ",", | |
RowBox[{ | |
RowBox[{"funConv", "[", | |
RowBox[{"$1", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", | |
RowBox[{"$L", "[", "$C", "]"}]}], ")"}]}], "]"}], "[", "a", | |
"]"}], ",", | |
RowBox[{"listConv", "[", "b", "]"}]}], "}"}]}], "]"}], ",", "1"}], | |
"]"}]}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{"qsAlgEqCheck", "[", | |
RowBox[{"x_", ",", "y_"}], "]"}], ":=", | |
RowBox[{"eq", "[", | |
RowBox[{ | |
RowBox[{"ap", "[", | |
RowBox[{"\"\<listEq\>\"", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"listConv", "[", "x", "]"}], ",", | |
RowBox[{"listConv", "[", "y", "]"}]}], "}"}]}], "]"}], ",", "1"}], | |
"]"}]}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"qsCoalgEqCheck", "[", | |
RowBox[{"x_", ",", "y_"}], "]"}], ":=", | |
RowBox[{"eq", "[", | |
RowBox[{ | |
RowBox[{"ap", "[", | |
RowBox[{ | |
RowBox[{"eqTrm", "[", | |
RowBox[{"$1", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$N", "\[CircleTimes]", | |
RowBox[{"(", | |
RowBox[{"$L", "\[CircleTimes]", "$L"}], ")"}]}], ")"}]}], "]"}], | |
",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"funConv", "[", | |
RowBox[{"$1", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", | |
RowBox[{"(", | |
RowBox[{ | |
RowBox[{"$L", "[", "$C", "]"}], "\[CircleTimes]", | |
RowBox[{"$L", "[", "$C", "]"}]}], ")"}]}], ")"}]}], "]"}], | |
"[", "x", "]"}], ",", | |
RowBox[{ | |
RowBox[{"funConv", "[", | |
RowBox[{"$1", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", | |
RowBox[{"(", | |
RowBox[{ | |
RowBox[{"$L", "[", "$C", "]"}], "\[CircleTimes]", | |
RowBox[{"$L", "[", "$C", "]"}]}], ")"}]}], ")"}]}], "]"}], | |
"[", "y", "]"}]}], "}"}]}], "]"}], ",", "1"}], "]"}]}], | |
"\[IndentingNewLine]"}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{"qsCheck", "[", "x_", "]"}], ":=", "\[IndentingNewLine]", | |
RowBox[{"Flatten", "[", | |
RowBox[{ | |
RowBox[{"Union", "[", "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"qsAlgCheck", "[", | |
RowBox[{"#2", ",", "#1"}], "]"}], "&"}], "@@@", | |
RowBox[{ | |
RowBox[{"AConstraints", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", | |
RowBox[{"(", | |
RowBox[{"$X", "\[CircleTimes]", "$X"}], ")"}]}], ")"}]}], ",", | |
"qsAlg", ",", "qsCoalg"}], "]"}], "[", "x", "]"}]}], ",", | |
"\[IndentingNewLine]", | |
RowBox[{"qsCoalgCheck", "@@@", | |
RowBox[{ | |
RowBox[{"CConstraints", "[", | |
RowBox[{ | |
RowBox[{"$C", "\[CirclePlus]", | |
RowBox[{"(", | |
RowBox[{"$C", "\[CircleTimes]", | |
RowBox[{"(", | |
RowBox[{"$X", "\[CircleTimes]", "$X"}], ")"}]}], ")"}]}], ",", | |
"qsCoalg"}], "]"}], "[", "x", "]"}]}]}], "\[IndentingNewLine]", | |
"]"}], ",", "1"}], "]"}]}], "\[IndentingNewLine]"}], "Input", | |
CellChangeTimes->{{3.889258251717911*^9, 3.889258262526223*^9}, | |
3.8892583598430643`*^9}, | |
CellLabel->"In[49]:=",ExpressionUUID->"16afc65a-0182-4851-a7f1-0e84755c2a4d"], | |
Cell[BoxData[""], "Input", | |
CellChangeTimes->{{3.889257431764042*^9, 3.889257431764434*^9}, | |
3.889258250189631*^9},ExpressionUUID->"461cd31d-22ad-4a86-b29f-\ | |
5ab045a1d4e7"], | |
Cell[BoxData[ | |
RowBox[{"\[IndentingNewLine]", "\[IndentingNewLine]"}]], "Input", | |
CellChangeTimes->{{3.8892581810918303`*^9, | |
3.8892581814189377`*^9}},ExpressionUUID->"a2c65c05-b0c3-48df-8345-\ | |
826b9c0ad1fc"], | |
Cell[BoxData[{ | |
RowBox[{ | |
RowBox[{"ap", "[", | |
RowBox[{ | |
RowBox[{"ap", "[", | |
RowBox[{"trm_", ",", | |
RowBox[{"{", "args1__", "}"}]}], "]"}], ",", | |
RowBox[{"{", "args2__", "}"}]}], "]"}], ":=", | |
RowBox[{"ap", "[", | |
RowBox[{"trm", ",", | |
RowBox[{"{", | |
RowBox[{"args1", ",", "args2"}], "}"}]}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{"termStr", "[", "x_Integer", "]"}], ":=", | |
RowBox[{"ToString", "@", "x"}]}], "\n", | |
RowBox[{ | |
RowBox[{"termStr", "[", "x_String", "]"}], ":=", "x"}], "\n", | |
RowBox[{ | |
RowBox[{"termStr", "[", | |
RowBox[{"ap", "[", | |
RowBox[{"trm_", ",", | |
RowBox[{"{", "args__", "}"}]}], "]"}], "]"}], ":=", | |
RowBox[{"\"\<(\>\"", "<>", | |
RowBox[{"StringRiffle", "[", | |
RowBox[{ | |
RowBox[{"termStr", "/@", | |
RowBox[{"{", | |
RowBox[{"trm", ",", "args"}], "}"}]}], ",", "\"\< \>\""}], "]"}], | |
"<>", "\"\<)\>\""}]}], "\n", | |
RowBox[{ | |
RowBox[{"tup", "[", | |
RowBox[{"x___", ",", | |
RowBox[{"tup", "[", "z__", "]"}]}], "]"}], ":=", | |
RowBox[{"tup", "[", | |
RowBox[{"x", ",", "z"}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{"termStr", "[", | |
RowBox[{"tup", "[", "x__", "]"}], "]"}], ":=", | |
RowBox[{"\"\<(\>\"", "<>", | |
RowBox[{"StringRiffle", "[", | |
RowBox[{ | |
RowBox[{"termStr", "/@", | |
RowBox[{"{", "x", "}"}]}], ",", "\"\<, \>\""}], "]"}], "<>", | |
"\"\<)\>\""}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"termStr", "[", | |
RowBox[{"eq", "[", | |
RowBox[{"x_", ",", "y_"}], "]"}], "]"}], ":=", | |
RowBox[{ | |
RowBox[{"termStr", "[", "x", "]"}], "<>", "\"\< = \>\"", "<>", | |
RowBox[{"termStr", "[", "y", "]"}], "<>", "\"\<;\>\""}]}], | |
"\[IndentingNewLine]"}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{"eqTrm", "[", | |
RowBox[{"X_", "\[CircleTimes]", "Y_"}], "]"}], ":=", | |
RowBox[{"ap", "[", | |
RowBox[{"\"\<prodEq\>\"", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"eqTrm", "[", "X", "]"}], ",", | |
RowBox[{"eqTrm", "[", "Y", "]"}]}], "}"}]}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{"eqTrm", "[", | |
RowBox[{"X_", "\[CirclePlus]", "Y_"}], "]"}], ":=", | |
RowBox[{"ap", "[", | |
RowBox[{"\"\<sumEq\>\"", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"eqTrm", "[", "X", "]"}], ",", | |
RowBox[{"eqTrm", "[", "Y", "]"}]}], "}"}]}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{"eqTrm", "[", "$1", "]"}], ":=", "\"\<unitEq\>\""}], "\n", | |
RowBox[{ | |
RowBox[{"eqTrm", "[", "$0", "]"}], ":=", "\"\<emptyEq\>\""}], "\n", | |
RowBox[{ | |
RowBox[{"eqTrm", "[", "$N", "]"}], ":=", | |
"\"\<intEq\>\""}], "\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{"eqTrm", "[", "$L", "]"}], ":=", "\"\<listEq\>\""}]}], "Input", | |
CellChangeTimes->{{3.889257419435378*^9, 3.88925741943576*^9}, { | |
3.889258203012187*^9, 3.889258219493967*^9}}, | |
CellLabel->"In[54]:=",ExpressionUUID->"dfadea89-3b09-4bc3-b6a6-45a2596060bd"], | |
Cell[BoxData[ | |
RowBox[{"\[IndentingNewLine]", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"funConv", "[", "$1", "]"}], "[", "x_", "]"}], ":=", "0"}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"funConv", "[", "$C", "]"}], "[", "x_", "]"}], ":=", "x"}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"funConv", "[", | |
RowBox[{"X_", "\[CirclePlus]", "Y_"}], "]"}], "[", | |
RowBox[{"inl", "[", "x_", "]"}], "]"}], ":=", | |
RowBox[{"ap", "[", | |
RowBox[{"\"\<inl\>\"", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"funConv", "[", "X", "]"}], "[", "x", "]"}], "}"}]}], "]"}]}], | |
"\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"funConv", "[", | |
RowBox[{"X_", "\[CirclePlus]", "Y_"}], "]"}], "[", | |
RowBox[{"inr", "[", "y_", "]"}], "]"}], ":=", | |
RowBox[{"ap", "[", | |
RowBox[{"\"\<inl\>\"", ",", | |
RowBox[{"{", | |
RowBox[{ | |
RowBox[{"funConv", "[", "Y", "]"}], "[", "y", "]"}], "}"}]}], "]"}]}], | |
"\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"funConv", "[", | |
RowBox[{"X_", "\[CircleTimes]", "Y_"}], "]"}], "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", "y_"}], "}"}], "]"}], ":=", | |
RowBox[{"tup", "[", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"funConv", "[", "X", "]"}], "[", "x", "]"}], ",", | |
RowBox[{ | |
RowBox[{"funConv", "[", "Y", "]"}], "[", "y", "]"}]}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{"listConv", "[", | |
RowBox[{"{", "}"}], "]"}], ":=", | |
RowBox[{"ap", "[", | |
RowBox[{"\"\<inl\>\"", ",", | |
RowBox[{"{", "0", "}"}]}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{"listConv", "[", | |
RowBox[{"{", | |
RowBox[{"x_", ",", "xs___"}], "}"}], "]"}], ":=", | |
RowBox[{"ap", "[", | |
RowBox[{"\"\<inr\>\"", ",", | |
RowBox[{"{", | |
RowBox[{"tup", "[", | |
RowBox[{"x", ",", | |
RowBox[{"listConv", "[", | |
RowBox[{"{", "xs", "}"}], "]"}]}], "]"}], "}"}]}], "]"}]}], "\n", | |
RowBox[{ | |
RowBox[{ | |
RowBox[{"funConv", "[", | |
RowBox[{"$L", "[", "X_", "]"}], "]"}], "[", "l_", "]"}], ":=", | |
RowBox[{"listConv", "[", | |
RowBox[{ | |
RowBox[{"funConv", "[", "X", "]"}], "/@", "l"}], "]"}]}], | |
"\[IndentingNewLine]", "\n"}]}]], "Input", | |
CellChangeTimes->{{3.88925740661909*^9, 3.8892574066194696`*^9}, { | |
3.889258218157164*^9, 3.889258227444976*^9}}, | |
CellLabel->"In[67]:=",ExpressionUUID->"22639eda-ab12-490a-948f-73efaa706062"], | |
Cell[BoxData[""], "Input", | |
CellChangeTimes->{{3.88925739262636*^9, 3.8892573926267853`*^9}, { | |
3.889258228893162*^9, | |
3.889258243653344*^9}},ExpressionUUID->"e9aa0173-1871-4497-87c2-\ | |
731cb345f401"], | |
Cell[BoxData[ | |
RowBox[{"\n", "\n"}]], "Input", | |
CellChangeTimes->{{3.889257367978035*^9, 3.8892573679785633`*^9}, | |
3.889258202035614*^9, {3.8892582326932898`*^9, | |
3.889258236420972*^9}},ExpressionUUID->"af0d328b-56a4-4fcf-a686-\ | |
d51ec260a3a8"], | |
Cell[BoxData[ | |
RowBox[{"\[IndentingNewLine]", "\[IndentingNewLine]"}]], "Input", | |
CellChangeTimes->{{3.889258088807831*^9, | |
3.889258089110301*^9}},ExpressionUUID->"a11c4b37-8e37-409a-9dca-\ | |
d7239a11a5f4"], | |
Cell[CellGroupData[{ | |
Cell[BoxData[ | |
RowBox[{"StringRiffle", "[", | |
RowBox[{ | |
RowBox[{"termStr", "/@", | |
RowBox[{"qsCheck", "[", | |
RowBox[{"{", | |
RowBox[{ | |
"9", ",", "4", ",", "0", ",", "5", ",", "3", ",", "2", ",", "7", ",", | |
"8", ",", "6", ",", "1"}], "}"}], "]"}]}], ",", "\"\<\\n\>\""}], | |
"]"}]], "Input", | |
CellChangeTimes->{{3.889257377497094*^9, 3.889257377497533*^9}}, | |
CellLabel->"In[75]:=",ExpressionUUID->"77e7e6a0-66a7-4427-aff8-b7ef0e36fab7"], | |
Cell[BoxData["\<\"(listEq termStr[listConv[inl[tt]]] (inl 0)) = 1;\\n(sumEq \ | |
unitEq (prodEq intEq (prodEq listEq listEq)) (inl 0) (inl 0)) = \ | |
1;\\n(concatAlgCheck (inr (0, (inr (1, (inr (2, (inr (3, (inl 0))))))))) (inl \ | |
0) (inr (0, (inr (1, (inr (2, (inr (3, (inl 0)))))))))) = 1;\\n(listEq (inr \ | |
(0, (inr (1, (inr (2, (inr (3, (inl 0))))))))) (inr (0, (inr (1, (inr (2, \ | |
(inr (3, (inl 0)))))))))) = 1;\\n(concatAlgCheck (inr (1, (inl 0))) (inl 0) \ | |
(inr (1, (inl 0)))) = 1;\\n(listEq (inr (1, (inl 0))) (inr (1, (inl 0)))) = \ | |
1;\\n(concatAlgCheck (inr (5, (inr (6, (inr (7, (inr (8, (inl 0))))))))) (inl \ | |
0) (inr (5, (inr (6, (inr (7, (inr (8, (inl 0)))))))))) = 1;\\n(listEq (inr \ | |
(5, (inr (6, (inr (7, (inr (8, (inl 0))))))))) (inr (5, (inr (6, (inr (7, \ | |
(inr (8, (inl 0)))))))))) = 1;\\n(concatAlgCheck (inr (6, (inl 0))) (inl 0) \ | |
(inr (6, (inl 0)))) = 1;\\n(listEq (inr (6, (inl 0))) (inr (6, (inl 0)))) = \ | |
1;\\n(concatAlgCheck (inr (8, (inl 0))) (inl 0) (inr (8, (inl 0)))) = \ | |
1;\\n(listEq (inr (8, (inl 0))) (inr (8, (inl 0)))) = 1;\\n(filterAlgCheck 1 \ | |
(inl 0) ((inl 0), (inl 0))) = 1;\\n(sumEq unitEq (prodEq intEq (prodEq listEq \ | |
listEq)) (inl (1, (inl 0), (inl 0))) (inl (1, (inl 0), (inl 0)))) = \ | |
1;\\n(filterAlgCheck 6 (inl 0) ((inl 0), (inl 0))) = 1;\\n(sumEq unitEq \ | |
(prodEq intEq (prodEq listEq listEq)) (inl (6, (inl 0), (inl 0))) (inl (6, \ | |
(inl 0), (inl 0)))) = 1;\\n(filterAlgCheck 8 (inl 0) ((inl 0), (inl 0))) = 1;\ | |
\\n(sumEq unitEq (prodEq intEq (prodEq listEq listEq)) (inl (8, (inl 0), (inl \ | |
0))) (inl (8, (inl 0), (inl 0)))) = 1;\\n(concatAlgCheck (inr (2, (inl 0))) \ | |
(inl 0) (inr (2, (inl 0)))) = 1;\\n(concatAlgCheck (inr (2, (inl 0))) (inl \ | |
(1, (inr (2, (inl 0))))) (inr (1, (inr (2, (inl 0)))))) = 1;\\n(listEq (inr \ | |
(1, (inr (2, (inl 0))))) (inr (1, (inr (2, (inl 0)))))) = \ | |
1;\\n(concatAlgCheck (inr (7, (inr (8, (inl 0))))) (inl 0) (inr (7, (inr (8, \ | |
(inl 0)))))) = 1;\\n(concatAlgCheck (inr (7, (inr (8, (inl 0))))) (inl (6, \ | |
(inr (7, (inr (8, (inl 0))))))) (inr (6, (inr (7, (inr (8, (inl 0)))))))) = \ | |
1;\\n(listEq (inr (6, (inr (7, (inr (8, (inl 0))))))) (inr (6, (inr (7, (inr \ | |
(8, (inl 0)))))))) = 1;\\n(filterAlgCheck 2 (inl 0) ((inl 0), (inl 0))) = \ | |
1;\\n(filterAlgCheck 2 (inl (1, (inl 0), (inl 0))) ((inr (1, (inl 0))), (inl \ | |
0))) = 1;\\n(sumEq unitEq (prodEq intEq (prodEq listEq listEq)) (inl (2, (inr \ | |
(1, (inl 0))), (inl 0))) (inl (2, (inr (1, (inl 0))), (inl 0)))) = \ | |
1;\\n(concatAlgCheck (inr (3, (inl 0))) (inl 0) (inr (3, (inl 0)))) = \ | |
1;\\n(concatAlgCheck (inr (3, (inl 0))) (inl (1, (inr (2, (inr (3, (inl \ | |
0))))))) (inr (1, (inr (2, (inr (3, (inl 0)))))))) = 1;\\n(concatAlgCheck \ | |
(inr (3, (inl 0))) (inl (2, (inr (3, (inl 0))))) (inr (2, (inr (3, (inl \ | |
0)))))) = 1;\\n(listEq (inr (1, (inr (2, (inr (3, (inl 0))))))) (inr (1, (inr \ | |
(2, (inr (3, (inl 0)))))))) = 1;\\n(filterAlgCheck 3 (inl 0) ((inl 0), (inl \ | |
0))) = 1;\\n(filterAlgCheck 3 (inl (1, (inl 0), (inl 0))) ((inr (1, (inl \ | |
0))), (inl 0))) = 1;\\n(filterAlgCheck 3 (inl (2, (inr (1, (inl 0))), (inl \ | |
0))) ((inr (2, (inr (1, (inl 0))))), (inl 0))) = 1;\\n(sumEq unitEq (prodEq \ | |
intEq (prodEq listEq listEq)) (inl (3, (inr (2, (inr (1, (inl 0))))), (inl \ | |
0))) (inl (3, (inr (2, (inr (1, (inl 0))))), (inl 0)))) = \ | |
1;\\n(filterAlgCheck 7 (inl 0) ((inl 0), (inl 0))) = 1;\\n(filterAlgCheck 7 \ | |
(inl (6, (inl 0), (inl 0))) ((inr (6, (inl 0))), (inl 0))) = \ | |
1;\\n(filterAlgCheck 7 (inl (8, (inr (6, (inl 0))), (inl 0))) ((inr (6, (inl \ | |
0))), (inr (8, (inl 0))))) = 1;\\n(sumEq unitEq (prodEq intEq (prodEq listEq \ | |
listEq)) (inl (7, (inr (6, (inl 0))), (inr (8, (inl 0))))) (inl (7, (inr (6, \ | |
(inl 0))), (inr (8, (inl 0)))))) = 1;\\n(filterAlgCheck 0 (inl 0) ((inl 0), \ | |
(inl 0))) = 1;\\n(filterAlgCheck 0 (inl (1, (inl 0), (inl 0))) ((inl 0), (inr \ | |
(1, (inl 0))))) = 1;\\n(filterAlgCheck 0 (inl (2, (inl 0), (inr (1, (inl \ | |
0))))) ((inl 0), (inr (2, (inr (1, (inl 0))))))) = 1;\\n(filterAlgCheck 0 \ | |
(inl (3, (inl 0), (inr (2, (inr (1, (inl 0))))))) ((inl 0), (inr (3, (inr (2, \ | |
(inr (1, (inl 0))))))))) = 1;\\n(sumEq unitEq (prodEq intEq (prodEq listEq \ | |
listEq)) (inl (0, (inl 0), (inr (3, (inr (2, (inr (1, (inl 0))))))))) (inl \ | |
(0, (inl 0), (inr (3, (inr (2, (inr (1, (inl 0)))))))))) = \ | |
1;\\n(filterAlgCheck 5 (inl 0) ((inl 0), (inl 0))) = 1;\\n(filterAlgCheck 5 \ | |
(inl (6, (inl 0), (inl 0))) ((inl 0), (inr (6, (inl 0))))) = \ | |
1;\\n(filterAlgCheck 5 (inl (7, (inl 0), (inr (8, (inr (6, (inl 0))))))) \ | |
((inl 0), (inr (7, (inr (8, (inr (6, (inl 0))))))))) = 1;\\n(filterAlgCheck 5 \ | |
(inl (8, (inl 0), (inr (6, (inl 0))))) ((inl 0), (inr (8, (inr (6, (inl \ | |
0))))))) = 1;\\n(sumEq unitEq (prodEq intEq (prodEq listEq listEq)) (inl (5, \ | |
(inl 0), (inr (7, (inr (8, (inr (6, (inl 0))))))))) (inl (5, (inl 0), (inr \ | |
(7, (inr (8, (inr (6, (inl 0)))))))))) = 1;\\n(concatAlgCheck (inr (4, (inr \ | |
(5, (inr (6, (inr (7, (inr (8, (inl 0))))))))))) (inl 0) (inr (4, (inr (5, \ | |
(inr (6, (inr (7, (inr (8, (inl 0)))))))))))) = 1;\\n(concatAlgCheck (inr (4, \ | |
(inr (5, (inr (6, (inr (7, (inr (8, (inl 0))))))))))) (inl (0, (inr (1, (inr \ | |
(2, (inr (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inl \ | |
0))))))))))))))))))) (inr (0, (inr (1, (inr (2, (inr (3, (inr (4, (inr (5, \ | |
(inr (6, (inr (7, (inr (8, (inl 0)))))))))))))))))))) = 1;\\n(concatAlgCheck \ | |
(inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inl 0))))))))))) (inl (1, (inr \ | |
(2, (inr (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inl \ | |
0))))))))))))))))) (inr (1, (inr (2, (inr (3, (inr (4, (inr (5, (inr (6, (inr \ | |
(7, (inr (8, (inl 0)))))))))))))))))) = 1;\\n(concatAlgCheck (inr (4, (inr \ | |
(5, (inr (6, (inr (7, (inr (8, (inl 0))))))))))) (inl (2, (inr (3, (inr (4, \ | |
(inr (5, (inr (6, (inr (7, (inr (8, (inl 0))))))))))))))) (inr (2, (inr (3, \ | |
(inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inl 0)))))))))))))))) = \ | |
1;\\n(concatAlgCheck (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inl \ | |
0))))))))))) (inl (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inl \ | |
0))))))))))))) (inr (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inl \ | |
0)))))))))))))) = 1;\\n(listEq (inr (0, (inr (1, (inr (2, (inr (3, (inr (4, \ | |
(inr (5, (inr (6, (inr (7, (inr (8, (inl 0))))))))))))))))))) (inr (0, (inr \ | |
(1, (inr (2, (inr (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inl \ | |
0)))))))))))))))))))) = 1;\\n(filterAlgCheck 4 (inl 0) ((inl 0), (inl 0))) = \ | |
1;\\n(filterAlgCheck 4 (inl (0, (inr (3, (inr (2, (inr (1, (inl 0))))))), \ | |
(inr (5, (inr (7, (inr (8, (inr (6, (inl 0))))))))))) ((inr (0, (inr (3, (inr \ | |
(2, (inr (1, (inl 0))))))))), (inr (5, (inr (7, (inr (8, (inr (6, (inl \ | |
0))))))))))) = 1;\\n(filterAlgCheck 4 (inl (1, (inl 0), (inl 0))) ((inr (1, \ | |
(inl 0))), (inl 0))) = 1;\\n(filterAlgCheck 4 (inl (2, (inr (1, (inl 0))), \ | |
(inr (7, (inr (8, (inr (6, (inl 0))))))))) ((inr (2, (inr (1, (inl 0))))), \ | |
(inr (7, (inr (8, (inr (6, (inl 0))))))))) = 1;\\n(filterAlgCheck 4 (inl (3, \ | |
(inr (2, (inr (1, (inl 0))))), (inr (7, (inr (8, (inr (6, (inl 0))))))))) \ | |
((inr (3, (inr (2, (inr (1, (inl 0))))))), (inr (7, (inr (8, (inr (6, (inl \ | |
0))))))))) = 1;\\n(filterAlgCheck 4 (inl (5, (inr (3, (inr (2, (inr (1, (inl \ | |
0))))))), (inr (7, (inr (8, (inr (6, (inl 0))))))))) ((inr (3, (inr (2, (inr \ | |
(1, (inl 0))))))), (inr (5, (inr (7, (inr (8, (inr (6, (inl 0))))))))))) = 1;\ | |
\\n(filterAlgCheck 4 (inl (6, (inr (1, (inl 0))), (inl 0))) ((inr (1, (inl \ | |
0))), (inr (6, (inl 0))))) = 1;\\n(filterAlgCheck 4 (inl (7, (inr (1, (inl \ | |
0))), (inr (8, (inr (6, (inl 0))))))) ((inr (1, (inl 0))), (inr (7, (inr (8, \ | |
(inr (6, (inl 0))))))))) = 1;\\n(filterAlgCheck 4 (inl (8, (inr (1, (inl \ | |
0))), (inr (6, (inl 0))))) ((inr (1, (inl 0))), (inr (8, (inr (6, (inl \ | |
0))))))) = 1;\\n(sumEq unitEq (prodEq intEq (prodEq listEq listEq)) (inl (4, \ | |
(inr (0, (inr (3, (inr (2, (inr (1, (inl 0))))))))), (inr (5, (inr (7, (inr \ | |
(8, (inr (6, (inl 0))))))))))) (inl (4, (inr (0, (inr (3, (inr (2, (inr (1, \ | |
(inl 0))))))))), (inr (5, (inr (7, (inr (8, (inr (6, (inl 0)))))))))))) = \ | |
1;\\n(concatAlgCheck (inr (9, (inl 0))) (inl 0) (inr (9, (inl 0)))) = \ | |
1;\\n(concatAlgCheck (inr (9, (inl 0))) (inl (0, (inr (1, (inr (2, (inr (3, \ | |
(inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inr (9, (inl \ | |
0))))))))))))))))))))) (inr (0, (inr (1, (inr (2, (inr (3, (inr (4, (inr (5, \ | |
(inr (6, (inr (7, (inr (8, (inr (9, (inl 0)))))))))))))))))))))) = \ | |
1;\\n(concatAlgCheck (inr (9, (inl 0))) (inl (1, (inr (2, (inr (3, (inr (4, \ | |
(inr (5, (inr (6, (inr (7, (inr (8, (inr (9, (inl 0))))))))))))))))))) (inr \ | |
(1, (inr (2, (inr (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inr (9, \ | |
(inl 0)))))))))))))))))))) = 1;\\n(concatAlgCheck (inr (9, (inl 0))) (inl (2, \ | |
(inr (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inr (9, (inl \ | |
0))))))))))))))))) (inr (2, (inr (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr \ | |
(8, (inr (9, (inl 0)))))))))))))))))) = 1;\\n(concatAlgCheck (inr (9, (inl \ | |
0))) (inl (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inr (9, (inl \ | |
0))))))))))))))) (inr (3, (inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inr \ | |
(9, (inl 0)))))))))))))))) = 1;\\n(concatAlgCheck (inr (9, (inl 0))) (inl (4, \ | |
(inr (5, (inr (6, (inr (7, (inr (8, (inr (9, (inl 0))))))))))))) (inr (4, \ | |
(inr (5, (inr (6, (inr (7, (inr (8, (inr (9, (inl 0)))))))))))))) = \ | |
1;\\n(concatAlgCheck (inr (9, (inl 0))) (inl (5, (inr (6, (inr (7, (inr (8, \ | |
(inr (9, (inl 0))))))))))) (inr (5, (inr (6, (inr (7, (inr (8, (inr (9, (inl \ | |
0)))))))))))) = 1;\\n(concatAlgCheck (inr (9, (inl 0))) (inl (6, (inr (7, \ | |
(inr (8, (inr (9, (inl 0))))))))) (inr (6, (inr (7, (inr (8, (inr (9, (inl \ | |
0)))))))))) = 1;\\n(concatAlgCheck (inr (9, (inl 0))) (inl (7, (inr (8, (inr \ | |
(9, (inl 0))))))) (inr (7, (inr (8, (inr (9, (inl 0)))))))) = \ | |
1;\\n(concatAlgCheck (inr (9, (inl 0))) (inl (8, (inr (9, (inl 0))))) (inr \ | |
(8, (inr (9, (inl 0)))))) = 1;\\n(listEq (inr (0, (inr (1, (inr (2, (inr (3, \ | |
(inr (4, (inr (5, (inr (6, (inr (7, (inr (8, (inr (9, (inl \ | |
0))))))))))))))))))))) (inr (0, (inr (1, (inr (2, (inr (3, (inr (4, (inr (5, \ | |
(inr (6, (inr (7, (inr (8, (inr (9, (inl 0)))))))))))))))))))))) = \ | |
1;\\n(filterAlgCheck 9 (inl 0) ((inl 0), (inl 0))) = 1;\\n(filterAlgCheck 9 \ | |
(inl (0, (inr (5, (inr (3, (inr (2, (inr (7, (inr (8, (inr (6, (inr (1, (inl \ | |
0))))))))))))))), (inl 0))) ((inr (0, (inr (5, (inr (3, (inr (2, (inr (7, \ | |
(inr (8, (inr (6, (inr (1, (inl 0))))))))))))))))), (inl 0))) = \ | |
1;\\n(filterAlgCheck 9 (inl (1, (inl 0), (inl 0))) ((inr (1, (inl 0))), (inl \ | |
0))) = 1;\\n(filterAlgCheck 9 (inl (2, (inr (7, (inr (8, (inr (6, (inr (1, \ | |
(inl 0))))))))), (inl 0))) ((inr (2, (inr (7, (inr (8, (inr (6, (inr (1, (inl \ | |
0))))))))))), (inl 0))) = 1;\\n(filterAlgCheck 9 (inl (3, (inr (2, (inr (7, \ | |
(inr (8, (inr (6, (inr (1, (inl 0))))))))))), (inl 0))) ((inr (3, (inr (2, \ | |
(inr (7, (inr (8, (inr (6, (inr (1, (inl 0))))))))))))), (inl 0))) = \ | |
1;\\n(filterAlgCheck 9 (inl (4, (inr (0, (inr (5, (inr (3, (inr (2, (inr (7, \ | |
(inr (8, (inr (6, (inr (1, (inl 0))))))))))))))))), (inl 0))) ((inr (4, (inr \ | |
(0, (inr (5, (inr (3, (inr (2, (inr (7, (inr (8, (inr (6, (inr (1, (inl \ | |
0))))))))))))))))))), (inl 0))) = 1;\\n(filterAlgCheck 9 (inl (5, (inr (3, \ | |
(inr (2, (inr (7, (inr (8, (inr (6, (inr (1, (inl 0))))))))))))), (inl 0))) \ | |
((inr (5, (inr (3, (inr (2, (inr (7, (inr (8, (inr (6, (inr (1, (inl \ | |
0))))))))))))))), (inl 0))) = 1;\\n(filterAlgCheck 9 (inl (6, (inr (1, (inl \ | |
0))), (inl 0))) ((inr (6, (inr (1, (inl 0))))), (inl 0))) = \ | |
1;\\n(filterAlgCheck 9 (inl (7, (inr (8, (inr (6, (inr (1, (inl 0))))))), \ | |
(inl 0))) ((inr (7, (inr (8, (inr (6, (inr (1, (inl 0))))))))), (inl 0))) = \ | |
1;\\n(filterAlgCheck 9 (inl (8, (inr (6, (inr (1, (inl 0))))), (inl 0))) \ | |
((inr (8, (inr (6, (inr (1, (inl 0))))))), (inl 0))) = 1;\\n(sumEq unitEq \ | |
(prodEq intEq (prodEq listEq listEq)) (inl (9, (inr (4, (inr (0, (inr (5, \ | |
(inr (3, (inr (2, (inr (7, (inr (8, (inr (6, (inr (1, (inl \ | |
0))))))))))))))))))), (inl 0))) (inl (9, (inr (4, (inr (0, (inr (5, (inr (3, \ | |
(inr (2, (inr (7, (inr (8, (inr (6, (inr (1, (inl 0))))))))))))))))))), (inl \ | |
0)))) = 1;\"\>"], "Output", | |
CellChangeTimes->{{3.88925738510716*^9, 3.889257423762768*^9}, | |
3.889257877273889*^9, 3.88925808607612*^9, 3.889258463345562*^9}, | |
CellLabel->"Out[75]=",ExpressionUUID->"4c6a73a9-b7b7-4dde-9e17-23f8b37f1ef2"] | |
}, Open ]] | |
}, | |
WindowSize->{1384.5, 762.}, | |
WindowMargins->{{0, Automatic}, {0, Automatic}}, | |
FrontEndVersion->"13.0 for Linux x86 (64-bit) (February 4, 2022)", | |
StyleDefinitions->"Default.nb", | |
ExpressionUUID->"eb777eab-a818-4d72-826f-e1b69567b79e" | |
] | |
(* End of Notebook Content *) | |
(* Internal cache information *) | |
(*CellTagsOutline | |
CellTagsIndex->{} | |
*) | |
(*CellTagsIndex | |
CellTagsIndex->{} | |
*) | |
(*NotebookFileOutline | |
Notebook[{ | |
Cell[558, 20, 1527, 50, 113, "Input",ExpressionUUID->"50f13cbc-3355-449d-b9d7-213289424d01"], | |
Cell[2088, 72, 497, 13, 29, "Input",ExpressionUUID->"24116713-3540-4c06-8a37-1d2a169da577"], | |
Cell[2588, 87, 514, 14, 51, "Input",ExpressionUUID->"2cc8e3b0-a564-476b-883e-35fbe0cacd50"], | |
Cell[3105, 103, 493, 13, 51, "Input",ExpressionUUID->"ce8c6ad0-379e-4a62-9bdd-54c6ca97ca9a"], | |
Cell[CellGroupData[{ | |
Cell[3623, 120, 446, 11, 29, "Input",ExpressionUUID->"ecb0ca89-3573-4f31-9928-408269c40209"], | |
Cell[4072, 133, 251, 5, 33, "Output",ExpressionUUID->"86b64a36-27c1-491c-812f-f2ceaf6f04ac"] | |
}, Open ]], | |
Cell[4338, 141, 949, 29, 51, "Input",ExpressionUUID->"84207c56-cdae-499f-a7ed-e0b6f118cb54"], | |
Cell[CellGroupData[{ | |
Cell[5312, 174, 430, 11, 29, "Input",ExpressionUUID->"37b7ffda-4dd2-4cbd-96d9-264d698aa239"], | |
Cell[5745, 187, 348, 9, 33, "Output",ExpressionUUID->"e6e420e2-79d2-41fa-b199-a1e78a5f5e9f"] | |
}, Open ]], | |
Cell[6108, 199, 781, 22, 51, "Input",ExpressionUUID->"8eab05b6-14bf-48ad-bbf1-56d271069b99"], | |
Cell[CellGroupData[{ | |
Cell[6914, 225, 295, 6, 29, "Input",ExpressionUUID->"59e6a7e5-e03c-4823-99c8-795cbaa1533d"], | |
Cell[7212, 233, 473, 13, 33, "Output",ExpressionUUID->"d12c2eff-e08f-48bf-b782-968f6d2c11d7"] | |
}, Open ]], | |
Cell[7700, 249, 1425, 42, 133, "Input",ExpressionUUID->"42bacf81-a553-4004-be13-5f696dbf3c7b"], | |
Cell[9128, 293, 478, 12, 29, "Input",ExpressionUUID->"cb180f76-efad-4546-8171-e493bd06f5a9"], | |
Cell[CellGroupData[{ | |
Cell[9631, 309, 300, 5, 51, "Input",ExpressionUUID->"e46c5ea3-d1b4-4e15-a7d4-fe45cf9a6d09"], | |
Cell[9934, 316, 318, 7, 33, "Output",ExpressionUUID->"d444709a-5db7-4815-a73c-4e87d8143640"], | |
Cell[10255, 325, 320, 7, 33, "Output",ExpressionUUID->"4025de9f-2886-49ca-a77b-0571d8443c09"] | |
}, Open ]], | |
Cell[10590, 335, 255, 5, 113, "Input",ExpressionUUID->"4df5a252-098a-4ee2-b38e-12c17eae0e90"], | |
Cell[10848, 342, 3743, 117, 360, "Input",ExpressionUUID->"c19b0b75-a3e9-4129-8573-09959fa31b35"], | |
Cell[CellGroupData[{ | |
Cell[14616, 463, 831, 21, 51, "Input",ExpressionUUID->"c0da4cf9-c27e-41db-8e36-684eed5a59c0"], | |
Cell[15450, 486, 2528, 85, 55, "Output",ExpressionUUID->"693e1144-1747-4f68-914a-2b9af4f37bee"], | |
Cell[17981, 573, 334, 7, 33, "Output",ExpressionUUID->"bbfa307b-11d6-4b8d-b528-100641a5ee35"] | |
}, Open ]], | |
Cell[CellGroupData[{ | |
Cell[18352, 585, 658, 19, 51, "Input",ExpressionUUID->"83412c11-daa9-4dd8-801f-d15a19ebab3e"], | |
Cell[19013, 606, 1928, 64, 55, "Output",ExpressionUUID->"3d72b1db-bf56-4b4b-a857-5ec4de7b8250"], | |
Cell[20944, 672, 280, 6, 33, "Output",ExpressionUUID->"9ab3dbbb-3b2f-4207-8c09-9a3013110972"] | |
}, Open ]], | |
Cell[21239, 681, 232, 5, 92, "Input",ExpressionUUID->"dc2c987e-da65-4d7e-9438-5c2142734df4"], | |
Cell[21474, 688, 3186, 97, 195, "Input",ExpressionUUID->"b5d27807-25e0-423a-8417-2fea0be86823"], | |
Cell[24663, 787, 4641, 128, 236, "Input",ExpressionUUID->"16afc65a-0182-4851-a7f1-0e84755c2a4d"], | |
Cell[29307, 917, 175, 3, 29, "Input",ExpressionUUID->"461cd31d-22ad-4a86-b29f-5ab045a1d4e7"], | |
Cell[29485, 922, 210, 4, 71, "Input",ExpressionUUID->"a2c65c05-b0c3-48df-8345-826b9c0ad1fc"], | |
Cell[29698, 928, 2811, 82, 298, "Input",ExpressionUUID->"dfadea89-3b09-4bc3-b6a6-45a2596060bd"], | |
Cell[32512, 1012, 2391, 70, 236, "Input",ExpressionUUID->"22639eda-ab12-490a-948f-73efaa706062"], | |
Cell[34906, 1084, 202, 4, 29, "Input",ExpressionUUID->"e9aa0173-1871-4497-87c2-731cb345f401"], | |
Cell[35111, 1090, 249, 5, 71, "Input",ExpressionUUID->"af0d328b-56a4-4fcf-a686-d51ec260a3a8"], | |
Cell[35363, 1097, 206, 4, 71, "Input",ExpressionUUID->"a11c4b37-8e37-409a-9dca-d7239a11a5f4"], | |
Cell[CellGroupData[{ | |
Cell[35594, 1105, 461, 11, 29, "Input",ExpressionUUID->"77e7e6a0-66a7-4427-aff8-b7ef0e36fab7"], | |
Cell[36058, 1118, 12288, 162, 2344, "Output",ExpressionUUID->"4c6a73a9-b7b7-4dde-9e17-23f8b37f1ef2"] | |
}, Open ]] | |
} | |
] | |
*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment