Documentation

Blaster.Optimize.Rewriting.OptimizeForAll

mkImpliesExpr a b return expression a → b without applying any normalization.

Equations
Instances For

    Given h : a → b, apply the simplification rules:

    • When a := True ∧ Type(b) = Prop:
      • When ¬ fVarInExpr h.fvarId! b:
        • return some b
      • When fVarInExpr h.fvarId! b:
        • return some b[h/True.intro]
    • When a := False ∧ Type(b) = Prop:
    • Otherwise
      • return none

    TODO: We need to find a way to replace h in body with the proper h in hypothesis.

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

      Given a → b, apply the following normalization rule:

      • When b := False ∧ Type(a) = Prop
        • return some ¬ a
      • Otherwise
        • return none
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Given a → b, apply the simplification rules:

        • When ∃ e := _ ∈ h, e = ¬ b
          • return some ¬ a
        • When ∃ e := _ ∈ hypothesisContext.hypothesisMap, e = ¬ b
          • return some ¬ a
        • Otherwise:
          • return none
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Given a → b, apply the simplification rules:

          • When ∃ e := _ ∈ h, e = b
          • When ∃ e := _ ∈ hypothesisContext.hypothesisMap, e = b
          • When ∃ e := _ ∈ hypothesisContext.hypothesisMap, e = ¬ a
          • Otherwise:
            • return none
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Given h : a → b returns true only when the following condition is satisfied:

            • ∃ h : a → b := _ ∈ hypothesisContext.hypothesisMap,
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Given h : a → b, apply the simplification rules:

              • When a := p ∈ hypothesisContext.hypothesisMap ∧ Type(b) = Prop
                • When ¬ fVarInExpr h.fvarId! b
                  • return some b
                • When fVarInExpr h.fvarId! b
                  • return `some b[h/p]
              • Otherwise:
                • return none
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Apply the following simplification/normalized rules on forallE. Note that implication a → b is internally represented as forallE _ a b bi. The simplification/normalization rules applied are: - ∀ (n : t), True | e → True ==> True - False → e ==> True (if Type(e) = Prop) - h : True → e ==> e (if Type(e) = Prop ∧ ¬ fVarInExpr h.fvarId! e) - h : True → e ==> e[h/True.intro] (if Type(e) = Prop ∧ fVarInExpr h.fvarId! e) TODO: replace True.intro with proper proof - e → False ==> ¬ e - e1 → e2 ==> True (if e1 =ₚₜᵣ e2 ∧ Type(e1) = Prop) - e1 → e2 ==> True (if ∃ e1 → e2 := _ ∈ hypothesisContext.hypothesisMap) - e1 → e2 ==> ¬ e1 (if ∃ e := _ ∈ h, e = ¬ e2) - e1 → e2 ==> ¬ e1 (if ∃ e := _ ∈ hypothesisContext.hypothesisMap, e = ¬ e2) - e1 → e2 ==> True (if e2 := _ ∈ h) - e1 → e2 ==> True (if e2 := _ ∈ hypothesisContext.hypothesisMap) - e1 → e2 ==> True (if ∃ e := _ ∈ hypothesisContext.hypothesisMap, e = ¬ e1 ∧ Type(e2) = Prop) - h : e1 → e2 ==> e2 (if e1 := _ ∈ hypothesisContext.hypothesisMap ∧ ¬ fVarInExpr h.fvarId! e2 ∧ Type(e2) = Prop) - h : e1 → e2 ==> e2[h/h'] (if e1 := h' ∈ hypothesisContext.hypothesisMap ∧ fVarInExpr h.fvarId! e2 ∧ Type(e2) = Prop ) - ∀ (n : t), e ===> e (if isSortOrInhabited t ∧ Type(e) = Prop ∧ ¬ fVarInExpr n.fvarId! e) Assume that n is a free variable expression. An error is triggered if this is not the case. Assume that h corresponds to the hypothesis map updated with hypotheses in t.

                Equations
                Instances For