• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
        • Base-api
        • Aignet-construction
        • Representation
          • Aignet-impl
          • Node
          • Network
            • Lookup-id
            • Lookup-stype
            • Aignet-extension-p
            • Aignet-nodes-ok
            • Aignet-outputs-aux
            • Aignet-nxsts-aux
            • Fanin
            • Aignet-outputs
            • Lookup-reg->nxst
            • Aignet-lit-fix
            • Aignet-fanins
            • Stype-count
            • Aignet-nxsts
            • Aignet-idp
            • Aignet-norm
            • Aignet-norm-p
            • Aignet-id-fix
              • Fanin-count
              • Proper-node-listp
              • Fanin-node-p
              • Node-list
              • Aignet-litp
            • Combinational-type
            • Typecode
            • Stypep
          • Aignet-copy-init
          • Aignet-simplify-with-tracking
          • Aignet-simplify-marked-with-tracking
          • Aignet-cnf
          • Aignet-simplify-marked
          • Aignet-complete-copy
          • Aignet-transforms
          • Aignet-eval
          • Semantics
          • Aignet-read-aiger
          • Aignet-write-aiger
          • Aignet-abc-interface
          • Utilities
        • Aig
        • Satlink
        • Truth
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Projects
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Network

    Aignet-id-fix

    Fix an ID so that it is valid for the aignet.

    Signature
    (aignet-id-fix id aignet) → new-id
    Arguments
    id — Guard (natp id).
    aignet — Guard (node-listp aignet).
    Returns
    new-id — Type (aignet-idp new-id aignet).

    Definitions and Theorems

    Function: aignet-id-fix

    (defun aignet-id-fix (id aignet)
      (declare (xargs :guard (and (natp id) (node-listp aignet))))
      (let ((__function__ 'aignet-id-fix))
        (declare (ignorable __function__))
        (if (aignet-idp id aignet)
            (nfix id)
          0)))

    Theorem: return-type-of-aignet-id-fix

    (defthm return-type-of-aignet-id-fix
      (b* ((new-id (aignet-id-fix id aignet)))
        (aignet-idp new-id aignet))
      :rule-classes :rewrite)

    Theorem: aignet-id-fix-when-aignet-idp

    (defthm aignet-id-fix-when-aignet-idp
      (implies (aignet-idp id aignet)
               (equal (aignet-id-fix id aignet)
                      (nfix id))))

    Theorem: aignet-id-fix-id-val-linear

    (defthm aignet-id-fix-id-val-linear
      (<= (aignet-id-fix id aignet)
          (fanin-count aignet))
      :rule-classes :linear)

    Theorem: aignet-id-fix-of-node-list-fix

    (defthm aignet-id-fix-of-node-list-fix
      (equal (aignet-id-fix x (node-list-fix aignet))
             (aignet-id-fix x aignet)))

    Theorem: aignet-id-fix-of-nfix-id

    (defthm aignet-id-fix-of-nfix-id
      (equal (aignet-id-fix (nfix id) aignet)
             (aignet-id-fix id aignet)))

    Theorem: aignet-id-fix-nat-equiv-congruence-on-id

    (defthm aignet-id-fix-nat-equiv-congruence-on-id
      (implies (nat-equiv id id-equiv)
               (equal (aignet-id-fix id aignet)
                      (aignet-id-fix id-equiv aignet)))
      :rule-classes :congruence)

    Theorem: aignet-id-fix-of-node-list-fix-aignet

    (defthm aignet-id-fix-of-node-list-fix-aignet
      (equal (aignet-id-fix id (node-list-fix aignet))
             (aignet-id-fix id aignet)))

    Theorem: aignet-id-fix-node-list-equiv-congruence-on-aignet

    (defthm aignet-id-fix-node-list-equiv-congruence-on-aignet
      (implies (node-list-equiv aignet aignet-equiv)
               (equal (aignet-id-fix id aignet)
                      (aignet-id-fix id aignet-equiv)))
      :rule-classes :congruence)