Loading Lion artifact…
Inspect Lion Program Source (JSON)
[
  "begin",
  [
    "relation",
    "ctrl",
    [
      "k",
      "v"
    ],
    {
      "key": [
        "k"
      ]
    }
  ],
  [
    "fact",
    [
      "ctrl",
      "deposit",
      25
    ],
    [
      "ctrl",
      "k_bound",
      3
    ]
  ],
  [
    "define",
    "view",
    [
      "lambda",
      [],
      [
        "begin",
        [
          "define",
          "dep",
          [
            "array/head",
            [
              "find",
              "?v",
              [
                "ctrl",
                "deposit",
                "?v"
              ]
            ]
          ]
        ],
        [
          "define",
          "kb",
          [
            "array/head",
            [
              "find",
              "?v",
              [
                "ctrl",
                "k_bound",
                "?v"
              ]
            ]
          ]
        ],
        [
          "define",
          "arr_proof",
          [
            "proof/smt",
            [
              "array/make",
              "and",
              [
                "array/make",
                "=",
                "ledger2",
                [
                  "array/make",
                  "store",
                  "ledger1",
                  "acct",
                  "dep"
                ]
              ],
              [
                "quote",
                [
                  "<=",
                  "acct",
                  "q"
                ]
              ],
              [
                "quote",
                [
                  "<=",
                  "q",
                  "acct"
                ]
              ],
              [
                "array/make",
                "<",
                [
                  "quote",
                  [
                    "select",
                    "ledger2",
                    "q"
                  ]
                ],
                "dep"
              ]
            ]
          ]
        ],
        [
          "define",
          "pipe_proof",
          [
            "proof/invariant",
            {
              "init": [
                "lambda",
                [
                  "s"
                ],
                [
                  "and",
                  [
                    "=",
                    [
                      "object/get",
                      "s",
                      "staged"
                    ],
                    "dep"
                  ],
                  [
                    "=",
                    [
                      "object/get",
                      "s",
                      "committed"
                    ],
                    "dep"
                  ]
                ]
              ],
              "invariant": [
                "lambda",
                [
                  "s"
                ],
                [
                  "number/greaterThanOrEqualTo",
                  [
                    "object/get",
                    "s",
                    "committed"
                  ],
                  "dep"
                ]
              ],
              "k": "kb",
              "next": [
                "lambda",
                [
                  "s",
                  "s2"
                ],
                [
                  "and",
                  [
                    "=",
                    [
                      "object/get",
                      "s2",
                      "staged"
                    ],
                    [
                      "number/add",
                      "dep",
                      10
                    ]
                  ],
                  [
                    "=",
                    [
                      "object/get",
                      "s2",
                      "committed"
                    ],
                    [
                      "object/get",
                      "s",
                      "staged"
                    ]
                  ]
                ]
              ],
              "vars": {
                "committed": "value/integer?",
                "staged": "value/integer?"
              }
            }
          ]
        ],
        [
          "define",
          "bmc_ce",
          [
            "proof/bmc",
            {
              "depth": 4,
              "init": [
                "lambda",
                [
                  "s"
                ],
                [
                  "and",
                  [
                    "=",
                    [
                      "object/get",
                      "s",
                      "inflight"
                    ],
                    0
                  ],
                  [
                    "=",
                    [
                      "object/get",
                      "s",
                      "cap"
                    ],
                    2
                  ]
                ]
              ],
              "next": [
                "lambda",
                [
                  "s",
                  "s2"
                ],
                [
                  "and",
                  [
                    "=",
                    [
                      "object/get",
                      "s2",
                      "inflight"
                    ],
                    [
                      "number/add",
                      [
                        "object/get",
                        "s",
                        "inflight"
                      ],
                      1
                    ]
                  ],
                  [
                    "=",
                    [
                      "object/get",
                      "s2",
                      "cap"
                    ],
                    [
                      "object/get",
                      "s",
                      "cap"
                    ]
                  ]
                ]
              ],
              "property": [
                "lambda",
                [
                  "s"
                ],
                [
                  "number/lessThan",
                  [
                    "object/get",
                    "s",
                    "inflight"
                  ],
                  [
                    "object/get",
                    "s",
                    "cap"
                  ]
                ]
              ],
              "vars": {
                "cap": "value/integer?",
                "inflight": "value/integer?"
              }
            }
          ]
        ],
        [
          "ui/stack",
          {
            "gap": "lg"
          },
          [
            "ui/hero",
            {
              "badges": [
                "quote",
                [
                  {
                    "label": "QF_AUFLIA Arrays",
                    "tone": "ok"
                  },
                  {
                    "label": "Automated k-Induction",
                    "tone": "ok"
                  },
                  {
                    "label": "Symbolic BMC",
                    "tone": "accent"
                  }
                ]
              ],
              "eyebrow": "Lion Formal Verification Artifact",
              "subtitle": "Interactive verification dashboard for a two-stage replicated escrow ledger. Drag the sliders to re-run SMT and k-induction live in your browser.",
              "title": "Verified Replicated Escrow Protocol"
            }
          ],
          [
            "ui/section",
            {
              "badge": "Live In-Browser Prover",
              "step": "01",
              "subtitle": "Drag either slider to re-run QF_AUFLIA array SMT and k-induction instantaneously in your browser. Setting k=1 intentionally shows why 1-induction alone is too weak.",
              "title": "Tune Protocol Parameters & Induction Depth",
              "tone": "accent"
            },
            [
              "ui/card",
              [
                "ui/grid",
                {
                  "cols": 2,
                  "gap": "md"
                },
                [
                  "ui/slider",
                  {
                    "label": "Initial Escrow Deposit Floor",
                    "max": 200,
                    "min": 0,
                    "onChange": [
                      "quote",
                      [
                        "fact",
                        [
                          "ctrl",
                          "deposit",
                          "value"
                        ]
                      ]
                    ],
                    "step": 5,
                    "value": "dep"
                  }
                ],
                [
                  "ui/slider",
                  {
                    "label": "k-Induction Depth Limit (1 fails, >= 2 proves)",
                    "max": 5,
                    "min": 1,
                    "onChange": [
                      "quote",
                      [
                        "fact",
                        [
                          "ctrl",
                          "k_bound",
                          "value"
                        ]
                      ]
                    ],
                    "step": 1,
                    "value": "kb"
                  }
                ]
              ]
            ]
          ],
          [
            "ui/section",
            {
              "step": "02",
              "subtitle": "Deposits enter the Staged WAL on step t and commit to the replicated ledger on step t+1, requiring k >= 2 induction to prove safety.",
              "title": "Two-Stage Quorum Commit Pipeline"
            },
            [
              "ui/graph",
              {
                "edges": [
                  "quote",
                  [
                    {
                      "from": "client",
                      "label": "deposit",
                      "to": "staged",
                      "tone": "accent"
                    },
                    {
                      "from": "staged",
                      "label": "quorum_wal",
                      "to": "committed",
                      "tone": "ok"
                    },
                    {
                      "from": "committed",
                      "label": "prolly_sync",
                      "to": "replica",
                      "tone": "ok"
                    }
                  ]
                ],
                "height": 200,
                "layout": "layered",
                "nodes": [
                  "quote",
                  [
                    {
                      "group": "ingress",
                      "id": "client",
                      "label": "Client Deposit",
                      "subtitle": "amount >= floor"
                    },
                    {
                      "group": "wal",
                      "id": "staged",
                      "label": "Staged WAL",
                      "subtitle": "stage 1",
                      "tone": "accent"
                    },
                    {
                      "group": "state",
                      "id": "committed",
                      "label": "Committed Ledger",
                      "subtitle": "stage 2",
                      "tone": "ok"
                    },
                    {
                      "group": "peer",
                      "id": "replica",
                      "label": "Peer Replica",
                      "subtitle": "Prolly sync",
                      "tone": "ok"
                    }
                  ]
                ],
                "title": "Replicated Escrow State Machine"
              }
            ]
          ],
          [
            "ui/section",
            {
              "step": "03",
              "subtitle": "Every green badge is independently checked by Lion's small proof/valid? kernel without trusting the solver.",
              "title": "Live Kernel-Verified Certificates & Counterexample Trace"
            },
            [
              "ui/grid",
              {
                "cols": 3,
                "gap": "md"
              },
              [
                "ui/proof",
                {
                  "summary": "Proves reading back the written escrow account never drops below deposit floor.",
                  "title": "Array Ledger Read-over-Write (proof/smt)",
                  "valid": [
                    "proof/valid?",
                    [
                      "object/get",
                      "arr_proof",
                      "proof"
                    ]
                  ]
                },
                "arr_proof"
              ],
              [
                "ui/proof",
                {
                  "summary": "Fails at k=1; automatically proved at k=2 with kernel-verified k-induction certificate.",
                  "title": "2-Stage Pipeline Invariant (proof/invariant)",
                  "valid": [
                    "cond",
                    [
                      [
                        "object/get",
                        "pipe_proof",
                        "proved"
                      ],
                      [
                        "proof/valid?",
                        [
                          "object/get",
                          "pipe_proof",
                          "proof"
                        ]
                      ]
                    ],
                    [
                      "else",
                      false
                    ]
                  ]
                },
                "pipe_proof"
              ],
              [
                "ui/proof",
                {
                  "summary": "Unrolls symbolic transitions to expose an unbounded in-flight overflow at depth 2.",
                  "title": "In-Flight Cap Violation (proof/bmc)",
                  "valid": false
                },
                "bmc_ce"
              ]
            ]
          ]
        ]
      ]
    ],
    {
      "persist": true
    }
  ],
  [
    "view"
  ]
]