def maj
import bend-kit-lemmas@0.1.1.0/lemmas.bend as Lemmasimport Base
291# The carry out of a full adder: set when two or three of the bits are set.
292def maj(x: Bool, y: Bool, c: Bool) -> Bool:
293 match x y:
294 case False{} False{}:
295 False{}
296 case True{} True{}:
297 True{}
298 case False{} True{}:
299 c
300 case True{} False{}:
301 c