Documentation

Plausible.Shrinkable

class Plausible.Shrinkable (α : Type u) :

Given an example x : α, Shrinkable α gives us a way to shrink it and suggest simpler examples.

  • shrink (x : α) : List α
Instances
    @[implicit_reducible]
    instance Plausible.instShrinkableSum {α : Type u_1} {β : Type u_2} [Shrinkable α] [Shrinkable β] :
    Shrinkable (α β)
    Equations
    • One or more equations did not get rendered due to their size.
    @[irreducible]

    Nat.shrink' n creates a list of smaller natural numbers by successively dividing n by 2 . For example, Nat.shrink 5 = [2, 1, 0].

    Equations
    Instances For
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      @[implicit_reducible]

      Int.shrinkable operates like Nat.shrinkable but also includes the negative variants.

      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      instance Plausible.Prod.shrinkable {α : Type u_1} {β : Type u_2} [shrA : Shrinkable α] [shrB : Shrinkable β] :
      Shrinkable (α × β)
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      instance Plausible.Sigma.shrinkable {α : Type u_1} {β : Type u_2} [shrA : Shrinkable α] [shrB : Shrinkable β] :
      Shrinkable ((_ : α) × β)
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]

      Shrink a list of a shrinkable type, either by discarding an element or shrinking an element.

      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      instance Plausible.Subtype.shrinkable {α : Type u} {β : αProp} [Shrinkable α] [(x : α) → Decidable (β x)] :
      Shrinkable { x : α // β x }
      Equations
      • One or more equations did not get rendered due to their size.