• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
      • Gl
      • Witness-cp
      • Ccg
      • Install-not-normalized
      • Rewrite$
      • Fgl
      • Removable-runes
      • Efficiency
      • Rewrite-bounds
      • Bash
      • Def-dag-measure
      • Bdd
      • Remove-hyps
      • Contextual-rewriting
      • Simp
      • Rewrite$-hyps
      • Bash-term-to-dnf
      • Use-trivial-ancestors-check
      • Minimal-runes
      • Clause-processor-tools
        • Rp-rewriter
          • Rp-ruleset
          • Defthmrp
          • Rp-rewriter/meta-rules
          • Rp-utilities
            • Defthmrp
            • Show-rules
            • Def-rw-opener-error
            • Valid-sc
            • Set-rp-backchain-limit
            • Fetch-new-theory
              • Ex-from-rp
              • Rp-other-utilities
              • Rp-equal
              • Preserve-current-theory
              • Set-rw-step-limit
              • Rp-termp
              • Include-fnc
              • Set-rp-backchain-limit-throws-error
              • Defwarrant-rp
              • Create-case-match-macro
            • Rp-rewriter-demo
            • Rp-rewriter/debugging
            • Rp-rewriter/applications
        • Fn-is-body
        • Without-subsumption
        • Rewrite-equiv-hint
        • Def-bounds
        • Rewrite$-context
        • Try-gl-concls
        • Hint-utils
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Rp-utilities

    Fetch-new-theory

    A macro that detects the changes in the theory when a book is included, and creates a macro to enable users to enable and disable the new theory.

    Gives users the ability to undo and redo the changes an event, such as include-book, makes to current theory.

    
     (fetch-new-theory
      <event>               ;; e.g., (include-book "arithmetic-5" :dir :system)
      <macro-name>          ;; e.g., use-aritmetic-5
      ;;optional key
      :disabled <disabled> ;; When non-nil, the event does not change the current
      theory. Default: nil.
      )
     
    

    After including the arithmetic library as given below, users can enable and disable the library as given.

    
     (fetch-new-theory
      (include-book "arithmetic-5" :dir :system)
      use-aritmetic-5)
     
    
    (use-aritmetic-5 t) 
    
    (use-aritmetic-5 nil) 
    

    If you wish not to generate a macro, you may want to use preserve-current-theory