Skip to content

Instantly share code, notes, and snippets.

@littlebenlittle
Created October 28, 2020 00:16
Show Gist options
  • Save littlebenlittle/ec4f92bdee73ee7a98fb5e1386697050 to your computer and use it in GitHub Desktop.
Save littlebenlittle/ec4f92bdee73ee7a98fb5e1386697050 to your computer and use it in GitHub Desktop.
module _ where
-- Constructive Set
data CSet {A : Set} : (A → Set) → Set where
⟨_⟩ : (p : A → Set) → CSet p
data _∈_ {A : Set} {p : A → Set} (x : A) (S : CSet p) : Set where
∈-pf : p x → x ∈ S
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
-- x is an element of the set containing elements equal to x
triv₁ : {A : Set} (x : A) → x ∈ ⟨ (λ y → x ≡ y) ⟩
triv₁ _ = ∈-pf refl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment