Documentation

GaudisCrypt.Lib.EC.Logic

EasyCrypt's Logic (theories/prelude/Logic.ec): predicates #

Only what ported developments use is here. Names are EasyCrypt's.

def GaudisCrypt.EC.predT {α : Type} :
α → Prop

op predT ['a] = fun (x : 'a) => true: the predicate that always holds.

Equations
Instances For
    @[simp]
    theorem GaudisCrypt.EC.predT_apply {α : Type} (x : α) :

    lemma predTE-like unfolding: predT x.

    def GaudisCrypt.EC.pred1 {α : Type} (c : α) :
    α → Prop

    op pred1 ['a] (c x : 'a) = x = c: the predicate "equal to c".

    Equations
    Instances For
      theorem GaudisCrypt.EC.pred1E {α : Type} (c x : α) :
      pred1 c x ↔ x = c

      lemma pred1E (c x : 'a) : pred1 c x <=> x = c.

      def GaudisCrypt.EC.predC {α : Type} (p : α → Bool) :
      α → Prop

      op predC ['a] (p : 'a -> bool) = fun x => !(p x): the complement of a test (a Bool function, as the guards of programs are; the complement of pred1 c is predC1 c).

      Equations
      Instances For
        theorem GaudisCrypt.EC.predCE {α : Type} (p : α → Bool) (x : α) :
        predC p x ↔ p x = false

        lemma predCE: predC p x <=> !(p x).

        def GaudisCrypt.EC.predC1 {α : Type} (c : α) :
        α → Prop

        op predC1 ['a] (c x : 'a) = x <> c.

        Equations
        Instances For