• 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
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Pigeon-hole

    No-others-in-hole

    Signature
    (no-others-in-hole tweety birds hole) → clauses
    Arguments
    tweety — Fixed.
        Guard (natp tweety).
    birds — Counts down from max birds.
        Guard (natp birds).
    hole — Fixed.
        Guard (natp hole).
    Returns
    clauses — No other bird shares hole with tweety.
        Type (lit-list-listp clauses).

    Definitions and Theorems

    Function: no-others-in-hole

    (defun no-others-in-hole (tweety birds hole)
      (declare (xargs :guard (and (natp tweety)
                                  (natp birds)
                                  (natp hole))))
      (let ((__function__ 'no-others-in-hole))
        (declare (ignorable __function__))
        (b* (((when (zp birds)) nil)
             (birds (- birds 1))
             ((when (eql tweety birds))
              (no-others-in-hole tweety birds hole)))
          (cons (not-both-in-hole tweety birds hole)
                (no-others-in-hole tweety birds hole)))))

    Theorem: lit-list-listp-of-no-others-in-hole

    (defthm lit-list-listp-of-no-others-in-hole
      (b* ((clauses (no-others-in-hole tweety birds hole)))
        (lit-list-listp clauses))
      :rule-classes :rewrite)