• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
        • Sat-solver-options
          • Unsat-checking
          • Check-config
            • Pigeon-hole
              • No-two-in-hole-aux
              • No-others-in-hole
              • Not-both-in-hole
              • No-two-in-any-hole
              • Every-bird-in-hole
                • No-two-in-hole
                • Bird-in-some-hole
                • Bird-in-hole
              • Simple-sat
              • Assert-unsat
              • Assert-sat
          • Config-p
          • Logical-story
          • Dimacs
          • Gather-benchmarks
          • Cnf
          • Satlink-extra-hook
          • Sat
        • Truth
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Projects
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Pigeon-hole

    Every-bird-in-hole

    Signature
    (every-bird-in-hole bird max-hole) → clauses
    Arguments
    bird — Counts down from max bird.
        Guard (natp bird).
    max-hole — Fixed.
        Guard (natp max-hole).
    Returns
    clauses — Every bird is in some hole.
        Type (lit-list-listp clauses).

    Definitions and Theorems

    Function: every-bird-in-hole

    (defun every-bird-in-hole (bird max-hole)
      (declare (xargs :guard (and (natp bird) (natp max-hole))))
      (let ((__function__ 'every-bird-in-hole))
        (declare (ignorable __function__))
        (b* (((when (zp bird)) nil)
             (bird (- bird 1)))
          (cons (bird-in-some-hole bird max-hole)
                (every-bird-in-hole bird max-hole)))))

    Theorem: lit-list-listp-of-every-bird-in-hole

    (defthm lit-list-listp-of-every-bird-in-hole
      (b* ((clauses (every-bird-in-hole bird max-hole)))
        (lit-list-listp clauses))
      :rule-classes :rewrite)