Documentation

Duper.Rules.BoolSimp

Rules 1 through 15 are from Leo-III. Rules 16 through 22 and 25 through 27 are from "Superposition with First-Class Booleans and Inprocessing Clausification." Rules 23, 24, and 28 were made just for duper. Rules with the b suffix operate on Bool, rules without the b suffix operate on Prop.

Instances For
    Equations
    Instances For
      theorem Duper.rule1Theorem (p : Prop) :
      (p p) = p
      theorem Duper.rule1bTheorem (b : Bool) :
      (b || b) = b
      theorem Duper.rule2bTheorem (b : Bool) :
      (!b || b) = true
      theorem Duper.rule4Theorem (p : Prop) :
      (p False) = p
      theorem Duper.rule4bTheorem (b : Bool) :
      (b || false) = b
      theorem Duper.rule5Theorem {α : Sort u_1} (p : α) :
      (p = p) = True
      theorem Duper.rule5bTheorem (b : Bool) :
      (b == b) = true
      theorem Duper.rule6Theorem (p : Prop) :
      (p = True) = p
      theorem Duper.rule6bTheorem (b : Bool) :
      (b == true) = b
      theorem Duper.rule6SymTheorem (p : Prop) :
      (True = p) = p
      theorem Duper.rule8Theorem (p : Prop) :
      (p p) = p
      theorem Duper.rule8bTheorem (b : Bool) :
      (b && b) = b
      theorem Duper.rule10Theorem (p : Prop) :
      (p True) = p
      theorem Duper.rule10bTheorem (b : Bool) :
      (b && true) = b
      theorem Duper.rule12Theorem {α : Sort u_1} (p : α) :
      (p p) = False
      theorem Duper.rule15Theorem (p : Prop) :
      (¬¬p) = p
      theorem Duper.rule15bTheorem (b : Bool) :
      (!!b) = b
      theorem Duper.rule16Theorem (p : Prop) :
      (Truep) = p
      theorem Duper.rule17Theorem (p : Prop) :
      (Falsep) = True
      theorem Duper.rule18Theorem (p : Prop) :
      (pFalse) = ¬p
      theorem Duper.rule19Theorem (α : Sort u_1) :
      (∀ (x : α), True) = True
      theorem Duper.rule20Theorem (p : Prop) :
      (p¬p) = ¬p
      theorem Duper.rule21Theorem (p : Prop) :
      (¬pp) = p
      theorem Duper.rule22Theorem (p : Prop) :
      (pp) = True
      theorem Duper.rule23Theorem (f : PropProp) :
      (∀ (p : Prop), f p) = (f True f False)
      theorem Duper.rule23bTheorem (f : BoolProp) :
      (∀ (b : Bool), f b) = (f true f false)
      theorem Duper.rule24Theorem (f : PropProp) :
      ( (p : Prop), f p) = (f True f False)
      theorem Duper.rule24bTheorem (f : BoolProp) :
      ( (b : Bool), f b) = (f true f false)
      theorem Duper.rule28Theorem (p1 p2 : Prop) :
      (p1 p2) = (p1 = p2)
      partial def Duper.mkRule25Theorem (e : Lean.Expr) (counter i j : Nat) :

      Assuming e has the form e1 ∨ e2 ∨ ... ∨ en, returns an array #[e1, e2, ... en]. Note: If e has the form (e1a ∨ e1b) ∨ e2 ∨ ... en, then the disjunction (e1a ∨ e1b) will be considered e1 (and the disjunction e1 will not be broken down further). This decision is made to reflect the form of the disjunction assumed by ProofReconstruction.lean's orIntro

      partial def Duper.mkRule26Theorem (e : Lean.Expr) (counter i j : Nat) :
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        s ∨ s ↦ s

        Equations
        Instances For

          s || s ↦ s

          Equations
          Instances For

            ¬s ∨ s ↦ True

            Equations
            Instances For

              !s || s ↦ true

              Equations
              Instances For

                s ∨ ¬s ↦ True

                Equations
                Instances For

                  s || !s ↦ true

                  Equations
                  Instances For

                    s ∨ True ↦ True

                    Equations
                    Instances For

                      s || true ↦ true

                      Equations
                      Instances For

                        True ∨ s ↦ True

                        Equations
                        Instances For

                          true || s ↦ true

                          Equations
                          Instances For

                            s ∨ False ↦ s

                            Equations
                            Instances For

                              s || false ↦ s

                              Equations
                              Instances For

                                False ∨ s ↦ s

                                Equations
                                Instances For

                                  false || s ↦ s

                                  Equations
                                  Instances For

                                    s = s ↦ True

                                    Equations
                                    Instances For

                                      s == s ↦ true

                                      Equations
                                      Instances For

                                        s = True ↦ s

                                        Equations
                                        Instances For

                                          s == true ↦ s

                                          Equations
                                          Instances For

                                            True = s ↦ s

                                            Equations
                                            Instances For

                                              true == s ↦ s

                                              Equations
                                              Instances For

                                                Not False ↦ True

                                                Equations
                                                Instances For

                                                  !false ↦ True

                                                  Equations
                                                  Instances For

                                                    s ∧ s ↦ s

                                                    Equations
                                                    Instances For

                                                      s && s ↦ s

                                                      Equations
                                                      Instances For

                                                        ¬s ∧ s ↦ False

                                                        Equations
                                                        Instances For

                                                          !s && s ↦ false

                                                          Equations
                                                          Instances For

                                                            s ∧ ¬s ↦ False

                                                            Equations
                                                            Instances For

                                                              s && !s ↦ false

                                                              Equations
                                                              Instances For

                                                                s ∧ True ↦ s

                                                                Equations
                                                                Instances For

                                                                  s && true ↦ s

                                                                  Equations
                                                                  Instances For

                                                                    True ∧ s ↦ s

                                                                    Equations
                                                                    Instances For

                                                                      true && s ↦ s

                                                                      Equations
                                                                      Instances For

                                                                        s ∧ False ↦ False

                                                                        Equations
                                                                        Instances For

                                                                          s && false ↦ false

                                                                          Equations
                                                                          Instances For

                                                                            False ∧ s ↦ False

                                                                            Equations
                                                                            Instances For

                                                                              false && s ↦ false

                                                                              Equations
                                                                              Instances For

                                                                                s ≠ s ↦ False

                                                                                Equations
                                                                                Instances For

                                                                                  s != s ↦ False

                                                                                  Equations
                                                                                  Instances For

                                                                                    s = False ↦ ¬s

                                                                                    Equations
                                                                                    Instances For

                                                                                      s == false ↦ !s

                                                                                      Equations
                                                                                      Instances For

                                                                                        False = s ↦ ¬s

                                                                                        Equations
                                                                                        Instances For

                                                                                          false == s ↦ !s

                                                                                          Equations
                                                                                          Instances For

                                                                                            Not True ↦ False

                                                                                            Equations
                                                                                            Instances For

                                                                                              !true ↦ false

                                                                                              Equations
                                                                                              Instances For

                                                                                                ¬¬s ↦ s

                                                                                                Equations
                                                                                                Instances For

                                                                                                  !!s ↦ s

                                                                                                  Equations
                                                                                                  Instances For

                                                                                                    True → s ↦ s

                                                                                                    Equations
                                                                                                    Instances For

                                                                                                      False → s ↦ True

                                                                                                      Equations
                                                                                                      Instances For

                                                                                                        s → False ↦ ¬s

                                                                                                        Equations
                                                                                                        Instances For

                                                                                                          s → True ↦ True (we generalize this to (∀ _ : α, True) ↦ True)

                                                                                                          Equations
                                                                                                          Instances For

                                                                                                            s → ¬s ↦ ¬s

                                                                                                            Equations
                                                                                                            Instances For

                                                                                                              ¬s → s ↦ s

                                                                                                              Equations
                                                                                                              Instances For

                                                                                                                s → s ↦ True

                                                                                                                Equations
                                                                                                                Instances For

                                                                                                                  ∀ p : Prop, f(p) ↦ f(True) ∧ f(False)

                                                                                                                  Equations
                                                                                                                  Instances For

                                                                                                                    ∀ b : Bool, f(b) ↦ f true ∧ f false (assuming f : Bool → Prop)

                                                                                                                    Equations
                                                                                                                    Instances For

                                                                                                                      ∃ p : Prop, f(p) ↦ f True ∨ f False

                                                                                                                      Equations
                                                                                                                      Instances For

                                                                                                                        ∃ b : Bool, f(b) ↦ f true ∨ f false (assuming f : Bool → Prop)

                                                                                                                        Equations
                                                                                                                        Instances For

                                                                                                                          (s1 → s2 → ... → sn → v) ↦ True if there exists i and j such that si = ¬sj Since this rule will require a more involved proof reconstruction, rather than returning the resulting expression as in previous applyRule functions, we return the two indices of the hypotheses that directly contradict each other. Specifically, if si = ¬sj, then we return some (i, j).

                                                                                                                          Equations
                                                                                                                          Instances For

                                                                                                                            (s1 → s2 → ... → sn → v1 ∨ ... ∨ vm) ↦ True if there exists i and j such that si = vj Since this rule will require a more involved proof reconstruction, rather than returning the resulting expression as in previous applyRule functions, we return the index of the hypothesis si and the index of the conclusion vj. Specifically, if si = vj, then we return some (i, j)

                                                                                                                            Equations
                                                                                                                            Instances For

                                                                                                                              (s1 ∧ s2 ∧ ... ∧ sn → v1 ∨ ... ∨ vm) ↦ True if there exists i and j such that si = vj Since this rule will require a more involved proof reconstruction, rather than returning the resulting expression as in previous applyRule functions, we return the index of the hypothesis si and the inddex of the conclusion vj. Specifically, if si = vj, then we return some (i, j)

                                                                                                                              Equations
                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                              Instances For
                                                                                                                                def Duper.getBoolSimpRuleTheorem (boolSimpRule : BoolSimpRule) (originalExp : Lean.Expr) (ijOpt : Option (Nat × Nat)) :

                                                                                                                                Returns the rule theorem corresponding to boolSimpRule with the first argument applied.

                                                                                                                                Note that this function assumes that boolSimpRule has already been shown to be applicable to originalExp so this is not rechecked (e.g. for rule1, this function does not check that the two propositions in the disjunction are actually equal, it assumes that this is the case from the fact that rule1 was applied)

                                                                                                                                Equations
                                                                                                                                Instances For

                                                                                                                                  Some boolSimpRules (those with b suffixes) operates on Bool rather than Prop. mkBoolSimpProp needs to know whether boolSimpRule is one such rule in order to pass the correct type into congrArg

                                                                                                                                  Equations
                                                                                                                                  Instances For
                                                                                                                                    def Duper.mkBoolSimpProof (substPos : ClausePos) (boolSimpRule : BoolSimpRule) (ijOpt : Option (Nat × Nat)) (premises : List Lean.Expr) (parents : List RuleM.ProofParent) (transferExprs : Array Lean.Expr) (c : Clause) :
                                                                                                                                    Equations
                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                    Instances For

                                                                                                                                      The list of rules that do not require the RuleM monad

                                                                                                                                      Equations
                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                      Instances For

                                                                                                                                        The list of rules that do require the RuleM monad

                                                                                                                                        Equations
                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                        Instances For
                                                                                                                                          Equations
                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                          Instances For
                                                                                                                                            Equations
                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                            Instances For

                                                                                                                                              Implements various Prop-related simplifications as described in "Superposition with First-Class Booleans and Inprocessing Clausification" and "Extensional Paramodulation for Higher-Order Logic and its Effective Implementation Leo-III"

                                                                                                                                              Equations
                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                              Instances For