• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
        • Defprojection
        • Deflist
        • Defaggregate
        • Define
        • Defmapping
        • Defenum
        • Add-io-pairs
        • Defalist
        • Defmapappend
        • Returns-specifiers
        • Defarbrec
        • Defines
        • Define-sk
        • Error-value-tuples
        • Defmax-nat
        • Defmin-int
        • Deftutorial
          • Deftutorial-implementation
            • Deftutorial-gen-deftopics
            • Deftutorial-gen-defpage
            • Deftutorial-gen-deftop
            • Deftutorial-gen-section
              • Deftutorial-fn
              • Deftutorial-definition
          • Extended-formals
          • Defrule
          • Defval
          • Defsurj
          • Defiso
          • Defconstrained-recognizer
          • Deffixer
          • Defmvtypes
          • Defconsts
          • Defthm-unsigned-byte-p
          • Support
          • Defthm-signed-byte-p
          • Defthm-natp
          • Defund-sk
          • Defmacro+
          • Defsum
          • Defthm-commutative
          • Definj
          • Defirrelevant
          • Defredundant
        • Std/strings
        • Std/osets
        • Std/io
        • Std/basic
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Deftutorial-implementation

    Deftutorial-gen-section

    Generate the macro to define a section in a tutorial page.

    Signature
    (deftutorial-gen-section tut-name) → event
    Arguments
    tut-name — Guard (symbolp tut-name).
    Returns
    event — Type (pseudo-event-formp event).

    We use a level-5 heading to keep it relatively small.

    Definitions and Theorems

    Function: deftutorial-gen-section

    (defun deftutorial-gen-section (tut-name)
      (declare (xargs :guard (symbolp tut-name)))
      (let ((__function__ 'deftutorial-gen-section))
        (declare (ignorable __function__))
        (b* ((tut-section (add-suffix tut-name "-SECTION")))
          (cons 'defmacro
                (cons tut-section
                      '((title)
                        (cons 'xdoc::h5 (cons title 'nil))))))))

    Theorem: pseudo-event-formp-of-deftutorial-gen-section

    (defthm pseudo-event-formp-of-deftutorial-gen-section
      (b* ((event (deftutorial-gen-section tut-name)))
        (pseudo-event-formp event))
      :rule-classes :rewrite)