• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
        • Type-prescription
        • Rewrite
          • Force
          • Hide
          • Syntaxp
          • Free-variables
          • Bind-free
          • Loop-stopper
          • Backchain-limit
          • Double-rewrite
          • Rewrite-lambda-object
          • Rewriting-versus-cleaning-up-lambda-objects
          • Random-remarks-on-rewriting
          • Case-split
          • Set-rw-cache-state
          • Rewrite-lambda-object-actions
          • Syntactically-clean-lambda-objects-theory
          • Hands-off-lambda-objects-theory
          • Rewrite-lambda-objects-theory
          • Simple
          • Rewrite-stack-limit
          • Rewrite-equiv
          • Assume-true-false-aggressive-p
          • Remove-trivial-equivalences-enabled-p
          • Rewrite-lambda-modep
          • Rewrite-if-avoid-swap
            • Set-rw-cache-state!
          • Meta
          • Linear
          • Definition
          • Clause-processor
          • Tau-system
          • Forward-chaining
          • Equivalence
          • Free-variables
          • Congruence
          • Executable-counterpart
          • Induction
          • Compound-recognizer
          • Elim
          • Well-founded-relation-rule
          • Rewrite-quoted-constant
          • Built-in-clause
          • Well-formedness-guarantee
          • Patterned-congruence
          • Rule-classes-introduction
          • Guard-holders
          • Refinement
          • Type-set-inverter
          • Generalize
          • Corollary
          • Induction-heuristics
          • Backchaining
          • Default-backchain-limit
        • Proof-builder
        • Hons-and-memoization
        • Events
        • History
        • Parallelism
        • Programming
        • Start-here
        • Real
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Rewrite
    • System-attachments

    Rewrite-if-avoid-swap

    Control rewriter's swapping of branches of IF calls

    This topic concerns an advanced control for the ACL2 prover.

    By default, the ACL2 rewriter may swap true and false branches of a call of IF, in particular when the test is a call of NOT. Attach the function constant-t-function-arity-0 to defeat this behavior. Attach the function constant-nil-function-arity-0 to restore the default behavior.