Documentation

GaudisCrypt.Lib.EC.FSetOflist

EasyCrypt's FSet: oflist and membership (theories/datatypes/FSet.ec) #

Next to Lib/EC/FSet.lean: the finite set of a list, EC's names for membership in a union, an intersection, a singleton and the empty set, and mem_iota of List.ec. EC's s `|` t and s `&` t are s ∪ t and s ∩ t. Names are EasyCrypt's.

theorem GaudisCrypt.EC.mem_iota (m n x : ℤ) :
x ∈ iota_ m n ↔ m ≤ x ∧ x < m + n

lemma mem_iota: x \in iota_ m n <=> m <= x < m + n.

@[simp]
theorem GaudisCrypt.EC.FSet.in_fset1 {α : Type} (z x : α) :
x ∈ fset1 z ↔ x = z

lemma in_fset1.

theorem GaudisCrypt.EC.FSet.fsetP {α : Type} (s1 s2 : FSet α) :
s1 = s2 ↔ ∀ (x : α), x ∈ s1 ↔ x ∈ s2

lemma fsetP: extensionality.

def GaudisCrypt.EC.FSet.oflist {α : Type} [DecidableEq α] (s : List α) :
FSet α

op oflist: the finite set of the elements of a list.

Equations
Instances For
    @[simp]
    theorem GaudisCrypt.EC.FSet.mem_oflist {α : Type} [DecidableEq α] (s : List α) (x : α) :
    x ∈ oflist s ↔ x ∈ s

    lemma mem_oflist.

    theorem GaudisCrypt.EC.FSet.in_fsetU {α : Type} [DecidableEq α] (s1 s2 : FSet α) (x : α) :
    x ∈ s1 ∪ s2 ↔ x ∈ s1 ∨ x ∈ s2

    lemma in_fsetU.

    theorem GaudisCrypt.EC.FSet.in_fsetI {α : Type} [DecidableEq α] (s1 s2 : FSet α) (x : α) :
    x ∈ s1 ∩ s2 ↔ x ∈ s1 ∧ x ∈ s2

    lemma in_fsetI.

    @[simp]
    theorem GaudisCrypt.EC.FSet.fset0U {α : Type} [DecidableEq α] (s : FSet α) :
    fset0 ∪ s = s

    lemma fset0U.