Documentation

LeanPool.Polylean.UnitConjecture.EnumDecide

Decision by enumeration #

For a type X that is finite (or more generally, compact), it is possible to automatically decide any statement of the form x : X, P x by enumeration when P is a decidable predicate on X (i.e., a predicate for the individual propositions P x are decidable for any given x : X).

Overview #

The EnumDecide.decideForall typeclass defines the property of a type being exhaustively checkable.

Results in this file include

def LeanPool.Polylean.EnumDecide.decideBelow (p : NatProp) [DecidablePred p] (bound : Nat) :
Decidable (∀ (n : Nat), n < boundp n)

It is possible to check whether a given decidable predicate holds for all natural numbers below a given bound.

Equations
Instances For
    def LeanPool.Polylean.EnumDecide.decideBelowFin {m : Nat} (p : Fin mProp) [DecidablePred p] (bound : Nat) :
    Decidable (∀ (n : Fin m), n < boundp n)

    It is possible to check whether a decidable predicate on Fin m holds below a given natural-number bound.

    Equations
    Instances For
      def LeanPool.Polylean.EnumDecide.decideFin {m : Nat} (p : Fin mProp) [DecidablePred p] :
      Decidable (∀ (n : Fin m), p n)

      It is possible to decide whether a predicate holds for all elements of Fin n.

      Equations
      Instances For

        A typeclass for "exhaustively verifiable types", i.e., types for which it is possible to decide whether a given (decidable) predicate holds for all its elements.

        • decideForall (p : αProp) [DecidablePred p] : Decidable (∀ (x : α), p x)

          Decide whether a decidable predicate holds for all elements.

        Instances
          @[reducible]
          instance LeanPool.Polylean.EnumDecide.decideProd {α : Type u_1} {β : Type u_2} [dfa : DecideForall α] [dfb : DecideForall β] (p : α × βProp) [DecidablePred p] :
          Decidable (∀ (xy : α × β), p xy)
          Equations
          @[reducible]
          Equations
          @[reducible]
          instance LeanPool.Polylean.EnumDecide.decideSum {α : Type u_1} {β : Type u_2} [dfa : DecideForall α] [dfb : DecideForall β] (p : α βProp) [DecidablePred p] :
          Decidable (∀ (x : α β), p x)
          Equations
          @[implicit_reducible]
          instance LeanPool.Polylean.EnumDecide.funEnum {α : Type u_1} {β : Type u_2} [dfa : DecideForall α] [dfb : DecidableEq β] :
          DecidableEq (αβ)
          Equations