xpile 0.1.616

Polyglot transpile workbench (Python/C/C++/Rust/Ruchy/Lean ↔ Rust/Ruchy/PTX/WGSL/SPIR-V) with provable contracts at every layer.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def both(a: bool, b: bool) -> bool:
    return a and b


def either(a: bool, b: bool) -> bool:
    return a or b


def negate(a: bool) -> bool:
    return not a


def mixed(a: bool, b: bool, c: bool) -> bool:
    # operator polarity preserved across nesting: (a and not b) or c
    return (a and not b) or c