def double_self

bendtorch-core@0.1.0.0 · src/storage/arith.bend:45

import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith
import Base

45def double_self(+a: Nat) -> {Nat.add(a, a) == Nat.double(a) : Nat}:
46  match a:
47    case 0n:
48      {==}
49    case 1n+p:
50      %double_self(p) : {1n+Nat.add(p, 1n+p) == 2n+_ : Nat}
51      %add_succ(p, p) : {1n+Nat.add(p, 1n+p) == 1n+_ : Nat}
52      {==}

Uses (4)

Used by (2)