initial commit: confluence and normalisation
This commit is contained in:
17 files changed
+1644
No files matched your search
+11
@@ -0,0 +1,11 @@
|
||||
_build/
|
||||
*.vo
|
||||
*.vok
|
||||
*.vos
|
||||
*.glob
|
||||
*.aux
|
||||
*.cmi
|
||||
*.cmo
|
||||
*.cmx
|
||||
__pycache__/
|
||||
*.pyc
|
||||
@@ -0,0 +1,15 @@
|
||||
This was (mostly) me being bored in a Monday evening and in an attempt to formalise in Rocq the confluence and normalisation results that Delia Kesner and Shane Ó Conchúir obtain for the lambda calculus of Milner with partial substitutions which is available as arXiv:2312.13270.
|
||||
|
||||
## Graphs
|
||||
|
||||
The dependency graph covers the six milestones and every edge runs from a dependency to the result that uses it while the node colour encodes the status proved or stated or planned or blocked:
|
||||
|
||||

|
||||
|
||||
The rule sketch gives the transition system generated by the rules B and Gc and R:
|
||||
|
||||

|
||||
|
||||
The reduction graph gives the bounded reduct set of the term that applies the duplicating identity to a variable with every edge labelled by its rule and with the normal form marked:
|
||||
|
||||

|
||||
@@ -0,0 +1,4 @@
|
||||
(lang dune 3.21)
|
||||
(name lambda_sub)
|
||||
(using rocq 0.11)
|
||||
(version 0.1.0)
|
||||
@@ -0,0 +1,110 @@
|
||||
digraph theorem_deps {
|
||||
rankdir=LR;
|
||||
bgcolor="white";
|
||||
node [fontname=Inter, fontsize=10, fontcolor="#333333"];
|
||||
edge [fontname=Inter, fontsize=8, color="#333333"];
|
||||
graph [fontname=Inter, fontsize=12, labelloc=t, label="Milner's Lambda-Calculus with Partial Substitutions - theorem dependency (M0)"];
|
||||
subgraph cluster_M0 {
|
||||
label="M0";
|
||||
style="rounded";
|
||||
color="#bbbbbb";
|
||||
fontcolor="#333333";
|
||||
exec_step [label="exec_step", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#333333", tooltip="exec_step theory/ExecReducer.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||
exec_examples [label="exec_examples", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#333333", tooltip="exec_examples theory/ExecReducer.v https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||
}
|
||||
subgraph cluster_M1 {
|
||||
label="M1";
|
||||
style="rounded";
|
||||
color="#bbbbbb";
|
||||
fontcolor="#333333";
|
||||
m1_syntax [label="M1 syntax/binding", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m1_syntax (section 2) https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||
m1_open_close [label="open/close laws", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m1_open_close (section 2) https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||
m1_red1 [label="red1 (B, Gc, R)", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m1_red1 (section 2) https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||
}
|
||||
subgraph cluster_M2 {
|
||||
label="M2";
|
||||
style="rounded";
|
||||
color="#bbbbbb";
|
||||
fontcolor="#333333";
|
||||
lemma_2_1_fv_preserved [label="Lemma 2.1 fv preserved", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="lemma_2_1_fv_preserved (section 2) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
lemma_2_2_full_comp [label="Lemma 2.2 full composition", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="lemma_2_2_full_comp (section 2) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
lemma_2_3_beta_sim [label="Lemma 2.3 β-simulation", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="lemma_2_3_beta_sim (section 2) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
}
|
||||
subgraph cluster_M3 {
|
||||
label="M3";
|
||||
style="rounded";
|
||||
color="#bbbbbb";
|
||||
fontcolor="#333333";
|
||||
m3_measure [label="sub measure", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m3_measure (section A) https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||
m3_termination [label="{R,Gc} termination", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m3_termination (section 3.1) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
m3_local_confluence [label="{R,Gc} local confluence", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m3_local_confluence (section 3.1) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
lemma_3_2_sub_nf_unique [label="Lemma 3.2 sub NF unique", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="lemma_3_2_sub_nf_unique (section 3.1) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
}
|
||||
subgraph cluster_M4 {
|
||||
label="M4";
|
||||
style="rounded";
|
||||
color="#bbbbbb";
|
||||
fontcolor="#333333";
|
||||
m4_par [label="parallel reduction par", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m4_par (section 3.2) https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||
m4_par_diamond [label="par diamond", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m4_par_diamond (section 3.2) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
theorem_confluence_terms [label="Confluence on terms", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="theorem_confluence_terms (section 3.2) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
}
|
||||
subgraph cluster_M5 {
|
||||
label="M5";
|
||||
style="rounded";
|
||||
color="#bbbbbb";
|
||||
fontcolor="#333333";
|
||||
m5_mvar [label="XΔ metaterms", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m5_mvar (section 3.3) https://arxiv.org/html/2312.13270v1", shape=ellipse];
|
||||
m5_rx [label="RX rule", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m5_rx (section 3.3) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
m5_eq_C [label="=C setoid", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m5_eq_C (section 3.3) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
m5_coherence [label="RX + =C coherence", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m5_coherence (section 3.3) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
theorem_confluence_metaterms [label="Confluence on metaterms", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="theorem_confluence_metaterms (section 3.3) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
}
|
||||
subgraph cluster_M6 {
|
||||
label="M6";
|
||||
style="rounded";
|
||||
color="#bbbbbb";
|
||||
fontcolor="#333333";
|
||||
m6_translation [label="translation to λβp", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m6_translation (section 4) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
m6_sn [label="SN for simply typed", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m6_sn (section 6) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
m6_intersection [label="intersection typing", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m6_intersection (section 6) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
m6_typable_sn [label="typable → SN", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m6_typable_sn (section 6) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
m6_sn_typable [label="SN → typable", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="m6_sn_typable (section 6) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
corollary_6_21_psn [label="Cor 6.21 PSN", color="#777777", fillcolor="#f3f3f3", style="dashed", fontcolor="#333333", tooltip="corollary_6_21_psn (section 6) https://arxiv.org/html/2312.13270v1", shape=box];
|
||||
}
|
||||
exec_step -> exec_examples;
|
||||
exec_examples -> m1_syntax;
|
||||
m1_syntax -> m1_open_close;
|
||||
m1_syntax -> m1_red1;
|
||||
m1_open_close -> m1_red1;
|
||||
m1_red1 -> lemma_2_1_fv_preserved;
|
||||
m1_red1 -> lemma_2_2_full_comp;
|
||||
m1_red1 -> lemma_2_3_beta_sim;
|
||||
lemma_2_2_full_comp -> lemma_2_3_beta_sim;
|
||||
m1_red1 -> m3_measure;
|
||||
m3_measure -> m3_termination;
|
||||
m3_termination -> m3_local_confluence;
|
||||
m1_red1 -> m3_local_confluence;
|
||||
m3_local_confluence -> lemma_3_2_sub_nf_unique;
|
||||
m1_red1 -> m4_par;
|
||||
lemma_3_2_sub_nf_unique -> m4_par;
|
||||
m4_par -> m4_par_diamond;
|
||||
m4_par_diamond -> theorem_confluence_terms;
|
||||
lemma_2_3_beta_sim -> theorem_confluence_terms;
|
||||
m1_syntax -> m5_mvar;
|
||||
m5_mvar -> m5_rx;
|
||||
m1_red1 -> m5_rx;
|
||||
m5_mvar -> m5_eq_C;
|
||||
m5_rx -> m5_coherence;
|
||||
m5_eq_C -> m5_coherence;
|
||||
lemma_3_2_sub_nf_unique -> m5_coherence;
|
||||
m5_coherence -> theorem_confluence_metaterms;
|
||||
m4_par_diamond -> theorem_confluence_metaterms;
|
||||
m1_red1 -> m6_translation;
|
||||
m6_translation -> m6_sn;
|
||||
m6_sn -> m6_intersection;
|
||||
m6_intersection -> m6_typable_sn;
|
||||
m6_typable_sn -> m6_sn_typable;
|
||||
m6_sn_typable -> corollary_6_21_psn;
|
||||
theorem_confluence_terms -> corollary_6_21_psn;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 160 KiB |
@@ -0,0 +1,493 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.42.4 (0)
|
||||
-->
|
||||
<!-- Title: theorem_deps Pages: 1 -->
|
||||
<svg width="2000pt" height="553pt"
|
||||
viewBox="0.00 0.00 2000.35 552.64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 548.64)">
|
||||
<title>theorem_deps</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-548.64 1996.35,-548.64 1996.35,4 -4,4"/>
|
||||
<text text-anchor="middle" x="996.18" y="-531.04" font-family="Inter" font-size="12.00">Milner's Lambda-Calculus with Partial Substitutions - theorem dependency (M0)</text>
|
||||
<g id="clust1" class="cluster">
|
||||
<title>cluster_M0</title>
|
||||
<path fill="white" stroke="#bbbbbb" d="M20,-200.64C20,-200.64 226.95,-200.64 226.95,-200.64 232.95,-200.64 238.95,-206.64 238.95,-212.64 238.95,-212.64 238.95,-261.64 238.95,-261.64 238.95,-267.64 232.95,-273.64 226.95,-273.64 226.95,-273.64 20,-273.64 20,-273.64 14,-273.64 8,-267.64 8,-261.64 8,-261.64 8,-212.64 8,-212.64 8,-206.64 14,-200.64 20,-200.64"/>
|
||||
<text text-anchor="middle" x="123.48" y="-260.04" font-family="Inter" font-size="12.00" fill="#333333">M0</text>
|
||||
</g>
|
||||
<g id="clust2" class="cluster">
|
||||
<title>cluster_M1</title>
|
||||
<path fill="white" stroke="#bbbbbb" d="M270.95,-180.64C270.95,-180.64 665.78,-180.64 665.78,-180.64 671.78,-180.64 677.78,-186.64 677.78,-192.64 677.78,-192.64 677.78,-261.64 677.78,-261.64 677.78,-267.64 671.78,-273.64 665.78,-273.64 665.78,-273.64 270.95,-273.64 270.95,-273.64 264.95,-273.64 258.95,-267.64 258.95,-261.64 258.95,-261.64 258.95,-192.64 258.95,-192.64 258.95,-186.64 264.95,-180.64 270.95,-180.64"/>
|
||||
<text text-anchor="middle" x="468.37" y="-260.04" font-family="Inter" font-size="12.00" fill="#333333">M1</text>
|
||||
</g>
|
||||
<g id="clust3" class="cluster">
|
||||
<title>cluster_M2</title>
|
||||
<path fill="white" stroke="#bbbbbb" d="M709.78,-23.64C709.78,-23.64 1015.78,-23.64 1015.78,-23.64 1021.78,-23.64 1027.78,-29.64 1027.78,-35.64 1027.78,-35.64 1027.78,-138.64 1027.78,-138.64 1027.78,-144.64 1021.78,-150.64 1015.78,-150.64 1015.78,-150.64 709.78,-150.64 709.78,-150.64 703.78,-150.64 697.78,-144.64 697.78,-138.64 697.78,-138.64 697.78,-35.64 697.78,-35.64 697.78,-29.64 703.78,-23.64 709.78,-23.64"/>
|
||||
<text text-anchor="middle" x="862.78" y="-137.04" font-family="Inter" font-size="12.00" fill="#333333">M2</text>
|
||||
</g>
|
||||
<g id="clust4" class="cluster">
|
||||
<title>cluster_M3</title>
|
||||
<path fill="white" stroke="#bbbbbb" d="M737.87,-226.64C737.87,-226.64 1359.78,-226.64 1359.78,-226.64 1365.78,-226.64 1371.78,-232.64 1371.78,-238.64 1371.78,-238.64 1371.78,-287.64 1371.78,-287.64 1371.78,-293.64 1365.78,-299.64 1359.78,-299.64 1359.78,-299.64 737.87,-299.64 737.87,-299.64 731.87,-299.64 725.87,-293.64 725.87,-287.64 725.87,-287.64 725.87,-238.64 725.87,-238.64 725.87,-232.64 731.87,-226.64 737.87,-226.64"/>
|
||||
<text text-anchor="middle" x="1048.82" y="-286.04" font-family="Inter" font-size="12.00" fill="#333333">M3</text>
|
||||
</g>
|
||||
<g id="clust5" class="cluster">
|
||||
<title>cluster_M4</title>
|
||||
<path fill="white" stroke="#bbbbbb" d="M1403.78,-196.64C1403.78,-196.64 1844.85,-196.64 1844.85,-196.64 1850.85,-196.64 1856.85,-202.64 1856.85,-208.64 1856.85,-208.64 1856.85,-257.64 1856.85,-257.64 1856.85,-263.64 1850.85,-269.64 1844.85,-269.64 1844.85,-269.64 1403.78,-269.64 1403.78,-269.64 1397.78,-269.64 1391.78,-263.64 1391.78,-257.64 1391.78,-257.64 1391.78,-208.64 1391.78,-208.64 1391.78,-202.64 1397.78,-196.64 1403.78,-196.64"/>
|
||||
<text text-anchor="middle" x="1624.32" y="-256.04" font-family="Inter" font-size="12.00" fill="#333333">M4</text>
|
||||
</g>
|
||||
<g id="clust6" class="cluster">
|
||||
<title>cluster_M5</title>
|
||||
<path fill="white" stroke="#bbbbbb" d="M1247.92,-307.64C1247.92,-307.64 1856.35,-307.64 1856.35,-307.64 1862.35,-307.64 1868.35,-313.64 1868.35,-319.64 1868.35,-319.64 1868.35,-422.64 1868.35,-422.64 1868.35,-428.64 1862.35,-434.64 1856.35,-434.64 1856.35,-434.64 1247.92,-434.64 1247.92,-434.64 1241.92,-434.64 1235.92,-428.64 1235.92,-422.64 1235.92,-422.64 1235.92,-319.64 1235.92,-319.64 1235.92,-313.64 1241.92,-307.64 1247.92,-307.64"/>
|
||||
<text text-anchor="middle" x="1552.14" y="-421.04" font-family="Inter" font-size="12.00" fill="#333333">M5</text>
|
||||
</g>
|
||||
<g id="clust7" class="cluster">
|
||||
<title>cluster_M6</title>
|
||||
<path fill="white" stroke="#bbbbbb" d="M1075.78,-442.64C1075.78,-442.64 1972.35,-442.64 1972.35,-442.64 1978.35,-442.64 1984.35,-448.64 1984.35,-454.64 1984.35,-454.64 1984.35,-503.64 1984.35,-503.64 1984.35,-509.64 1978.35,-515.64 1972.35,-515.64 1972.35,-515.64 1075.78,-515.64 1075.78,-515.64 1069.78,-515.64 1063.78,-509.64 1063.78,-503.64 1063.78,-503.64 1063.78,-454.64 1063.78,-454.64 1063.78,-448.64 1069.78,-442.64 1075.78,-442.64"/>
|
||||
<text text-anchor="middle" x="1524.07" y="-502.04" font-family="Inter" font-size="12.00" fill="#333333">M6</text>
|
||||
</g>
|
||||
<!-- exec_step -->
|
||||
<g id="node1" class="node">
|
||||
<title>exec_step</title>
|
||||
<g id="a_node1"><a xlink:title="exec_step theory/ExecReducer.v https://arxiv.org/html/2312.13270v1">
|
||||
<ellipse fill="#d9ead3" stroke="#38761d" cx="53.67" cy="-226.64" rx="37.85" ry="18"/>
|
||||
<text text-anchor="middle" x="53.67" y="-224.14" font-family="Inter" font-size="10.00" fill="#333333">exec_step</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- exec_examples -->
|
||||
<g id="node2" class="node">
|
||||
<title>exec_examples</title>
|
||||
<g id="a_node2"><a xlink:title="exec_examples theory/ExecReducer.v https://arxiv.org/html/2312.13270v1">
|
||||
<ellipse fill="#d9ead3" stroke="#38761d" cx="179.15" cy="-226.64" rx="51.61" ry="18"/>
|
||||
<text text-anchor="middle" x="179.15" y="-224.14" font-family="Inter" font-size="10.00" fill="#333333">exec_examples</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- exec_step->exec_examples -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>exec_step->exec_examples</title>
|
||||
<path fill="none" stroke="#333333" d="M91.39,-226.64C99.46,-226.64 108.22,-226.64 116.97,-226.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="117.18,-230.14 127.18,-226.64 117.18,-223.14 117.18,-230.14"/>
|
||||
</g>
|
||||
<!-- m1_syntax -->
|
||||
<g id="node3" class="node">
|
||||
<title>m1_syntax</title>
|
||||
<g id="a_node3"><a xlink:title="m1_syntax (section 2) https://arxiv.org/html/2312.13270v1">
|
||||
<ellipse fill="none" stroke="#777777" stroke-dasharray="5,2" cx="326.41" cy="-226.64" rx="59.41" ry="18"/>
|
||||
<text text-anchor="middle" x="326.41" y="-224.14" font-family="Inter" font-size="10.00" fill="#333333">M1 syntax/binding</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- exec_examples->m1_syntax -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>exec_examples->m1_syntax</title>
|
||||
<path fill="none" stroke="#333333" d="M230.96,-226.64C239.31,-226.64 248.08,-226.64 256.78,-226.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="256.92,-230.14 266.92,-226.64 256.92,-223.14 256.92,-230.14"/>
|
||||
</g>
|
||||
<!-- m1_open_close -->
|
||||
<g id="node4" class="node">
|
||||
<title>m1_open_close</title>
|
||||
<g id="a_node4"><a xlink:title="m1_open_close (section 2) https://arxiv.org/html/2312.13270v1">
|
||||
<ellipse fill="none" stroke="#777777" stroke-dasharray="5,2" cx="477.2" cy="-206.64" rx="55.17" ry="18"/>
|
||||
<text text-anchor="middle" x="477.2" y="-204.14" font-family="Inter" font-size="10.00" fill="#333333">open/close laws</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_syntax->m1_open_close -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>m1_syntax->m1_open_close</title>
|
||||
<path fill="none" stroke="#333333" d="M381.12,-219.42C392.21,-217.93 403.97,-216.35 415.29,-214.83"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="416.09,-218.25 425.54,-213.45 415.16,-211.31 416.09,-218.25"/>
|
||||
</g>
|
||||
<!-- m1_red1 -->
|
||||
<g id="node5" class="node">
|
||||
<title>m1_red1</title>
|
||||
<g id="a_node5"><a xlink:title="m1_red1 (section 2) https://arxiv.org/html/2312.13270v1">
|
||||
<ellipse fill="none" stroke="#777777" stroke-dasharray="5,2" cx="619.16" cy="-206.64" rx="50.75" ry="18"/>
|
||||
<text text-anchor="middle" x="619.16" y="-204.14" font-family="Inter" font-size="10.00" fill="#333333">red1 (B, Gc, R)</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_syntax->m1_red1 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>m1_syntax->m1_red1</title>
|
||||
<path fill="none" stroke="#333333" d="M380.86,-233.88C422.44,-238.21 481.47,-241.5 532.53,-233.64 546.53,-231.48 561.37,-227.46 574.7,-223.16"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="576.19,-226.35 584.56,-219.85 573.97,-219.72 576.19,-226.35"/>
|
||||
</g>
|
||||
<!-- m5_mvar -->
|
||||
<g id="node16" class="node">
|
||||
<title>m5_mvar</title>
|
||||
<g id="a_node16"><a xlink:title="m5_mvar (section 3.3) https://arxiv.org/html/2312.13270v1">
|
||||
<ellipse fill="none" stroke="#777777" stroke-dasharray="5,2" cx="1292.78" cy="-363.64" rx="48.72" ry="18"/>
|
||||
<text text-anchor="middle" x="1292.78" y="-361.14" font-family="Inter" font-size="10.00" fill="#333333">XΔ metaterms</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_syntax->m5_mvar -->
|
||||
<g id="edge20" class="edge">
|
||||
<title>m1_syntax->m5_mvar</title>
|
||||
<path fill="none" stroke="#333333" d="M347.8,-243.48C393.28,-279.27 507.7,-359.64 618.16,-359.64 618.16,-359.64 618.16,-359.64 955.78,-359.64 1053.24,-359.64 1166.59,-361.34 1233.59,-362.53"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1233.87,-366.03 1243.93,-362.71 1234,-359.03 1233.87,-366.03"/>
|
||||
</g>
|
||||
<!-- m1_open_close->m1_red1 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>m1_open_close->m1_red1</title>
|
||||
<path fill="none" stroke="#333333" d="M532.71,-206.64C541,-206.64 549.6,-206.64 558.01,-206.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="558.13,-210.14 568.13,-206.64 558.13,-203.14 558.13,-210.14"/>
|
||||
</g>
|
||||
<!-- lemma_2_1_fv_preserved -->
|
||||
<g id="node6" class="node">
|
||||
<title>lemma_2_1_fv_preserved</title>
|
||||
<g id="a_node6"><a xlink:title="lemma_2_1_fv_preserved (section 2) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="844.78,-121.64 714.78,-121.64 714.78,-85.64 844.78,-85.64 844.78,-121.64"/>
|
||||
<text text-anchor="middle" x="779.78" y="-101.14" font-family="Inter" font-size="10.00" fill="#333333">Lemma 2.1 fv preserved</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_red1->lemma_2_1_fv_preserved -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>m1_red1->lemma_2_1_fv_preserved</title>
|
||||
<path fill="none" stroke="#333333" d="M643.48,-190.76C658.84,-180.38 679.42,-166.57 697.78,-154.64 711.73,-145.58 727.15,-135.81 740.76,-127.27"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="742.79,-130.13 749.41,-121.85 739.08,-124.19 742.79,-130.13"/>
|
||||
</g>
|
||||
<!-- lemma_2_2_full_comp -->
|
||||
<g id="node7" class="node">
|
||||
<title>lemma_2_2_full_comp</title>
|
||||
<g id="a_node7"><a xlink:title="lemma_2_2_full_comp (section 2) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="853.78,-67.64 705.78,-67.64 705.78,-31.64 853.78,-31.64 853.78,-67.64"/>
|
||||
<text text-anchor="middle" x="779.78" y="-47.14" font-family="Inter" font-size="10.00" fill="#333333">Lemma 2.2 full composition</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_red1->lemma_2_2_full_comp -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>m1_red1->lemma_2_2_full_comp</title>
|
||||
<path fill="none" stroke="#333333" d="M626.18,-188.76C636.48,-160.84 660.09,-106.94 697.78,-76.64 699.34,-75.38 700.96,-74.19 702.63,-73.05"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="704.6,-75.95 711.35,-67.78 700.98,-69.95 704.6,-75.95"/>
|
||||
</g>
|
||||
<!-- lemma_2_3_beta_sim -->
|
||||
<g id="node8" class="node">
|
||||
<title>lemma_2_3_beta_sim</title>
|
||||
<g id="a_node8"><a xlink:title="lemma_2_3_beta_sim (section 2) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1019.78,-67.64 889.78,-67.64 889.78,-31.64 1019.78,-31.64 1019.78,-67.64"/>
|
||||
<text text-anchor="middle" x="954.78" y="-47.14" font-family="Inter" font-size="10.00" fill="#333333">Lemma 2.3 β-simulation</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_red1->lemma_2_3_beta_sim -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>m1_red1->lemma_2_3_beta_sim</title>
|
||||
<path fill="none" stroke="#333333" d="M621.5,-188.43C625.43,-149.91 640.58,-60.59 697.78,-22.64 760.49,18.97 851.47,-5.84 906.39,-27.7"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="905.3,-31.03 915.88,-31.59 907.95,-24.56 905.3,-31.03"/>
|
||||
</g>
|
||||
<!-- m3_measure -->
|
||||
<g id="node9" class="node">
|
||||
<title>m3_measure</title>
|
||||
<g id="a_node9"><a xlink:title="m3_measure (section A) https://arxiv.org/html/2312.13270v1">
|
||||
<ellipse fill="none" stroke="#777777" stroke-dasharray="5,2" cx="779.78" cy="-252.64" rx="45.83" ry="18"/>
|
||||
<text text-anchor="middle" x="779.78" y="-250.14" font-family="Inter" font-size="10.00" fill="#333333">sub measure</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_red1->m3_measure -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>m1_red1->m3_measure</title>
|
||||
<path fill="none" stroke="#333333" d="M658.96,-217.89C681.19,-224.34 709.23,-232.47 732.59,-239.24"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="731.7,-242.63 742.28,-242.05 733.65,-235.91 731.7,-242.63"/>
|
||||
</g>
|
||||
<!-- m3_local_confluence -->
|
||||
<g id="node11" class="node">
|
||||
<title>m3_local_confluence</title>
|
||||
<g id="a_node11"><a xlink:title="m3_local_confluence (section 3.1) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1185.78,-270.64 1055.78,-270.64 1055.78,-234.64 1185.78,-234.64 1185.78,-270.64"/>
|
||||
<text text-anchor="middle" x="1120.78" y="-250.14" font-family="Inter" font-size="10.00" fill="#333333">{R,Gc} local confluence</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_red1->m3_local_confluence -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>m1_red1->m3_local_confluence</title>
|
||||
<path fill="none" stroke="#333333" d="M669.82,-205.16C746.98,-203.71 900.09,-204.24 1027.78,-225.64 1037.16,-227.21 1046.94,-229.43 1056.47,-231.92"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1055.72,-235.34 1066.29,-234.6 1057.56,-228.59 1055.72,-235.34"/>
|
||||
</g>
|
||||
<!-- m4_par -->
|
||||
<g id="node13" class="node">
|
||||
<title>m4_par</title>
|
||||
<g id="a_node13"><a xlink:title="m4_par (section 3.2) https://arxiv.org/html/2312.13270v1">
|
||||
<ellipse fill="none" stroke="#777777" stroke-dasharray="5,2" cx="1468.07" cy="-222.64" rx="68.07" ry="18"/>
|
||||
<text text-anchor="middle" x="1468.07" y="-220.14" font-family="Inter" font-size="10.00" fill="#333333">parallel reduction par</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_red1->m4_par -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>m1_red1->m4_par</title>
|
||||
<path fill="none" stroke="#333333" d="M664.23,-198.39C727.9,-187.22 849.43,-168.64 953.78,-168.64 953.78,-168.64 953.78,-168.64 1121.78,-168.64 1223.5,-168.64 1340.07,-191.8 1408.42,-207.78"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1408.01,-211.28 1418.55,-210.18 1409.63,-204.47 1408.01,-211.28"/>
|
||||
</g>
|
||||
<!-- m5_rx -->
|
||||
<g id="node17" class="node">
|
||||
<title>m5_rx</title>
|
||||
<g id="a_node17"><a xlink:title="m5_rx (section 3.3) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1495.07,-351.64 1441.07,-351.64 1441.07,-315.64 1495.07,-315.64 1495.07,-351.64"/>
|
||||
<text text-anchor="middle" x="1468.07" y="-331.14" font-family="Inter" font-size="10.00" fill="#333333">RX rule</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_red1->m5_rx -->
|
||||
<g id="edge22" class="edge">
|
||||
<title>m1_red1->m5_rx</title>
|
||||
<path fill="none" stroke="#333333" d="M628.47,-224.44C640.27,-247.38 664.22,-286.37 697.78,-303.64 799.1,-355.78 839.83,-317.64 953.78,-317.64 953.78,-317.64 953.78,-317.64 1121.78,-317.64 1234.39,-317.64 1367.43,-326.23 1430.45,-330.83"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1430.43,-334.33 1440.66,-331.58 1430.95,-327.35 1430.43,-334.33"/>
|
||||
</g>
|
||||
<!-- m6_translation -->
|
||||
<g id="node21" class="node">
|
||||
<title>m6_translation</title>
|
||||
<g id="a_node21"><a xlink:title="m6_translation (section 4) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1169.78,-486.64 1071.78,-486.64 1071.78,-450.64 1169.78,-450.64 1169.78,-486.64"/>
|
||||
<text text-anchor="middle" x="1120.78" y="-466.14" font-family="Inter" font-size="10.00" fill="#333333">translation to λβp</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m1_red1->m6_translation -->
|
||||
<g id="edge29" class="edge">
|
||||
<title>m1_red1->m6_translation</title>
|
||||
<path fill="none" stroke="#333333" d="M626.69,-224.75C637.39,-251.88 661.18,-302.97 697.78,-331.64 808.02,-417.99 974.51,-450.79 1061.76,-462.55"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1061.38,-466.03 1071.75,-463.85 1062.28,-459.08 1061.38,-466.03"/>
|
||||
</g>
|
||||
<!-- lemma_2_2_full_comp->lemma_2_3_beta_sim -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>lemma_2_2_full_comp->lemma_2_3_beta_sim</title>
|
||||
<path fill="none" stroke="#333333" d="M853.9,-49.64C862.36,-49.64 870.99,-49.64 879.46,-49.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="879.7,-53.14 889.7,-49.64 879.7,-46.14 879.7,-53.14"/>
|
||||
</g>
|
||||
<!-- theorem_confluence_terms -->
|
||||
<g id="node15" class="node">
|
||||
<title>theorem_confluence_terms</title>
|
||||
<g id="a_node15"><a xlink:title="theorem_confluence_terms (section 3.2) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1848.85,-240.64 1731.85,-240.64 1731.85,-204.64 1848.85,-204.64 1848.85,-240.64"/>
|
||||
<text text-anchor="middle" x="1790.35" y="-220.14" font-family="Inter" font-size="10.00" fill="#333333">Confluence on terms</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- lemma_2_3_beta_sim->theorem_confluence_terms -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>lemma_2_3_beta_sim->theorem_confluence_terms</title>
|
||||
<path fill="none" stroke="#333333" d="M1019.91,-62.16C1087.32,-74.22 1196.58,-90.64 1291.78,-90.64 1291.78,-90.64 1291.78,-90.64 1469.07,-90.64 1581.25,-90.64 1699.98,-160.71 1756.17,-198.75"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1754.42,-201.79 1764.64,-204.56 1758.38,-196.02 1754.42,-201.79"/>
|
||||
</g>
|
||||
<!-- m3_termination -->
|
||||
<g id="node10" class="node">
|
||||
<title>m3_termination</title>
|
||||
<g id="a_node10"><a xlink:title="m3_termination (section 3.1) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1006.78,-270.64 902.78,-270.64 902.78,-234.64 1006.78,-234.64 1006.78,-270.64"/>
|
||||
<text text-anchor="middle" x="954.78" y="-250.14" font-family="Inter" font-size="10.00" fill="#333333">{R,Gc} termination</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m3_measure->m3_termination -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>m3_measure->m3_termination</title>
|
||||
<path fill="none" stroke="#333333" d="M825.78,-252.64C846.09,-252.64 870.41,-252.64 892.36,-252.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="892.59,-256.14 902.58,-252.64 892.58,-249.14 892.59,-256.14"/>
|
||||
</g>
|
||||
<!-- m3_termination->m3_local_confluence -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>m3_termination->m3_local_confluence</title>
|
||||
<path fill="none" stroke="#333333" d="M1007.22,-252.64C1019.3,-252.64 1032.42,-252.64 1045.29,-252.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1045.53,-256.14 1055.53,-252.64 1045.53,-249.14 1045.53,-256.14"/>
|
||||
</g>
|
||||
<!-- lemma_3_2_sub_nf_unique -->
|
||||
<g id="node12" class="node">
|
||||
<title>lemma_3_2_sub_nf_unique</title>
|
||||
<g id="a_node12"><a xlink:title="lemma_3_2_sub_nf_unique (section 3.1) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1363.78,-270.64 1221.78,-270.64 1221.78,-234.64 1363.78,-234.64 1363.78,-270.64"/>
|
||||
<text text-anchor="middle" x="1292.78" y="-250.14" font-family="Inter" font-size="10.00" fill="#333333">Lemma 3.2 sub NF unique</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m3_local_confluence->lemma_3_2_sub_nf_unique -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>m3_local_confluence->lemma_3_2_sub_nf_unique</title>
|
||||
<path fill="none" stroke="#333333" d="M1186.05,-252.64C1194.43,-252.64 1203.1,-252.64 1211.7,-252.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1211.74,-256.14 1221.74,-252.64 1211.74,-249.14 1211.74,-256.14"/>
|
||||
</g>
|
||||
<!-- lemma_3_2_sub_nf_unique->m4_par -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>lemma_3_2_sub_nf_unique->m4_par</title>
|
||||
<path fill="none" stroke="#333333" d="M1364.26,-240.44C1376.15,-238.38 1388.46,-236.25 1400.24,-234.21"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1401.19,-237.6 1410.45,-232.44 1400,-230.7 1401.19,-237.6"/>
|
||||
</g>
|
||||
<!-- m5_coherence -->
|
||||
<g id="node19" class="node">
|
||||
<title>m5_coherence</title>
|
||||
<g id="a_node19"><a xlink:title="m5_coherence (section 3.3) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1684.35,-351.64 1572.35,-351.64 1572.35,-315.64 1684.35,-315.64 1684.35,-351.64"/>
|
||||
<text text-anchor="middle" x="1628.35" y="-331.14" font-family="Inter" font-size="10.00" fill="#333333">RX + =C coherence</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- lemma_3_2_sub_nf_unique->m5_coherence -->
|
||||
<g id="edge26" class="edge">
|
||||
<title>lemma_3_2_sub_nf_unique->m5_coherence</title>
|
||||
<path fill="none" stroke="#333333" d="M1363.89,-267.68C1423.47,-280.57 1504.3,-298.33 1536.35,-306.64 1544.81,-308.83 1553.67,-311.28 1562.41,-313.77"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1561.6,-317.18 1572.18,-316.6 1563.55,-310.46 1561.6,-317.18"/>
|
||||
</g>
|
||||
<!-- m4_par_diamond -->
|
||||
<g id="node14" class="node">
|
||||
<title>m4_par_diamond</title>
|
||||
<g id="a_node14"><a xlink:title="m4_par_diamond (section 3.2) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1665.85,-240.64 1590.85,-240.64 1590.85,-204.64 1665.85,-204.64 1665.85,-240.64"/>
|
||||
<text text-anchor="middle" x="1628.35" y="-220.14" font-family="Inter" font-size="10.00" fill="#333333">par diamond</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m4_par->m4_par_diamond -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>m4_par->m4_par_diamond</title>
|
||||
<path fill="none" stroke="#333333" d="M1536.65,-222.64C1551.38,-222.64 1566.66,-222.64 1580.38,-222.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1580.54,-226.14 1590.54,-222.64 1580.54,-219.14 1580.54,-226.14"/>
|
||||
</g>
|
||||
<!-- m4_par_diamond->theorem_confluence_terms -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>m4_par_diamond->theorem_confluence_terms</title>
|
||||
<path fill="none" stroke="#333333" d="M1666.06,-222.64C1682.56,-222.64 1702.58,-222.64 1721.64,-222.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1721.8,-226.14 1731.8,-222.64 1721.8,-219.14 1721.8,-226.14"/>
|
||||
</g>
|
||||
<!-- theorem_confluence_metaterms -->
|
||||
<g id="node20" class="node">
|
||||
<title>theorem_confluence_metaterms</title>
|
||||
<g id="a_node20"><a xlink:title="theorem_confluence_metaterms (section 3.3) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1860.35,-351.64 1720.35,-351.64 1720.35,-315.64 1860.35,-315.64 1860.35,-351.64"/>
|
||||
<text text-anchor="middle" x="1790.35" y="-331.14" font-family="Inter" font-size="10.00" fill="#333333">Confluence on metaterms</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m4_par_diamond->theorem_confluence_metaterms -->
|
||||
<g id="edge28" class="edge">
|
||||
<title>m4_par_diamond->theorem_confluence_metaterms</title>
|
||||
<path fill="none" stroke="#333333" d="M1655.41,-240.72C1682.49,-259.51 1725.01,-289 1754.86,-309.71"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1753.09,-312.74 1763.3,-315.57 1757.08,-306.99 1753.09,-312.74"/>
|
||||
</g>
|
||||
<!-- corollary_6_21_psn -->
|
||||
<g id="node26" class="node">
|
||||
<title>corollary_6_21_psn</title>
|
||||
<g id="a_node26"><a xlink:title="corollary_6_21_psn (section 6) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1976.35,-486.64 1896.35,-486.64 1896.35,-450.64 1976.35,-450.64 1976.35,-486.64"/>
|
||||
<text text-anchor="middle" x="1936.35" y="-466.14" font-family="Inter" font-size="10.00" fill="#333333">Cor 6.21 PSN</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- theorem_confluence_terms->corollary_6_21_psn -->
|
||||
<g id="edge35" class="edge">
|
||||
<title>theorem_confluence_terms->corollary_6_21_psn</title>
|
||||
<path fill="none" stroke="#333333" d="M1812.59,-240.84C1829.48,-256.21 1852.79,-279.51 1868.35,-303.64 1896.91,-347.9 1917.13,-406.33 1927.46,-440.47"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1924.16,-441.64 1930.35,-450.24 1930.87,-439.65 1924.16,-441.64"/>
|
||||
</g>
|
||||
<!-- m5_mvar->m5_rx -->
|
||||
<g id="edge21" class="edge">
|
||||
<title>m5_mvar->m5_rx</title>
|
||||
<path fill="none" stroke="#333333" d="M1337.51,-356.07C1366.4,-351.07 1403.82,-344.59 1431,-339.88"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1431.63,-343.33 1440.88,-338.17 1430.43,-336.43 1431.63,-343.33"/>
|
||||
</g>
|
||||
<!-- m5_eq_C -->
|
||||
<g id="node18" class="node">
|
||||
<title>m5_eq_C</title>
|
||||
<g id="a_node18"><a xlink:title="m5_eq_C (section 3.3) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1499.07,-405.64 1437.07,-405.64 1437.07,-369.64 1499.07,-369.64 1499.07,-405.64"/>
|
||||
<text text-anchor="middle" x="1468.07" y="-385.14" font-family="Inter" font-size="10.00" fill="#333333">=C setoid</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m5_mvar->m5_eq_C -->
|
||||
<g id="edge23" class="edge">
|
||||
<title>m5_mvar->m5_eq_C</title>
|
||||
<path fill="none" stroke="#333333" d="M1338.86,-369.88C1366.13,-373.66 1400.59,-378.43 1426.92,-382.08"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1426.55,-385.56 1436.94,-383.47 1427.51,-378.63 1426.55,-385.56"/>
|
||||
</g>
|
||||
<!-- m5_rx->m5_coherence -->
|
||||
<g id="edge24" class="edge">
|
||||
<title>m5_rx->m5_coherence</title>
|
||||
<path fill="none" stroke="#333333" d="M1495.2,-333.64C1513.41,-333.64 1538.54,-333.64 1562,-333.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1562.28,-337.14 1572.28,-333.64 1562.28,-330.14 1562.28,-337.14"/>
|
||||
</g>
|
||||
<!-- m5_eq_C->m5_coherence -->
|
||||
<g id="edge25" class="edge">
|
||||
<title>m5_eq_C->m5_coherence</title>
|
||||
<path fill="none" stroke="#333333" d="M1499.21,-377.35C1517.81,-371.01 1542.37,-362.63 1565,-354.91"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1566.23,-358.19 1574.56,-351.65 1563.97,-351.57 1566.23,-358.19"/>
|
||||
</g>
|
||||
<!-- m5_coherence->theorem_confluence_metaterms -->
|
||||
<g id="edge27" class="edge">
|
||||
<title>m5_coherence->theorem_confluence_metaterms</title>
|
||||
<path fill="none" stroke="#333333" d="M1684.41,-333.64C1692.73,-333.64 1701.45,-333.64 1710.15,-333.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1710.34,-337.14 1720.34,-333.64 1710.34,-330.14 1710.34,-337.14"/>
|
||||
</g>
|
||||
<!-- m6_sn -->
|
||||
<g id="node22" class="node">
|
||||
<title>m6_sn</title>
|
||||
<g id="a_node22"><a xlink:title="m6_sn (section 6) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1347.78,-486.64 1237.78,-486.64 1237.78,-450.64 1347.78,-450.64 1347.78,-486.64"/>
|
||||
<text text-anchor="middle" x="1292.78" y="-466.14" font-family="Inter" font-size="10.00" fill="#333333">SN for simply typed</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m6_translation->m6_sn -->
|
||||
<g id="edge30" class="edge">
|
||||
<title>m6_translation->m6_sn</title>
|
||||
<path fill="none" stroke="#333333" d="M1170.04,-468.64C1187.93,-468.64 1208.51,-468.64 1227.6,-468.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1227.72,-472.14 1237.72,-468.64 1227.72,-465.14 1227.72,-472.14"/>
|
||||
</g>
|
||||
<!-- m6_intersection -->
|
||||
<g id="node23" class="node">
|
||||
<title>m6_intersection</title>
|
||||
<g id="a_node23"><a xlink:title="m6_intersection (section 6) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1520.07,-486.64 1416.07,-486.64 1416.07,-450.64 1520.07,-450.64 1520.07,-486.64"/>
|
||||
<text text-anchor="middle" x="1468.07" y="-466.14" font-family="Inter" font-size="10.00" fill="#333333">intersection typing</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m6_sn->m6_intersection -->
|
||||
<g id="edge31" class="edge">
|
||||
<title>m6_sn->m6_intersection</title>
|
||||
<path fill="none" stroke="#333333" d="M1348.14,-468.64C1366.39,-468.64 1386.88,-468.64 1405.64,-468.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1405.86,-472.14 1415.86,-468.64 1405.86,-465.14 1405.86,-472.14"/>
|
||||
</g>
|
||||
<!-- m6_typable_sn -->
|
||||
<g id="node24" class="node">
|
||||
<title>m6_typable_sn</title>
|
||||
<g id="a_node24"><a xlink:title="m6_typable_sn (section 6) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1668.85,-486.64 1587.85,-486.64 1587.85,-450.64 1668.85,-450.64 1668.85,-486.64"/>
|
||||
<text text-anchor="middle" x="1628.35" y="-466.14" font-family="Inter" font-size="10.00" fill="#333333">typable → SN</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m6_intersection->m6_typable_sn -->
|
||||
<g id="edge32" class="edge">
|
||||
<title>m6_intersection->m6_typable_sn</title>
|
||||
<path fill="none" stroke="#333333" d="M1520.46,-468.64C1538.8,-468.64 1559.43,-468.64 1577.63,-468.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1577.75,-472.14 1587.75,-468.64 1577.75,-465.14 1577.75,-472.14"/>
|
||||
</g>
|
||||
<!-- m6_sn_typable -->
|
||||
<g id="node25" class="node">
|
||||
<title>m6_sn_typable</title>
|
||||
<g id="a_node25"><a xlink:title="m6_sn_typable (section 6) https://arxiv.org/html/2312.13270v1">
|
||||
<polygon fill="none" stroke="#777777" stroke-dasharray="5,2" points="1830.85,-486.64 1749.85,-486.64 1749.85,-450.64 1830.85,-450.64 1830.85,-486.64"/>
|
||||
<text text-anchor="middle" x="1790.35" y="-466.14" font-family="Inter" font-size="10.00" fill="#333333">SN → typable</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- m6_typable_sn->m6_sn_typable -->
|
||||
<g id="edge33" class="edge">
|
||||
<title>m6_typable_sn->m6_sn_typable</title>
|
||||
<path fill="none" stroke="#333333" d="M1668.9,-468.64C1690.25,-468.64 1716.81,-468.64 1739.55,-468.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1739.7,-472.14 1749.7,-468.64 1739.7,-465.14 1739.7,-472.14"/>
|
||||
</g>
|
||||
<!-- m6_sn_typable->corollary_6_21_psn -->
|
||||
<g id="edge34" class="edge">
|
||||
<title>m6_sn_typable->corollary_6_21_psn</title>
|
||||
<path fill="none" stroke="#333333" d="M1831.08,-468.64C1848.14,-468.64 1868.25,-468.64 1886.23,-468.64"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="1886.25,-472.14 1896.25,-468.64 1886.25,-465.14 1886.25,-472.14"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 29 KiB |
@@ -0,0 +1,20 @@
|
||||
digraph reduction_dup {
|
||||
rankdir=LR;
|
||||
bgcolor="white";
|
||||
node [fontname=Inter, fontsize=10];
|
||||
edge [fontname=Inter, fontsize=9, color="#333333"];
|
||||
graph [labelloc=t, fontcolor="#333333", label="(lambda x. x x) y reduction graph"];
|
||||
n0 [label="(lambda x. x x) y", shape=box, style="filled", fillcolor="#f5f5f5", color="#333333", fontcolor="#333333"];
|
||||
n1 [label="(x x)[x/y]", shape=box, style="filled", fillcolor="#f5f5f5", color="#333333", fontcolor="#333333"];
|
||||
n2 [label="(y x)[x/y]", shape=box, style="filled", fillcolor="#f5f5f5", color="#333333", fontcolor="#333333"];
|
||||
n2b [label="(x y)[x/y]", shape=box, style="filled", fillcolor="#f5f5f5", color="#333333", fontcolor="#333333"];
|
||||
n3 [label="(y y)[x/y]", shape=box, style="filled", fillcolor="#f5f5f5", color="#333333", fontcolor="#333333"];
|
||||
nf [label="y y (normal form)", shape=doublecircle, style=filled, fillcolor="#d9ead3", color="#38761d", fontcolor="#333333"];
|
||||
n0 -> n1 [label="B", color="#990000"];
|
||||
n1 -> n2 [label="R", color="#674ea7"];
|
||||
n1 -> n2b [label="R", color="#674ea7"];
|
||||
n2 -> n3 [label="R", color="#674ea7"];
|
||||
n2b -> n3 [label="R", color="#674ea7"];
|
||||
n3 -> nf [label="Gc", color="#38761d"];
|
||||
{rank=same; n2; n2b;}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.42.4 (0)
|
||||
-->
|
||||
<!-- Title: reduction_dup Pages: 1 -->
|
||||
<svg width="580pt" height="154pt"
|
||||
viewBox="0.00 0.00 580.38 154.38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 150.38)">
|
||||
<title>reduction_dup</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-150.38 576.38,-150.38 576.38,4 -4,4"/>
|
||||
<text text-anchor="middle" x="286.19" y="-131.18" font-family="Times,serif" font-size="14.00" fill="#333333">(lambda x. x x) y reduction graph</text>
|
||||
<!-- n0 -->
|
||||
<g id="node1" class="node">
|
||||
<title>n0</title>
|
||||
<polygon fill="#f5f5f5" stroke="#333333" points="94,-79.69 0,-79.69 0,-43.69 94,-43.69 94,-79.69"/>
|
||||
<text text-anchor="middle" x="47" y="-59.19" font-family="Inter" font-size="10.00" fill="#333333">(lambda x. x x) y</text>
|
||||
</g>
|
||||
<!-- n1 -->
|
||||
<g id="node2" class="node">
|
||||
<title>n1</title>
|
||||
<polygon fill="#f5f5f5" stroke="#333333" points="196,-79.69 137,-79.69 137,-43.69 196,-43.69 196,-79.69"/>
|
||||
<text text-anchor="middle" x="166.5" y="-59.19" font-family="Inter" font-size="10.00" fill="#333333">(x x)[x/y]</text>
|
||||
</g>
|
||||
<!-- n0->n1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>n0->n1</title>
|
||||
<path fill="none" stroke="#990000" d="M94.1,-61.69C104.9,-61.69 116.3,-61.69 126.75,-61.69"/>
|
||||
<polygon fill="#990000" stroke="#990000" points="126.81,-65.19 136.81,-61.69 126.81,-58.19 126.81,-65.19"/>
|
||||
<text text-anchor="middle" x="115.5" y="-64.49" font-family="Inter" font-size="9.00">B</text>
|
||||
</g>
|
||||
<!-- n2 -->
|
||||
<g id="node3" class="node">
|
||||
<title>n2</title>
|
||||
<polygon fill="#f5f5f5" stroke="#333333" points="298,-107.69 239,-107.69 239,-71.69 298,-71.69 298,-107.69"/>
|
||||
<text text-anchor="middle" x="268.5" y="-87.19" font-family="Inter" font-size="10.00" fill="#333333">(y x)[x/y]</text>
|
||||
</g>
|
||||
<!-- n1->n2 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>n1->n2</title>
|
||||
<path fill="none" stroke="#674ea7" d="M196.16,-69.71C206.41,-72.58 218.13,-75.87 229.08,-78.93"/>
|
||||
<polygon fill="#674ea7" stroke="#674ea7" points="228.27,-82.34 238.84,-81.66 230.15,-75.6 228.27,-82.34"/>
|
||||
<text text-anchor="middle" x="217.5" y="-78.49" font-family="Inter" font-size="9.00">R</text>
|
||||
</g>
|
||||
<!-- n2b -->
|
||||
<g id="node4" class="node">
|
||||
<title>n2b</title>
|
||||
<polygon fill="#f5f5f5" stroke="#333333" points="298,-53.69 239,-53.69 239,-17.69 298,-17.69 298,-53.69"/>
|
||||
<text text-anchor="middle" x="268.5" y="-33.19" font-family="Inter" font-size="10.00" fill="#333333">(x y)[x/y]</text>
|
||||
</g>
|
||||
<!-- n1->n2b -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>n1->n2b</title>
|
||||
<path fill="none" stroke="#674ea7" d="M196.16,-54.24C206.41,-51.57 218.13,-48.52 229.08,-45.68"/>
|
||||
<polygon fill="#674ea7" stroke="#674ea7" points="230.04,-49.04 238.84,-43.14 228.28,-42.27 230.04,-49.04"/>
|
||||
<text text-anchor="middle" x="217.5" y="-51.49" font-family="Inter" font-size="9.00">R</text>
|
||||
</g>
|
||||
<!-- n3 -->
|
||||
<g id="node5" class="node">
|
||||
<title>n3</title>
|
||||
<polygon fill="#f5f5f5" stroke="#333333" points="400,-79.69 341,-79.69 341,-43.69 400,-43.69 400,-79.69"/>
|
||||
<text text-anchor="middle" x="370.5" y="-59.19" font-family="Inter" font-size="10.00" fill="#333333">(y y)[x/y]</text>
|
||||
</g>
|
||||
<!-- n2->n3 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>n2->n3</title>
|
||||
<path fill="none" stroke="#674ea7" d="M298.16,-81.67C308.41,-78.79 320.13,-75.51 331.08,-72.45"/>
|
||||
<polygon fill="#674ea7" stroke="#674ea7" points="332.15,-75.78 340.84,-69.71 330.27,-69.04 332.15,-75.78"/>
|
||||
<text text-anchor="middle" x="319.5" y="-78.49" font-family="Inter" font-size="9.00">R</text>
|
||||
</g>
|
||||
<!-- n2b->n3 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>n2b->n3</title>
|
||||
<path fill="none" stroke="#674ea7" d="M298.16,-43.14C308.41,-45.8 320.13,-48.85 331.08,-51.7"/>
|
||||
<polygon fill="#674ea7" stroke="#674ea7" points="330.28,-55.11 340.84,-54.24 332.04,-48.33 330.28,-55.11"/>
|
||||
<text text-anchor="middle" x="319.5" y="-51.49" font-family="Inter" font-size="9.00">R</text>
|
||||
</g>
|
||||
<!-- nf -->
|
||||
<g id="node6" class="node">
|
||||
<title>nf</title>
|
||||
<ellipse fill="#d9ead3" stroke="#38761d" cx="510.69" cy="-61.69" rx="57.87" ry="57.87"/>
|
||||
<ellipse fill="none" stroke="#38761d" cx="510.69" cy="-61.69" rx="61.88" ry="61.88"/>
|
||||
<text text-anchor="middle" x="510.69" y="-59.19" font-family="Inter" font-size="10.00" fill="#333333">y y (normal form)</text>
|
||||
</g>
|
||||
<!-- n3->nf -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>n3->nf</title>
|
||||
<path fill="none" stroke="#38761d" d="M400.13,-61.69C411.41,-61.69 424.91,-61.69 438.51,-61.69"/>
|
||||
<polygon fill="#38761d" stroke="#38761d" points="438.9,-65.19 448.9,-61.69 438.9,-58.19 438.9,-65.19"/>
|
||||
<text text-anchor="middle" x="424.5" y="-64.49" font-family="Inter" font-size="9.00">Gc</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,19 @@
|
||||
digraph lambda_sub_cfg {
|
||||
rankdir=TB;
|
||||
bgcolor="white";
|
||||
node [fontname=Inter, fontsize=10];
|
||||
edge [fontname=Inter, fontsize=9, color="#333333"];
|
||||
start [label="term", shape=oval, style=filled, fillcolor="#f3f3f3", color="#333333"];
|
||||
beta [label="(lambda x. t) u", shape=box, style="rounded,filled", fillcolor="#f5f5f5", color="#333333", fontcolor="#333333"];
|
||||
es [label="t[x/u]", shape=box, style="rounded,filled", fillcolor="#f5f5f5", color="#333333", fontcolor="#333333"];
|
||||
pure [label="pure term", shape=oval, style=filled, fillcolor="#f3f3f3", color="#333333"];
|
||||
nf [label="normal form", shape=doublecircle, style=filled, fillcolor="#d9ead3", color="#38761d"];
|
||||
start -> beta [label="App(Lam,_)"];
|
||||
start -> es [label="ESub"];
|
||||
start -> pure [label="BVar/FVar/Lam"];
|
||||
beta -> es [label="B", color="#990000"];
|
||||
es -> es [label="R (one occurrence)", color="#674ea7"];
|
||||
es -> pure [label="Gc (x not in fv)", color="#38761d"];
|
||||
pure -> pure [label="B under context", color="#990000"];
|
||||
es -> nf [label="R/Gc normalisation", color="#674ea7"];
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.42.4 (0)
|
||||
-->
|
||||
<!-- Title: lambda_sub_cfg Pages: 1 -->
|
||||
<svg width="322pt" height="349pt"
|
||||
viewBox="0.00 0.00 321.65 349.12" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 345.12)">
|
||||
<title>lambda_sub_cfg</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-345.12 317.65,-345.12 317.65,4 -4,4"/>
|
||||
<!-- start -->
|
||||
<g id="node1" class="node">
|
||||
<title>start</title>
|
||||
<ellipse fill="#f3f3f3" stroke="#333333" cx="152.56" cy="-323.12" rx="27" ry="18"/>
|
||||
<text text-anchor="middle" x="152.56" y="-320.62" font-family="Inter" font-size="10.00">term</text>
|
||||
</g>
|
||||
<!-- beta -->
|
||||
<g id="node2" class="node">
|
||||
<title>beta</title>
|
||||
<path fill="#f5f5f5" stroke="#333333" d="M104.56,-259.12C104.56,-259.12 44.56,-259.12 44.56,-259.12 38.56,-259.12 32.56,-253.12 32.56,-247.12 32.56,-247.12 32.56,-235.12 32.56,-235.12 32.56,-229.12 38.56,-223.12 44.56,-223.12 44.56,-223.12 104.56,-223.12 104.56,-223.12 110.56,-223.12 116.56,-229.12 116.56,-235.12 116.56,-235.12 116.56,-247.12 116.56,-247.12 116.56,-253.12 110.56,-259.12 104.56,-259.12"/>
|
||||
<text text-anchor="middle" x="74.56" y="-238.62" font-family="Inter" font-size="10.00" fill="#333333">(lambda x. t) u</text>
|
||||
</g>
|
||||
<!-- start->beta -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>start->beta</title>
|
||||
<path fill="none" stroke="#333333" d="M129.2,-313.7C116.24,-307.98 100.74,-299.23 90.56,-287.12 86.22,-281.96 83.02,-275.53 80.68,-269.16"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="83.96,-267.92 77.66,-259.4 77.27,-269.99 83.96,-267.92"/>
|
||||
<text text-anchor="middle" x="114.56" y="-279.92" font-family="Inter" font-size="9.00">App(Lam,_)</text>
|
||||
</g>
|
||||
<!-- es -->
|
||||
<g id="node3" class="node">
|
||||
<title>es</title>
|
||||
<path fill="#f5f5f5" stroke="#333333" d="M89.56,-177.12C89.56,-177.12 59.56,-177.12 59.56,-177.12 53.56,-177.12 47.56,-171.12 47.56,-165.12 47.56,-165.12 47.56,-153.12 47.56,-153.12 47.56,-147.12 53.56,-141.12 59.56,-141.12 59.56,-141.12 89.56,-141.12 89.56,-141.12 95.56,-141.12 101.56,-147.12 101.56,-153.12 101.56,-153.12 101.56,-165.12 101.56,-165.12 101.56,-171.12 95.56,-177.12 89.56,-177.12"/>
|
||||
<text text-anchor="middle" x="74.56" y="-156.62" font-family="Inter" font-size="10.00" fill="#333333">t[x/u]</text>
|
||||
</g>
|
||||
<!-- start->es -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>start->es</title>
|
||||
<path fill="none" stroke="#333333" d="M150.08,-304.88C146.66,-284.48 139.29,-249.92 125.56,-223.12 118.49,-209.31 108.05,-195.72 98.46,-184.71"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="100.97,-182.27 91.68,-177.18 95.77,-186.96 100.97,-182.27"/>
|
||||
<text text-anchor="middle" x="149.56" y="-238.92" font-family="Inter" font-size="9.00">ESub</text>
|
||||
</g>
|
||||
<!-- pure -->
|
||||
<g id="node4" class="node">
|
||||
<title>pure</title>
|
||||
<ellipse fill="#f3f3f3" stroke="#333333" cx="190.56" cy="-47.56" rx="37.17" ry="18"/>
|
||||
<text text-anchor="middle" x="190.56" y="-45.06" font-family="Inter" font-size="10.00">pure term</text>
|
||||
</g>
|
||||
<!-- start->pure -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>start->pure</title>
|
||||
<path fill="none" stroke="#333333" d="M161.51,-305.79C175.29,-279.58 201.13,-226.11 210.56,-177.12 217.31,-142.07 208.11,-101.31 200.07,-75.24"/>
|
||||
<polygon fill="#333333" stroke="#333333" points="203.39,-74.11 196.98,-65.68 196.73,-76.27 203.39,-74.11"/>
|
||||
<text text-anchor="middle" x="238.06" y="-197.92" font-family="Inter" font-size="9.00">BVar/FVar/Lam</text>
|
||||
</g>
|
||||
<!-- beta->es -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>beta->es</title>
|
||||
<path fill="none" stroke="#990000" d="M74.56,-222.76C74.56,-212.42 74.56,-199.06 74.56,-187.34"/>
|
||||
<polygon fill="#990000" stroke="#990000" points="78.06,-187.17 74.56,-177.17 71.06,-187.17 78.06,-187.17"/>
|
||||
<text text-anchor="middle" x="78.06" y="-197.92" font-family="Inter" font-size="9.00">B</text>
|
||||
</g>
|
||||
<!-- es->es -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>es->es</title>
|
||||
<path fill="none" stroke="#674ea7" d="M101.8,-166.61C111.58,-166.78 119.56,-164.28 119.56,-159.12 119.56,-155.98 116.6,-153.83 112.07,-152.66"/>
|
||||
<polygon fill="#674ea7" stroke="#674ea7" points="112.1,-149.14 101.8,-151.63 111.4,-156.11 112.1,-149.14"/>
|
||||
<text text-anchor="middle" x="160.56" y="-156.92" font-family="Inter" font-size="9.00">R (one occurrence)</text>
|
||||
</g>
|
||||
<!-- es->pure -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>es->pure</title>
|
||||
<path fill="none" stroke="#38761d" d="M101.76,-143.62C111.36,-137.88 121.9,-130.81 130.56,-123.12 147.08,-108.46 162.62,-88.93 173.74,-73.53"/>
|
||||
<polygon fill="#38761d" stroke="#38761d" points="176.85,-75.2 179.76,-65.01 171.13,-71.16 176.85,-75.2"/>
|
||||
<text text-anchor="middle" x="170.56" y="-115.92" font-family="Inter" font-size="9.00">Gc (x not in fv)</text>
|
||||
</g>
|
||||
<!-- nf -->
|
||||
<g id="node5" class="node">
|
||||
<title>nf</title>
|
||||
<ellipse fill="#d9ead3" stroke="#38761d" cx="47.56" cy="-47.56" rx="43.62" ry="43.62"/>
|
||||
<ellipse fill="none" stroke="#38761d" cx="47.56" cy="-47.56" rx="47.62" ry="47.62"/>
|
||||
<text text-anchor="middle" x="47.56" y="-45.06" font-family="Inter" font-size="10.00">normal form</text>
|
||||
</g>
|
||||
<!-- es->nf -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>es->nf</title>
|
||||
<path fill="none" stroke="#674ea7" d="M58.42,-140.84C54.43,-135.54 50.7,-129.43 48.56,-123.12 46.65,-117.47 45.39,-111.43 44.62,-105.33"/>
|
||||
<polygon fill="#674ea7" stroke="#674ea7" points="48.08,-104.73 43.74,-95.06 41.1,-105.32 48.08,-104.73"/>
|
||||
<text text-anchor="middle" x="89.56" y="-115.92" font-family="Inter" font-size="9.00">R/Gc normalisation</text>
|
||||
</g>
|
||||
<!-- pure->pure -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>pure->pure</title>
|
||||
<path fill="none" stroke="#990000" d="M217.49,-60.1C232.18,-62.34 245.65,-58.16 245.65,-47.56 245.65,-39.53 237.92,-35.19 227.77,-34.53"/>
|
||||
<polygon fill="#990000" stroke="#990000" points="227.31,-31.04 217.49,-35.02 227.64,-38.04 227.31,-31.04"/>
|
||||
<text text-anchor="middle" x="279.65" y="-45.36" font-family="Inter" font-size="9.00">B under context</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.0 KiB |
@@ -0,0 +1,272 @@
|
||||
{
|
||||
"paper": {
|
||||
"title": "Milner's Lambda-Calculus with Partial Substitutions",
|
||||
"authors": ["Delia Kesner", "Shane Ó Conchúir"],
|
||||
"url": "https://arxiv.org/abs/2312.13270",
|
||||
"html": "https://arxiv.org/html/2312.13270v1"
|
||||
},
|
||||
"milestones": ["M0", "M1", "M2", "M3", "M4", "M5", "M6"],
|
||||
"current": "M0",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "exec_step",
|
||||
"label": "exec_step",
|
||||
"kind": "infra",
|
||||
"status": "proved",
|
||||
"milestone": "M0",
|
||||
"section": "",
|
||||
"file": "theory/ExecReducer.v",
|
||||
"depends": []
|
||||
},
|
||||
{
|
||||
"id": "exec_examples",
|
||||
"label": "exec_examples",
|
||||
"kind": "infra",
|
||||
"status": "proved",
|
||||
"milestone": "M0",
|
||||
"section": "",
|
||||
"file": "theory/ExecReducer.v",
|
||||
"depends": ["exec_step"]
|
||||
},
|
||||
{
|
||||
"id": "m1_syntax",
|
||||
"label": "M1 syntax/binding",
|
||||
"kind": "infra",
|
||||
"status": "planned",
|
||||
"milestone": "M1",
|
||||
"section": "2",
|
||||
"file": "",
|
||||
"depends": ["exec_examples"]
|
||||
},
|
||||
{
|
||||
"id": "m1_open_close",
|
||||
"label": "open/close laws",
|
||||
"kind": "infra",
|
||||
"status": "planned",
|
||||
"milestone": "M1",
|
||||
"section": "2",
|
||||
"file": "",
|
||||
"depends": ["m1_syntax"]
|
||||
},
|
||||
{
|
||||
"id": "m1_red1",
|
||||
"label": "red1 (B, Gc, R)",
|
||||
"kind": "infra",
|
||||
"status": "planned",
|
||||
"milestone": "M1",
|
||||
"section": "2",
|
||||
"file": "",
|
||||
"depends": ["m1_syntax", "m1_open_close"]
|
||||
},
|
||||
{
|
||||
"id": "lemma_2_1_fv_preserved",
|
||||
"label": "Lemma 2.1 fv preserved",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M2",
|
||||
"section": "2",
|
||||
"file": "",
|
||||
"depends": ["m1_red1"]
|
||||
},
|
||||
{
|
||||
"id": "lemma_2_2_full_comp",
|
||||
"label": "Lemma 2.2 full composition",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M2",
|
||||
"section": "2",
|
||||
"file": "",
|
||||
"depends": ["m1_red1"]
|
||||
},
|
||||
{
|
||||
"id": "lemma_2_3_beta_sim",
|
||||
"label": "Lemma 2.3 β-simulation",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M2",
|
||||
"section": "2",
|
||||
"file": "",
|
||||
"depends": ["m1_red1", "lemma_2_2_full_comp"]
|
||||
},
|
||||
{
|
||||
"id": "m3_measure",
|
||||
"label": "sub measure",
|
||||
"kind": "infra",
|
||||
"status": "planned",
|
||||
"milestone": "M3",
|
||||
"section": "A",
|
||||
"file": "",
|
||||
"depends": ["m1_red1"]
|
||||
},
|
||||
{
|
||||
"id": "m3_termination",
|
||||
"label": "{R,Gc} termination",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M3",
|
||||
"section": "3.1",
|
||||
"file": "",
|
||||
"depends": ["m3_measure"]
|
||||
},
|
||||
{
|
||||
"id": "m3_local_confluence",
|
||||
"label": "{R,Gc} local confluence",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M3",
|
||||
"section": "3.1",
|
||||
"file": "",
|
||||
"depends": ["m3_termination", "m1_red1"]
|
||||
},
|
||||
{
|
||||
"id": "lemma_3_2_sub_nf_unique",
|
||||
"label": "Lemma 3.2 sub NF unique",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M3",
|
||||
"section": "3.1",
|
||||
"file": "",
|
||||
"depends": ["m3_local_confluence"]
|
||||
},
|
||||
{
|
||||
"id": "m4_par",
|
||||
"label": "parallel reduction par",
|
||||
"kind": "infra",
|
||||
"status": "planned",
|
||||
"milestone": "M4",
|
||||
"section": "3.2",
|
||||
"file": "",
|
||||
"depends": ["m1_red1", "lemma_3_2_sub_nf_unique"]
|
||||
},
|
||||
{
|
||||
"id": "m4_par_diamond",
|
||||
"label": "par diamond",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M4",
|
||||
"section": "3.2",
|
||||
"file": "",
|
||||
"depends": ["m4_par"]
|
||||
},
|
||||
{
|
||||
"id": "theorem_confluence_terms",
|
||||
"label": "Confluence on terms",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M4",
|
||||
"section": "3.2",
|
||||
"file": "",
|
||||
"depends": ["m4_par_diamond", "lemma_2_3_beta_sim"]
|
||||
},
|
||||
{
|
||||
"id": "m5_mvar",
|
||||
"label": "XΔ metaterms",
|
||||
"kind": "infra",
|
||||
"status": "planned",
|
||||
"milestone": "M5",
|
||||
"section": "3.3",
|
||||
"file": "",
|
||||
"depends": ["m1_syntax"]
|
||||
},
|
||||
{
|
||||
"id": "m5_rx",
|
||||
"label": "RX rule",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M5",
|
||||
"section": "3.3",
|
||||
"file": "",
|
||||
"depends": ["m5_mvar", "m1_red1"]
|
||||
},
|
||||
{
|
||||
"id": "m5_eq_C",
|
||||
"label": "=C setoid",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M5",
|
||||
"section": "3.3",
|
||||
"file": "",
|
||||
"depends": ["m5_mvar"]
|
||||
},
|
||||
{
|
||||
"id": "m5_coherence",
|
||||
"label": "RX + =C coherence",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M5",
|
||||
"section": "3.3",
|
||||
"file": "",
|
||||
"depends": ["m5_rx", "m5_eq_C", "lemma_3_2_sub_nf_unique"]
|
||||
},
|
||||
{
|
||||
"id": "theorem_confluence_metaterms",
|
||||
"label": "Confluence on metaterms",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M5",
|
||||
"section": "3.3",
|
||||
"file": "",
|
||||
"depends": ["m5_coherence", "m4_par_diamond"]
|
||||
},
|
||||
{
|
||||
"id": "m6_translation",
|
||||
"label": "translation to λβp",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M6",
|
||||
"section": "4",
|
||||
"file": "",
|
||||
"depends": ["m1_red1"]
|
||||
},
|
||||
{
|
||||
"id": "m6_sn",
|
||||
"label": "SN for simply typed",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M6",
|
||||
"section": "6",
|
||||
"file": "",
|
||||
"depends": ["m6_translation"]
|
||||
},
|
||||
{
|
||||
"id": "m6_intersection",
|
||||
"label": "intersection typing",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M6",
|
||||
"section": "6",
|
||||
"file": "",
|
||||
"depends": ["m6_sn"]
|
||||
},
|
||||
{
|
||||
"id": "m6_typable_sn",
|
||||
"label": "typable → SN",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M6",
|
||||
"section": "6",
|
||||
"file": "",
|
||||
"depends": ["m6_intersection"]
|
||||
},
|
||||
{
|
||||
"id": "m6_sn_typable",
|
||||
"label": "SN → typable",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M6",
|
||||
"section": "6",
|
||||
"file": "",
|
||||
"depends": ["m6_typable_sn"]
|
||||
},
|
||||
{
|
||||
"id": "corollary_6_21_psn",
|
||||
"label": "Cor 6.21 PSN",
|
||||
"kind": "paper",
|
||||
"status": "planned",
|
||||
"milestone": "M6",
|
||||
"section": "6",
|
||||
"file": "",
|
||||
"depends": ["m6_sn_typable", "theorem_confluence_terms"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
if ! command -v rocq >/dev/null 2>&1; then
|
||||
if command -v opam >/dev/null 2>&1; then
|
||||
eval "$(opam env --switch=rocq-system --set-switch 2>/dev/null || true)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v rocq >/dev/null 2>&1; then
|
||||
echo "rocq not on PATH; run: eval \$(opam env --switch=rocq-system --set-switch)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fail=0
|
||||
|
||||
echo "== forbidden tokens =="
|
||||
while IFS= read -r -d '' f; do
|
||||
if grep -nE '\b(Admitted|admit|Axiom|Conjecture|native_compute)\b|TODO|FIXME|XXX' "$f"; then
|
||||
echo "forbidden token in $f" >&2
|
||||
fail=1
|
||||
fi
|
||||
done < <(find theory -name '*.v' -print0 2>/dev/null)
|
||||
|
||||
echo "== forbidden Parameter =="
|
||||
while IFS= read -r -d '' f; do
|
||||
if grep -nE '^[[:space:]]*Parameter[[:space:]]' "$f"; then
|
||||
echo "forbidden Parameter in $f" >&2
|
||||
fail=1
|
||||
fi
|
||||
done < <(find theory -name '*.v' -print0 2>/dev/null)
|
||||
|
||||
echo "== Print Assumptions =="
|
||||
mkdir -p /tmp/opencode/audit
|
||||
out="$(rocq compile -o /tmp/opencode/audit/ExecReducer.vo theory/ExecReducer.v 2>&1 || true)"
|
||||
echo "$out"
|
||||
if echo "$out" | grep -q "Axioms:"; then
|
||||
echo "unexpected axioms reported" >&2
|
||||
fail=1
|
||||
fi
|
||||
if ! echo "$out" | grep -q "Closed under the global context"; then
|
||||
echo "no Closed-under-global-context report found" >&2
|
||||
fail=1
|
||||
fi
|
||||
|
||||
if [ "$fail" -ne 0 ]; then
|
||||
echo "AUDIT FAIL"
|
||||
exit 1
|
||||
fi
|
||||
echo "AUDIT OK"
|
||||
Executable
+180
@@ -0,0 +1,180 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
GRAPH_DIR = os.path.join(ROOT, "graphs")
|
||||
META = os.path.join(GRAPH_DIR, "theorems.json")
|
||||
|
||||
STATUS_FILL = {
|
||||
"proved": "#d9ead3",
|
||||
"stated": "#fff2cc",
|
||||
"planned": "#f3f3f3",
|
||||
"blocked": "#f4cccc",
|
||||
}
|
||||
STATUS_PEN = {
|
||||
"proved": "#38761d",
|
||||
"stated": "#b45f06",
|
||||
"planned": "#777777",
|
||||
"blocked": "#cc0000",
|
||||
}
|
||||
STATUS_STYLE = {
|
||||
"proved": "filled",
|
||||
"stated": "filled,dashed",
|
||||
"planned": "dashed",
|
||||
"blocked": "filled,bold",
|
||||
}
|
||||
INK = "#333333"
|
||||
RULE_B = "#990000"
|
||||
RULE_R = "#674ea7"
|
||||
RULE_G = "#38761d"
|
||||
|
||||
|
||||
def q(s):
|
||||
return '"' + str(s).replace("\\", "\\\\").replace('"', '\\"') + '"'
|
||||
|
||||
|
||||
def load():
|
||||
with open(META, "r", encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
|
||||
|
||||
def dependency_dot(data):
|
||||
nodes = data["nodes"]
|
||||
by_id = {n["id"]: n for n in nodes}
|
||||
title = data["paper"]["title"] + " - theorem dependency (" + data["current"] + ")"
|
||||
lines = [
|
||||
"digraph theorem_deps {",
|
||||
" rankdir=LR;",
|
||||
" bgcolor=\"white\";",
|
||||
" node [fontname=Inter, fontsize=10, fontcolor=\"%s\"];" % INK,
|
||||
" edge [fontname=Inter, fontsize=8, color=\"%s\"];" % INK,
|
||||
" graph [fontname=Inter, fontsize=12, labelloc=t, label=%s];" % q(title),
|
||||
]
|
||||
for ms in data["milestones"]:
|
||||
members = [n for n in nodes if n["milestone"] == ms]
|
||||
if not members:
|
||||
continue
|
||||
lines.append(" subgraph cluster_%s {" % ms)
|
||||
lines.append(" label=%s;" % q(ms))
|
||||
lines.append(" style=\"rounded\";")
|
||||
lines.append(" color=\"#bbbbbb\";")
|
||||
lines.append(" fontcolor=\"%s\";" % INK)
|
||||
for n in members:
|
||||
fill = STATUS_FILL.get(n["status"], "#f3f3f3")
|
||||
pen = STATUS_PEN.get(n["status"], "#777777")
|
||||
style = STATUS_STYLE.get(n["status"], "dashed")
|
||||
tip = n["id"]
|
||||
if n.get("section"):
|
||||
tip += " (section " + n["section"] + ")"
|
||||
if n.get("file"):
|
||||
tip += " " + n["file"]
|
||||
tip += " " + data["paper"]["html"]
|
||||
attrs = [
|
||||
"label=%s" % q(n["label"]),
|
||||
"color=%s" % q(pen),
|
||||
"fillcolor=%s" % q(fill),
|
||||
"style=%s" % q(style),
|
||||
"fontcolor=%s" % q(INK),
|
||||
"tooltip=%s" % q(tip),
|
||||
"shape=%s" % ("box" if n["kind"] == "paper" else "ellipse"),
|
||||
]
|
||||
lines.append(" %s [%s];" % (n["id"], ", ".join(attrs)))
|
||||
lines.append(" }")
|
||||
for n in nodes:
|
||||
for d in n.get("depends", []):
|
||||
if d in by_id:
|
||||
lines.append(" %s -> %s;" % (d, n["id"]))
|
||||
lines.append("}")
|
||||
return "\n".join(lines) + "\n"
|
||||
|
||||
|
||||
def rules_dot():
|
||||
box = 'shape=box, style="rounded,filled", fillcolor="#f5f5f5", color="%s", fontcolor="%s"' % (INK, INK)
|
||||
lines = [
|
||||
"digraph lambda_sub_cfg {",
|
||||
" rankdir=TB;",
|
||||
" bgcolor=\"white\";",
|
||||
" node [fontname=Inter, fontsize=10];",
|
||||
" edge [fontname=Inter, fontsize=9, color=\"%s\"];" % INK,
|
||||
" start [label=\"term\", shape=oval, style=filled, fillcolor=\"#f3f3f3\", color=\"%s\"];" % INK,
|
||||
" beta [label=\"(lambda x. t) u\", %s];" % box,
|
||||
" es [label=\"t[x/u]\", %s];" % box,
|
||||
" pure [label=\"pure term\", shape=oval, style=filled, fillcolor=\"#f3f3f3\", color=\"%s\"];" % INK,
|
||||
" nf [label=\"normal form\", shape=doublecircle, style=filled, fillcolor=\"#d9ead3\", color=\"%s\"];" % RULE_G,
|
||||
" start -> beta [label=\"App(Lam,_)\"];",
|
||||
" start -> es [label=\"ESub\"];",
|
||||
" start -> pure [label=\"BVar/FVar/Lam\"];",
|
||||
" beta -> es [label=\"B\", color=\"%s\"];" % RULE_B,
|
||||
" es -> es [label=\"R (one occurrence)\", color=\"%s\"];" % RULE_R,
|
||||
" es -> pure [label=\"Gc (x not in fv)\", color=\"%s\"];" % RULE_G,
|
||||
" pure -> pure [label=\"B under context\", color=\"%s\"];" % RULE_B,
|
||||
" es -> nf [label=\"R/Gc normalisation\", color=\"%s\"];" % RULE_R,
|
||||
"}",
|
||||
]
|
||||
return "\n".join(lines) + "\n"
|
||||
|
||||
|
||||
def reduction_dot():
|
||||
box = 'shape=box, style="filled", fillcolor="#f5f5f5", color="%s", fontcolor="%s"' % (INK, INK)
|
||||
lines = [
|
||||
"digraph reduction_dup {",
|
||||
" rankdir=LR;",
|
||||
" bgcolor=\"white\";",
|
||||
" node [fontname=Inter, fontsize=10];",
|
||||
" edge [fontname=Inter, fontsize=9, color=\"%s\"];" % INK,
|
||||
" graph [labelloc=t, fontcolor=\"%s\", label=\"(lambda x. x x) y reduction graph\"];" % INK,
|
||||
" n0 [label=\"(lambda x. x x) y\", %s];" % box,
|
||||
" n1 [label=\"(x x)[x/y]\", %s];" % box,
|
||||
" n2 [label=\"(y x)[x/y]\", %s];" % box,
|
||||
" n2b [label=\"(x y)[x/y]\", %s];" % box,
|
||||
" n3 [label=\"(y y)[x/y]\", %s];" % box,
|
||||
" nf [label=\"y y (normal form)\", shape=doublecircle, style=filled, fillcolor=\"#d9ead3\", color=\"%s\", fontcolor=\"%s\"];" % (RULE_G, INK),
|
||||
" n0 -> n1 [label=\"B\", color=\"%s\"];" % RULE_B,
|
||||
" n1 -> n2 [label=\"R\", color=\"%s\"];" % RULE_R,
|
||||
" n1 -> n2b [label=\"R\", color=\"%s\"];" % RULE_R,
|
||||
" n2 -> n3 [label=\"R\", color=\"%s\"];" % RULE_R,
|
||||
" n2b -> n3 [label=\"R\", color=\"%s\"];" % RULE_R,
|
||||
" n3 -> nf [label=\"Gc\", color=\"%s\"];" % RULE_G,
|
||||
" {rank=same; n2; n2b;}",
|
||||
"}",
|
||||
]
|
||||
return "\n".join(lines) + "\n"
|
||||
|
||||
|
||||
def run_dot(path):
|
||||
svg = path[:-4] + ".svg"
|
||||
png = path[:-4] + ".png"
|
||||
ok = True
|
||||
for fmt, out in (("svg", svg), ("png", png)):
|
||||
r = subprocess.run(["dot", "-T" + fmt, path, "-o", out], capture_output=True, text=True)
|
||||
if r.returncode != 0:
|
||||
print(r.stderr, file=sys.stderr)
|
||||
ok = False
|
||||
else:
|
||||
print("wrote", os.path.relpath(out, ROOT))
|
||||
return ok
|
||||
|
||||
|
||||
def main():
|
||||
data = load()
|
||||
outputs = {
|
||||
"dependency.dot": dependency_dot(data),
|
||||
"rules.dot": rules_dot(),
|
||||
"reduction.dot": reduction_dot(),
|
||||
}
|
||||
ok = True
|
||||
for name, text in outputs.items():
|
||||
p = os.path.join(GRAPH_DIR, name)
|
||||
with open(p, "w", encoding="utf-8") as f:
|
||||
f.write(text)
|
||||
print("wrote", os.path.relpath(p, ROOT))
|
||||
if not run_dot(p):
|
||||
ok = False
|
||||
return 0 if ok else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -0,0 +1,272 @@
|
||||
From Stdlib Require Import List Bool PeanoNat Lia.
|
||||
Import ListNotations.
|
||||
|
||||
Definition atom := nat.
|
||||
|
||||
Inductive trm : Type :=
|
||||
| BVar : nat -> trm
|
||||
| FVar : atom -> trm
|
||||
| App : trm -> trm -> trm
|
||||
| Lam : trm -> trm
|
||||
| ESub : trm -> trm -> trm.
|
||||
|
||||
Fixpoint fvs (t : trm) : list atom :=
|
||||
match t with
|
||||
| BVar _ => []
|
||||
| FVar x => [x]
|
||||
| App t1 t2 => fvs t1 ++ fvs t2
|
||||
| Lam t1 => fvs t1
|
||||
| ESub t1 t2 => fvs t1 ++ fvs t2
|
||||
end.
|
||||
|
||||
Definition in_fvs (x : atom) (t : trm) : bool :=
|
||||
existsb (Nat.eqb x) (fvs t).
|
||||
|
||||
Fixpoint lift (k : nat) (t : trm) : trm :=
|
||||
match t with
|
||||
| BVar n => if Nat.ltb n k then BVar n else BVar (S n)
|
||||
| FVar x => FVar x
|
||||
| App t1 t2 => App (lift k t1) (lift k t2)
|
||||
| Lam t1 => Lam (lift (S k) t1)
|
||||
| ESub t1 t2 => ESub (lift (S k) t1) (lift k t2)
|
||||
end.
|
||||
|
||||
Fixpoint open_rec (k : nat) (u : trm) (t : trm) : trm :=
|
||||
match t with
|
||||
| BVar n => if Nat.eqb n k then lift k u else BVar n
|
||||
| FVar x => FVar x
|
||||
| App t1 t2 => App (open_rec k u t1) (open_rec k u t2)
|
||||
| Lam t1 => Lam (open_rec (S k) u t1)
|
||||
| ESub t1 t2 => ESub (open_rec (S k) u t1) (open_rec k u t2)
|
||||
end.
|
||||
|
||||
Fixpoint close_rec (x : atom) (k : nat) (t : trm) : trm :=
|
||||
match t with
|
||||
| BVar n => BVar n
|
||||
| FVar y => if Nat.eqb y x then BVar k else FVar y
|
||||
| App t1 t2 => App (close_rec x k t1) (close_rec x k t2)
|
||||
| Lam t1 => Lam (close_rec x (S k) t1)
|
||||
| ESub t1 t2 => ESub (close_rec x (S k) t1) (close_rec x k t2)
|
||||
end.
|
||||
|
||||
Definition subst (x : atom) (u t : trm) : trm :=
|
||||
open_rec 0 u (close_rec x 0 t).
|
||||
|
||||
Fixpoint occurs (n : nat) (t : trm) : bool :=
|
||||
match t with
|
||||
| BVar m => Nat.eqb m n
|
||||
| FVar _ => false
|
||||
| App t1 t2 => occurs n t1 || occurs n t2
|
||||
| Lam t1 => occurs (S n) t1
|
||||
| ESub t1 t2 => occurs (S n) t1 || occurs n t2
|
||||
end.
|
||||
|
||||
Definition occurs0 (t : trm) : bool := occurs 0 t.
|
||||
|
||||
Inductive rule : Type := RB | RGc | RR.
|
||||
|
||||
Definition rule_eqb (r s : rule) : bool :=
|
||||
match r, s with
|
||||
| RB, RB => true
|
||||
| RGc, RGc => true
|
||||
| RR, RR => true
|
||||
| _, _ => false
|
||||
end.
|
||||
|
||||
Inductive zctx : Type :=
|
||||
| ZTop : zctx
|
||||
| ZAppL : zctx -> trm -> zctx
|
||||
| ZAppR : trm -> zctx -> zctx
|
||||
| ZLam : zctx -> zctx
|
||||
| ZESubL : zctx -> trm -> zctx
|
||||
| ZESubR : trm -> zctx -> zctx.
|
||||
|
||||
Fixpoint zplug (C : zctx) (k : nat) (t : trm) : trm :=
|
||||
match C with
|
||||
| ZTop => t
|
||||
| ZAppL C1 u => App (zplug C1 k t) u
|
||||
| ZAppR u C1 => App u (zplug C1 k t)
|
||||
| ZLam C1 => Lam (zplug C1 (S k) t)
|
||||
| ZESubL C1 u => ESub (zplug C1 (S k) t) u
|
||||
| ZESubR t1 C1 => ESub t1 (zplug C1 k t)
|
||||
end.
|
||||
|
||||
Fixpoint zplug_lift (C : zctx) (k : nat) (t : trm) : trm :=
|
||||
match C with
|
||||
| ZTop => lift k t
|
||||
| ZAppL C1 u => App (zplug_lift C1 k t) u
|
||||
| ZAppR u C1 => App u (zplug_lift C1 k t)
|
||||
| ZLam C1 => Lam (zplug_lift C1 (S k) t)
|
||||
| ZESubL C1 u => ESub (zplug_lift C1 (S k) t) u
|
||||
| ZESubR t1 C1 => ESub t1 (zplug_lift C1 k t)
|
||||
end.
|
||||
|
||||
Fixpoint zdecs (t : trm) (k : nat) : list zctx :=
|
||||
match t with
|
||||
| BVar n => if Nat.eqb n k then [ZTop] else []
|
||||
| FVar _ => []
|
||||
| App t1 t2 =>
|
||||
map (fun C => ZAppL C t2) (zdecs t1 k)
|
||||
++ map (fun C => ZAppR t1 C) (zdecs t2 k)
|
||||
| Lam t1 => map ZLam (zdecs t1 (S k))
|
||||
| ESub t1 t2 =>
|
||||
map (fun C => ZESubL C t2) (zdecs t1 (S k))
|
||||
++ map (fun C => ZESubR t1 C) (zdecs t2 k)
|
||||
end.
|
||||
|
||||
Definition root_steps (t : trm) : list (rule * trm) :=
|
||||
match t with
|
||||
| App (Lam body) u => [(RB, ESub body u)]
|
||||
| ESub body u =>
|
||||
(if occurs0 body then [] else [(RGc, body)])
|
||||
++ map (fun C => (RR, ESub (zplug_lift C 0 u) u)) (zdecs body 0)
|
||||
| _ => []
|
||||
end.
|
||||
|
||||
Inductive ctx : Type :=
|
||||
| GHole : ctx
|
||||
| GAppL : ctx -> trm -> ctx
|
||||
| GAppR : trm -> ctx -> ctx
|
||||
| GLam : ctx -> ctx
|
||||
| GESubL : ctx -> trm -> ctx
|
||||
| GESubR : trm -> ctx -> ctx.
|
||||
|
||||
Fixpoint plug (C : ctx) (t : trm) : trm :=
|
||||
match C with
|
||||
| GHole => t
|
||||
| GAppL C1 u => App (plug C1 t) u
|
||||
| GAppR u C1 => App u (plug C1 t)
|
||||
| GLam C1 => Lam (plug C1 t)
|
||||
| GESubL C1 u => ESub (plug C1 t) u
|
||||
| GESubR t1 C1 => ESub t1 (plug C1 t)
|
||||
end.
|
||||
|
||||
Fixpoint positions (t : trm) : list ctx :=
|
||||
GHole ::
|
||||
match t with
|
||||
| BVar _ => []
|
||||
| FVar _ => []
|
||||
| App t1 t2 =>
|
||||
map (fun C => GAppL C t2) (positions t1)
|
||||
++ map (fun C => GAppR t1 C) (positions t2)
|
||||
| Lam t1 => map GLam (positions t1)
|
||||
| ESub t1 t2 =>
|
||||
map (fun C => GESubL C t2) (positions t1)
|
||||
++ map (fun C => GESubR t1 C) (positions t2)
|
||||
end.
|
||||
|
||||
Fixpoint at_ctx (C : ctx) (t : trm) : option trm :=
|
||||
match C, t with
|
||||
| GHole, t => Some t
|
||||
| GAppL C1 _, App t1 _ => at_ctx C1 t1
|
||||
| GAppR _ C2, App _ t2 => at_ctx C2 t2
|
||||
| GLam C1, Lam t1 => at_ctx C1 t1
|
||||
| GESubL C1 _, ESub t1 _ => at_ctx C1 t1
|
||||
| GESubR _ C2, ESub _ t2 => at_ctx C2 t2
|
||||
| _, _ => None
|
||||
end.
|
||||
|
||||
Definition step_at (C : ctx) (t : trm) : list (rule * trm) :=
|
||||
match at_ctx C t with
|
||||
| None => []
|
||||
| Some s => map (fun p => (fst p, plug C (snd p))) (root_steps s)
|
||||
end.
|
||||
|
||||
Definition steps (t : trm) : list (rule * trm) :=
|
||||
flat_map (fun C => step_at C t) (positions t).
|
||||
|
||||
Definition has_rule (r : rule) (l : list (rule * trm)) : bool :=
|
||||
existsb (fun p => rule_eqb r (fst p)) l.
|
||||
|
||||
Definition count_rule (r : rule) (l : list (rule * trm)) : nat :=
|
||||
length (filter (fun p => rule_eqb r (fst p)) l).
|
||||
|
||||
Definition normal_form (t : trm) : bool :=
|
||||
match steps t with [] => true | _ => false end.
|
||||
|
||||
Definition ex_id : trm := App (Lam (BVar 0)) (FVar 1).
|
||||
Definition ex_dup : trm := App (Lam (App (BVar 0) (BVar 0))) (FVar 1).
|
||||
Definition ex_dup_es : trm := ESub (App (BVar 0) (BVar 0)) (FVar 1).
|
||||
Definition ex_es : trm := ESub (BVar 0) (FVar 1).
|
||||
Definition ex_gc : trm := ESub (FVar 2) (FVar 1).
|
||||
Definition ex_nested : trm := ESub (ESub (BVar 0) (FVar 1)) (FVar 2).
|
||||
|
||||
Example ex_id_beta : has_rule RB (steps ex_id) = true.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_id_one_step : length (steps ex_id) = 1.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_dup_beta : has_rule RB (steps ex_dup) = true.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_dup_es_two_R : count_rule RR (steps ex_dup_es) = 2.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_dup_es_no_Gc : has_rule RGc (steps ex_dup_es) = false.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_es_R : has_rule RR (steps ex_es) = true.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_es_no_Gc : has_rule RGc (steps ex_es) = false.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_gc_gc : has_rule RGc (steps ex_gc) = true.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_gc_no_R : has_rule RR (steps ex_gc) = false.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_nested_has_gc : has_rule RGc (steps ex_nested) = true.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example ex_id_terminates : normal_form (plug GHole (FVar 5)) = true.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example fvs_lam : fvs (Lam (App (BVar 0) (FVar 1))) = [1].
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example fvs_es : fvs (ESub (FVar 0) (FVar 1)) = [0; 1].
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example occurs0_lam : occurs0 (Lam (BVar 0)) = false.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example occurs0_bvar : occurs0 (BVar 0) = true.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example open_basic : open_rec 0 (FVar 1) (BVar 0) = FVar 1.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example open_under_lam : open_rec 0 (FVar 1) (Lam (BVar 1)) = Lam (FVar 1).
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example subst_hit : subst 0 (FVar 1) (FVar 0) = FVar 1.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example subst_miss : subst 0 (FVar 1) (FVar 2) = FVar 2.
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example capture_avoid_1 :
|
||||
subst 0 (FVar 1) (Lam (BVar 0)) = Lam (BVar 0).
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example capture_avoid_2 :
|
||||
subst 0 (FVar 1) (Lam (App (BVar 0) (FVar 0)))
|
||||
= Lam (App (BVar 0) (FVar 1)).
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Example capture_avoid_es :
|
||||
subst 0 (FVar 1) (ESub (FVar 0) (FVar 2))
|
||||
= ESub (FVar 1) (FVar 2).
|
||||
Proof. reflexivity. Qed.
|
||||
|
||||
Print Assumptions ex_id_beta.
|
||||
Print Assumptions ex_dup_es_two_R.
|
||||
Print Assumptions ex_gc_gc.
|
||||
Print Assumptions ex_nested_has_gc.
|
||||
Print Assumptions capture_avoid_1.
|
||||
Print Assumptions capture_avoid_2.
|
||||
Print Assumptions capture_avoid_es.
|
||||
Print Assumptions open_under_lam.
|
||||
@@ -0,0 +1,3 @@
|
||||
(rocq.theory
|
||||
(name LambdaSub)
|
||||
(theories Stdlib))
|
||||
Reference in new issue
Block a user