Skip to content

Different types of equality in F*

Kenji Maillard edited this page Jul 4, 2017 · 12 revisions

Equalities

F* has 3 different types of equality:

val (=)  : #a:Type{hasEq a} -> a -> a -> Tot bool
val (==) : #a:Type -> a -> a -> Tot Type0
val (===): #a:Type -> #b:Type -> a -> b -> Tot Type0

Here is what each of them means:

Disequalities

Corresponding to the equalities, there are also the corresponding disequalities :

  • x <> y is equivalent to not (x = y) (the decidable boolean valued disequality)
  • x =!= y is equivalent yo ~(x == y) (the logical, homogeneous disequality)
Clone this wiki locally