def antisymmetric

stelliferous@0.0.2.0 · proofs/nat_order.bend:368

import stelliferous@0.0.2.0/proofs/nat_order.bend as NatOrder
import Base
import stelliferous@0.0.2.0/proofs/word_encoding.bend as WordEncoding

368# Two opposite bounds identify a natural number.
369def antisymmetric(+left: Nat,+right: Nat,forward: {Nat.is_le(left,right) == True{} : Bool},backward: {Nat.is_le(right,left) == True{} : Bool}) -> {left == right : Nat}:
370  match left right:
371    case 0n 0n: {==}
372    case 0n 1n+right: Empty.absurd({0n == 1n+right : Nat},WordEncoding.false_true(backward))
373    case 1n+left 0n: Empty.absurd({1n+left == 0n : Nat},WordEncoding.false_true(forward))
374    case 1n+ +left 1n+ +right:
375      Equal.cong(Nat,Nat,value => 1n+value,left,right,antisymmetric(left,right,forward,backward))

Uses (6)

Used by (0)

No other definition uses this definition.