Write one byte to an open
Signature: (write-byte$ x channel state-state) returns
This is a logic-mode function, but its logical definition is tricky; see logical-story-of-io. The main logical consequence is the updating of state.
Under the hood, we write a byte to the Lisp output stream that is associated
with
Theorem:
(defthm state-p1-of-write-byte$ (implies (and (state-p1 state) (symbolp channel) (natp byte) (< byte 256) (open-output-channel-p1 channel :byte state)) (state-p1 (write-byte$ byte channel state))))
Theorem:
(defthm open-output-channel-p1-of-write-byte$ (implies (and (state-p1 state) (open-output-channel-p1 channel :byte state)) (open-output-channel-p1 channel :byte (write-byte$ byte channel state))))