WordSubtraction.restore: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/word_subtraction.bend as WordSubtraction Lines 94-105 of stelliferous@0.0.2.0/proofs/word_subtraction.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/word_subtraction.bend&start_line=94&end_line=105 import Base import stelliferous@0.0.2.0/proofs/natural_addition.bend as Addition import stelliferous@0.0.2.0/proofs/word_encoding.bend as WordEncoding def restore(+a: Nat,+b: Nat,h: {Nat.is_le(b,a) == True{} : Bool}) -> {Nat.add(Nat.sub(a,b),b) == a : Nat}: match a b: case 0n 0n: {==} case 0n 1n+b: Empty.absurd({Nat.add(Nat.sub(0n,1n+b),1n+b) == 0n : Nat},WordEncoding.false_true(h)) case 1n+ +a 0n: Addition.zero_right(1n+a) case 1n+ +a 1n+ +b: %Equal.sym(Nat,Nat.add(Nat.sub(a,b),1n+b),1n+Nat.add(Nat.sub(a,b),b),Addition.successor_right(Nat.sub(a,b),b)) : {_ == 1n+a : Nat} %restore(a,b,h) : {1n+Nat.add(Nat.sub(a,b),b) == 1n+_ : Nat} {==} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/natural_addition.bend&name=successor_right https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/natural_addition.bend&name=zero_right https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/word_encoding.bend&name=false_true