# RLang Execution Dataset (Version 1)

This document contains pure execution logs for RLang programs.
No analysis. No abstraction. Only empirical execution data.

## Program 1 (Simplest Pipeline)

### RLang Source

```
fn inc(x: Int) -> Int;

pipeline main(Int) -> Int { inc }
```

### Test Inputs

- Input 1: `0`
- Input 2: `5`
- Input 3: `10`
- Input 4: `100`
- Input 5: `-5`

#### Input 1 = `-5`

**Output Value:**
```json
-4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `06c6dec70e47612979bc2429cc5de6060089ce9da60b390c583a53fe43197cad`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": -5,
    "output": -4
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `33d6dd5f43ee58e80aea4c825d77cff5cc6c4698d829f7af0d325b94df7af08e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": -5,
  "output": -4,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": -5,
      "output": -4
    }
  ],
  "branches": []
}
```

#### Input 2 = `0`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `fe4a2dcb8749f3c466f9756f7ed10edfa97cdb61dfd0563258615005d2fd45cc`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 0,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `4f0f887a6c4ccbfb047aa2dcb70c1a8b6f21fe38270610558413da2c79baf2f9`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 0,
      "output": 1
    }
  ],
  "branches": []
}
```

#### Input 3 = `5`

**Output Value:**
```json
6
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `4391f47ae7f058e6f7f45eae68e8e822f43805e7600076574f312258b768de26`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 5,
    "output": 6
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `9e83e0f2b5c573275fbe537c7c342f63dc7ab86299b524cdecf2ea01f14dccff`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 6,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 5,
      "output": 6
    }
  ],
  "branches": []
}
```

#### Input 4 = `10`

**Output Value:**
```json
11
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `92331ffb913e6b0d9118ece6a32f29f059128d59af0748e3724465bf355f1cf0`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 10,
    "output": 11
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `e0625123a5c6aa17426fe8af58023784f9a6bef34fae062b6bcfabb2d733e01e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 11,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 10,
      "output": 11
    }
  ],
  "branches": []
}
```

#### Input 5 = `100`

**Output Value:**
```json
101
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `c05d07b427ce4744b29756a53a3cfb8fe4398764dc954b4405c290105af3e936`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 100,
    "output": 101
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `16cb15c7ca4d551c85c623eb7c23e3292f210be2e1b09ec5885109a99cbf96a9`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 100,
  "output": 101,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 100,
      "output": 101
    }
  ],
  "branches": []
}
```

---

## Program 2 (2-Step Pipeline)

### RLang Source

```
fn inc(x: Int) -> Int;
fn double(x: Int) -> Int;

pipeline main(Int) -> Int { inc -> double }
```

### Test Inputs

- Input 1: `0`
- Input 2: `5`
- Input 3: `10`
- Input 4: `20`
- Input 5: `-3`

#### Input 1 = `-3`

**Output Value:**
```json
-4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "double",
          "template_id": "fn:double",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `0c5a4fc98706dd263b172cbc87d7d32908f681a8ff02dccbbc8c3c60273d2199`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": -3,
    "output": -2
  },
  {
    "index": 1,
    "step_name": "double",
    "template_id": "fn:double",
    "input": -2,
    "output": -4
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `468840d2501ae536f66831632e7403d7b04f8b2ec2ac358e6d9e05db5143209e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "double",
            "template_id": "fn:double",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": -3,
  "output": -4,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": -3,
      "output": -2
    },
    {
      "index": 1,
      "step_name": "double",
      "template_id": "fn:double",
      "input": -2,
      "output": -4
    }
  ],
  "branches": []
}
```

#### Input 2 = `0`

**Output Value:**
```json
2
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "double",
          "template_id": "fn:double",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `a57c80c05f480df2ab0b8733833958b5eaae922e98c80b5d2dc2e6b5ac017eeb`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 0,
    "output": 1
  },
  {
    "index": 1,
    "step_name": "double",
    "template_id": "fn:double",
    "input": 1,
    "output": 2
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `200e8432517513464758e4799b3e5a8fbb7a049e24fd8fe5e5fbe3aece5064bc`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "double",
            "template_id": "fn:double",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 2,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 0,
      "output": 1
    },
    {
      "index": 1,
      "step_name": "double",
      "template_id": "fn:double",
      "input": 1,
      "output": 2
    }
  ],
  "branches": []
}
```

#### Input 3 = `5`

**Output Value:**
```json
12
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "double",
          "template_id": "fn:double",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `1a03168af9eff3b72c9f991ea4fd8a32b96bc53d2c708fe63f23512eddbd59d4`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 5,
    "output": 6
  },
  {
    "index": 1,
    "step_name": "double",
    "template_id": "fn:double",
    "input": 6,
    "output": 12
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `0a2ac417dc8e42c8b262fe686946d2c6db44c140451da2622fb14e9a894419a2`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "double",
            "template_id": "fn:double",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 12,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 5,
      "output": 6
    },
    {
      "index": 1,
      "step_name": "double",
      "template_id": "fn:double",
      "input": 6,
      "output": 12
    }
  ],
  "branches": []
}
```

#### Input 4 = `10`

**Output Value:**
```json
22
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "double",
          "template_id": "fn:double",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `eb8798eee5172451ddc9fd74fbe18d075eb9fb07cdf02a5a7efbb005eb8a2e1e`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 10,
    "output": 11
  },
  {
    "index": 1,
    "step_name": "double",
    "template_id": "fn:double",
    "input": 11,
    "output": 22
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `ccc58c8d9b8035962c9e5a52127108e3cbc3c730e64304ffd36591881c00a7c0`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "double",
            "template_id": "fn:double",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 22,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 10,
      "output": 11
    },
    {
      "index": 1,
      "step_name": "double",
      "template_id": "fn:double",
      "input": 11,
      "output": 22
    }
  ],
  "branches": []
}
```

#### Input 5 = `20`

**Output Value:**
```json
42
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "inc",
          "template_id": "fn:inc",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "double",
          "template_id": "fn:double",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `230cb474d264161075c8d8c5a20efddb0cb311f2ec9ca9513aa53195c43f129b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 20,
    "output": 21
  },
  {
    "index": 1,
    "step_name": "double",
    "template_id": "fn:double",
    "input": 21,
    "output": 42
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `9eab3b3643f2681f2d182d6e2628b95b3b538daa98a3f5c8495eed9da0490550`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "inc",
            "template_id": "fn:inc",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "double",
            "template_id": "fn:double",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 20,
  "output": 42,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 20,
      "output": 21
    },
    {
      "index": 1,
      "step_name": "double",
      "template_id": "fn:double",
      "input": 21,
      "output": 42
    }
  ],
  "branches": []
}
```

---

## Program 3 (3-Step Pipeline)

### RLang Source

```
fn add_one(x: Int) -> Int;
fn multiply(x: Int) -> Int;
fn subtract(x: Int) -> Int;

pipeline main(Int) -> Int { add_one -> multiply -> subtract }
```

### Test Inputs

- Input 1: `0`
- Input 2: `5`
- Input 3: `10`
- Input 4: `15`
- Input 5: `-5`

#### Input 1 = `-5`

**Output Value:**
```json
-14
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:add_one",
      "name": "add_one",
      "fn_name": "add_one",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn add_one(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:subtract",
      "name": "subtract",
      "fn_name": "subtract",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn subtract(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "add_one",
          "template_id": "fn:add_one",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "subtract",
          "template_id": "fn:subtract",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `b0f7dca331c6fb7ceedcc348a107711174cef985c188b4e22e5ca229942b28b3`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "add_one",
    "template_id": "fn:add_one",
    "input": -5,
    "output": -4
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": -4,
    "output": -12
  },
  {
    "index": 2,
    "step_name": "subtract",
    "template_id": "fn:subtract",
    "input": -12,
    "output": -14
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `a201f308a3fc443b27b6073e3b0f303d05ea8c7fb8a37e504ce0d773f2d8f7a6`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:add_one",
        "name": "add_one",
        "fn_name": "add_one",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn add_one(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:subtract",
        "name": "subtract",
        "fn_name": "subtract",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn subtract(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "add_one",
            "template_id": "fn:add_one",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "subtract",
            "template_id": "fn:subtract",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": -5,
  "output": -14,
  "steps": [
    {
      "index": 0,
      "step_name": "add_one",
      "template_id": "fn:add_one",
      "input": -5,
      "output": -4
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": -4,
      "output": -12
    },
    {
      "index": 2,
      "step_name": "subtract",
      "template_id": "fn:subtract",
      "input": -12,
      "output": -14
    }
  ],
  "branches": []
}
```

#### Input 2 = `0`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:add_one",
      "name": "add_one",
      "fn_name": "add_one",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn add_one(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:subtract",
      "name": "subtract",
      "fn_name": "subtract",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn subtract(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "add_one",
          "template_id": "fn:add_one",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "subtract",
          "template_id": "fn:subtract",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `a5107639a6209e324ce4ffba6e0a9d36f77ba5833351db22f6025a20e0e89f0d`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "add_one",
    "template_id": "fn:add_one",
    "input": 0,
    "output": 1
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": 1,
    "output": 3
  },
  {
    "index": 2,
    "step_name": "subtract",
    "template_id": "fn:subtract",
    "input": 3,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `eca7684fd25456dfa6e3600ed2cf19c03dda824ad9a3721e54cb0ff0918a962f`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:add_one",
        "name": "add_one",
        "fn_name": "add_one",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn add_one(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:subtract",
        "name": "subtract",
        "fn_name": "subtract",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn subtract(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "add_one",
            "template_id": "fn:add_one",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "subtract",
            "template_id": "fn:subtract",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "add_one",
      "template_id": "fn:add_one",
      "input": 0,
      "output": 1
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": 1,
      "output": 3
    },
    {
      "index": 2,
      "step_name": "subtract",
      "template_id": "fn:subtract",
      "input": 3,
      "output": 1
    }
  ],
  "branches": []
}
```

#### Input 3 = `5`

**Output Value:**
```json
16
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:add_one",
      "name": "add_one",
      "fn_name": "add_one",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn add_one(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:subtract",
      "name": "subtract",
      "fn_name": "subtract",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn subtract(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "add_one",
          "template_id": "fn:add_one",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "subtract",
          "template_id": "fn:subtract",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `ea3570e3a1671b4da17d11f723d0d7ae6acb75982064f5b3c1f5eae7b182484e`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "add_one",
    "template_id": "fn:add_one",
    "input": 5,
    "output": 6
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": 6,
    "output": 18
  },
  {
    "index": 2,
    "step_name": "subtract",
    "template_id": "fn:subtract",
    "input": 18,
    "output": 16
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `42e3b0b54db1697ee839bc9cd8d7026b08a42f6866fe7cefa312a7d9a7483213`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:add_one",
        "name": "add_one",
        "fn_name": "add_one",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn add_one(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:subtract",
        "name": "subtract",
        "fn_name": "subtract",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn subtract(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "add_one",
            "template_id": "fn:add_one",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "subtract",
            "template_id": "fn:subtract",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 16,
  "steps": [
    {
      "index": 0,
      "step_name": "add_one",
      "template_id": "fn:add_one",
      "input": 5,
      "output": 6
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": 6,
      "output": 18
    },
    {
      "index": 2,
      "step_name": "subtract",
      "template_id": "fn:subtract",
      "input": 18,
      "output": 16
    }
  ],
  "branches": []
}
```

#### Input 4 = `10`

**Output Value:**
```json
31
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:add_one",
      "name": "add_one",
      "fn_name": "add_one",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn add_one(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:subtract",
      "name": "subtract",
      "fn_name": "subtract",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn subtract(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "add_one",
          "template_id": "fn:add_one",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "subtract",
          "template_id": "fn:subtract",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `62476b36a14305bd4b769a92254e9548b298a41156675d8a96e8d1f0283e67b7`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "add_one",
    "template_id": "fn:add_one",
    "input": 10,
    "output": 11
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": 11,
    "output": 33
  },
  {
    "index": 2,
    "step_name": "subtract",
    "template_id": "fn:subtract",
    "input": 33,
    "output": 31
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `0256fc41482a79bdf08f4b07c22e33be4f01a2f9d4fd5c3caa38e193823bfb55`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:add_one",
        "name": "add_one",
        "fn_name": "add_one",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn add_one(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:subtract",
        "name": "subtract",
        "fn_name": "subtract",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn subtract(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "add_one",
            "template_id": "fn:add_one",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "subtract",
            "template_id": "fn:subtract",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 31,
  "steps": [
    {
      "index": 0,
      "step_name": "add_one",
      "template_id": "fn:add_one",
      "input": 10,
      "output": 11
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": 11,
      "output": 33
    },
    {
      "index": 2,
      "step_name": "subtract",
      "template_id": "fn:subtract",
      "input": 33,
      "output": 31
    }
  ],
  "branches": []
}
```

#### Input 5 = `15`

**Output Value:**
```json
46
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:add_one",
      "name": "add_one",
      "fn_name": "add_one",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn add_one(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:subtract",
      "name": "subtract",
      "fn_name": "subtract",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn subtract(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "add_one",
          "template_id": "fn:add_one",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "subtract",
          "template_id": "fn:subtract",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `72c1817bf4215e7a55ddf0a706e9efa687192502b02649d16c5d47c93f3c2b64`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "add_one",
    "template_id": "fn:add_one",
    "input": 15,
    "output": 16
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": 16,
    "output": 48
  },
  {
    "index": 2,
    "step_name": "subtract",
    "template_id": "fn:subtract",
    "input": 48,
    "output": 46
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `ec24525942df7dd163ea5d8147eda02e6dae686bf840d11841356235fa62eb82`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:add_one",
        "name": "add_one",
        "fn_name": "add_one",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn add_one(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:subtract",
        "name": "subtract",
        "fn_name": "subtract",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn subtract(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "add_one",
            "template_id": "fn:add_one",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "subtract",
            "template_id": "fn:subtract",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 46,
  "steps": [
    {
      "index": 0,
      "step_name": "add_one",
      "template_id": "fn:add_one",
      "input": 15,
      "output": 16
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": 16,
      "output": 48
    },
    {
      "index": 2,
      "step_name": "subtract",
      "template_id": "fn:subtract",
      "input": 48,
      "output": 46
    }
  ],
  "branches": []
}
```

---

## Program 4 (5-Step Pipeline)

### RLang Source

```
fn step1(x: Int) -> Int;
fn step2(x: Int) -> Int;
fn step3(x: Int) -> Int;
fn step4(x: Int) -> Int;
fn step5(x: Int) -> Int;

pipeline main(Int) -> Int { step1 -> step2 -> step3 -> step4 -> step5 }
```

### Test Inputs

- Input 1: `0`
- Input 2: `5`
- Input 3: `10`
- Input 4: `20`
- Input 5: `50`

#### Input 1 = `0`

**Output Value:**
```json
8
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:step1",
      "name": "step1",
      "fn_name": "step1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step2",
      "name": "step2",
      "fn_name": "step2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step3",
      "name": "step3",
      "fn_name": "step3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step4",
      "name": "step4",
      "fn_name": "step4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step5",
      "name": "step5",
      "fn_name": "step5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "step1",
          "template_id": "fn:step1",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "step2",
          "template_id": "fn:step2",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "step3",
          "template_id": "fn:step3",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "step4",
          "template_id": "fn:step4",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 4,
          "name": "step5",
          "template_id": "fn:step5",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `89bb88b9c1cb3847fe69de557ddb701f163b3be4beae65b17838df3400ed526f`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "step1",
    "template_id": "fn:step1",
    "input": 0,
    "output": 1
  },
  {
    "index": 1,
    "step_name": "step2",
    "template_id": "fn:step2",
    "input": 1,
    "output": 2
  },
  {
    "index": 2,
    "step_name": "step3",
    "template_id": "fn:step3",
    "input": 2,
    "output": -1
  },
  {
    "index": 3,
    "step_name": "step4",
    "template_id": "fn:step4",
    "input": -1,
    "output": -2
  },
  {
    "index": 4,
    "step_name": "step5",
    "template_id": "fn:step5",
    "input": -2,
    "output": 8
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `6ecf46a6c0a51294ac70f163077f1ac973c8afadbc73cfb3641acf1f70d07968`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:step1",
        "name": "step1",
        "fn_name": "step1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step2",
        "name": "step2",
        "fn_name": "step2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step3",
        "name": "step3",
        "fn_name": "step3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step4",
        "name": "step4",
        "fn_name": "step4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step5",
        "name": "step5",
        "fn_name": "step5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "step1",
            "template_id": "fn:step1",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "step2",
            "template_id": "fn:step2",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "step3",
            "template_id": "fn:step3",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "step4",
            "template_id": "fn:step4",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 4,
            "name": "step5",
            "template_id": "fn:step5",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 8,
  "steps": [
    {
      "index": 0,
      "step_name": "step1",
      "template_id": "fn:step1",
      "input": 0,
      "output": 1
    },
    {
      "index": 1,
      "step_name": "step2",
      "template_id": "fn:step2",
      "input": 1,
      "output": 2
    },
    {
      "index": 2,
      "step_name": "step3",
      "template_id": "fn:step3",
      "input": 2,
      "output": -1
    },
    {
      "index": 3,
      "step_name": "step4",
      "template_id": "fn:step4",
      "input": -1,
      "output": -2
    },
    {
      "index": 4,
      "step_name": "step5",
      "template_id": "fn:step5",
      "input": -2,
      "output": 8
    }
  ],
  "branches": []
}
```

#### Input 2 = `5`

**Output Value:**
```json
28
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:step1",
      "name": "step1",
      "fn_name": "step1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step2",
      "name": "step2",
      "fn_name": "step2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step3",
      "name": "step3",
      "fn_name": "step3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step4",
      "name": "step4",
      "fn_name": "step4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step5",
      "name": "step5",
      "fn_name": "step5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "step1",
          "template_id": "fn:step1",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "step2",
          "template_id": "fn:step2",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "step3",
          "template_id": "fn:step3",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "step4",
          "template_id": "fn:step4",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 4,
          "name": "step5",
          "template_id": "fn:step5",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `2d9b33116cd41b9c2fae0b6a6cd7bdf6c1809297622561e50410326db2f3f323`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "step1",
    "template_id": "fn:step1",
    "input": 5,
    "output": 6
  },
  {
    "index": 1,
    "step_name": "step2",
    "template_id": "fn:step2",
    "input": 6,
    "output": 12
  },
  {
    "index": 2,
    "step_name": "step3",
    "template_id": "fn:step3",
    "input": 12,
    "output": 9
  },
  {
    "index": 3,
    "step_name": "step4",
    "template_id": "fn:step4",
    "input": 9,
    "output": 18
  },
  {
    "index": 4,
    "step_name": "step5",
    "template_id": "fn:step5",
    "input": 18,
    "output": 28
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `d236e79aef14c50e550628c9daf1fade00a7a7d51b1191a8f40bacac4d03b158`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:step1",
        "name": "step1",
        "fn_name": "step1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step2",
        "name": "step2",
        "fn_name": "step2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step3",
        "name": "step3",
        "fn_name": "step3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step4",
        "name": "step4",
        "fn_name": "step4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step5",
        "name": "step5",
        "fn_name": "step5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "step1",
            "template_id": "fn:step1",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "step2",
            "template_id": "fn:step2",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "step3",
            "template_id": "fn:step3",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "step4",
            "template_id": "fn:step4",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 4,
            "name": "step5",
            "template_id": "fn:step5",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 28,
  "steps": [
    {
      "index": 0,
      "step_name": "step1",
      "template_id": "fn:step1",
      "input": 5,
      "output": 6
    },
    {
      "index": 1,
      "step_name": "step2",
      "template_id": "fn:step2",
      "input": 6,
      "output": 12
    },
    {
      "index": 2,
      "step_name": "step3",
      "template_id": "fn:step3",
      "input": 12,
      "output": 9
    },
    {
      "index": 3,
      "step_name": "step4",
      "template_id": "fn:step4",
      "input": 9,
      "output": 18
    },
    {
      "index": 4,
      "step_name": "step5",
      "template_id": "fn:step5",
      "input": 18,
      "output": 28
    }
  ],
  "branches": []
}
```

#### Input 3 = `10`

**Output Value:**
```json
48
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:step1",
      "name": "step1",
      "fn_name": "step1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step2",
      "name": "step2",
      "fn_name": "step2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step3",
      "name": "step3",
      "fn_name": "step3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step4",
      "name": "step4",
      "fn_name": "step4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step5",
      "name": "step5",
      "fn_name": "step5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "step1",
          "template_id": "fn:step1",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "step2",
          "template_id": "fn:step2",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "step3",
          "template_id": "fn:step3",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "step4",
          "template_id": "fn:step4",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 4,
          "name": "step5",
          "template_id": "fn:step5",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `f47e5af7d8e93e5eed8e48e5ce349feef7e7738fb223ac234b8e42e3105a15f8`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "step1",
    "template_id": "fn:step1",
    "input": 10,
    "output": 11
  },
  {
    "index": 1,
    "step_name": "step2",
    "template_id": "fn:step2",
    "input": 11,
    "output": 22
  },
  {
    "index": 2,
    "step_name": "step3",
    "template_id": "fn:step3",
    "input": 22,
    "output": 19
  },
  {
    "index": 3,
    "step_name": "step4",
    "template_id": "fn:step4",
    "input": 19,
    "output": 38
  },
  {
    "index": 4,
    "step_name": "step5",
    "template_id": "fn:step5",
    "input": 38,
    "output": 48
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `465669c74354b361ea8282fe85b3bdf7cfa230cd4f79daa987467da91fe157b9`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:step1",
        "name": "step1",
        "fn_name": "step1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step2",
        "name": "step2",
        "fn_name": "step2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step3",
        "name": "step3",
        "fn_name": "step3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step4",
        "name": "step4",
        "fn_name": "step4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step5",
        "name": "step5",
        "fn_name": "step5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "step1",
            "template_id": "fn:step1",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "step2",
            "template_id": "fn:step2",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "step3",
            "template_id": "fn:step3",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "step4",
            "template_id": "fn:step4",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 4,
            "name": "step5",
            "template_id": "fn:step5",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 48,
  "steps": [
    {
      "index": 0,
      "step_name": "step1",
      "template_id": "fn:step1",
      "input": 10,
      "output": 11
    },
    {
      "index": 1,
      "step_name": "step2",
      "template_id": "fn:step2",
      "input": 11,
      "output": 22
    },
    {
      "index": 2,
      "step_name": "step3",
      "template_id": "fn:step3",
      "input": 22,
      "output": 19
    },
    {
      "index": 3,
      "step_name": "step4",
      "template_id": "fn:step4",
      "input": 19,
      "output": 38
    },
    {
      "index": 4,
      "step_name": "step5",
      "template_id": "fn:step5",
      "input": 38,
      "output": 48
    }
  ],
  "branches": []
}
```

#### Input 4 = `20`

**Output Value:**
```json
88
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:step1",
      "name": "step1",
      "fn_name": "step1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step2",
      "name": "step2",
      "fn_name": "step2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step3",
      "name": "step3",
      "fn_name": "step3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step4",
      "name": "step4",
      "fn_name": "step4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step5",
      "name": "step5",
      "fn_name": "step5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "step1",
          "template_id": "fn:step1",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "step2",
          "template_id": "fn:step2",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "step3",
          "template_id": "fn:step3",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "step4",
          "template_id": "fn:step4",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 4,
          "name": "step5",
          "template_id": "fn:step5",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `fbb5292fa27d944682932e7fc240b290f51647fafd3e0bde31b5f342a8089a0a`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "step1",
    "template_id": "fn:step1",
    "input": 20,
    "output": 21
  },
  {
    "index": 1,
    "step_name": "step2",
    "template_id": "fn:step2",
    "input": 21,
    "output": 42
  },
  {
    "index": 2,
    "step_name": "step3",
    "template_id": "fn:step3",
    "input": 42,
    "output": 39
  },
  {
    "index": 3,
    "step_name": "step4",
    "template_id": "fn:step4",
    "input": 39,
    "output": 78
  },
  {
    "index": 4,
    "step_name": "step5",
    "template_id": "fn:step5",
    "input": 78,
    "output": 88
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `e6beb09282941ea36250f1cf2c8ef16c38810acb0e5c07d6d6b7de02d1c6dc55`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:step1",
        "name": "step1",
        "fn_name": "step1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step2",
        "name": "step2",
        "fn_name": "step2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step3",
        "name": "step3",
        "fn_name": "step3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step4",
        "name": "step4",
        "fn_name": "step4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step5",
        "name": "step5",
        "fn_name": "step5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "step1",
            "template_id": "fn:step1",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "step2",
            "template_id": "fn:step2",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "step3",
            "template_id": "fn:step3",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "step4",
            "template_id": "fn:step4",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 4,
            "name": "step5",
            "template_id": "fn:step5",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 20,
  "output": 88,
  "steps": [
    {
      "index": 0,
      "step_name": "step1",
      "template_id": "fn:step1",
      "input": 20,
      "output": 21
    },
    {
      "index": 1,
      "step_name": "step2",
      "template_id": "fn:step2",
      "input": 21,
      "output": 42
    },
    {
      "index": 2,
      "step_name": "step3",
      "template_id": "fn:step3",
      "input": 42,
      "output": 39
    },
    {
      "index": 3,
      "step_name": "step4",
      "template_id": "fn:step4",
      "input": 39,
      "output": 78
    },
    {
      "index": 4,
      "step_name": "step5",
      "template_id": "fn:step5",
      "input": 78,
      "output": 88
    }
  ],
  "branches": []
}
```

#### Input 5 = `50`

**Output Value:**
```json
208
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:step1",
      "name": "step1",
      "fn_name": "step1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step2",
      "name": "step2",
      "fn_name": "step2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step3",
      "name": "step3",
      "fn_name": "step3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step4",
      "name": "step4",
      "fn_name": "step4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:step5",
      "name": "step5",
      "fn_name": "step5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn step5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "step1",
          "template_id": "fn:step1",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "step2",
          "template_id": "fn:step2",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "step3",
          "template_id": "fn:step3",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "step4",
          "template_id": "fn:step4",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 4,
          "name": "step5",
          "template_id": "fn:step5",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `cee1717914f2aabf059e95b5549dcdb821b15afe9a87caf7ee4e079f7f17b54b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "step1",
    "template_id": "fn:step1",
    "input": 50,
    "output": 51
  },
  {
    "index": 1,
    "step_name": "step2",
    "template_id": "fn:step2",
    "input": 51,
    "output": 102
  },
  {
    "index": 2,
    "step_name": "step3",
    "template_id": "fn:step3",
    "input": 102,
    "output": 99
  },
  {
    "index": 3,
    "step_name": "step4",
    "template_id": "fn:step4",
    "input": 99,
    "output": 198
  },
  {
    "index": 4,
    "step_name": "step5",
    "template_id": "fn:step5",
    "input": 198,
    "output": 208
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `0329adfa89451ea1f7bd8db50c97492cd8bcbc32b360a23fdcaea4423f2be88a`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:step1",
        "name": "step1",
        "fn_name": "step1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step2",
        "name": "step2",
        "fn_name": "step2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step3",
        "name": "step3",
        "fn_name": "step3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step4",
        "name": "step4",
        "fn_name": "step4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:step5",
        "name": "step5",
        "fn_name": "step5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn step5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "step1",
            "template_id": "fn:step1",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "step2",
            "template_id": "fn:step2",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "step3",
            "template_id": "fn:step3",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "step4",
            "template_id": "fn:step4",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 4,
            "name": "step5",
            "template_id": "fn:step5",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 208,
  "steps": [
    {
      "index": 0,
      "step_name": "step1",
      "template_id": "fn:step1",
      "input": 50,
      "output": 51
    },
    {
      "index": 1,
      "step_name": "step2",
      "template_id": "fn:step2",
      "input": 51,
      "output": 102
    },
    {
      "index": 2,
      "step_name": "step3",
      "template_id": "fn:step3",
      "input": 102,
      "output": 99
    },
    {
      "index": 3,
      "step_name": "step4",
      "template_id": "fn:step4",
      "input": 99,
      "output": 198
    },
    {
      "index": 4,
      "step_name": "step5",
      "template_id": "fn:step5",
      "input": 198,
      "output": 208
    }
  ],
  "branches": []
}
```

---

## Program 5 (Simple IF)

### RLang Source

```
fn double(x: Int) -> Int;
fn half(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 10) {
        double
    } else {
        half
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `10`
- Input 3: `15`
- Input 4: `20`
- Input 5: `0`

#### Input 1 = `0`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:half",
      "name": "half",
      "fn_name": "half",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn half(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "half",
              "template_id": "fn:half",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "double",
              "template_id": "fn:double",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `33f19a445d9ab5157ba4e23971ae7ade1e0b14a60546e63334eabda137ce7c82`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "half",
    "template_id": "fn:half",
    "input": 0,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `7902ecd92b6500f2c368c8d479fe05f1478b07ff72e547e6ac31789ccb138b47`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:half",
        "name": "half",
        "fn_name": "half",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn half(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "half",
                "template_id": "fn:half",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "double",
                "template_id": "fn:double",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "half",
      "template_id": "fn:half",
      "input": 0,
      "output": 0
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `5`

**Output Value:**
```json
2
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:half",
      "name": "half",
      "fn_name": "half",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn half(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "half",
              "template_id": "fn:half",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "double",
              "template_id": "fn:double",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `769d3d0166db75eccd65c5b031b12dfcfba52af9d3664a36ac331203c4cf651e`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "half",
    "template_id": "fn:half",
    "input": 5,
    "output": 2
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `d885e4b79b5db5880586ef5f3ff91c99a2b7f62b5220ad7b3b54ed2d9b4c361b`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:half",
        "name": "half",
        "fn_name": "half",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn half(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "half",
                "template_id": "fn:half",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "double",
                "template_id": "fn:double",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 2,
  "steps": [
    {
      "index": 0,
      "step_name": "half",
      "template_id": "fn:half",
      "input": 5,
      "output": 2
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `10`

**Output Value:**
```json
5
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:half",
      "name": "half",
      "fn_name": "half",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn half(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "half",
              "template_id": "fn:half",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "double",
              "template_id": "fn:double",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `16aa1817b587de1f17a789ebd7265735e66e80701aed49f914821ac037e51c50`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "half",
    "template_id": "fn:half",
    "input": 10,
    "output": 5
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `3df5b6b3a0e142b69773922c66eb255fe4eb8567c28ce2f68856cad4d12ef0fb`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:half",
        "name": "half",
        "fn_name": "half",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn half(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "half",
                "template_id": "fn:half",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "double",
                "template_id": "fn:double",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 5,
  "steps": [
    {
      "index": 0,
      "step_name": "half",
      "template_id": "fn:half",
      "input": 10,
      "output": 5
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `15`

**Output Value:**
```json
30
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:half",
      "name": "half",
      "fn_name": "half",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn half(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "half",
              "template_id": "fn:half",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "double",
              "template_id": "fn:double",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `85029ddd6d7e40acbf8d46d3989d7006291ba5a55cdb0a939fc2cacc84787762`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "double",
    "template_id": "fn:double",
    "input": 15,
    "output": 30
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `4b6ab72d3617d2a1de4d10b11164d9e41aee1b02fc8f4051cab536ce9bc4789a`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:half",
        "name": "half",
        "fn_name": "half",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn half(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "half",
                "template_id": "fn:half",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "double",
                "template_id": "fn:double",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 30,
  "steps": [
    {
      "index": 0,
      "step_name": "double",
      "template_id": "fn:double",
      "input": 15,
      "output": 30
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `20`

**Output Value:**
```json
40
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:double",
      "name": "double",
      "fn_name": "double",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn double(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:half",
      "name": "half",
      "fn_name": "half",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn half(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "half",
              "template_id": "fn:half",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "double",
              "template_id": "fn:double",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `e7c6c62cd4fdf29fb870f3296020b5b44bc9727bc38b7c0641123cd609c3d6f5`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "double",
    "template_id": "fn:double",
    "input": 20,
    "output": 40
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `5386a67d6aa82ed733c6dc78b7c99ca778ebb1b5bf5657e860afff5b80efc404`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:double",
        "name": "double",
        "fn_name": "double",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn double(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:half",
        "name": "half",
        "fn_name": "half",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn half(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "half",
                "template_id": "fn:half",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "double",
                "template_id": "fn:double",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 20,
  "output": 40,
  "steps": [
    {
      "index": 0,
      "step_name": "double",
      "template_id": "fn:double",
      "input": 20,
      "output": 40
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 6 (Nested IF)

### RLang Source

```
fn f1(x: Int) -> Int;
fn f2(x: Int) -> Int;
fn f3(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 10) {
        if (__value > 20) {
            f1
        } else {
            f2
        }
    } else {
        f3
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `15`
- Input 3: `25`
- Input 4: `30`
- Input 5: `0`

#### Input 1 = `0`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f3",
              "template_id": "fn:f3",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f1",
                  "template_id": "fn:f1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `bbef7d790534aed163bfd168240cd50add0ff7dc3ce7c605893bd3d4f7e9e6e2`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f3",
    "template_id": "fn:f3",
    "input": 0,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `62c3d82a2fdb68348629e80afb50d30aaef8c8eba005ae7b9f68c8efaa1c79af`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f3",
                "template_id": "fn:f3",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f1",
                    "template_id": "fn:f1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "f3",
      "template_id": "fn:f3",
      "input": 0,
      "output": 0
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `5`

**Output Value:**
```json
5
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f3",
              "template_id": "fn:f3",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f1",
                  "template_id": "fn:f1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `1e75356ce24eff51c8879505dfcfc316e4973223d6dd0f8e8aaf477577257143`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f3",
    "template_id": "fn:f3",
    "input": 5,
    "output": 5
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `287e434e9c569385d6c69a0c3786c62853675855438f2174d0e719eb659f4501`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f3",
                "template_id": "fn:f3",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f1",
                    "template_id": "fn:f1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 5,
  "steps": [
    {
      "index": 0,
      "step_name": "f3",
      "template_id": "fn:f3",
      "input": 5,
      "output": 5
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `15`

**Output Value:**
```json
30
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f3",
              "template_id": "fn:f3",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f1",
                  "template_id": "fn:f1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `4cac214615fbfc6cfa77dd80711442f8c753b7de47d757c5e837aa91d7f28f3b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f2",
    "template_id": "fn:f2",
    "input": 15,
    "output": 30
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `6577e454b20b5044bb09d096e93c2a8df4754b01b6f2a064cb7bcf1e3793152a`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f3",
                "template_id": "fn:f3",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f1",
                    "template_id": "fn:f1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 30,
  "steps": [
    {
      "index": 0,
      "step_name": "f2",
      "template_id": "fn:f2",
      "input": 15,
      "output": 30
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `25`

**Output Value:**
```json
75
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f3",
              "template_id": "fn:f3",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f1",
                  "template_id": "fn:f1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `f1e136597a9b1a75eb0131621163a4c9593fadc66c20560a9c140780d3333f3e`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f1",
    "template_id": "fn:f1",
    "input": 25,
    "output": 75
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `3aee5645f754016cb899928a1c9bb35af699bb14fdbecece18d1c1860247431d`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f3",
                "template_id": "fn:f3",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f1",
                    "template_id": "fn:f1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 75,
  "steps": [
    {
      "index": 0,
      "step_name": "f1",
      "template_id": "fn:f1",
      "input": 25,
      "output": 75
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `30`

**Output Value:**
```json
90
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f3",
              "template_id": "fn:f3",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f1",
                  "template_id": "fn:f1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `13ae9f73ed42a322b02fe487637282fe79494387c56154c88cc4f84288fca817`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f1",
    "template_id": "fn:f1",
    "input": 30,
    "output": 90
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `5ff9773864f012d1462a4455daa5ef1d169846c5252aa6dbb3c1c6d110ac4ad3`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f3",
                "template_id": "fn:f3",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f1",
                    "template_id": "fn:f1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 30,
  "output": 90,
  "steps": [
    {
      "index": 0,
      "step_name": "f1",
      "template_id": "fn:f1",
      "input": 30,
      "output": 90
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 7 (3-Layer Branching)

### RLang Source

```
fn f1(x: Int) -> Int;
fn f2(x: Int) -> Int;
fn f3(x: Int) -> Int;
fn f4(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 10) {
        if (__value > 20) {
            if (__value > 30) {
                f1
            } else {
                f2
            }
        } else {
            f3
        }
    } else {
        f4
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `15`
- Input 3: `25`
- Input 4: `35`
- Input 5: `50`

#### Input 1 = `5`

**Output Value:**
```json
5
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f4",
              "template_id": "fn:f4",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f3",
                  "template_id": "fn:f3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f2",
                      "template_id": "fn:f2",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f1",
                      "template_id": "fn:f1",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `ca4f266fa673236e0f8e6bef1b44b2d1b49d139e3e52f8c6e5cfb97b9e6e7bac`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f4",
    "template_id": "fn:f4",
    "input": 5,
    "output": 5
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `fe5eed52f2cd905f760a976fe0400f89abda45d76841dc27c3d4956020fe9287`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f4",
                "template_id": "fn:f4",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f3",
                    "template_id": "fn:f3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f2",
                        "template_id": "fn:f2",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f1",
                        "template_id": "fn:f1",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 5,
  "steps": [
    {
      "index": 0,
      "step_name": "f4",
      "template_id": "fn:f4",
      "input": 5,
      "output": 5
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `15`

**Output Value:**
```json
30
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f4",
              "template_id": "fn:f4",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f3",
                  "template_id": "fn:f3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f2",
                      "template_id": "fn:f2",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f1",
                      "template_id": "fn:f1",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `64ebafbb53e1c3a752004a6e6d4a8c518662b4c6d3fe66bd92d7f8a1487ab411`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f3",
    "template_id": "fn:f3",
    "input": 15,
    "output": 30
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `fd57a828bfd54e9e416a9bbe054e1c51bb6ecca8ea9986ac70c32b63f9744baa`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f4",
                "template_id": "fn:f4",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f3",
                    "template_id": "fn:f3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f2",
                        "template_id": "fn:f2",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f1",
                        "template_id": "fn:f1",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 30,
  "steps": [
    {
      "index": 0,
      "step_name": "f3",
      "template_id": "fn:f3",
      "input": 15,
      "output": 30
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `25`

**Output Value:**
```json
75
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f4",
              "template_id": "fn:f4",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f3",
                  "template_id": "fn:f3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f2",
                      "template_id": "fn:f2",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f1",
                      "template_id": "fn:f1",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `a5f1493aa3640c8f92d9b72f55c809d6e45fc7a861f7ca714b4c71b4df4834df`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f2",
    "template_id": "fn:f2",
    "input": 25,
    "output": 75
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `3773b680b7219a988ed570a208ffd38f563e5e8317b301f80839c16eb77bb821`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f4",
                "template_id": "fn:f4",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f3",
                    "template_id": "fn:f3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f2",
                        "template_id": "fn:f2",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f1",
                        "template_id": "fn:f1",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 75,
  "steps": [
    {
      "index": 0,
      "step_name": "f2",
      "template_id": "fn:f2",
      "input": 25,
      "output": 75
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `35`

**Output Value:**
```json
140
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f4",
              "template_id": "fn:f4",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f3",
                  "template_id": "fn:f3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f2",
                      "template_id": "fn:f2",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f1",
                      "template_id": "fn:f1",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `c738cefb0685eb8a5ee188bd710084712365a1b24f51b4e484aec51279e467e1`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f1",
    "template_id": "fn:f1",
    "input": 35,
    "output": 140
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `8917d8cfdda051a30f74baa5ea2efff36a2026ab8b8e7952e373b9fe29037650`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f4",
                "template_id": "fn:f4",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f3",
                    "template_id": "fn:f3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f2",
                        "template_id": "fn:f2",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f1",
                        "template_id": "fn:f1",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 35,
  "output": 140,
  "steps": [
    {
      "index": 0,
      "step_name": "f1",
      "template_id": "fn:f1",
      "input": 35,
      "output": 140
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `50`

**Output Value:**
```json
200
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f4",
              "template_id": "fn:f4",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f3",
                  "template_id": "fn:f3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f2",
                      "template_id": "fn:f2",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f1",
                      "template_id": "fn:f1",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `e8d43eba74b65fe8dbdd5eaf05e9fcbcebdf5c7623316aee0d0ce63acae4f522`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f1",
    "template_id": "fn:f1",
    "input": 50,
    "output": 200
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `7c0c5753be6ebb8357b4fa3ad2eb3ac1ed9f29f4bd31714b8c04ebaef9cb7494`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f4",
                "template_id": "fn:f4",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f3",
                    "template_id": "fn:f3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f2",
                        "template_id": "fn:f2",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f1",
                        "template_id": "fn:f1",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 200,
  "steps": [
    {
      "index": 0,
      "step_name": "f1",
      "template_id": "fn:f1",
      "input": 50,
      "output": 200
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 8 (Boolean AND)

### RLang Source

```
fn inc(x: Int) -> Int;
fn dec(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 10 && __value < 20) {
        inc
    } else {
        dec
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `15`
- Input 3: `25`
- Input 4: `10`
- Input 5: `20`

#### Input 1 = `5`

**Output Value:**
```json
4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `0821a93110f8feb87643f9f67d2ec95cfd869ba009038dc599216803c3a17537`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 5,
    "output": 4
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `0793a5293387c19598fb42c152ce78aaa4427eba3e6267699b44ada4e5f81e27`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 4,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 5,
      "output": 4
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `10`

**Output Value:**
```json
9
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `260290db45d590c8453ada11d7e2173eb7876b1c30609584b27e5dbc5d6a48a6`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 10,
    "output": 9
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `7b2bc7a81e3f5b21af7e864fa8a4db9e24e6e92007d25eca95fb3e840e970e4e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 9,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 10,
      "output": 9
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `15`

**Output Value:**
```json
16
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `7a8f813580911d2bb8cf030287733e8bccc8e2ebf2a29e94499996866f04ebf9`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 15,
    "output": 16
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `b5b98ff7a5a6ffd1d214817069b316c8124cee1cf03690ef01473837fb33a169`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 16,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 15,
      "output": 16
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `20`

**Output Value:**
```json
19
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `f10154a0aeb5a6a2120ee14a7010bc8d83dfbdf5cc3fd35f5279e21e7042a345`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 20,
    "output": 19
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `98dd8b28a776dbb980a9205cbed5734120975be44b47620dc1eb495e5c94a596`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 20,
  "output": 19,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 20,
      "output": 19
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 5 = `25`

**Output Value:**
```json
24
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `aa853bbe8b52fa7cd846ac482bf864af8187dd88bbe169d19e5e65cb2bfcb1b1`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 25,
    "output": 24
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `7c45e715aff58edcb31e1c5207738c94cfeade97bad449ec85b7581a97b54b6a`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 24,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 25,
      "output": 24
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 9 (Boolean OR)

### RLang Source

```
fn inc(x: Int) -> Int;
fn dec(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 20 || __value < 0) {
        inc
    } else {
        dec
    }
}
```

### Test Inputs

- Input 1: `-5`
- Input 2: `5`
- Input 3: `15`
- Input 4: `25`
- Input 5: `0`

#### Input 1 = `-5`

**Output Value:**
```json
-4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `06c6dec70e47612979bc2429cc5de6060089ce9da60b390c583a53fe43197cad`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": -5,
    "output": -4
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `33d6dd5f43ee58e80aea4c825d77cff5cc6c4698d829f7af0d325b94df7af08e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": -5,
  "output": -4,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": -5,
      "output": -4
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `0`

**Output Value:**
```json
-1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `ae43f7c8428117f636c6cf55c674186bb9fc9efd7c0464411a21b2b86168543f`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 0,
    "output": -1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `eaf15084051e3f7dfc5bffa2f520429b0156d85c43dfc5f6702a6d74464427f4`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": -1,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 0,
      "output": -1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `5`

**Output Value:**
```json
4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `0821a93110f8feb87643f9f67d2ec95cfd869ba009038dc599216803c3a17537`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 5,
    "output": 4
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `0793a5293387c19598fb42c152ce78aaa4427eba3e6267699b44ada4e5f81e27`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 4,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 5,
      "output": 4
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `15`

**Output Value:**
```json
14
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `13cf95ee68e1209ee724a416c6daf87bcf6cf843f96c9046e4477ff3d0b0369a`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 15,
    "output": 14
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `f337a2d24749853ec59371edecccde4ca81c2cb01e41ba03a7f8ebccf959f845`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 14,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 15,
      "output": 14
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 5 = `25`

**Output Value:**
```json
26
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `ebb8434d08f68e35648d21319b1f8cbcaaddf04121aedb54ceecff2f82ba7265`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 25,
    "output": 26
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `9fc969fdc405e2dd303fd75e3a1360e2ad6e9a59d7b3de83e8b6cdae38ae31a4`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 26,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 25,
      "output": 26
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 10 (Boolean NOT)

### RLang Source

```
fn inc(x: Int) -> Int;
fn dec(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (!(__value > 10)) {
        inc
    } else {
        dec
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `10`
- Input 3: `15`
- Input 4: `20`
- Input 5: `0`

#### Input 1 = `0`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_not",
            "operand": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `fe4a2dcb8749f3c466f9756f7ed10edfa97cdb61dfd0563258615005d2fd45cc`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 0,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `4f0f887a6c4ccbfb047aa2dcb70c1a8b6f21fe38270610558413da2c79baf2f9`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_not",
              "operand": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 0,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `5`

**Output Value:**
```json
6
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_not",
            "operand": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `4391f47ae7f058e6f7f45eae68e8e822f43805e7600076574f312258b768de26`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 5,
    "output": 6
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `9e83e0f2b5c573275fbe537c7c342f63dc7ab86299b524cdecf2ea01f14dccff`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_not",
              "operand": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 6,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 5,
      "output": 6
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `10`

**Output Value:**
```json
11
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_not",
            "operand": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `92331ffb913e6b0d9118ece6a32f29f059128d59af0748e3724465bf355f1cf0`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 10,
    "output": 11
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `e0625123a5c6aa17426fe8af58023784f9a6bef34fae062b6bcfabb2d733e01e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_not",
              "operand": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 11,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 10,
      "output": 11
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `15`

**Output Value:**
```json
14
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_not",
            "operand": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `13cf95ee68e1209ee724a416c6daf87bcf6cf843f96c9046e4477ff3d0b0369a`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 15,
    "output": 14
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `f337a2d24749853ec59371edecccde4ca81c2cb01e41ba03a7f8ebccf959f845`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_not",
              "operand": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 14,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 15,
      "output": 14
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 5 = `20`

**Output Value:**
```json
19
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_not",
            "operand": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `f10154a0aeb5a6a2120ee14a7010bc8d83dfbdf5cc3fd35f5279e21e7042a345`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 20,
    "output": 19
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `98dd8b28a776dbb980a9205cbed5734120975be44b47620dc1eb495e5c94a596`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_not",
              "operand": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 20,
  "output": 19,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 20,
      "output": 19
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 11 (Compound Boolean)

### RLang Source

```
fn inc(x: Int) -> Int;
fn dec(x: Int) -> Int;

pipeline main(Int) -> Int {
    if ((__value > 10 || __value < 0) && __value != 5) {
        inc
    } else {
        dec
    }
}
```

### Test Inputs

- Input 1: `-5`
- Input 2: `5`
- Input 3: `15`
- Input 4: `25`
- Input 5: `0`

#### Input 1 = `-5`

**Output Value:**
```json
-4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 5
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `06c6dec70e47612979bc2429cc5de6060089ce9da60b390c583a53fe43197cad`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": -5,
    "output": -4
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `33d6dd5f43ee58e80aea4c825d77cff5cc6c4698d829f7af0d325b94df7af08e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_or",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 10
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 5
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": -5,
  "output": -4,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": -5,
      "output": -4
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `0`

**Output Value:**
```json
-1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 5
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `ae43f7c8428117f636c6cf55c674186bb9fc9efd7c0464411a21b2b86168543f`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 0,
    "output": -1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `eaf15084051e3f7dfc5bffa2f520429b0156d85c43dfc5f6702a6d74464427f4`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_or",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 10
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 5
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": -1,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 0,
      "output": -1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `5`

**Output Value:**
```json
4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 5
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `0821a93110f8feb87643f9f67d2ec95cfd869ba009038dc599216803c3a17537`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 5,
    "output": 4
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `0793a5293387c19598fb42c152ce78aaa4427eba3e6267699b44ada4e5f81e27`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_or",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 10
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 5
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 4,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 5,
      "output": 4
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `15`

**Output Value:**
```json
16
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 5
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `7a8f813580911d2bb8cf030287733e8bccc8e2ebf2a29e94499996866f04ebf9`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 15,
    "output": 16
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `b5b98ff7a5a6ffd1d214817069b316c8124cee1cf03690ef01473837fb33a169`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_or",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 10
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 5
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 16,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 15,
      "output": 16
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `25`

**Output Value:**
```json
26
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_or",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 5
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `ebb8434d08f68e35648d21319b1f8cbcaaddf04121aedb54ceecff2f82ba7265`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 25,
    "output": 26
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `9fc969fdc405e2dd303fd75e3a1360e2ad6e9a59d7b3de83e8b6cdae38ae31a4`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_or",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 10
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 5
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 26,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 25,
      "output": 26
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 12 (Normalize Scale Clamp)

### RLang Source

```
fn normalize(x: Int) -> Int;
fn scale(x: Int) -> Int;
fn clamp(x: Int) -> Int;

pipeline main(Int) -> Int { normalize -> scale -> clamp }
```

### Test Inputs

- Input 1: `0`
- Input 2: `25`
- Input 3: `50`
- Input 4: `75`
- Input 5: `100`

#### Input 1 = `0`

**Output Value:**
```json
-100
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:clamp",
      "name": "clamp",
      "fn_name": "clamp",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn clamp(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:scale",
      "name": "scale",
      "fn_name": "scale",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn scale(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "scale",
          "template_id": "fn:scale",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "clamp",
          "template_id": "fn:clamp",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `0477751c6cbd939ccf89213c0d1f262594d6ed393069f772d0956535348ad9f4`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 0,
    "output": -50
  },
  {
    "index": 1,
    "step_name": "scale",
    "template_id": "fn:scale",
    "input": -50,
    "output": -100
  },
  {
    "index": 2,
    "step_name": "clamp",
    "template_id": "fn:clamp",
    "input": -100,
    "output": -100
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `2986281a5ef450862e4c4a43d4d047ab8df7c7aa7c82842178751defcb443900`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:clamp",
        "name": "clamp",
        "fn_name": "clamp",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn clamp(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:scale",
        "name": "scale",
        "fn_name": "scale",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn scale(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "scale",
            "template_id": "fn:scale",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "clamp",
            "template_id": "fn:clamp",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": -100,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 0,
      "output": -50
    },
    {
      "index": 1,
      "step_name": "scale",
      "template_id": "fn:scale",
      "input": -50,
      "output": -100
    },
    {
      "index": 2,
      "step_name": "clamp",
      "template_id": "fn:clamp",
      "input": -100,
      "output": -100
    }
  ],
  "branches": []
}
```

#### Input 2 = `25`

**Output Value:**
```json
-50
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:clamp",
      "name": "clamp",
      "fn_name": "clamp",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn clamp(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:scale",
      "name": "scale",
      "fn_name": "scale",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn scale(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "scale",
          "template_id": "fn:scale",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "clamp",
          "template_id": "fn:clamp",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `e0dc130de6048cdc195a1eac0a85627d8a72300eb88819e8c2c391e3e637cd4c`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 25,
    "output": -25
  },
  {
    "index": 1,
    "step_name": "scale",
    "template_id": "fn:scale",
    "input": -25,
    "output": -50
  },
  {
    "index": 2,
    "step_name": "clamp",
    "template_id": "fn:clamp",
    "input": -50,
    "output": -50
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `ffd75baab17bc67eb894abff44e89a0513c7bd2f98fbb58ca2480a7b6a047a6e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:clamp",
        "name": "clamp",
        "fn_name": "clamp",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn clamp(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:scale",
        "name": "scale",
        "fn_name": "scale",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn scale(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "scale",
            "template_id": "fn:scale",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "clamp",
            "template_id": "fn:clamp",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": -50,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 25,
      "output": -25
    },
    {
      "index": 1,
      "step_name": "scale",
      "template_id": "fn:scale",
      "input": -25,
      "output": -50
    },
    {
      "index": 2,
      "step_name": "clamp",
      "template_id": "fn:clamp",
      "input": -50,
      "output": -50
    }
  ],
  "branches": []
}
```

#### Input 3 = `50`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:clamp",
      "name": "clamp",
      "fn_name": "clamp",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn clamp(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:scale",
      "name": "scale",
      "fn_name": "scale",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn scale(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "scale",
          "template_id": "fn:scale",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "clamp",
          "template_id": "fn:clamp",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `9c2732588b868c2b738c2c605fd51261ab54f85e4b1085948ac3891fc7d2b3f6`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 50,
    "output": 0
  },
  {
    "index": 1,
    "step_name": "scale",
    "template_id": "fn:scale",
    "input": 0,
    "output": 0
  },
  {
    "index": 2,
    "step_name": "clamp",
    "template_id": "fn:clamp",
    "input": 0,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `c2b5632c1424f874e3a76b89e394356b1dd44f27c85d577655beb58b40ffeb1b`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:clamp",
        "name": "clamp",
        "fn_name": "clamp",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn clamp(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:scale",
        "name": "scale",
        "fn_name": "scale",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn scale(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "scale",
            "template_id": "fn:scale",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "clamp",
            "template_id": "fn:clamp",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 50,
      "output": 0
    },
    {
      "index": 1,
      "step_name": "scale",
      "template_id": "fn:scale",
      "input": 0,
      "output": 0
    },
    {
      "index": 2,
      "step_name": "clamp",
      "template_id": "fn:clamp",
      "input": 0,
      "output": 0
    }
  ],
  "branches": []
}
```

#### Input 4 = `75`

**Output Value:**
```json
50
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:clamp",
      "name": "clamp",
      "fn_name": "clamp",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn clamp(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:scale",
      "name": "scale",
      "fn_name": "scale",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn scale(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "scale",
          "template_id": "fn:scale",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "clamp",
          "template_id": "fn:clamp",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `3fed1b1869bdc9ea3a219b54f2ef58f8e4669c0a2fc79ee67e31e60a0c193137`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 75,
    "output": 25
  },
  {
    "index": 1,
    "step_name": "scale",
    "template_id": "fn:scale",
    "input": 25,
    "output": 50
  },
  {
    "index": 2,
    "step_name": "clamp",
    "template_id": "fn:clamp",
    "input": 50,
    "output": 50
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `cdb74134c99a2924d7704b520c2fd58e61a37a320364b824efe763913e89de80`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:clamp",
        "name": "clamp",
        "fn_name": "clamp",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn clamp(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:scale",
        "name": "scale",
        "fn_name": "scale",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn scale(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "scale",
            "template_id": "fn:scale",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "clamp",
            "template_id": "fn:clamp",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 75,
  "output": 50,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 75,
      "output": 25
    },
    {
      "index": 1,
      "step_name": "scale",
      "template_id": "fn:scale",
      "input": 25,
      "output": 50
    },
    {
      "index": 2,
      "step_name": "clamp",
      "template_id": "fn:clamp",
      "input": 50,
      "output": 50
    }
  ],
  "branches": []
}
```

#### Input 5 = `100`

**Output Value:**
```json
100
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:clamp",
      "name": "clamp",
      "fn_name": "clamp",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn clamp(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:scale",
      "name": "scale",
      "fn_name": "scale",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn scale(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "scale",
          "template_id": "fn:scale",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "clamp",
          "template_id": "fn:clamp",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `4f7cb85e7fa2761d8edba0b6e826ebe248c6af458c0358d1c85de31fb913abcc`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 100,
    "output": 50
  },
  {
    "index": 1,
    "step_name": "scale",
    "template_id": "fn:scale",
    "input": 50,
    "output": 100
  },
  {
    "index": 2,
    "step_name": "clamp",
    "template_id": "fn:clamp",
    "input": 100,
    "output": 100
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `284b2d9aafe7dd3c81962d2b69e38d502d2fba6d5a741e21e7b1922586c55a13`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:clamp",
        "name": "clamp",
        "fn_name": "clamp",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn clamp(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:scale",
        "name": "scale",
        "fn_name": "scale",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn scale(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "scale",
            "template_id": "fn:scale",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "clamp",
            "template_id": "fn:clamp",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 100,
  "output": 100,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 100,
      "output": 50
    },
    {
      "index": 1,
      "step_name": "scale",
      "template_id": "fn:scale",
      "input": 50,
      "output": 100
    },
    {
      "index": 2,
      "step_name": "clamp",
      "template_id": "fn:clamp",
      "input": 100,
      "output": 100
    }
  ],
  "branches": []
}
```

---

## Program 13 (Risk Scoring Pipeline)

### RLang Source

```
fn score(x: Int) -> Int;
fn multiply(x: Int) -> Int;
fn threshold(x: Int) -> Int;
fn classify(x: Int) -> Int;

pipeline main(Int) -> Int { score -> multiply -> threshold -> classify }
```

### Test Inputs

- Input 1: `5`
- Input 2: `10`
- Input 3: `20`
- Input 4: `30`
- Input 5: `50`

#### Input 1 = `5`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:score",
      "name": "score",
      "fn_name": "score",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn score(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:threshold",
      "name": "threshold",
      "fn_name": "threshold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn threshold(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "score",
          "template_id": "fn:score",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "threshold",
          "template_id": "fn:threshold",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `5fb3eda4be41c1aff3273729e989859ff489c48b43bdb7f5e51b8daae4b54216`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "score",
    "template_id": "fn:score",
    "input": 5,
    "output": 50
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": 50,
    "output": 100
  },
  {
    "index": 2,
    "step_name": "threshold",
    "template_id": "fn:threshold",
    "input": 100,
    "output": 100
  },
  {
    "index": 3,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": 100,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `e33973638b3bcff7fb1b8bf1c6445e3b8ebb0ab1e6a7b3b2c2fcf25a8526615c`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:score",
        "name": "score",
        "fn_name": "score",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn score(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:threshold",
        "name": "threshold",
        "fn_name": "threshold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn threshold(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "score",
            "template_id": "fn:score",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "threshold",
            "template_id": "fn:threshold",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "score",
      "template_id": "fn:score",
      "input": 5,
      "output": 50
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": 50,
      "output": 100
    },
    {
      "index": 2,
      "step_name": "threshold",
      "template_id": "fn:threshold",
      "input": 100,
      "output": 100
    },
    {
      "index": 3,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": 100,
      "output": 1
    }
  ],
  "branches": []
}
```

#### Input 2 = `10`

**Output Value:**
```json
2
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:score",
      "name": "score",
      "fn_name": "score",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn score(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:threshold",
      "name": "threshold",
      "fn_name": "threshold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn threshold(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "score",
          "template_id": "fn:score",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "threshold",
          "template_id": "fn:threshold",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `2fff592f7c52321b4754968d1d50070f99838b17338946350fd5568177d6cd25`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "score",
    "template_id": "fn:score",
    "input": 10,
    "output": 100
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": 100,
    "output": 200
  },
  {
    "index": 2,
    "step_name": "threshold",
    "template_id": "fn:threshold",
    "input": 200,
    "output": 200
  },
  {
    "index": 3,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": 200,
    "output": 2
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `815b8017fd43a8ad6387cb6199c3f2e16801bee8319d3671259bbd9ef21ab2b0`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:score",
        "name": "score",
        "fn_name": "score",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn score(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:threshold",
        "name": "threshold",
        "fn_name": "threshold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn threshold(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "score",
            "template_id": "fn:score",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "threshold",
            "template_id": "fn:threshold",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 2,
  "steps": [
    {
      "index": 0,
      "step_name": "score",
      "template_id": "fn:score",
      "input": 10,
      "output": 100
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": 100,
      "output": 200
    },
    {
      "index": 2,
      "step_name": "threshold",
      "template_id": "fn:threshold",
      "input": 200,
      "output": 200
    },
    {
      "index": 3,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": 200,
      "output": 2
    }
  ],
  "branches": []
}
```

#### Input 3 = `20`

**Output Value:**
```json
4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:score",
      "name": "score",
      "fn_name": "score",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn score(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:threshold",
      "name": "threshold",
      "fn_name": "threshold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn threshold(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "score",
          "template_id": "fn:score",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "threshold",
          "template_id": "fn:threshold",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `0a72c0ba3324b49f736b0f8158b3f666a890ef2d1dc6ea8b1833194bead6704f`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "score",
    "template_id": "fn:score",
    "input": 20,
    "output": 200
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": 200,
    "output": 400
  },
  {
    "index": 2,
    "step_name": "threshold",
    "template_id": "fn:threshold",
    "input": 400,
    "output": 400
  },
  {
    "index": 3,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": 400,
    "output": 4
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `625896e876b0416fe5245b8e489c9ee3a8f6dcd7f659e08db08612abc76148bd`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:score",
        "name": "score",
        "fn_name": "score",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn score(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:threshold",
        "name": "threshold",
        "fn_name": "threshold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn threshold(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "score",
            "template_id": "fn:score",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "threshold",
            "template_id": "fn:threshold",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 20,
  "output": 4,
  "steps": [
    {
      "index": 0,
      "step_name": "score",
      "template_id": "fn:score",
      "input": 20,
      "output": 200
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": 200,
      "output": 400
    },
    {
      "index": 2,
      "step_name": "threshold",
      "template_id": "fn:threshold",
      "input": 400,
      "output": 400
    },
    {
      "index": 3,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": 400,
      "output": 4
    }
  ],
  "branches": []
}
```

#### Input 4 = `30`

**Output Value:**
```json
6
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:score",
      "name": "score",
      "fn_name": "score",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn score(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:threshold",
      "name": "threshold",
      "fn_name": "threshold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn threshold(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "score",
          "template_id": "fn:score",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "threshold",
          "template_id": "fn:threshold",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `0f8db677ec518d2483e467c4c9943497c20ab462702070f5b9cc6e877be0cb94`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "score",
    "template_id": "fn:score",
    "input": 30,
    "output": 300
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": 300,
    "output": 600
  },
  {
    "index": 2,
    "step_name": "threshold",
    "template_id": "fn:threshold",
    "input": 600,
    "output": 600
  },
  {
    "index": 3,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": 600,
    "output": 6
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `82814c74e8a647044e6866e48ed10c0f7fbfed549289bd7f43c741ca3460e0f6`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:score",
        "name": "score",
        "fn_name": "score",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn score(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:threshold",
        "name": "threshold",
        "fn_name": "threshold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn threshold(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "score",
            "template_id": "fn:score",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "threshold",
            "template_id": "fn:threshold",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 30,
  "output": 6,
  "steps": [
    {
      "index": 0,
      "step_name": "score",
      "template_id": "fn:score",
      "input": 30,
      "output": 300
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": 300,
      "output": 600
    },
    {
      "index": 2,
      "step_name": "threshold",
      "template_id": "fn:threshold",
      "input": 600,
      "output": 600
    },
    {
      "index": 3,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": 600,
      "output": 6
    }
  ],
  "branches": []
}
```

#### Input 5 = `50`

**Output Value:**
```json
10
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:multiply",
      "name": "multiply",
      "fn_name": "multiply",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn multiply(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:score",
      "name": "score",
      "fn_name": "score",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn score(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:threshold",
      "name": "threshold",
      "fn_name": "threshold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn threshold(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "score",
          "template_id": "fn:score",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "multiply",
          "template_id": "fn:multiply",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 2,
          "name": "threshold",
          "template_id": "fn:threshold",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 3,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `086cb3d02230269cfb93137d832a961f6da038d71af7571f5e53d7dd9ba5a225`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "score",
    "template_id": "fn:score",
    "input": 50,
    "output": 500
  },
  {
    "index": 1,
    "step_name": "multiply",
    "template_id": "fn:multiply",
    "input": 500,
    "output": 1000
  },
  {
    "index": 2,
    "step_name": "threshold",
    "template_id": "fn:threshold",
    "input": 1000,
    "output": 1000
  },
  {
    "index": 3,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": 1000,
    "output": 10
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `e6889ab8e99fd71ac4e8757455d974c3b57c35125d01d1994b8b6e4c70bc6071`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:multiply",
        "name": "multiply",
        "fn_name": "multiply",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn multiply(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:score",
        "name": "score",
        "fn_name": "score",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn score(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:threshold",
        "name": "threshold",
        "fn_name": "threshold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn threshold(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "score",
            "template_id": "fn:score",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "multiply",
            "template_id": "fn:multiply",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 2,
            "name": "threshold",
            "template_id": "fn:threshold",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 3,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 10,
  "steps": [
    {
      "index": 0,
      "step_name": "score",
      "template_id": "fn:score",
      "input": 50,
      "output": 500
    },
    {
      "index": 1,
      "step_name": "multiply",
      "template_id": "fn:multiply",
      "input": 500,
      "output": 1000
    },
    {
      "index": 2,
      "step_name": "threshold",
      "template_id": "fn:threshold",
      "input": 1000,
      "output": 1000
    },
    {
      "index": 3,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": 1000,
      "output": 10
    }
  ],
  "branches": []
}
```

---

## Program 14 (Tax Calculation)

### RLang Source

```
fn low_rate(x: Int) -> Int;
fn mid_rate(x: Int) -> Int;
fn high_rate(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value <= 10000) {
        low_rate
    } else {
        if (__value <= 50000) {
            mid_rate
        } else {
            high_rate
        }
    }
}
```

### Test Inputs

- Input 1: `5000`
- Input 2: `10000`
- Input 3: `25000`
- Input 4: `50000`
- Input 5: `100000`

#### Input 1 = `5000`

**Output Value:**
```json
500
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_rate",
      "name": "high_rate",
      "fn_name": "high_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_rate",
      "name": "low_rate",
      "fn_name": "low_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:mid_rate",
      "name": "mid_rate",
      "fn_name": "mid_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn mid_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10000
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50000
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "high_rate",
                  "template_id": "fn:high_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "mid_rate",
                  "template_id": "fn:mid_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "low_rate",
              "template_id": "fn:low_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `4c67d31928be0970397ed509affa288d601557953885a9dda9cf4193618a65fe`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "low_rate",
    "template_id": "fn:low_rate",
    "input": 5000,
    "output": 500
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `6dc1c9a1cb91ca127612fdd2ba5759ff3b670c5aafaf54fe9a07ce02423108a0`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_rate",
        "name": "high_rate",
        "fn_name": "high_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_rate",
        "name": "low_rate",
        "fn_name": "low_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:mid_rate",
        "name": "mid_rate",
        "fn_name": "mid_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn mid_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10000
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50000
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "high_rate",
                    "template_id": "fn:high_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "mid_rate",
                    "template_id": "fn:mid_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "low_rate",
                "template_id": "fn:low_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5000,
  "output": 500,
  "steps": [
    {
      "index": 0,
      "step_name": "low_rate",
      "template_id": "fn:low_rate",
      "input": 5000,
      "output": 500
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `10000`

**Output Value:**
```json
1000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_rate",
      "name": "high_rate",
      "fn_name": "high_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_rate",
      "name": "low_rate",
      "fn_name": "low_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:mid_rate",
      "name": "mid_rate",
      "fn_name": "mid_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn mid_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10000
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50000
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "high_rate",
                  "template_id": "fn:high_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "mid_rate",
                  "template_id": "fn:mid_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "low_rate",
              "template_id": "fn:low_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `b10c44cfcc554afbd1673c4437312919f68df643ad3ebe900768d7edab890025`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "low_rate",
    "template_id": "fn:low_rate",
    "input": 10000,
    "output": 1000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `7f850e82b47a57bf8df2cbf18cd7e922a6c6f0beaf1db5f88af5abf7892eb6a2`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_rate",
        "name": "high_rate",
        "fn_name": "high_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_rate",
        "name": "low_rate",
        "fn_name": "low_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:mid_rate",
        "name": "mid_rate",
        "fn_name": "mid_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn mid_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10000
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50000
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "high_rate",
                    "template_id": "fn:high_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "mid_rate",
                    "template_id": "fn:mid_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "low_rate",
                "template_id": "fn:low_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 10000,
  "output": 1000,
  "steps": [
    {
      "index": 0,
      "step_name": "low_rate",
      "template_id": "fn:low_rate",
      "input": 10000,
      "output": 1000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `25000`

**Output Value:**
```json
5000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_rate",
      "name": "high_rate",
      "fn_name": "high_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_rate",
      "name": "low_rate",
      "fn_name": "low_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:mid_rate",
      "name": "mid_rate",
      "fn_name": "mid_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn mid_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10000
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50000
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "high_rate",
                  "template_id": "fn:high_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "mid_rate",
                  "template_id": "fn:mid_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "low_rate",
              "template_id": "fn:low_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `8f0b9199e3c18a118000e09b712cf389aa34f18335a8d0f4cc2299ac702051e3`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "mid_rate",
    "template_id": "fn:mid_rate",
    "input": 25000,
    "output": 5000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `b8ef12143bf72c4a069b1515fe52809141850a6e9e9a6976f7810e5f6a29ac86`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_rate",
        "name": "high_rate",
        "fn_name": "high_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_rate",
        "name": "low_rate",
        "fn_name": "low_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:mid_rate",
        "name": "mid_rate",
        "fn_name": "mid_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn mid_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10000
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50000
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "high_rate",
                    "template_id": "fn:high_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "mid_rate",
                    "template_id": "fn:mid_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "low_rate",
                "template_id": "fn:low_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25000,
  "output": 5000,
  "steps": [
    {
      "index": 0,
      "step_name": "mid_rate",
      "template_id": "fn:mid_rate",
      "input": 25000,
      "output": 5000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `50000`

**Output Value:**
```json
10000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_rate",
      "name": "high_rate",
      "fn_name": "high_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_rate",
      "name": "low_rate",
      "fn_name": "low_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:mid_rate",
      "name": "mid_rate",
      "fn_name": "mid_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn mid_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10000
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50000
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "high_rate",
                  "template_id": "fn:high_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "mid_rate",
                  "template_id": "fn:mid_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "low_rate",
              "template_id": "fn:low_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `8bc63a484fe30d3ee3bb843616a898b316918cad95237db847dd47b7a9e22a4e`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "mid_rate",
    "template_id": "fn:mid_rate",
    "input": 50000,
    "output": 10000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `24158faf0783dd37c71cdc8dbd17aa549ecb5af33d4e54ed32d8bfb7263a1e29`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_rate",
        "name": "high_rate",
        "fn_name": "high_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_rate",
        "name": "low_rate",
        "fn_name": "low_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:mid_rate",
        "name": "mid_rate",
        "fn_name": "mid_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn mid_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10000
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50000
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "high_rate",
                    "template_id": "fn:high_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "mid_rate",
                    "template_id": "fn:mid_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "low_rate",
                "template_id": "fn:low_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 50000,
  "output": 10000,
  "steps": [
    {
      "index": 0,
      "step_name": "mid_rate",
      "template_id": "fn:mid_rate",
      "input": 50000,
      "output": 10000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `100000`

**Output Value:**
```json
30000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_rate",
      "name": "high_rate",
      "fn_name": "high_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_rate",
      "name": "low_rate",
      "fn_name": "low_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:mid_rate",
      "name": "mid_rate",
      "fn_name": "mid_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn mid_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10000
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50000
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "high_rate",
                  "template_id": "fn:high_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "mid_rate",
                  "template_id": "fn:mid_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "low_rate",
              "template_id": "fn:low_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `22593d65e09f71934cf987c4be71236db39681786280a9b162d0786f746f54e6`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "high_rate",
    "template_id": "fn:high_rate",
    "input": 100000,
    "output": 30000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `11e2d879f3258f4a470f02c82243b598e6082008ed5029be60b75e9684ea908c`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_rate",
        "name": "high_rate",
        "fn_name": "high_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_rate",
        "name": "low_rate",
        "fn_name": "low_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:mid_rate",
        "name": "mid_rate",
        "fn_name": "mid_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn mid_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10000
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50000
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "high_rate",
                    "template_id": "fn:high_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "mid_rate",
                    "template_id": "fn:mid_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "low_rate",
                "template_id": "fn:low_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 100000,
  "output": 30000,
  "steps": [
    {
      "index": 0,
      "step_name": "high_rate",
      "template_id": "fn:high_rate",
      "input": 100000,
      "output": 30000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 15 (Insurance Premium)

### RLang Source

```
fn young_rate(x: Int) -> Int;
fn adult_rate(x: Int) -> Int;
fn senior_rate(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value < 25) {
        young_rate
    } else {
        if (__value < 65) {
            adult_rate
        } else {
            senior_rate
        }
    }
}
```

### Test Inputs

- Input 1: `20`
- Input 2: `30`
- Input 3: `50`
- Input 4: `70`
- Input 5: `80`

#### Input 1 = `20`

**Output Value:**
```json
3000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:adult_rate",
      "name": "adult_rate",
      "fn_name": "adult_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn adult_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:senior_rate",
      "name": "senior_rate",
      "fn_name": "senior_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn senior_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:young_rate",
      "name": "young_rate",
      "fn_name": "young_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn young_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "senior_rate",
                  "template_id": "fn:senior_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "adult_rate",
                  "template_id": "fn:adult_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "young_rate",
              "template_id": "fn:young_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `829d77c39b20093732ba874737855a6144c7f570ae87a716150045fc8ad36cb4`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "young_rate",
    "template_id": "fn:young_rate",
    "input": 20,
    "output": 3000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `a51b9e23546740fc21b512754f006208c17b18775afd59650a5342112eb7bfff`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:adult_rate",
        "name": "adult_rate",
        "fn_name": "adult_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn adult_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:senior_rate",
        "name": "senior_rate",
        "fn_name": "senior_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn senior_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:young_rate",
        "name": "young_rate",
        "fn_name": "young_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn young_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 65
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "senior_rate",
                    "template_id": "fn:senior_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "adult_rate",
                    "template_id": "fn:adult_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "young_rate",
                "template_id": "fn:young_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 20,
  "output": 3000,
  "steps": [
    {
      "index": 0,
      "step_name": "young_rate",
      "template_id": "fn:young_rate",
      "input": 20,
      "output": 3000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `30`

**Output Value:**
```json
3000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:adult_rate",
      "name": "adult_rate",
      "fn_name": "adult_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn adult_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:senior_rate",
      "name": "senior_rate",
      "fn_name": "senior_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn senior_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:young_rate",
      "name": "young_rate",
      "fn_name": "young_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn young_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "senior_rate",
                  "template_id": "fn:senior_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "adult_rate",
                  "template_id": "fn:adult_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "young_rate",
              "template_id": "fn:young_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `8416ec723938e7350875aa94a156bea3f54ccef6dafb600c1ae923e429b825fb`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "adult_rate",
    "template_id": "fn:adult_rate",
    "input": 30,
    "output": 3000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `f843aba06387351e27771d862cf1ddd8fd49b1073993ec984fd8d6203930fd7c`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:adult_rate",
        "name": "adult_rate",
        "fn_name": "adult_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn adult_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:senior_rate",
        "name": "senior_rate",
        "fn_name": "senior_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn senior_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:young_rate",
        "name": "young_rate",
        "fn_name": "young_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn young_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 65
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "senior_rate",
                    "template_id": "fn:senior_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "adult_rate",
                    "template_id": "fn:adult_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "young_rate",
                "template_id": "fn:young_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 30,
  "output": 3000,
  "steps": [
    {
      "index": 0,
      "step_name": "adult_rate",
      "template_id": "fn:adult_rate",
      "input": 30,
      "output": 3000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `50`

**Output Value:**
```json
5000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:adult_rate",
      "name": "adult_rate",
      "fn_name": "adult_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn adult_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:senior_rate",
      "name": "senior_rate",
      "fn_name": "senior_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn senior_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:young_rate",
      "name": "young_rate",
      "fn_name": "young_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn young_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "senior_rate",
                  "template_id": "fn:senior_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "adult_rate",
                  "template_id": "fn:adult_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "young_rate",
              "template_id": "fn:young_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `0a5304018f52be7a06ed09973fc244fff352b24fe3b0e7c614273561a453ba9c`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "adult_rate",
    "template_id": "fn:adult_rate",
    "input": 50,
    "output": 5000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `398b3892b170333b90e4d415a1a9f0620eace4ae7b40331a96ccbeb6931885c9`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:adult_rate",
        "name": "adult_rate",
        "fn_name": "adult_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn adult_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:senior_rate",
        "name": "senior_rate",
        "fn_name": "senior_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn senior_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:young_rate",
        "name": "young_rate",
        "fn_name": "young_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn young_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 65
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "senior_rate",
                    "template_id": "fn:senior_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "adult_rate",
                    "template_id": "fn:adult_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "young_rate",
                "template_id": "fn:young_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 5000,
  "steps": [
    {
      "index": 0,
      "step_name": "adult_rate",
      "template_id": "fn:adult_rate",
      "input": 50,
      "output": 5000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `70`

**Output Value:**
```json
14000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:adult_rate",
      "name": "adult_rate",
      "fn_name": "adult_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn adult_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:senior_rate",
      "name": "senior_rate",
      "fn_name": "senior_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn senior_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:young_rate",
      "name": "young_rate",
      "fn_name": "young_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn young_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "senior_rate",
                  "template_id": "fn:senior_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "adult_rate",
                  "template_id": "fn:adult_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "young_rate",
              "template_id": "fn:young_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `c9733214497e757fba0c44be11d08f9aacc6b8a825b146f2f490d75da227d629`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "senior_rate",
    "template_id": "fn:senior_rate",
    "input": 70,
    "output": 14000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `ba635b5c79d1a084856a65e656dc3da65a7bf2bfb278af273e7b58936edf427c`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:adult_rate",
        "name": "adult_rate",
        "fn_name": "adult_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn adult_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:senior_rate",
        "name": "senior_rate",
        "fn_name": "senior_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn senior_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:young_rate",
        "name": "young_rate",
        "fn_name": "young_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn young_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 65
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "senior_rate",
                    "template_id": "fn:senior_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "adult_rate",
                    "template_id": "fn:adult_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "young_rate",
                "template_id": "fn:young_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 70,
  "output": 14000,
  "steps": [
    {
      "index": 0,
      "step_name": "senior_rate",
      "template_id": "fn:senior_rate",
      "input": 70,
      "output": 14000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 5 = `80`

**Output Value:**
```json
16000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:adult_rate",
      "name": "adult_rate",
      "fn_name": "adult_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn adult_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:senior_rate",
      "name": "senior_rate",
      "fn_name": "senior_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn senior_rate(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:young_rate",
      "name": "young_rate",
      "fn_name": "young_rate",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn young_rate(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "senior_rate",
                  "template_id": "fn:senior_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "adult_rate",
                  "template_id": "fn:adult_rate",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "young_rate",
              "template_id": "fn:young_rate",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `1c278940786c56c176ca2a84793d32a37f89383c5f49eaea177e5ec90b4c30f9`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "senior_rate",
    "template_id": "fn:senior_rate",
    "input": 80,
    "output": 16000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `7471ddd4040b5c1a67403a875c4219c9ac395458824616625c64cc9049db12d1`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:adult_rate",
        "name": "adult_rate",
        "fn_name": "adult_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn adult_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:senior_rate",
        "name": "senior_rate",
        "fn_name": "senior_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn senior_rate(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:young_rate",
        "name": "young_rate",
        "fn_name": "young_rate",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn young_rate(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 65
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "senior_rate",
                    "template_id": "fn:senior_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "adult_rate",
                    "template_id": "fn:adult_rate",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "young_rate",
                "template_id": "fn:young_rate",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 80,
  "output": 16000,
  "steps": [
    {
      "index": 0,
      "step_name": "senior_rate",
      "template_id": "fn:senior_rate",
      "input": 80,
      "output": 16000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 16 (Eligibility Check)

### RLang Source

```
fn eligible(x: Int) -> Int;
fn ineligible(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value >= 18 && __value <= 65) {
        eligible
    } else {
        ineligible
    }
}
```

### Test Inputs

- Input 1: `15`
- Input 2: `18`
- Input 3: `30`
- Input 4: `65`
- Input 5: `70`

#### Input 1 = `15`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:eligible",
      "name": "eligible",
      "fn_name": "eligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn eligible(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:ineligible",
      "name": "ineligible",
      "fn_name": "ineligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn ineligible(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 18
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 65
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "ineligible",
              "template_id": "fn:ineligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "eligible",
              "template_id": "fn:eligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `dd26d7c261ac3c76f22e5a284880d8b1a3b212533c7dc87a0aef000627ba8db7`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "ineligible",
    "template_id": "fn:ineligible",
    "input": 15,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `83e40f70d3ec7b61c7cfc63ddae6ca1c9fc7f374f27ecc1798fb4e11fbb1edde`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:eligible",
        "name": "eligible",
        "fn_name": "eligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn eligible(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:ineligible",
        "name": "ineligible",
        "fn_name": "ineligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn ineligible(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 18
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "ineligible",
                "template_id": "fn:ineligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "eligible",
                "template_id": "fn:eligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "ineligible",
      "template_id": "fn:ineligible",
      "input": 15,
      "output": 0
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `18`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:eligible",
      "name": "eligible",
      "fn_name": "eligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn eligible(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:ineligible",
      "name": "ineligible",
      "fn_name": "ineligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn ineligible(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 18
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 65
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "ineligible",
              "template_id": "fn:ineligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "eligible",
              "template_id": "fn:eligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `3458bee0282a2eb87cfe7f1292ad8f70506967ead8a496b6a25ad99c0cc143c3`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "eligible",
    "template_id": "fn:eligible",
    "input": 18,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `4738bbc42e5c7b4687a0fe61d40955925ecf46f5e9e9242013c22e7f34ef7853`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:eligible",
        "name": "eligible",
        "fn_name": "eligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn eligible(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:ineligible",
        "name": "ineligible",
        "fn_name": "ineligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn ineligible(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 18
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "ineligible",
                "template_id": "fn:ineligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "eligible",
                "template_id": "fn:eligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 18,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "eligible",
      "template_id": "fn:eligible",
      "input": 18,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `30`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:eligible",
      "name": "eligible",
      "fn_name": "eligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn eligible(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:ineligible",
      "name": "ineligible",
      "fn_name": "ineligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn ineligible(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 18
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 65
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "ineligible",
              "template_id": "fn:ineligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "eligible",
              "template_id": "fn:eligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `6b1691c27c3c9c0212eb29e21464e58e5aab432f5d33d34e872c84f1ebc8c0e8`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "eligible",
    "template_id": "fn:eligible",
    "input": 30,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `50bf3f2087ace70c87959417f8488f7bb8c1e694afffae9b3c3c3330d074dbdd`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:eligible",
        "name": "eligible",
        "fn_name": "eligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn eligible(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:ineligible",
        "name": "ineligible",
        "fn_name": "ineligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn ineligible(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 18
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "ineligible",
                "template_id": "fn:ineligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "eligible",
                "template_id": "fn:eligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 30,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "eligible",
      "template_id": "fn:eligible",
      "input": 30,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `65`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:eligible",
      "name": "eligible",
      "fn_name": "eligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn eligible(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:ineligible",
      "name": "ineligible",
      "fn_name": "ineligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn ineligible(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 18
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 65
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "ineligible",
              "template_id": "fn:ineligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "eligible",
              "template_id": "fn:eligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `f40662048257d9a33602c35680a7ae101b7cf7e50484132d121489db693a71c1`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "eligible",
    "template_id": "fn:eligible",
    "input": 65,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `45cc5052c721622b822f25c491ea10f48771fa8a308b5c76451e40448ea2080c`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:eligible",
        "name": "eligible",
        "fn_name": "eligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn eligible(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:ineligible",
        "name": "ineligible",
        "fn_name": "ineligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn ineligible(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 18
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "ineligible",
                "template_id": "fn:ineligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "eligible",
                "template_id": "fn:eligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 65,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "eligible",
      "template_id": "fn:eligible",
      "input": 65,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `70`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:eligible",
      "name": "eligible",
      "fn_name": "eligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn eligible(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:ineligible",
      "name": "ineligible",
      "fn_name": "ineligible",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn ineligible(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 18
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 65
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "ineligible",
              "template_id": "fn:ineligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "eligible",
              "template_id": "fn:eligible",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `00ccb1ceefd3e048449bc6a34647ffb4768e5e3a9f7ccf6becef9db679638deb`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "ineligible",
    "template_id": "fn:ineligible",
    "input": 70,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `2f2fdbd2d40cb8a9bfd93da9707d413f361b708dd1b31f58670cb546c858b55d`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:eligible",
        "name": "eligible",
        "fn_name": "eligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn eligible(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:ineligible",
        "name": "ineligible",
        "fn_name": "ineligible",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn ineligible(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 18
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 65
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "ineligible",
                "template_id": "fn:ineligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "eligible",
                "template_id": "fn:eligible",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 70,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "ineligible",
      "template_id": "fn:ineligible",
      "input": 70,
      "output": 0
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 17 (Billing Tier)

### RLang Source

```
fn tier1(x: Int) -> Int;
fn tier2(x: Int) -> Int;
fn tier3(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value <= 100) {
        tier1
    } else {
        if (__value <= 500) {
            tier2
        } else {
            tier3
        }
    }
}
```

### Test Inputs

- Input 1: `50`
- Input 2: `100`
- Input 3: `250`
- Input 4: `500`
- Input 5: `1000`

#### Input 1 = `50`

**Output Value:**
```json
50
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:tier1",
      "name": "tier1",
      "fn_name": "tier1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier2",
      "name": "tier2",
      "fn_name": "tier2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier3",
      "name": "tier3",
      "fn_name": "tier3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 100
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "tier3",
                  "template_id": "fn:tier3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "tier2",
                  "template_id": "fn:tier2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "tier1",
              "template_id": "fn:tier1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `f6f8a6af0c972414188bd1b7036f882534c664748484692dc69b760f73f91583`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "tier1",
    "template_id": "fn:tier1",
    "input": 50,
    "output": 50
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `335b4ee4c90805edac05bc740be708f66b1d07e5e37db868bba7cc702564aef3`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:tier1",
        "name": "tier1",
        "fn_name": "tier1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier2",
        "name": "tier2",
        "fn_name": "tier2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier3",
        "name": "tier3",
        "fn_name": "tier3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 100
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "tier3",
                    "template_id": "fn:tier3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "tier2",
                    "template_id": "fn:tier2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "tier1",
                "template_id": "fn:tier1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 50,
  "steps": [
    {
      "index": 0,
      "step_name": "tier1",
      "template_id": "fn:tier1",
      "input": 50,
      "output": 50
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `100`

**Output Value:**
```json
100
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:tier1",
      "name": "tier1",
      "fn_name": "tier1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier2",
      "name": "tier2",
      "fn_name": "tier2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier3",
      "name": "tier3",
      "fn_name": "tier3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 100
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "tier3",
                  "template_id": "fn:tier3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "tier2",
                  "template_id": "fn:tier2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "tier1",
              "template_id": "fn:tier1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `eab845dd342c995936d8975cf533d454ef17eefc9d79a8eeb9d45ee517bba96b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "tier1",
    "template_id": "fn:tier1",
    "input": 100,
    "output": 100
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `97f46ef0b1ed34859f9cf7129d9de1619668f992400eb0708effcee591f6e23f`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:tier1",
        "name": "tier1",
        "fn_name": "tier1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier2",
        "name": "tier2",
        "fn_name": "tier2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier3",
        "name": "tier3",
        "fn_name": "tier3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 100
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "tier3",
                    "template_id": "fn:tier3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "tier2",
                    "template_id": "fn:tier2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "tier1",
                "template_id": "fn:tier1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 100,
  "output": 100,
  "steps": [
    {
      "index": 0,
      "step_name": "tier1",
      "template_id": "fn:tier1",
      "input": 100,
      "output": 100
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `250`

**Output Value:**
```json
500
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:tier1",
      "name": "tier1",
      "fn_name": "tier1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier2",
      "name": "tier2",
      "fn_name": "tier2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier3",
      "name": "tier3",
      "fn_name": "tier3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 100
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "tier3",
                  "template_id": "fn:tier3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "tier2",
                  "template_id": "fn:tier2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "tier1",
              "template_id": "fn:tier1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `2d1f46dccd18e4b168645fc43f925e86162a1f13cbe0ab6d6e092d34e3a961cc`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "tier2",
    "template_id": "fn:tier2",
    "input": 250,
    "output": 500
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `ec10161d16f49bc29e9dc5ac52893cdb006e88496193d67263658c4e91a83ff0`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:tier1",
        "name": "tier1",
        "fn_name": "tier1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier2",
        "name": "tier2",
        "fn_name": "tier2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier3",
        "name": "tier3",
        "fn_name": "tier3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 100
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "tier3",
                    "template_id": "fn:tier3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "tier2",
                    "template_id": "fn:tier2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "tier1",
                "template_id": "fn:tier1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 250,
  "output": 500,
  "steps": [
    {
      "index": 0,
      "step_name": "tier2",
      "template_id": "fn:tier2",
      "input": 250,
      "output": 500
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `500`

**Output Value:**
```json
1000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:tier1",
      "name": "tier1",
      "fn_name": "tier1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier2",
      "name": "tier2",
      "fn_name": "tier2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier3",
      "name": "tier3",
      "fn_name": "tier3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 100
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "tier3",
                  "template_id": "fn:tier3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "tier2",
                  "template_id": "fn:tier2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "tier1",
              "template_id": "fn:tier1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `c32909a2de0fbff5155a2ae4b3f882ef1f5cfd536547c359c174f8b7990620e3`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "tier2",
    "template_id": "fn:tier2",
    "input": 500,
    "output": 1000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `4fa78b5cfef99999a3b25e9c67e0b8d6b4559ebd5a84763073d92b48041d09ad`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:tier1",
        "name": "tier1",
        "fn_name": "tier1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier2",
        "name": "tier2",
        "fn_name": "tier2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier3",
        "name": "tier3",
        "fn_name": "tier3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 100
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "tier3",
                    "template_id": "fn:tier3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "tier2",
                    "template_id": "fn:tier2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "tier1",
                "template_id": "fn:tier1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 500,
  "output": 1000,
  "steps": [
    {
      "index": 0,
      "step_name": "tier2",
      "template_id": "fn:tier2",
      "input": 500,
      "output": 1000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `1000`

**Output Value:**
```json
3000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:tier1",
      "name": "tier1",
      "fn_name": "tier1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier2",
      "name": "tier2",
      "fn_name": "tier2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:tier3",
      "name": "tier3",
      "fn_name": "tier3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn tier3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 100
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "tier3",
                  "template_id": "fn:tier3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "tier2",
                  "template_id": "fn:tier2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "tier1",
              "template_id": "fn:tier1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `abd539f9d7c4a87729c58da9335be5557b073a4d14d2aa5e6a9c084cc447fb17`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "tier3",
    "template_id": "fn:tier3",
    "input": 1000,
    "output": 3000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `3559ebc149c9b0212cd72e6d381cd03bb8eac937d9308df4308fab3e073720e3`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:tier1",
        "name": "tier1",
        "fn_name": "tier1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier2",
        "name": "tier2",
        "fn_name": "tier2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:tier3",
        "name": "tier3",
        "fn_name": "tier3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn tier3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 100
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "tier3",
                    "template_id": "fn:tier3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "tier2",
                    "template_id": "fn:tier2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "tier1",
                "template_id": "fn:tier1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 1000,
  "output": 3000,
  "steps": [
    {
      "index": 0,
      "step_name": "tier3",
      "template_id": "fn:tier3",
      "input": 1000,
      "output": 3000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 18 (Allocation Logic)

### RLang Source

```
fn allocate_low(x: Int) -> Int;
fn allocate_med(x: Int) -> Int;
fn allocate_high(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value < 30) {
        allocate_low
    } else {
        if (__value < 70) {
            allocate_med
        } else {
            allocate_high
        }
    }
}
```

### Test Inputs

- Input 1: `10`
- Input 2: `30`
- Input 3: `50`
- Input 4: `70`
- Input 5: `90`

#### Input 1 = `10`

**Output Value:**
```json
100
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:allocate_high",
      "name": "allocate_high",
      "fn_name": "allocate_high",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_high(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_low",
      "name": "allocate_low",
      "fn_name": "allocate_low",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_low(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_med",
      "name": "allocate_med",
      "fn_name": "allocate_med",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_med(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 70
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "allocate_high",
                  "template_id": "fn:allocate_high",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "allocate_med",
                  "template_id": "fn:allocate_med",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "allocate_low",
              "template_id": "fn:allocate_low",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `58fcd77ddbf08caca0fc5cf36ec85475d8ab0b36edc267d43a83fc3ef2783af1`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "allocate_low",
    "template_id": "fn:allocate_low",
    "input": 10,
    "output": 100
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `92d661e43f6a9da4021d212c6215a87479ea9d19b5b913642a4beef5722e966e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:allocate_high",
        "name": "allocate_high",
        "fn_name": "allocate_high",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_high(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_low",
        "name": "allocate_low",
        "fn_name": "allocate_low",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_low(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_med",
        "name": "allocate_med",
        "fn_name": "allocate_med",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_med(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 70
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "allocate_high",
                    "template_id": "fn:allocate_high",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "allocate_med",
                    "template_id": "fn:allocate_med",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "allocate_low",
                "template_id": "fn:allocate_low",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 100,
  "steps": [
    {
      "index": 0,
      "step_name": "allocate_low",
      "template_id": "fn:allocate_low",
      "input": 10,
      "output": 100
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `30`

**Output Value:**
```json
600
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:allocate_high",
      "name": "allocate_high",
      "fn_name": "allocate_high",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_high(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_low",
      "name": "allocate_low",
      "fn_name": "allocate_low",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_low(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_med",
      "name": "allocate_med",
      "fn_name": "allocate_med",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_med(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 70
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "allocate_high",
                  "template_id": "fn:allocate_high",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "allocate_med",
                  "template_id": "fn:allocate_med",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "allocate_low",
              "template_id": "fn:allocate_low",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `ac5b7e340b7e72285b016ad0d516c5f27cc24f0cf37c1a330d0d3ba82b875e04`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "allocate_med",
    "template_id": "fn:allocate_med",
    "input": 30,
    "output": 600
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `3a436fec4cc03340698b1c5c750cf1e67d51e7389052ee6ae7bc3f9c1157bc3c`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:allocate_high",
        "name": "allocate_high",
        "fn_name": "allocate_high",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_high(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_low",
        "name": "allocate_low",
        "fn_name": "allocate_low",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_low(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_med",
        "name": "allocate_med",
        "fn_name": "allocate_med",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_med(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 70
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "allocate_high",
                    "template_id": "fn:allocate_high",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "allocate_med",
                    "template_id": "fn:allocate_med",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "allocate_low",
                "template_id": "fn:allocate_low",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 30,
  "output": 600,
  "steps": [
    {
      "index": 0,
      "step_name": "allocate_med",
      "template_id": "fn:allocate_med",
      "input": 30,
      "output": 600
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `50`

**Output Value:**
```json
1000
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:allocate_high",
      "name": "allocate_high",
      "fn_name": "allocate_high",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_high(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_low",
      "name": "allocate_low",
      "fn_name": "allocate_low",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_low(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_med",
      "name": "allocate_med",
      "fn_name": "allocate_med",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_med(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 70
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "allocate_high",
                  "template_id": "fn:allocate_high",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "allocate_med",
                  "template_id": "fn:allocate_med",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "allocate_low",
              "template_id": "fn:allocate_low",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `456e8ecda9d0fecac08f9bea8f9030444a9aab2ea1bb24009f2aeee074db0804`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "allocate_med",
    "template_id": "fn:allocate_med",
    "input": 50,
    "output": 1000
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `cf75509ac2df17bf13f0046f5418154deb789047b5f1415f7dda37497526fb15`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:allocate_high",
        "name": "allocate_high",
        "fn_name": "allocate_high",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_high(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_low",
        "name": "allocate_low",
        "fn_name": "allocate_low",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_low(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_med",
        "name": "allocate_med",
        "fn_name": "allocate_med",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_med(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 70
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "allocate_high",
                    "template_id": "fn:allocate_high",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "allocate_med",
                    "template_id": "fn:allocate_med",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "allocate_low",
                "template_id": "fn:allocate_low",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 1000,
  "steps": [
    {
      "index": 0,
      "step_name": "allocate_med",
      "template_id": "fn:allocate_med",
      "input": 50,
      "output": 1000
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `70`

**Output Value:**
```json
2100
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:allocate_high",
      "name": "allocate_high",
      "fn_name": "allocate_high",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_high(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_low",
      "name": "allocate_low",
      "fn_name": "allocate_low",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_low(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_med",
      "name": "allocate_med",
      "fn_name": "allocate_med",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_med(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 70
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "allocate_high",
                  "template_id": "fn:allocate_high",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "allocate_med",
                  "template_id": "fn:allocate_med",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "allocate_low",
              "template_id": "fn:allocate_low",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `1f7e601ccd815875ef857a34029aecd69ae0c9aea71015e44b392421c9aa562b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "allocate_high",
    "template_id": "fn:allocate_high",
    "input": 70,
    "output": 2100
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `75744ab9822e37ea7e0afab914c7c6bcd9420e20a940db4e79247242b692acbb`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:allocate_high",
        "name": "allocate_high",
        "fn_name": "allocate_high",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_high(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_low",
        "name": "allocate_low",
        "fn_name": "allocate_low",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_low(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_med",
        "name": "allocate_med",
        "fn_name": "allocate_med",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_med(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 70
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "allocate_high",
                    "template_id": "fn:allocate_high",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "allocate_med",
                    "template_id": "fn:allocate_med",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "allocate_low",
                "template_id": "fn:allocate_low",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 70,
  "output": 2100,
  "steps": [
    {
      "index": 0,
      "step_name": "allocate_high",
      "template_id": "fn:allocate_high",
      "input": 70,
      "output": 2100
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 5 = `90`

**Output Value:**
```json
2700
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:allocate_high",
      "name": "allocate_high",
      "fn_name": "allocate_high",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_high(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_low",
      "name": "allocate_low",
      "fn_name": "allocate_low",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_low(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:allocate_med",
      "name": "allocate_med",
      "fn_name": "allocate_med",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn allocate_med(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 70
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "allocate_high",
                  "template_id": "fn:allocate_high",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "allocate_med",
                  "template_id": "fn:allocate_med",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "allocate_low",
              "template_id": "fn:allocate_low",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `16dca73d734fc13b32ba14c203d01915a292a6959377ef30749e957302731af7`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "allocate_high",
    "template_id": "fn:allocate_high",
    "input": 90,
    "output": 2700
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `8f01a25328870e759cae6d152680050f4215ac4e17adad9ea3511513612fb29b`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:allocate_high",
        "name": "allocate_high",
        "fn_name": "allocate_high",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_high(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_low",
        "name": "allocate_low",
        "fn_name": "allocate_low",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_low(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:allocate_med",
        "name": "allocate_med",
        "fn_name": "allocate_med",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn allocate_med(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 70
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "allocate_high",
                    "template_id": "fn:allocate_high",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "allocate_med",
                    "template_id": "fn:allocate_med",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "allocate_low",
                "template_id": "fn:allocate_low",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 90,
  "output": 2700,
  "steps": [
    {
      "index": 0,
      "step_name": "allocate_high",
      "template_id": "fn:allocate_high",
      "input": 90,
      "output": 2700
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 19 (Fraud Scoring)

### RLang Source

```
fn low_risk(x: Int) -> Int;
fn high_risk(x: Int) -> Int;

pipeline main(Int) -> Int {
    if ((__value > 100 && __value < 500) || __value < 0) {
        high_risk
    } else {
        low_risk
    }
}
```

### Test Inputs

- Input 1: `-10`
- Input 2: `50`
- Input 3: `200`
- Input 4: `400`
- Input 5: `600`

#### Input 1 = `-10`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_risk",
      "name": "high_risk",
      "fn_name": "high_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_risk(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_risk",
      "name": "low_risk",
      "fn_name": "low_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_risk(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "low_risk",
              "template_id": "fn:low_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "high_risk",
              "template_id": "fn:high_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `86ab383cb78cbc4055cf85c4fcceb6badb72c40e1dcbbae0da99950155a9dd43`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "high_risk",
    "template_id": "fn:high_risk",
    "input": -10,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `533800fd947ffbd7a060b9f81cf83113411ece5f820a38198130e3cf0baade50`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_risk",
        "name": "high_risk",
        "fn_name": "high_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_risk(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_risk",
        "name": "low_risk",
        "fn_name": "low_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_risk(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "low_risk",
                "template_id": "fn:low_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "high_risk",
                "template_id": "fn:high_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": -10,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "high_risk",
      "template_id": "fn:high_risk",
      "input": -10,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `50`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_risk",
      "name": "high_risk",
      "fn_name": "high_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_risk(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_risk",
      "name": "low_risk",
      "fn_name": "low_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_risk(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "low_risk",
              "template_id": "fn:low_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "high_risk",
              "template_id": "fn:high_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `06e583426407201ab1fd8380face16d00d229b8e3b3f07e0318614ec5a73fedd`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "low_risk",
    "template_id": "fn:low_risk",
    "input": 50,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `d6ff0fec7c4eca5e302948c810ca5203607c04bebf179c484bafe26fc6bf5351`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_risk",
        "name": "high_risk",
        "fn_name": "high_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_risk(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_risk",
        "name": "low_risk",
        "fn_name": "low_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_risk(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "low_risk",
                "template_id": "fn:low_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "high_risk",
                "template_id": "fn:high_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "low_risk",
      "template_id": "fn:low_risk",
      "input": 50,
      "output": 0
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `200`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_risk",
      "name": "high_risk",
      "fn_name": "high_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_risk(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_risk",
      "name": "low_risk",
      "fn_name": "low_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_risk(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "low_risk",
              "template_id": "fn:low_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "high_risk",
              "template_id": "fn:high_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `d97876a638b39d93bba9159155361b432e7ae3d0aa9230db4c011bb81adc6ff4`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "high_risk",
    "template_id": "fn:high_risk",
    "input": 200,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `0ec223d70354826e4c82f2e6083a36435cd7ce7c35831a481c79f0a2de26cb85`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_risk",
        "name": "high_risk",
        "fn_name": "high_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_risk(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_risk",
        "name": "low_risk",
        "fn_name": "low_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_risk(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "low_risk",
                "template_id": "fn:low_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "high_risk",
                "template_id": "fn:high_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 200,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "high_risk",
      "template_id": "fn:high_risk",
      "input": 200,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `400`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_risk",
      "name": "high_risk",
      "fn_name": "high_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_risk(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_risk",
      "name": "low_risk",
      "fn_name": "low_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_risk(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "low_risk",
              "template_id": "fn:low_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "high_risk",
              "template_id": "fn:high_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `58d27f0eb3aa92dd3b12b186ae7f2308deb91eea78313ff3174abafeef0a14bb`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "high_risk",
    "template_id": "fn:high_risk",
    "input": 400,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `2f3bc781bfa72f1f1682d30e05b185cec86201c89662db0f9271f6884bfe4d09`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_risk",
        "name": "high_risk",
        "fn_name": "high_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_risk(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_risk",
        "name": "low_risk",
        "fn_name": "low_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_risk(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "low_risk",
                "template_id": "fn:low_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "high_risk",
                "template_id": "fn:high_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 400,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "high_risk",
      "template_id": "fn:high_risk",
      "input": 400,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `600`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:high_risk",
      "name": "high_risk",
      "fn_name": "high_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn high_risk(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:low_risk",
      "name": "low_risk",
      "fn_name": "low_risk",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn low_risk(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_or",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 500
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "low_risk",
              "template_id": "fn:low_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "high_risk",
              "template_id": "fn:high_risk",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `c013717997bc29e8ffea2acecde21f50991f4a917adbe4bae1340b3f9cd3fd3e`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "low_risk",
    "template_id": "fn:low_risk",
    "input": 600,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `58c2c974c0f0e6c76a8d7e555a0c2a7106c148d62c9f15dc4337436e707298c3`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:high_risk",
        "name": "high_risk",
        "fn_name": "high_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn high_risk(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:low_risk",
        "name": "low_risk",
        "fn_name": "low_risk",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn low_risk(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_or",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 500
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "low_risk",
                "template_id": "fn:low_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "high_risk",
                "template_id": "fn:high_risk",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 600,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "low_risk",
      "template_id": "fn:low_risk",
      "input": 600,
      "output": 0
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 20 (Risk Weighting)

### RLang Source

```
fn weight1(x: Int) -> Int;
fn weight2(x: Int) -> Int;
fn weight3(x: Int) -> Int;
fn weight4(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 50) {
        if (__value > 75) {
            weight1
        } else {
            weight2
        }
    } else {
        if (__value > 25) {
            weight3
        } else {
            weight4
        }
    }
}
```

### Test Inputs

- Input 1: `10`
- Input 2: `30`
- Input 3: `60`
- Input 4: `80`
- Input 5: `100`

#### Input 1 = `10`

**Output Value:**
```json
10
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:weight1",
      "name": "weight1",
      "fn_name": "weight1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight2",
      "name": "weight2",
      "fn_name": "weight2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight3",
      "name": "weight3",
      "fn_name": "weight3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight4",
      "name": "weight4",
      "fn_name": "weight4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 50
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 25
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight4",
                  "template_id": "fn:weight4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight3",
                  "template_id": "fn:weight3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 75
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight2",
                  "template_id": "fn:weight2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight1",
                  "template_id": "fn:weight1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `8ec9a12ec39367632feb08c8cc5965530fbe86fa70b21097a49825ae7382ebcd`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "weight4",
    "template_id": "fn:weight4",
    "input": 10,
    "output": 10
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `b7234f01555f712b3f57bb834dfff6521c62e3296b405d52e7cafad717d8e108`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:weight1",
        "name": "weight1",
        "fn_name": "weight1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight2",
        "name": "weight2",
        "fn_name": "weight2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight3",
        "name": "weight3",
        "fn_name": "weight3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight4",
        "name": "weight4",
        "fn_name": "weight4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 25
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight4",
                    "template_id": "fn:weight4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight3",
                    "template_id": "fn:weight3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 75
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight2",
                    "template_id": "fn:weight2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight1",
                    "template_id": "fn:weight1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 10,
  "steps": [
    {
      "index": 0,
      "step_name": "weight4",
      "template_id": "fn:weight4",
      "input": 10,
      "output": 10
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `30`

**Output Value:**
```json
60
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:weight1",
      "name": "weight1",
      "fn_name": "weight1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight2",
      "name": "weight2",
      "fn_name": "weight2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight3",
      "name": "weight3",
      "fn_name": "weight3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight4",
      "name": "weight4",
      "fn_name": "weight4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 50
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 25
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight4",
                  "template_id": "fn:weight4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight3",
                  "template_id": "fn:weight3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 75
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight2",
                  "template_id": "fn:weight2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight1",
                  "template_id": "fn:weight1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `bcd2ecea71eed20dedea9adf30445fc0ab30fefebdb7e926cbd2c0e9e0ca930d`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "weight3",
    "template_id": "fn:weight3",
    "input": 30,
    "output": 60
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `b6c581ffc85ba2a44ae63530df3c451c41db7a9115df5c68d9e73daaf0badb1c`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:weight1",
        "name": "weight1",
        "fn_name": "weight1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight2",
        "name": "weight2",
        "fn_name": "weight2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight3",
        "name": "weight3",
        "fn_name": "weight3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight4",
        "name": "weight4",
        "fn_name": "weight4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 25
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight4",
                    "template_id": "fn:weight4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight3",
                    "template_id": "fn:weight3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 75
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight2",
                    "template_id": "fn:weight2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight1",
                    "template_id": "fn:weight1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 30,
  "output": 60,
  "steps": [
    {
      "index": 0,
      "step_name": "weight3",
      "template_id": "fn:weight3",
      "input": 30,
      "output": 60
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `60`

**Output Value:**
```json
180
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:weight1",
      "name": "weight1",
      "fn_name": "weight1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight2",
      "name": "weight2",
      "fn_name": "weight2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight3",
      "name": "weight3",
      "fn_name": "weight3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight4",
      "name": "weight4",
      "fn_name": "weight4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 50
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 25
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight4",
                  "template_id": "fn:weight4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight3",
                  "template_id": "fn:weight3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 75
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight2",
                  "template_id": "fn:weight2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight1",
                  "template_id": "fn:weight1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `16fcbdb7fb888bc1a375dc49e77a2b031d0027ec062711deb82453cde1611f02`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "weight2",
    "template_id": "fn:weight2",
    "input": 60,
    "output": 180
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `d408879ebba4f33b014704910422abd48ec1125b61dfb9232f71c3dee9814bf0`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:weight1",
        "name": "weight1",
        "fn_name": "weight1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight2",
        "name": "weight2",
        "fn_name": "weight2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight3",
        "name": "weight3",
        "fn_name": "weight3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight4",
        "name": "weight4",
        "fn_name": "weight4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 25
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight4",
                    "template_id": "fn:weight4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight3",
                    "template_id": "fn:weight3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 75
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight2",
                    "template_id": "fn:weight2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight1",
                    "template_id": "fn:weight1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 60,
  "output": 180,
  "steps": [
    {
      "index": 0,
      "step_name": "weight2",
      "template_id": "fn:weight2",
      "input": 60,
      "output": 180
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `80`

**Output Value:**
```json
320
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:weight1",
      "name": "weight1",
      "fn_name": "weight1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight2",
      "name": "weight2",
      "fn_name": "weight2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight3",
      "name": "weight3",
      "fn_name": "weight3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight4",
      "name": "weight4",
      "fn_name": "weight4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 50
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 25
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight4",
                  "template_id": "fn:weight4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight3",
                  "template_id": "fn:weight3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 75
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight2",
                  "template_id": "fn:weight2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight1",
                  "template_id": "fn:weight1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `11a7bbc222cb70e11061643084fe04bda99210061d1b8ad3ad543094eb4afc18`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "weight1",
    "template_id": "fn:weight1",
    "input": 80,
    "output": 320
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `5f4707697b522ff6712c3e1cb7074a68ea2e42f873948e26d4946f21fd85e4ce`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:weight1",
        "name": "weight1",
        "fn_name": "weight1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight2",
        "name": "weight2",
        "fn_name": "weight2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight3",
        "name": "weight3",
        "fn_name": "weight3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight4",
        "name": "weight4",
        "fn_name": "weight4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 25
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight4",
                    "template_id": "fn:weight4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight3",
                    "template_id": "fn:weight3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 75
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight2",
                    "template_id": "fn:weight2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight1",
                    "template_id": "fn:weight1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 80,
  "output": 320,
  "steps": [
    {
      "index": 0,
      "step_name": "weight1",
      "template_id": "fn:weight1",
      "input": 80,
      "output": 320
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `100`

**Output Value:**
```json
400
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:weight1",
      "name": "weight1",
      "fn_name": "weight1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight2",
      "name": "weight2",
      "fn_name": "weight2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight3",
      "name": "weight3",
      "fn_name": "weight3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:weight4",
      "name": "weight4",
      "fn_name": "weight4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn weight4(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 50
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 25
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight4",
                  "template_id": "fn:weight4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight3",
                  "template_id": "fn:weight3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 75
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "weight2",
                  "template_id": "fn:weight2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "weight1",
                  "template_id": "fn:weight1",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `ec77e2517826afb9a81e7a455bcc979fef58896df49e26f4e495922c0acbc855`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "weight1",
    "template_id": "fn:weight1",
    "input": 100,
    "output": 400
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `ef002c26b82e3defb4c0914f871357c21ea80ce3abf087a7d4b4d05fb76ffe54`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:weight1",
        "name": "weight1",
        "fn_name": "weight1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight2",
        "name": "weight2",
        "fn_name": "weight2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight3",
        "name": "weight3",
        "fn_name": "weight3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:weight4",
        "name": "weight4",
        "fn_name": "weight4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn weight4(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 25
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight4",
                    "template_id": "fn:weight4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight3",
                    "template_id": "fn:weight3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 75
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "weight2",
                    "template_id": "fn:weight2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "weight1",
                    "template_id": "fn:weight1",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 100,
  "output": 400,
  "steps": [
    {
      "index": 0,
      "step_name": "weight1",
      "template_id": "fn:weight1",
      "input": 100,
      "output": 400
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 21 (Signal Processing)

### RLang Source

```
fn normalize(x: Int) -> Int;
fn classify(x: Int) -> Int;

pipeline main(Int) -> Int { normalize -> classify }
```

### Test Inputs

- Input 1: `0`
- Input 2: `25`
- Input 3: `50`
- Input 4: `75`
- Input 5: `100`

#### Input 1 = `0`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `bb4d1b92de66a51b0b7db173e057db772b5b5e54dab52b85c087ff9fa44270b8`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 0,
    "output": -50
  },
  {
    "index": 1,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": -50,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `b29e8f3aaed6de6c18989d00d8bc17e98403c0f44e63e18427b95657f6c77a8d`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 0,
      "output": -50
    },
    {
      "index": 1,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": -50,
      "output": 0
    }
  ],
  "branches": []
}
```

#### Input 2 = `25`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `623d4ea23d6adc1debf6c096ce62f66e1111bb5b3cc296f0803361904d1730b4`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 25,
    "output": -25
  },
  {
    "index": 1,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": -25,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `c769dd370af60d6cdf814a3c450ef75fa60193f7fc6f9e38f51f7718436bada4`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 25,
      "output": -25
    },
    {
      "index": 1,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": -25,
      "output": 0
    }
  ],
  "branches": []
}
```

#### Input 3 = `50`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `821f92e6e866553889fcaeddeb1f9647cdc18899786354d003d00511e8aa4cbe`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 50,
    "output": 0
  },
  {
    "index": 1,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": 0,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `1bbc62bc3a12b20b10126d1100e77b31588b65460c89430d7400fab4a73cc205`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 50,
      "output": 0
    },
    {
      "index": 1,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": 0,
      "output": 0
    }
  ],
  "branches": []
}
```

#### Input 4 = `75`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `b95afff70bf0e151d6514f69bdad992557bbbabceeec634bd841262753c77f5e`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 75,
    "output": 25
  },
  {
    "index": 1,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": 25,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `1b19918969d8c6c6dbc48fe94b701db16708c10628b22243b3ffa84dfd5abb5a`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 75,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 75,
      "output": 25
    },
    {
      "index": 1,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": 25,
      "output": 1
    }
  ],
  "branches": []
}
```

#### Input 5 = `100`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:classify",
      "name": "classify",
      "fn_name": "classify",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn classify(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:normalize",
      "name": "normalize",
      "fn_name": "normalize",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn normalize(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "index": 0,
          "name": "normalize",
          "template_id": "fn:normalize",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        },
        {
          "index": 1,
          "name": "classify",
          "template_id": "fn:classify",
          "arg_types": [],
          "input_type": "Int",
          "output_type": "Int"
        }
      ]
    }
  ]
}
```

**HMASTER:** `03db6b054fc2b22df52844fe0697202777f7e0bb1d68e215d17b9c661dda8ce0`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "normalize",
    "template_id": "fn:normalize",
    "input": 100,
    "output": 50
  },
  {
    "index": 1,
    "step_name": "classify",
    "template_id": "fn:classify",
    "input": 50,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[]
```

**HRICH:** `a5edc086102862f605980bc7df8cf83cc4647ba2e40c1392841ee1f37a458aa9`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:classify",
        "name": "classify",
        "fn_name": "classify",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn classify(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:normalize",
        "name": "normalize",
        "fn_name": "normalize",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn normalize(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "index": 0,
            "name": "normalize",
            "template_id": "fn:normalize",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          },
          {
            "index": 1,
            "name": "classify",
            "template_id": "fn:classify",
            "arg_types": [],
            "input_type": "Int",
            "output_type": "Int"
          }
        ]
      }
    ]
  },
  "input": 100,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "normalize",
      "template_id": "fn:normalize",
      "input": 100,
      "output": 50
    },
    {
      "index": 1,
      "step_name": "classify",
      "template_id": "fn:classify",
      "input": 50,
      "output": 1
    }
  ],
  "branches": []
}
```

---

## Program 22 (Tier Classification)

### RLang Source

```
fn bronze(x: Int) -> Int;
fn silver(x: Int) -> Int;
fn gold(x: Int) -> Int;
fn platinum(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value < 25) {
        bronze
    } else {
        if (__value < 50) {
            silver
        } else {
            if (__value < 75) {
                gold
            } else {
                platinum
            }
        }
    }
}
```

### Test Inputs

- Input 1: `10`
- Input 2: `30`
- Input 3: `60`
- Input 4: `80`
- Input 5: `100`

#### Input 1 = `10`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:bronze",
      "name": "bronze",
      "fn_name": "bronze",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn bronze(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:gold",
      "name": "gold",
      "fn_name": "gold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn gold(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:platinum",
      "name": "platinum",
      "fn_name": "platinum",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn platinum(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:silver",
      "name": "silver",
      "fn_name": "silver",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn silver(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 75
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "platinum",
                      "template_id": "fn:platinum",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "gold",
                      "template_id": "fn:gold",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "silver",
                  "template_id": "fn:silver",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "bronze",
              "template_id": "fn:bronze",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `99d1f34b446d876d7d5936882c7e54e1c25a1dc57dbebef9caf5a7091607953b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "bronze",
    "template_id": "fn:bronze",
    "input": 10,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `3bd009e204b9f1ecc8e98229d8e4f2ac8cbf0653fd5eb9bfc1468b5ffcedbef7`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:bronze",
        "name": "bronze",
        "fn_name": "bronze",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn bronze(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:gold",
        "name": "gold",
        "fn_name": "gold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn gold(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:platinum",
        "name": "platinum",
        "fn_name": "platinum",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn platinum(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:silver",
        "name": "silver",
        "fn_name": "silver",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn silver(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 75
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "platinum",
                        "template_id": "fn:platinum",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "gold",
                        "template_id": "fn:gold",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "silver",
                    "template_id": "fn:silver",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "bronze",
                "template_id": "fn:bronze",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 10,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "bronze",
      "template_id": "fn:bronze",
      "input": 10,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `30`

**Output Value:**
```json
2
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:bronze",
      "name": "bronze",
      "fn_name": "bronze",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn bronze(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:gold",
      "name": "gold",
      "fn_name": "gold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn gold(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:platinum",
      "name": "platinum",
      "fn_name": "platinum",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn platinum(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:silver",
      "name": "silver",
      "fn_name": "silver",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn silver(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 75
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "platinum",
                      "template_id": "fn:platinum",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "gold",
                      "template_id": "fn:gold",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "silver",
                  "template_id": "fn:silver",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "bronze",
              "template_id": "fn:bronze",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `8c19ebdb30ecedf4b6e0627448617d2f0b3ecaac2dc57026705b6fe1e461f2f6`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "silver",
    "template_id": "fn:silver",
    "input": 30,
    "output": 2
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `c96d6208d9a3317b10843e974f628b733901524edfa1fdc046da0069f4c829b9`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:bronze",
        "name": "bronze",
        "fn_name": "bronze",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn bronze(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:gold",
        "name": "gold",
        "fn_name": "gold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn gold(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:platinum",
        "name": "platinum",
        "fn_name": "platinum",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn platinum(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:silver",
        "name": "silver",
        "fn_name": "silver",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn silver(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 75
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "platinum",
                        "template_id": "fn:platinum",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "gold",
                        "template_id": "fn:gold",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "silver",
                    "template_id": "fn:silver",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "bronze",
                "template_id": "fn:bronze",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 30,
  "output": 2,
  "steps": [
    {
      "index": 0,
      "step_name": "silver",
      "template_id": "fn:silver",
      "input": 30,
      "output": 2
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `60`

**Output Value:**
```json
3
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:bronze",
      "name": "bronze",
      "fn_name": "bronze",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn bronze(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:gold",
      "name": "gold",
      "fn_name": "gold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn gold(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:platinum",
      "name": "platinum",
      "fn_name": "platinum",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn platinum(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:silver",
      "name": "silver",
      "fn_name": "silver",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn silver(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 75
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "platinum",
                      "template_id": "fn:platinum",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "gold",
                      "template_id": "fn:gold",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "silver",
                  "template_id": "fn:silver",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "bronze",
              "template_id": "fn:bronze",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `739016acf761b0c4242d92bed67e42b303e00dbe9af557c394d973dde7640ee1`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "gold",
    "template_id": "fn:gold",
    "input": 60,
    "output": 3
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `1238fd101408c4b579282d8f6fbc63d4949e2fca6baeff2fae86b6da9b5b4f41`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:bronze",
        "name": "bronze",
        "fn_name": "bronze",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn bronze(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:gold",
        "name": "gold",
        "fn_name": "gold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn gold(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:platinum",
        "name": "platinum",
        "fn_name": "platinum",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn platinum(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:silver",
        "name": "silver",
        "fn_name": "silver",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn silver(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 75
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "platinum",
                        "template_id": "fn:platinum",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "gold",
                        "template_id": "fn:gold",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "silver",
                    "template_id": "fn:silver",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "bronze",
                "template_id": "fn:bronze",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 60,
  "output": 3,
  "steps": [
    {
      "index": 0,
      "step_name": "gold",
      "template_id": "fn:gold",
      "input": 60,
      "output": 3
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `80`

**Output Value:**
```json
4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:bronze",
      "name": "bronze",
      "fn_name": "bronze",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn bronze(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:gold",
      "name": "gold",
      "fn_name": "gold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn gold(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:platinum",
      "name": "platinum",
      "fn_name": "platinum",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn platinum(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:silver",
      "name": "silver",
      "fn_name": "silver",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn silver(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 75
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "platinum",
                      "template_id": "fn:platinum",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "gold",
                      "template_id": "fn:gold",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "silver",
                  "template_id": "fn:silver",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "bronze",
              "template_id": "fn:bronze",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `3e0f526b126d8889aabb1497ec0083eacd56d4c9193960e3c2184b0495ba9961`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "platinum",
    "template_id": "fn:platinum",
    "input": 80,
    "output": 4
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `fc31f2a6df9527744b92c49fd8a9c4509c4dbf4b551b2d07a696876f8f5b97e9`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:bronze",
        "name": "bronze",
        "fn_name": "bronze",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn bronze(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:gold",
        "name": "gold",
        "fn_name": "gold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn gold(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:platinum",
        "name": "platinum",
        "fn_name": "platinum",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn platinum(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:silver",
        "name": "silver",
        "fn_name": "silver",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn silver(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 75
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "platinum",
                        "template_id": "fn:platinum",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "gold",
                        "template_id": "fn:gold",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "silver",
                    "template_id": "fn:silver",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "bronze",
                "template_id": "fn:bronze",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 80,
  "output": 4,
  "steps": [
    {
      "index": 0,
      "step_name": "platinum",
      "template_id": "fn:platinum",
      "input": 80,
      "output": 4
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 5 = `100`

**Output Value:**
```json
4
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:bronze",
      "name": "bronze",
      "fn_name": "bronze",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn bronze(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:gold",
      "name": "gold",
      "fn_name": "gold",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn gold(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:platinum",
      "name": "platinum",
      "fn_name": "platinum",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn platinum(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:silver",
      "name": "silver",
      "fn_name": "silver",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn silver(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 25
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 75
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "platinum",
                      "template_id": "fn:platinum",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "gold",
                      "template_id": "fn:gold",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "silver",
                  "template_id": "fn:silver",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "bronze",
              "template_id": "fn:bronze",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `5c4bf5d3049dd1fffa8573e139fe10d5a6c2980ca53f821c6633122ebb7eaae6`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "platinum",
    "template_id": "fn:platinum",
    "input": 100,
    "output": 4
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `620c9c3583bd578c9e4c346f5a1337fe5f59e2fb81ccb4e8e4ff9add02fb986f`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:bronze",
        "name": "bronze",
        "fn_name": "bronze",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn bronze(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:gold",
        "name": "gold",
        "fn_name": "gold",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn gold(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:platinum",
        "name": "platinum",
        "fn_name": "platinum",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn platinum(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:silver",
        "name": "silver",
        "fn_name": "silver",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn silver(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 25
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 75
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "platinum",
                        "template_id": "fn:platinum",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "gold",
                        "template_id": "fn:gold",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "silver",
                    "template_id": "fn:silver",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "bronze",
                "template_id": "fn:bronze",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 100,
  "output": 4,
  "steps": [
    {
      "index": 0,
      "step_name": "platinum",
      "template_id": "fn:platinum",
      "input": 100,
      "output": 4
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 23 (Compliance Scoring)

### RLang Source

```
fn compliant(x: Int) -> Int;
fn non_compliant(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value >= 0 && __value <= 100 && __value != 50) {
        compliant
    } else {
        non_compliant
    }
}
```

### Test Inputs

- Input 1: `0`
- Input 2: `25`
- Input 3: `50`
- Input 4: `75`
- Input 5: `100`

#### Input 1 = `0`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:compliant",
      "name": "compliant",
      "fn_name": "compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn compliant(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:non_compliant",
      "name": "non_compliant",
      "fn_name": "non_compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn non_compliant(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "non_compliant",
              "template_id": "fn:non_compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "compliant",
              "template_id": "fn:compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `f3874485a43b0f8d4fee89036f67e3062f636feeb8c92a1df7f4481a00d8cdb4`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "compliant",
    "template_id": "fn:compliant",
    "input": 0,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `720f89004298c90f05808caf6e91b2ceb3939da51cac89687de577fca4e2a312`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:compliant",
        "name": "compliant",
        "fn_name": "compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn compliant(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:non_compliant",
        "name": "non_compliant",
        "fn_name": "non_compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn non_compliant(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "non_compliant",
                "template_id": "fn:non_compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "compliant",
                "template_id": "fn:compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "compliant",
      "template_id": "fn:compliant",
      "input": 0,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `25`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:compliant",
      "name": "compliant",
      "fn_name": "compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn compliant(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:non_compliant",
      "name": "non_compliant",
      "fn_name": "non_compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn non_compliant(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "non_compliant",
              "template_id": "fn:non_compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "compliant",
              "template_id": "fn:compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `91d695bc59f66e17679167771fc2c2e2445ed8467378bdc212710a2f05b25867`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "compliant",
    "template_id": "fn:compliant",
    "input": 25,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `7062cb1b125d4dad1d901f772af36ccab63342573b5c22608fea189117b9e3b8`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:compliant",
        "name": "compliant",
        "fn_name": "compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn compliant(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:non_compliant",
        "name": "non_compliant",
        "fn_name": "non_compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn non_compliant(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "non_compliant",
                "template_id": "fn:non_compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "compliant",
                "template_id": "fn:compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "compliant",
      "template_id": "fn:compliant",
      "input": 25,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `50`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:compliant",
      "name": "compliant",
      "fn_name": "compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn compliant(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:non_compliant",
      "name": "non_compliant",
      "fn_name": "non_compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn non_compliant(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "non_compliant",
              "template_id": "fn:non_compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "compliant",
              "template_id": "fn:compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `8e6337d2d259321f751b199fc0b2f66f1efd7cdd0f6c4885eb6d649ed0a498b5`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "non_compliant",
    "template_id": "fn:non_compliant",
    "input": 50,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `84fc40e0e2304a7e35925eeca5caa85a4bf4aa76172ca092609df337fceff257`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:compliant",
        "name": "compliant",
        "fn_name": "compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn compliant(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:non_compliant",
        "name": "non_compliant",
        "fn_name": "non_compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn non_compliant(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "non_compliant",
                "template_id": "fn:non_compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "compliant",
                "template_id": "fn:compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "non_compliant",
      "template_id": "fn:non_compliant",
      "input": 50,
      "output": 0
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `75`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:compliant",
      "name": "compliant",
      "fn_name": "compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn compliant(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:non_compliant",
      "name": "non_compliant",
      "fn_name": "non_compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn non_compliant(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "non_compliant",
              "template_id": "fn:non_compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "compliant",
              "template_id": "fn:compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `b5863bdac5bc497433bda7de88093cbe52b7fc8670183779108376cc0723df36`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "compliant",
    "template_id": "fn:compliant",
    "input": 75,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `6fbf0fec3ba5290d4bd0f7d4cc7939afe5ce5ee94307536a31e61592138d6ac4`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:compliant",
        "name": "compliant",
        "fn_name": "compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn compliant(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:non_compliant",
        "name": "non_compliant",
        "fn_name": "non_compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn non_compliant(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "non_compliant",
                "template_id": "fn:non_compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "compliant",
                "template_id": "fn:compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 75,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "compliant",
      "template_id": "fn:compliant",
      "input": 75,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `100`

**Output Value:**
```json
1
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:compliant",
      "name": "compliant",
      "fn_name": "compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn compliant(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:non_compliant",
      "name": "non_compliant",
      "fn_name": "non_compliant",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn non_compliant(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 0
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 100
                }
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "!=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 50
              }
            }
          },
          "else": [
            {
              "index": 0,
              "name": "non_compliant",
              "template_id": "fn:non_compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "compliant",
              "template_id": "fn:compliant",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `306a94a688c15fe47ee80d38deb343593fe144b82b849ce534f31b0853cae5b1`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "compliant",
    "template_id": "fn:compliant",
    "input": 100,
    "output": 1
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `7c1bf25d637f01175fc535b89e34a0426a0e707a724867ac7bedf9d02108b446`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:compliant",
        "name": "compliant",
        "fn_name": "compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn compliant(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:non_compliant",
        "name": "non_compliant",
        "fn_name": "non_compliant",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn non_compliant(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 0
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 100
                  }
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "!=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              }
            },
            "else": [
              {
                "index": 0,
                "name": "non_compliant",
                "template_id": "fn:non_compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "compliant",
                "template_id": "fn:compliant",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 100,
  "output": 1,
  "steps": [
    {
      "index": 0,
      "step_name": "compliant",
      "template_id": "fn:compliant",
      "input": 100,
      "output": 1
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 24 (Threshold Boundaries)

### RLang Source

```
fn f1(x: Int) -> Int;
fn f2(x: Int) -> Int;
fn f3(x: Int) -> Int;
fn f4(x: Int) -> Int;
fn f5(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value < 10) {
        f1
    } else {
        if (__value < 20) {
            f2
        } else {
            if (__value < 30) {
                f3
            } else {
                if (__value < 40) {
                    f4
                } else {
                    f5
                }
            }
        }
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `15`
- Input 3: `25`
- Input 4: `35`
- Input 5: `45`

#### Input 1 = `5`

**Output Value:**
```json
5
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": "<",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f5",
                          "template_id": "fn:f5",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "f1",
              "template_id": "fn:f1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `05539ab182dbec2a40945dbc6b4ff0d9784a4e6b73a92cffe0227ad811b0459c`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f1",
    "template_id": "fn:f1",
    "input": 5,
    "output": 5
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `7fc5a6b9ee20da5d0bc98993566c016a2bf71e51ecfe480a93cec4bb13541685`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": "<",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f5",
                            "template_id": "fn:f5",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "f1",
                "template_id": "fn:f1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 5,
  "steps": [
    {
      "index": 0,
      "step_name": "f1",
      "template_id": "fn:f1",
      "input": 5,
      "output": 5
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `15`

**Output Value:**
```json
30
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": "<",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f5",
                          "template_id": "fn:f5",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "f1",
              "template_id": "fn:f1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `4cac214615fbfc6cfa77dd80711442f8c753b7de47d757c5e837aa91d7f28f3b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f2",
    "template_id": "fn:f2",
    "input": 15,
    "output": 30
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `6577e454b20b5044bb09d096e93c2a8df4754b01b6f2a064cb7bcf1e3793152a`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": "<",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f5",
                            "template_id": "fn:f5",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "f1",
                "template_id": "fn:f1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 30,
  "steps": [
    {
      "index": 0,
      "step_name": "f2",
      "template_id": "fn:f2",
      "input": 15,
      "output": 30
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `25`

**Output Value:**
```json
75
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": "<",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f5",
                          "template_id": "fn:f5",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "f1",
              "template_id": "fn:f1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `f454c772a3d6b06e90ea77cb54def0e650ee7dad6dfdc4a1cfbcf43151e7eb5b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f3",
    "template_id": "fn:f3",
    "input": 25,
    "output": 75
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `e1a2ece1d869ec45adab50c9aae1abd6be81fd1ca5ba40433e50b0a79dad4e8b`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": "<",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f5",
                            "template_id": "fn:f5",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "f1",
                "template_id": "fn:f1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 75,
  "steps": [
    {
      "index": 0,
      "step_name": "f3",
      "template_id": "fn:f3",
      "input": 25,
      "output": 75
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `35`

**Output Value:**
```json
140
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": "<",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f5",
                          "template_id": "fn:f5",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "f1",
              "template_id": "fn:f1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `7dc4f42921ea2d52f808452f4e61270504aaefdd72d445405686766a9c5b6d9f`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f4",
    "template_id": "fn:f4",
    "input": 35,
    "output": 140
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `1bb7e22900cd6c2c99aa5affe1b33d9dec46569e10d6c349d480973ec835a34f`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": "<",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f5",
                            "template_id": "fn:f5",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "f1",
                "template_id": "fn:f1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 35,
  "output": 140,
  "steps": [
    {
      "index": 0,
      "step_name": "f4",
      "template_id": "fn:f4",
      "input": 35,
      "output": 140
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `45`

**Output Value:**
```json
225
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": "<",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": "<",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f5",
                          "template_id": "fn:f5",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ]
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "f2",
                  "template_id": "fn:f2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "f1",
              "template_id": "fn:f1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `b0fa5f5fd54f706eaf8af7e4c84f888b0a5054933b30eb04658081bb7d5df653`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f5",
    "template_id": "fn:f5",
    "input": 45,
    "output": 225
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `bbe129be5dccd21ffc5fc139a3c3c993b7f35a1134ede014b965adf8b2138267`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": "<",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": "<",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f5",
                            "template_id": "fn:f5",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ]
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "f2",
                    "template_id": "fn:f2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "f1",
                "template_id": "fn:f1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 45,
  "output": 225,
  "steps": [
    {
      "index": 0,
      "step_name": "f5",
      "template_id": "fn:f5",
      "input": 45,
      "output": 225
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 25 (Piecewise Logic)

### RLang Source

```
fn region1(x: Int) -> Int;
fn region2(x: Int) -> Int;
fn region3(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value <= 0) {
        region1
    } else {
        if (__value <= 50) {
            region2
        } else {
            region3
        }
    }
}
```

### Test Inputs

- Input 1: `-10`
- Input 2: `0`
- Input 3: `25`
- Input 4: `50`
- Input 5: `100`

#### Input 1 = `-10`

**Output Value:**
```json
10
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:region1",
      "name": "region1",
      "fn_name": "region1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region2",
      "name": "region2",
      "fn_name": "region2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region3",
      "name": "region3",
      "fn_name": "region3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 0
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "region3",
                  "template_id": "fn:region3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "region2",
                  "template_id": "fn:region2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "region1",
              "template_id": "fn:region1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `8daf87ab437cae4fb1e73456c47ae76f463e7fce732d8f36bd1cedd25bb26e9b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "region1",
    "template_id": "fn:region1",
    "input": -10,
    "output": 10
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `fd73b52575f177598470d42a91d39c96a106695b7fa13dc63808e5aa85d6dbd5`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:region1",
        "name": "region1",
        "fn_name": "region1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region2",
        "name": "region2",
        "fn_name": "region2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region3",
        "name": "region3",
        "fn_name": "region3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "region3",
                    "template_id": "fn:region3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "region2",
                    "template_id": "fn:region2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "region1",
                "template_id": "fn:region1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": -10,
  "output": 10,
  "steps": [
    {
      "index": 0,
      "step_name": "region1",
      "template_id": "fn:region1",
      "input": -10,
      "output": 10
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 2 = `0`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:region1",
      "name": "region1",
      "fn_name": "region1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region2",
      "name": "region2",
      "fn_name": "region2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region3",
      "name": "region3",
      "fn_name": "region3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 0
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "region3",
                  "template_id": "fn:region3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "region2",
                  "template_id": "fn:region2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "region1",
              "template_id": "fn:region1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `b547ba404c72e057e4892813d36e7d8c1780fbcf1607cb552c5c98fb4934de39`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "region1",
    "template_id": "fn:region1",
    "input": 0,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `7f52760522539f587adb068b21d2deed107f4b0d82308ed254536df4a4d1409e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:region1",
        "name": "region1",
        "fn_name": "region1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region2",
        "name": "region2",
        "fn_name": "region2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region3",
        "name": "region3",
        "fn_name": "region3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "region3",
                    "template_id": "fn:region3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "region2",
                    "template_id": "fn:region2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "region1",
                "template_id": "fn:region1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "region1",
      "template_id": "fn:region1",
      "input": 0,
      "output": 0
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 3 = `25`

**Output Value:**
```json
50
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:region1",
      "name": "region1",
      "fn_name": "region1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region2",
      "name": "region2",
      "fn_name": "region2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region3",
      "name": "region3",
      "fn_name": "region3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 0
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "region3",
                  "template_id": "fn:region3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "region2",
                  "template_id": "fn:region2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "region1",
              "template_id": "fn:region1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `77ae64b005ad4b921e3b09a598e70d2a3a632cc81dfbbafbb502b881e32cb570`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "region2",
    "template_id": "fn:region2",
    "input": 25,
    "output": 50
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `d508f6d56eeb5fcd52a56716515d7fd258ed3a48afdf0b870e96d12e53cd716d`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:region1",
        "name": "region1",
        "fn_name": "region1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region2",
        "name": "region2",
        "fn_name": "region2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region3",
        "name": "region3",
        "fn_name": "region3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "region3",
                    "template_id": "fn:region3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "region2",
                    "template_id": "fn:region2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "region1",
                "template_id": "fn:region1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 50,
  "steps": [
    {
      "index": 0,
      "step_name": "region2",
      "template_id": "fn:region2",
      "input": 25,
      "output": 50
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `50`

**Output Value:**
```json
100
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:region1",
      "name": "region1",
      "fn_name": "region1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region2",
      "name": "region2",
      "fn_name": "region2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region3",
      "name": "region3",
      "fn_name": "region3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 0
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "region3",
                  "template_id": "fn:region3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "region2",
                  "template_id": "fn:region2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "region1",
              "template_id": "fn:region1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `22509e6ac61693ef6f0bdcf802a5650100682da0b0a753c73b0563ddb10d3398`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "region2",
    "template_id": "fn:region2",
    "input": 50,
    "output": 100
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `991a33dbdcaecb7b7a939f05946707759804ddec84c155fd60b3ac5e04f12a1e`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:region1",
        "name": "region1",
        "fn_name": "region1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region2",
        "name": "region2",
        "fn_name": "region2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region3",
        "name": "region3",
        "fn_name": "region3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "region3",
                    "template_id": "fn:region3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "region2",
                    "template_id": "fn:region2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "region1",
                "template_id": "fn:region1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 100,
  "steps": [
    {
      "index": 0,
      "step_name": "region2",
      "template_id": "fn:region2",
      "input": 50,
      "output": 100
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `100`

**Output Value:**
```json
300
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:region1",
      "name": "region1",
      "fn_name": "region1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region2",
      "name": "region2",
      "fn_name": "region2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:region3",
      "name": "region3",
      "fn_name": "region3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn region3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": "<=",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 0
            }
          },
          "else": [
            {
              "condition": {
                "kind": "binary_op",
                "op": "<=",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 50
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "region3",
                  "template_id": "fn:region3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "region2",
                  "template_id": "fn:region2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "region1",
              "template_id": "fn:region1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `6da1c539353ef75ab4f5d74883a83a037bd3dbc459fa9fef2a68dafaeaca3a03`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "region3",
    "template_id": "fn:region3",
    "input": 100,
    "output": 300
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `933ff46e41afab95a7a82a9effffcc88e982c9f24aef3483d1227a81932cae00`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:region1",
        "name": "region1",
        "fn_name": "region1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region2",
        "name": "region2",
        "fn_name": "region2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:region3",
        "name": "region3",
        "fn_name": "region3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn region3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": "<=",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 0
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "region3",
                    "template_id": "fn:region3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "region2",
                    "template_id": "fn:region2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "region1",
                "template_id": "fn:region1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 100,
  "output": 300,
  "steps": [
    {
      "index": 0,
      "step_name": "region3",
      "template_id": "fn:region3",
      "input": 100,
      "output": 300
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---

## Program 26 (4-Level Nested)

### RLang Source

```
fn f1(x: Int) -> Int;
fn f2(x: Int) -> Int;
fn f3(x: Int) -> Int;
fn f4(x: Int) -> Int;
fn f5(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 10) {
        if (__value > 20) {
            if (__value > 30) {
                if (__value > 40) {
                    f1
                } else {
                    f2
                }
            } else {
                f3
            }
        } else {
            f4
        }
    } else {
        f5
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `15`
- Input 3: `25`
- Input 4: `35`
- Input 5: `45`

#### Input 1 = `5`

**Output Value:**
```json
5
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f5",
              "template_id": "fn:f5",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f4",
                  "template_id": "fn:f4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f2",
                          "template_id": "fn:f2",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f1",
                          "template_id": "fn:f1",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `198f599f8b13793389367094939cc2dff3ad326a3959bbc3a1d4236047ec88b1`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f5",
    "template_id": "fn:f5",
    "input": 5,
    "output": 5
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `8918f28370ea396af6ab1e55a71616b25a78f62f8a1c5e2249676ef7a4d5963a`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f5",
                "template_id": "fn:f5",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f4",
                    "template_id": "fn:f4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f2",
                            "template_id": "fn:f2",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f1",
                            "template_id": "fn:f1",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 5,
  "steps": [
    {
      "index": 0,
      "step_name": "f5",
      "template_id": "fn:f5",
      "input": 5,
      "output": 5
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `15`

**Output Value:**
```json
30
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f5",
              "template_id": "fn:f5",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f4",
                  "template_id": "fn:f4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f2",
                          "template_id": "fn:f2",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f1",
                          "template_id": "fn:f1",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `3d20c19ded9465a1c041aebefcb4ab070e040db4d5077edeea326ee49bded7f4`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f4",
    "template_id": "fn:f4",
    "input": 15,
    "output": 30
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `532a877b83bf3bb646a5c4f71d5280715381dc0763cc2f219c64d62e157a5a5f`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f5",
                "template_id": "fn:f5",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f4",
                    "template_id": "fn:f4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f2",
                            "template_id": "fn:f2",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f1",
                            "template_id": "fn:f1",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 30,
  "steps": [
    {
      "index": 0,
      "step_name": "f4",
      "template_id": "fn:f4",
      "input": 15,
      "output": 30
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `25`

**Output Value:**
```json
75
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f5",
              "template_id": "fn:f5",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f4",
                  "template_id": "fn:f4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f2",
                          "template_id": "fn:f2",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f1",
                          "template_id": "fn:f1",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `f454c772a3d6b06e90ea77cb54def0e650ee7dad6dfdc4a1cfbcf43151e7eb5b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f3",
    "template_id": "fn:f3",
    "input": 25,
    "output": 75
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `e1a2ece1d869ec45adab50c9aae1abd6be81fd1ca5ba40433e50b0a79dad4e8b`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f5",
                "template_id": "fn:f5",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f4",
                    "template_id": "fn:f4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f2",
                            "template_id": "fn:f2",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f1",
                            "template_id": "fn:f1",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 75,
  "steps": [
    {
      "index": 0,
      "step_name": "f3",
      "template_id": "fn:f3",
      "input": 25,
      "output": 75
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `35`

**Output Value:**
```json
140
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f5",
              "template_id": "fn:f5",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f4",
                  "template_id": "fn:f4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f2",
                          "template_id": "fn:f2",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f1",
                          "template_id": "fn:f1",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `926d517ef99de02a8ef0fec9abe538cd55aa5fea9b5deae135c0ea40bd5d69da`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f2",
    "template_id": "fn:f2",
    "input": 35,
    "output": 140
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `c84f08a07a09962def9ca176cafbdde438cb80b0d6a265037e70e7781ef1dff9`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f5",
                "template_id": "fn:f5",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f4",
                    "template_id": "fn:f4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f2",
                            "template_id": "fn:f2",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f1",
                            "template_id": "fn:f1",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 35,
  "output": 140,
  "steps": [
    {
      "index": 0,
      "step_name": "f2",
      "template_id": "fn:f2",
      "input": 35,
      "output": 140
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 5 = `45`

**Output Value:**
```json
225
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f5",
              "template_id": "fn:f5",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f4",
                  "template_id": "fn:f4",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f3",
                      "template_id": "fn:f3",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f2",
                          "template_id": "fn:f2",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "index": 0,
                          "name": "f1",
                          "template_id": "fn:f1",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `bf8f8830cfa81adafa0af45bdc480c82fb33db18f2934d302665d8e996d3bcdd`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f1",
    "template_id": "fn:f1",
    "input": 45,
    "output": 225
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `4faa23782eac06241287c641a46ca19dc84282da4aa2fe0614f7173197d95ef5`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f5",
                "template_id": "fn:f5",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f4",
                    "template_id": "fn:f4",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f3",
                        "template_id": "fn:f3",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f2",
                            "template_id": "fn:f2",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "index": 0,
                            "name": "f1",
                            "template_id": "fn:f1",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 45,
  "output": 225,
  "steps": [
    {
      "index": 0,
      "step_name": "f1",
      "template_id": "fn:f1",
      "input": 45,
      "output": 225
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 27 (5-Level Nested)

### RLang Source

```
fn f1(x: Int) -> Int;
fn f2(x: Int) -> Int;
fn f3(x: Int) -> Int;
fn f4(x: Int) -> Int;
fn f5(x: Int) -> Int;
fn f6(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 10) {
        if (__value > 20) {
            if (__value > 30) {
                if (__value > 40) {
                    if (__value > 50) {
                        f1
                    } else {
                        f2
                    }
                } else {
                    f3
                }
            } else {
                f4
            }
        } else {
            f5
        }
    } else {
        f6
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `15`
- Input 3: `25`
- Input 4: `35`
- Input 5: `55`

#### Input 1 = `5`

**Output Value:**
```json
5
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f6",
              "template_id": "fn:f6",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f5",
                  "template_id": "fn:f5",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f4",
                      "template_id": "fn:f4",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f3",
                          "template_id": "fn:f3",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f2",
                              "template_id": "fn:f2",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "index": 0,
                              "name": "f1",
                              "template_id": "fn:f1",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `3d38c9838c19f88953cee2bde71f9d1b1f283d5081585a02212e384807e1b4bf`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f6",
    "template_id": "fn:f6",
    "input": 5,
    "output": 5
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `1c7e2565b3d05616a8aae37af80f7b226d8b8ec756c7602a8f7db737f453b43a`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f6",
                "template_id": "fn:f6",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f5",
                    "template_id": "fn:f5",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f4",
                        "template_id": "fn:f4",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f3",
                            "template_id": "fn:f3",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f2",
                                "template_id": "fn:f2",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "index": 0,
                                "name": "f1",
                                "template_id": "fn:f1",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 5,
  "steps": [
    {
      "index": 0,
      "step_name": "f6",
      "template_id": "fn:f6",
      "input": 5,
      "output": 5
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `15`

**Output Value:**
```json
30
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f6",
              "template_id": "fn:f6",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f5",
                  "template_id": "fn:f5",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f4",
                      "template_id": "fn:f4",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f3",
                          "template_id": "fn:f3",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f2",
                              "template_id": "fn:f2",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "index": 0,
                              "name": "f1",
                              "template_id": "fn:f1",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `8b0cc1fdcb49ab3cd04c296707efb5e74a9f7b1c7ef021a1995ce80aceed43b5`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f5",
    "template_id": "fn:f5",
    "input": 15,
    "output": 30
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `8a838b648453ae739928fa2d1b0f87aadd740974561da85cd6dcb3984e5bb396`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f6",
                "template_id": "fn:f6",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f5",
                    "template_id": "fn:f5",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f4",
                        "template_id": "fn:f4",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f3",
                            "template_id": "fn:f3",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f2",
                                "template_id": "fn:f2",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "index": 0,
                                "name": "f1",
                                "template_id": "fn:f1",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 30,
  "steps": [
    {
      "index": 0,
      "step_name": "f5",
      "template_id": "fn:f5",
      "input": 15,
      "output": 30
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `25`

**Output Value:**
```json
75
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f6",
              "template_id": "fn:f6",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f5",
                  "template_id": "fn:f5",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f4",
                      "template_id": "fn:f4",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f3",
                          "template_id": "fn:f3",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f2",
                              "template_id": "fn:f2",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "index": 0,
                              "name": "f1",
                              "template_id": "fn:f1",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `8507ee2cb30f725df8d5e1a376b191d7978e9a132c1b8732f373fc88c8c921d7`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f4",
    "template_id": "fn:f4",
    "input": 25,
    "output": 75
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `32bc7e5d9d809edd7fbc09d7fd07c0b3ca629e51db402334e2d058c874dec1f3`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f6",
                "template_id": "fn:f6",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f5",
                    "template_id": "fn:f5",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f4",
                        "template_id": "fn:f4",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f3",
                            "template_id": "fn:f3",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f2",
                                "template_id": "fn:f2",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "index": 0,
                                "name": "f1",
                                "template_id": "fn:f1",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 75,
  "steps": [
    {
      "index": 0,
      "step_name": "f4",
      "template_id": "fn:f4",
      "input": 25,
      "output": 75
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `35`

**Output Value:**
```json
140
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f6",
              "template_id": "fn:f6",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f5",
                  "template_id": "fn:f5",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f4",
                      "template_id": "fn:f4",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f3",
                          "template_id": "fn:f3",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f2",
                              "template_id": "fn:f2",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "index": 0,
                              "name": "f1",
                              "template_id": "fn:f1",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `7fab8f178b3e0bcdabcab539d7f90c546b4ae6288fda5c33501d313a865a3167`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f3",
    "template_id": "fn:f3",
    "input": 35,
    "output": 140
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `0217f0f58b39ebef9ab17f65c643c75ddf8ee064d9b03c7230eb35c0a652290f`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f6",
                "template_id": "fn:f6",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f5",
                    "template_id": "fn:f5",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f4",
                        "template_id": "fn:f4",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f3",
                            "template_id": "fn:f3",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f2",
                                "template_id": "fn:f2",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "index": 0,
                                "name": "f1",
                                "template_id": "fn:f1",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 35,
  "output": 140,
  "steps": [
    {
      "index": 0,
      "step_name": "f3",
      "template_id": "fn:f3",
      "input": 35,
      "output": 140
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 5 = `55`

**Output Value:**
```json
330
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f6",
              "template_id": "fn:f6",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f5",
                  "template_id": "fn:f5",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f4",
                      "template_id": "fn:f4",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f3",
                          "template_id": "fn:f3",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f2",
                              "template_id": "fn:f2",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "index": 0,
                              "name": "f1",
                              "template_id": "fn:f1",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `872d67125e3e172aea0be0d42e1f60b8100fdb45361ac571441ae021f3e56b01`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f1",
    "template_id": "fn:f1",
    "input": 55,
    "output": 330
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `a3011fad60b31f2ec9caa94e90acfe3b56b54ef9f79d5522423b2bb0a809aa50`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f6",
                "template_id": "fn:f6",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f5",
                    "template_id": "fn:f5",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f4",
                        "template_id": "fn:f4",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f3",
                            "template_id": "fn:f3",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f2",
                                "template_id": "fn:f2",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "index": 0,
                                "name": "f1",
                                "template_id": "fn:f1",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 55,
  "output": 330,
  "steps": [
    {
      "index": 0,
      "step_name": "f1",
      "template_id": "fn:f1",
      "input": 55,
      "output": 330
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 28 (6-Level Nested)

### RLang Source

```
fn f1(x: Int) -> Int;
fn f2(x: Int) -> Int;
fn f3(x: Int) -> Int;
fn f4(x: Int) -> Int;
fn f5(x: Int) -> Int;
fn f6(x: Int) -> Int;
fn f7(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 10) {
        if (__value > 20) {
            if (__value > 30) {
                if (__value > 40) {
                    if (__value > 50) {
                        if (__value > 60) {
                            f1
                        } else {
                            f2
                        }
                    } else {
                        f3
                    }
                } else {
                    f4
                }
            } else {
                f5
            }
        } else {
            f6
        }
    } else {
        f7
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `15`
- Input 3: `25`
- Input 4: `35`
- Input 5: `65`

#### Input 1 = `5`

**Output Value:**
```json
5
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f7",
      "name": "f7",
      "fn_name": "f7",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f7(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f7",
              "template_id": "fn:f7",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f6",
                  "template_id": "fn:f6",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f5",
                      "template_id": "fn:f5",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f3",
                              "template_id": "fn:f3",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "condition": {
                                "kind": "binary_op",
                                "op": ">",
                                "left": {
                                  "kind": "identifier",
                                  "name": "__value"
                                },
                                "right": {
                                  "kind": "literal",
                                  "value": 60
                                }
                              },
                              "else": [
                                {
                                  "index": 0,
                                  "name": "f2",
                                  "template_id": "fn:f2",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ],
                              "kind": "if",
                              "then": [
                                {
                                  "index": 0,
                                  "name": "f1",
                                  "template_id": "fn:f1",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `fc2662afb3ee5cca4f98c9649b6e627676320439923135e9a04a715992425de9`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f7",
    "template_id": "fn:f7",
    "input": 5,
    "output": 5
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `ee6f4ce46c94c3d05f9f4b465ee9b052925ee74a300eb34d633c40515179f161`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f7",
        "name": "f7",
        "fn_name": "f7",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f7(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f7",
                "template_id": "fn:f7",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f6",
                    "template_id": "fn:f6",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f5",
                        "template_id": "fn:f5",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f3",
                                "template_id": "fn:f3",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "condition": {
                                  "kind": "binary_op",
                                  "op": ">",
                                  "left": {
                                    "kind": "identifier",
                                    "name": "__value"
                                  },
                                  "right": {
                                    "kind": "literal",
                                    "value": 60
                                  }
                                },
                                "else": [
                                  {
                                    "index": 0,
                                    "name": "f2",
                                    "template_id": "fn:f2",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ],
                                "kind": "if",
                                "then": [
                                  {
                                    "index": 0,
                                    "name": "f1",
                                    "template_id": "fn:f1",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 5,
  "steps": [
    {
      "index": 0,
      "step_name": "f7",
      "template_id": "fn:f7",
      "input": 5,
      "output": 5
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `15`

**Output Value:**
```json
30
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f7",
      "name": "f7",
      "fn_name": "f7",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f7(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f7",
              "template_id": "fn:f7",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f6",
                  "template_id": "fn:f6",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f5",
                      "template_id": "fn:f5",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f3",
                              "template_id": "fn:f3",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "condition": {
                                "kind": "binary_op",
                                "op": ">",
                                "left": {
                                  "kind": "identifier",
                                  "name": "__value"
                                },
                                "right": {
                                  "kind": "literal",
                                  "value": 60
                                }
                              },
                              "else": [
                                {
                                  "index": 0,
                                  "name": "f2",
                                  "template_id": "fn:f2",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ],
                              "kind": "if",
                              "then": [
                                {
                                  "index": 0,
                                  "name": "f1",
                                  "template_id": "fn:f1",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `ba7efd102ac59ae922d95bd46f492ad334775b85022749e1f2d02ad0223c4bcf`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f6",
    "template_id": "fn:f6",
    "input": 15,
    "output": 30
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `fa708014f26502f2f549e13bc937c2259b07ce7d8071e5056e460b11a90305c0`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f7",
        "name": "f7",
        "fn_name": "f7",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f7(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f7",
                "template_id": "fn:f7",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f6",
                    "template_id": "fn:f6",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f5",
                        "template_id": "fn:f5",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f3",
                                "template_id": "fn:f3",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "condition": {
                                  "kind": "binary_op",
                                  "op": ">",
                                  "left": {
                                    "kind": "identifier",
                                    "name": "__value"
                                  },
                                  "right": {
                                    "kind": "literal",
                                    "value": 60
                                  }
                                },
                                "else": [
                                  {
                                    "index": 0,
                                    "name": "f2",
                                    "template_id": "fn:f2",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ],
                                "kind": "if",
                                "then": [
                                  {
                                    "index": 0,
                                    "name": "f1",
                                    "template_id": "fn:f1",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 30,
  "steps": [
    {
      "index": 0,
      "step_name": "f6",
      "template_id": "fn:f6",
      "input": 15,
      "output": 30
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `25`

**Output Value:**
```json
75
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f7",
      "name": "f7",
      "fn_name": "f7",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f7(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f7",
              "template_id": "fn:f7",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f6",
                  "template_id": "fn:f6",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f5",
                      "template_id": "fn:f5",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f3",
                              "template_id": "fn:f3",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "condition": {
                                "kind": "binary_op",
                                "op": ">",
                                "left": {
                                  "kind": "identifier",
                                  "name": "__value"
                                },
                                "right": {
                                  "kind": "literal",
                                  "value": 60
                                }
                              },
                              "else": [
                                {
                                  "index": 0,
                                  "name": "f2",
                                  "template_id": "fn:f2",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ],
                              "kind": "if",
                              "then": [
                                {
                                  "index": 0,
                                  "name": "f1",
                                  "template_id": "fn:f1",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `c31929fe4d1a510dbdf020c8f73255f26780c280efbf2f2035b42104f1c40a2f`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f5",
    "template_id": "fn:f5",
    "input": 25,
    "output": 75
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `2cf1603b118ecaa141ed732565d9d1a2671736cf825e80beee34abb1606ce377`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f7",
        "name": "f7",
        "fn_name": "f7",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f7(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f7",
                "template_id": "fn:f7",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f6",
                    "template_id": "fn:f6",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f5",
                        "template_id": "fn:f5",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f3",
                                "template_id": "fn:f3",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "condition": {
                                  "kind": "binary_op",
                                  "op": ">",
                                  "left": {
                                    "kind": "identifier",
                                    "name": "__value"
                                  },
                                  "right": {
                                    "kind": "literal",
                                    "value": 60
                                  }
                                },
                                "else": [
                                  {
                                    "index": 0,
                                    "name": "f2",
                                    "template_id": "fn:f2",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ],
                                "kind": "if",
                                "then": [
                                  {
                                    "index": 0,
                                    "name": "f1",
                                    "template_id": "fn:f1",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 75,
  "steps": [
    {
      "index": 0,
      "step_name": "f5",
      "template_id": "fn:f5",
      "input": 25,
      "output": 75
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `35`

**Output Value:**
```json
140
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f7",
      "name": "f7",
      "fn_name": "f7",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f7(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f7",
              "template_id": "fn:f7",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f6",
                  "template_id": "fn:f6",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f5",
                      "template_id": "fn:f5",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f3",
                              "template_id": "fn:f3",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "condition": {
                                "kind": "binary_op",
                                "op": ">",
                                "left": {
                                  "kind": "identifier",
                                  "name": "__value"
                                },
                                "right": {
                                  "kind": "literal",
                                  "value": 60
                                }
                              },
                              "else": [
                                {
                                  "index": 0,
                                  "name": "f2",
                                  "template_id": "fn:f2",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ],
                              "kind": "if",
                              "then": [
                                {
                                  "index": 0,
                                  "name": "f1",
                                  "template_id": "fn:f1",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `7dc4f42921ea2d52f808452f4e61270504aaefdd72d445405686766a9c5b6d9f`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f4",
    "template_id": "fn:f4",
    "input": 35,
    "output": 140
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `1bb7e22900cd6c2c99aa5affe1b33d9dec46569e10d6c349d480973ec835a34f`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f7",
        "name": "f7",
        "fn_name": "f7",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f7(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f7",
                "template_id": "fn:f7",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f6",
                    "template_id": "fn:f6",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f5",
                        "template_id": "fn:f5",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f3",
                                "template_id": "fn:f3",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "condition": {
                                  "kind": "binary_op",
                                  "op": ">",
                                  "left": {
                                    "kind": "identifier",
                                    "name": "__value"
                                  },
                                  "right": {
                                    "kind": "literal",
                                    "value": 60
                                  }
                                },
                                "else": [
                                  {
                                    "index": 0,
                                    "name": "f2",
                                    "template_id": "fn:f2",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ],
                                "kind": "if",
                                "then": [
                                  {
                                    "index": 0,
                                    "name": "f1",
                                    "template_id": "fn:f1",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 35,
  "output": 140,
  "steps": [
    {
      "index": 0,
      "step_name": "f4",
      "template_id": "fn:f4",
      "input": 35,
      "output": 140
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 5 = `65`

**Output Value:**
```json
455
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:f1",
      "name": "f1",
      "fn_name": "f1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f2",
      "name": "f2",
      "fn_name": "f2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f3",
      "name": "f3",
      "fn_name": "f3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f3(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f4",
      "name": "f4",
      "fn_name": "f4",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f4(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f5",
      "name": "f5",
      "fn_name": "f5",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f5(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f6",
      "name": "f6",
      "fn_name": "f6",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f6(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:f7",
      "name": "f7",
      "fn_name": "f7",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn f7(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "f7",
              "template_id": "fn:f7",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "condition": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 20
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "f6",
                  "template_id": "fn:f6",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "condition": {
                    "kind": "binary_op",
                    "op": ">",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "else": [
                    {
                      "index": 0,
                      "name": "f5",
                      "template_id": "fn:f5",
                      "arg_types": [],
                      "input_type": "Int",
                      "output_type": "Int"
                    }
                  ],
                  "kind": "if",
                  "then": [
                    {
                      "condition": {
                        "kind": "binary_op",
                        "op": ">",
                        "left": {
                          "kind": "identifier",
                          "name": "__value"
                        },
                        "right": {
                          "kind": "literal",
                          "value": 40
                        }
                      },
                      "else": [
                        {
                          "index": 0,
                          "name": "f4",
                          "template_id": "fn:f4",
                          "arg_types": [],
                          "input_type": "Int",
                          "output_type": "Int"
                        }
                      ],
                      "kind": "if",
                      "then": [
                        {
                          "condition": {
                            "kind": "binary_op",
                            "op": ">",
                            "left": {
                              "kind": "identifier",
                              "name": "__value"
                            },
                            "right": {
                              "kind": "literal",
                              "value": 50
                            }
                          },
                          "else": [
                            {
                              "index": 0,
                              "name": "f3",
                              "template_id": "fn:f3",
                              "arg_types": [],
                              "input_type": "Int",
                              "output_type": "Int"
                            }
                          ],
                          "kind": "if",
                          "then": [
                            {
                              "condition": {
                                "kind": "binary_op",
                                "op": ">",
                                "left": {
                                  "kind": "identifier",
                                  "name": "__value"
                                },
                                "right": {
                                  "kind": "literal",
                                  "value": 60
                                }
                              },
                              "else": [
                                {
                                  "index": 0,
                                  "name": "f2",
                                  "template_id": "fn:f2",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ],
                              "kind": "if",
                              "then": [
                                {
                                  "index": 0,
                                  "name": "f1",
                                  "template_id": "fn:f1",
                                  "arg_types": [],
                                  "input_type": "Int",
                                  "output_type": "Int"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `867ff0e8e64b10e79683ffe4bffe6dedbad80beb41df3b6fcf1acabb70818ea6`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "f1",
    "template_id": "fn:f1",
    "input": 65,
    "output": 455
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `675c98c40f23863cbfb2d44845cbd0b6d8583e8f144ec29c40301fbc3b3eb9e2`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:f1",
        "name": "f1",
        "fn_name": "f1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f2",
        "name": "f2",
        "fn_name": "f2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f3",
        "name": "f3",
        "fn_name": "f3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f3(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f4",
        "name": "f4",
        "fn_name": "f4",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f4(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f5",
        "name": "f5",
        "fn_name": "f5",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f5(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f6",
        "name": "f6",
        "fn_name": "f6",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f6(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:f7",
        "name": "f7",
        "fn_name": "f7",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn f7(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "f7",
                "template_id": "fn:f7",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "condition": {
                  "kind": "binary_op",
                  "op": ">",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 20
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "f6",
                    "template_id": "fn:f6",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "condition": {
                      "kind": "binary_op",
                      "op": ">",
                      "left": {
                        "kind": "identifier",
                        "name": "__value"
                      },
                      "right": {
                        "kind": "literal",
                        "value": 30
                      }
                    },
                    "else": [
                      {
                        "index": 0,
                        "name": "f5",
                        "template_id": "fn:f5",
                        "arg_types": [],
                        "input_type": "Int",
                        "output_type": "Int"
                      }
                    ],
                    "kind": "if",
                    "then": [
                      {
                        "condition": {
                          "kind": "binary_op",
                          "op": ">",
                          "left": {
                            "kind": "identifier",
                            "name": "__value"
                          },
                          "right": {
                            "kind": "literal",
                            "value": 40
                          }
                        },
                        "else": [
                          {
                            "index": 0,
                            "name": "f4",
                            "template_id": "fn:f4",
                            "arg_types": [],
                            "input_type": "Int",
                            "output_type": "Int"
                          }
                        ],
                        "kind": "if",
                        "then": [
                          {
                            "condition": {
                              "kind": "binary_op",
                              "op": ">",
                              "left": {
                                "kind": "identifier",
                                "name": "__value"
                              },
                              "right": {
                                "kind": "literal",
                                "value": 50
                              }
                            },
                            "else": [
                              {
                                "index": 0,
                                "name": "f3",
                                "template_id": "fn:f3",
                                "arg_types": [],
                                "input_type": "Int",
                                "output_type": "Int"
                              }
                            ],
                            "kind": "if",
                            "then": [
                              {
                                "condition": {
                                  "kind": "binary_op",
                                  "op": ">",
                                  "left": {
                                    "kind": "identifier",
                                    "name": "__value"
                                  },
                                  "right": {
                                    "kind": "literal",
                                    "value": 60
                                  }
                                },
                                "else": [
                                  {
                                    "index": 0,
                                    "name": "f2",
                                    "template_id": "fn:f2",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ],
                                "kind": "if",
                                "then": [
                                  {
                                    "index": 0,
                                    "name": "f1",
                                    "template_id": "fn:f1",
                                    "arg_types": [],
                                    "input_type": "Int",
                                    "output_type": "Int"
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 65,
  "output": 455,
  "steps": [
    {
      "index": 0,
      "step_name": "f1",
      "template_id": "fn:f1",
      "input": 65,
      "output": 455
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 29 (Multi-IF Chain)

### RLang Source

```
fn inc(x: Int) -> Int;
fn dec(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 10) {
        inc
    } else {
        dec
    } ->
    if (__value > 20) {
        inc
    } else {
        dec
    } ->
    if (__value > 30) {
        inc
    } else {
        dec
    }
}
```

### Test Inputs

- Input 1: `0`
- Input 2: `15`
- Input 3: `25`
- Input 4: `35`
- Input 5: `50`

#### Input 1 = `0`

**Output Value:**
```json
-3
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 20
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `d37213f729370166f70510335f351324438303a1c892862d9f1203a66ffbd92b`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 0,
    "output": -1
  },
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": -1,
    "output": -2
  },
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": -2,
    "output": -3
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": 1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": 2,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `73f416e9458b779b760c0a8d8b23bf792e8948d260f29ac935233c35d2a187ac`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": -3,
  "steps": [
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 0,
      "output": -1
    },
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": -1,
      "output": -2
    },
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": -2,
      "output": -3
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": 1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": 2,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `15`

**Output Value:**
```json
14
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 20
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `f6b2d9e6750ce0a83b066e97049942f4cb2a10bdba0c3dd24654d0cbb1c78bb3`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 15,
    "output": 16
  },
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 16,
    "output": 15
  },
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 15,
    "output": 14
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": 1,
    "path": "else",
    "condition_value": false
  },
  {
    "index": 2,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `540f07001b0a12957b01399b7cda427636fee0262a9bc3ea5474c82a4beae17b`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 15,
  "output": 14,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 15,
      "output": 16
    },
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 16,
      "output": 15
    },
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 15,
      "output": 14
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": 1,
      "path": "else",
      "condition_value": false
    },
    {
      "index": 2,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `25`

**Output Value:**
```json
26
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 20
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `682f54653f38f1d224fc24e444ea7442a77f5ff8e562c8ea11e0244222f6b83c`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 25,
    "output": 26
  },
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 26,
    "output": 27
  },
  {
    "index": 0,
    "step_name": "dec",
    "template_id": "fn:dec",
    "input": 27,
    "output": 26
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": 1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": 2,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `860a22060990caa1b6304801b438683c542cfbd209b292db5d267aeb7c86aed3`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 25,
  "output": 26,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 25,
      "output": 26
    },
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 26,
      "output": 27
    },
    {
      "index": 0,
      "step_name": "dec",
      "template_id": "fn:dec",
      "input": 27,
      "output": 26
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": 1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": 2,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 4 = `35`

**Output Value:**
```json
38
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 20
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `0ed56f1e5363b852d22c9bbe75001f82c00ba43b23e872014238fc961c350419`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 35,
    "output": 36
  },
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 36,
    "output": 37
  },
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 37,
    "output": 38
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": 1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": 2,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `f88c8f8d24cf15b2215369ec9f06782316ce533736c192f64fcdee547492615a`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 35,
  "output": 38,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 35,
      "output": 36
    },
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 36,
      "output": 37
    },
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 37,
      "output": 38
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": 1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": 2,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `50`

**Output Value:**
```json
53
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:dec",
      "name": "dec",
      "fn_name": "dec",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn dec(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:inc",
      "name": "inc",
      "fn_name": "inc",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn inc(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 10
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 20
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        },
        {
          "condition": {
            "kind": "binary_op",
            "op": ">",
            "left": {
              "kind": "identifier",
              "name": "__value"
            },
            "right": {
              "kind": "literal",
              "value": 30
            }
          },
          "else": [
            {
              "index": 0,
              "name": "dec",
              "template_id": "fn:dec",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "inc",
              "template_id": "fn:inc",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `14d27875e8d7dbc30d8a67dcbf168fd62bd97fbb202cc24e03d0eff946dc1212`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 50,
    "output": 51
  },
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 51,
    "output": 52
  },
  {
    "index": 0,
    "step_name": "inc",
    "template_id": "fn:inc",
    "input": 52,
    "output": 53
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  },
  {
    "index": 1,
    "path": "then",
    "condition_value": true
  },
  {
    "index": 2,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `fc21308ddd5a7a5569a9a1a1026f1196c1dc86ca8c8173d4d8343a4cfa6e8b88`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:dec",
        "name": "dec",
        "fn_name": "dec",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn dec(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:inc",
        "name": "inc",
        "fn_name": "inc",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn inc(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 20
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          },
          {
            "condition": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            },
            "else": [
              {
                "index": 0,
                "name": "dec",
                "template_id": "fn:dec",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "inc",
                "template_id": "fn:inc",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 50,
  "output": 53,
  "steps": [
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 50,
      "output": 51
    },
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 51,
      "output": 52
    },
    {
      "index": 0,
      "step_name": "inc",
      "template_id": "fn:inc",
      "input": 52,
      "output": 53
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    },
    {
      "index": 1,
      "path": "then",
      "condition_value": true
    },
    {
      "index": 2,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

---

## Program 30 (Complex Boolean Chain)

### RLang Source

```
fn transform1(x: Int) -> Int;
fn transform2(x: Int) -> Int;
fn transform3(x: Int) -> Int;

pipeline main(Int) -> Int {
    if (__value > 10 && __value < 30) {
        transform1
    } else {
        if (__value >= 30 && __value <= 50) {
            transform2
        } else {
            transform3
        }
    }
}
```

### Test Inputs

- Input 1: `5`
- Input 2: `20`
- Input 3: `40`
- Input 4: `60`
- Input 5: `0`

#### Input 1 = `0`

**Output Value:**
```json
0
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:transform1",
      "name": "transform1",
      "fn_name": "transform1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform2",
      "name": "transform2",
      "fn_name": "transform2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform3",
      "name": "transform3",
      "fn_name": "transform3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            }
          },
          "else": [
            {
              "condition": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 30
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "transform3",
                  "template_id": "fn:transform3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "transform2",
                  "template_id": "fn:transform2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "transform1",
              "template_id": "fn:transform1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `fdada9c830f36887a67310aac338468301ff50e40135ac0606c709bb7018275d`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "transform3",
    "template_id": "fn:transform3",
    "input": 0,
    "output": 0
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `c56c3e8c482c1717d568f3ac9d2d0b9d2b6aa654a2d553c6ca4cdc7c5022f418`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:transform1",
        "name": "transform1",
        "fn_name": "transform1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform2",
        "name": "transform2",
        "fn_name": "transform2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform3",
        "name": "transform3",
        "fn_name": "transform3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 30
                }
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "boolean_and",
                  "left": {
                    "kind": "binary_op",
                    "op": ">=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "right": {
                    "kind": "binary_op",
                    "op": "<=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 50
                    }
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "transform3",
                    "template_id": "fn:transform3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "transform2",
                    "template_id": "fn:transform2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "transform1",
                "template_id": "fn:transform1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 0,
  "output": 0,
  "steps": [
    {
      "index": 0,
      "step_name": "transform3",
      "template_id": "fn:transform3",
      "input": 0,
      "output": 0
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 2 = `5`

**Output Value:**
```json
5
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:transform1",
      "name": "transform1",
      "fn_name": "transform1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform2",
      "name": "transform2",
      "fn_name": "transform2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform3",
      "name": "transform3",
      "fn_name": "transform3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            }
          },
          "else": [
            {
              "condition": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 30
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "transform3",
                  "template_id": "fn:transform3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "transform2",
                  "template_id": "fn:transform2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "transform1",
              "template_id": "fn:transform1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `9faffd68c6aed6bdf983a4c538dd565700e38c9bf3bc2f9d182c9651dd9755e9`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "transform3",
    "template_id": "fn:transform3",
    "input": 5,
    "output": 5
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `ee0f5a708a798be6c7b43f873f86355bd1de71eec655fa1da3cdb96e4e1d41f6`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:transform1",
        "name": "transform1",
        "fn_name": "transform1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform2",
        "name": "transform2",
        "fn_name": "transform2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform3",
        "name": "transform3",
        "fn_name": "transform3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 30
                }
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "boolean_and",
                  "left": {
                    "kind": "binary_op",
                    "op": ">=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "right": {
                    "kind": "binary_op",
                    "op": "<=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 50
                    }
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "transform3",
                    "template_id": "fn:transform3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "transform2",
                    "template_id": "fn:transform2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "transform1",
                "template_id": "fn:transform1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 5,
  "output": 5,
  "steps": [
    {
      "index": 0,
      "step_name": "transform3",
      "template_id": "fn:transform3",
      "input": 5,
      "output": 5
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

#### Input 3 = `20`

**Output Value:**
```json
40
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:transform1",
      "name": "transform1",
      "fn_name": "transform1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform2",
      "name": "transform2",
      "fn_name": "transform2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform3",
      "name": "transform3",
      "fn_name": "transform3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            }
          },
          "else": [
            {
              "condition": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 30
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "transform3",
                  "template_id": "fn:transform3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "transform2",
                  "template_id": "fn:transform2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "transform1",
              "template_id": "fn:transform1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `664246fef027fdba335205b0f70e404db5479399c66c1536823087b1af997a3f`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "transform1",
    "template_id": "fn:transform1",
    "input": 20,
    "output": 40
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `245e2865ebcef94d1a382b1913ea466fbe60c97507101c1edbb9336f410ad872`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:transform1",
        "name": "transform1",
        "fn_name": "transform1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform2",
        "name": "transform2",
        "fn_name": "transform2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform3",
        "name": "transform3",
        "fn_name": "transform3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 30
                }
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "boolean_and",
                  "left": {
                    "kind": "binary_op",
                    "op": ">=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "right": {
                    "kind": "binary_op",
                    "op": "<=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 50
                    }
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "transform3",
                    "template_id": "fn:transform3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "transform2",
                    "template_id": "fn:transform2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "transform1",
                "template_id": "fn:transform1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 20,
  "output": 40,
  "steps": [
    {
      "index": 0,
      "step_name": "transform1",
      "template_id": "fn:transform1",
      "input": 20,
      "output": 40
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 4 = `40`

**Output Value:**
```json
120
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:transform1",
      "name": "transform1",
      "fn_name": "transform1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform2",
      "name": "transform2",
      "fn_name": "transform2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform3",
      "name": "transform3",
      "fn_name": "transform3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            }
          },
          "else": [
            {
              "condition": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 30
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "transform3",
                  "template_id": "fn:transform3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "transform2",
                  "template_id": "fn:transform2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "transform1",
              "template_id": "fn:transform1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `521276013a582a46ace968703bec32854cc4d84b62b7c3dcd7b7a56a6c5fcefa`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "transform2",
    "template_id": "fn:transform2",
    "input": 40,
    "output": 120
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "then",
    "condition_value": true
  }
]
```

**HRICH:** `7e2686ad359437811611634d738be39301f0bfdc829f203642a996f07bef72aa`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:transform1",
        "name": "transform1",
        "fn_name": "transform1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform2",
        "name": "transform2",
        "fn_name": "transform2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform3",
        "name": "transform3",
        "fn_name": "transform3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 30
                }
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "boolean_and",
                  "left": {
                    "kind": "binary_op",
                    "op": ">=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "right": {
                    "kind": "binary_op",
                    "op": "<=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 50
                    }
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "transform3",
                    "template_id": "fn:transform3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "transform2",
                    "template_id": "fn:transform2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "transform1",
                "template_id": "fn:transform1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 40,
  "output": 120,
  "steps": [
    {
      "index": 0,
      "step_name": "transform2",
      "template_id": "fn:transform2",
      "input": 40,
      "output": 120
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "then",
      "condition_value": true
    }
  ]
}
```

#### Input 5 = `60`

**Output Value:**
```json
60
```

**Canonical IR (HMASTER):**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "step_templates": [
    {
      "id": "fn:transform1",
      "name": "transform1",
      "fn_name": "transform1",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform1(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform2",
      "name": "transform2",
      "fn_name": "transform2",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform2(Int) -> Int",
      "version": "v0"
    },
    {
      "id": "fn:transform3",
      "name": "transform3",
      "fn_name": "transform3",
      "param_types": [
        "Int"
      ],
      "return_type": "Int",
      "rule_repr": "fn transform3(Int) -> Int",
      "version": "v0"
    }
  ],
  "pipelines": [
    {
      "id": "pipeline:main",
      "name": "main",
      "input_type": "Int",
      "output_type": "Int",
      "steps": [
        {
          "condition": {
            "kind": "boolean_and",
            "left": {
              "kind": "binary_op",
              "op": ">",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 10
              }
            },
            "right": {
              "kind": "binary_op",
              "op": "<",
              "left": {
                "kind": "identifier",
                "name": "__value"
              },
              "right": {
                "kind": "literal",
                "value": 30
              }
            }
          },
          "else": [
            {
              "condition": {
                "kind": "boolean_and",
                "left": {
                  "kind": "binary_op",
                  "op": ">=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 30
                  }
                },
                "right": {
                  "kind": "binary_op",
                  "op": "<=",
                  "left": {
                    "kind": "identifier",
                    "name": "__value"
                  },
                  "right": {
                    "kind": "literal",
                    "value": 50
                  }
                }
              },
              "else": [
                {
                  "index": 0,
                  "name": "transform3",
                  "template_id": "fn:transform3",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ],
              "kind": "if",
              "then": [
                {
                  "index": 0,
                  "name": "transform2",
                  "template_id": "fn:transform2",
                  "arg_types": [],
                  "input_type": "Int",
                  "output_type": "Int"
                }
              ]
            }
          ],
          "kind": "if",
          "then": [
            {
              "index": 0,
              "name": "transform1",
              "template_id": "fn:transform1",
              "arg_types": [],
              "input_type": "Int",
              "output_type": "Int"
            }
          ]
        }
      ]
    }
  ]
}
```

**HMASTER:** `08eac4eda2f3886dc50dfd479a70f3d9fbad016fc494777e9c22b3b158ad13c2`

**TRP Step Records:**
```json
[
  {
    "index": 0,
    "step_name": "transform3",
    "template_id": "fn:transform3",
    "input": 60,
    "output": 60
  }
]
```

**TRP Branch Records:**
```json
[
  {
    "index": 0,
    "path": "else",
    "condition_value": false
  },
  {
    "index": -1,
    "path": "else",
    "condition_value": false
  }
]
```

**HRICH:** `7bc0ce0dda924101110bdbc4ba412e76e73206456b09ce6fafd2dd63062f889f`

**Full Proof Bundle JSON:**
```json
{
  "version": "v0",
  "language": "rlang",
  "entry_pipeline": "main",
  "program": {
    "version": "v0",
    "language": "rlang",
    "entry_pipeline": "main",
    "step_templates": [
      {
        "id": "fn:transform1",
        "name": "transform1",
        "fn_name": "transform1",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform1(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform2",
        "name": "transform2",
        "fn_name": "transform2",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform2(Int) -> Int",
        "version": "v0"
      },
      {
        "id": "fn:transform3",
        "name": "transform3",
        "fn_name": "transform3",
        "param_types": [
          "Int"
        ],
        "return_type": "Int",
        "rule_repr": "fn transform3(Int) -> Int",
        "version": "v0"
      }
    ],
    "pipelines": [
      {
        "id": "pipeline:main",
        "name": "main",
        "input_type": "Int",
        "output_type": "Int",
        "steps": [
          {
            "condition": {
              "kind": "boolean_and",
              "left": {
                "kind": "binary_op",
                "op": ">",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 10
                }
              },
              "right": {
                "kind": "binary_op",
                "op": "<",
                "left": {
                  "kind": "identifier",
                  "name": "__value"
                },
                "right": {
                  "kind": "literal",
                  "value": 30
                }
              }
            },
            "else": [
              {
                "condition": {
                  "kind": "boolean_and",
                  "left": {
                    "kind": "binary_op",
                    "op": ">=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 30
                    }
                  },
                  "right": {
                    "kind": "binary_op",
                    "op": "<=",
                    "left": {
                      "kind": "identifier",
                      "name": "__value"
                    },
                    "right": {
                      "kind": "literal",
                      "value": 50
                    }
                  }
                },
                "else": [
                  {
                    "index": 0,
                    "name": "transform3",
                    "template_id": "fn:transform3",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ],
                "kind": "if",
                "then": [
                  {
                    "index": 0,
                    "name": "transform2",
                    "template_id": "fn:transform2",
                    "arg_types": [],
                    "input_type": "Int",
                    "output_type": "Int"
                  }
                ]
              }
            ],
            "kind": "if",
            "then": [
              {
                "index": 0,
                "name": "transform1",
                "template_id": "fn:transform1",
                "arg_types": [],
                "input_type": "Int",
                "output_type": "Int"
              }
            ]
          }
        ]
      }
    ]
  },
  "input": 60,
  "output": 60,
  "steps": [
    {
      "index": 0,
      "step_name": "transform3",
      "template_id": "fn:transform3",
      "input": 60,
      "output": 60
    }
  ],
  "branches": [
    {
      "index": 0,
      "path": "else",
      "condition_value": false
    },
    {
      "index": -1,
      "path": "else",
      "condition_value": false
    }
  ]
}
```

---
