Product.agda 641 B

123456789101112131415161718192021222324252627282930
  1. {-# OPTIONS --without-K #-}
  2. module Common.Product where
  3. open import Common.Level
  4. infixr 4 _,_ _,′_
  5. infixr 2 _×_
  6. ------------------------------------------------------------------------
  7. -- Definition
  8. record Σ {a b} (A : Set a) (B : A → Set b) : Set (a ⊔ b) where
  9. constructor _,_
  10. field
  11. proj₁ : A
  12. proj₂ : B proj₁
  13. open Σ public
  14. syntax Σ A (λ x → B) = Σ[ x ∶ A ] B
  15. ∃ : ∀ {a b} {A : Set a} → (A → Set b) → Set (a ⊔ b)
  16. ∃ = Σ _
  17. _×_ : ∀ {a b} (A : Set a) (B : Set b) → Set (a ⊔ b)
  18. A × B = Σ[ x ∶ A ] B
  19. _,′_ : ∀ {a b} {A : Set a} {B : Set b} → A → B → A × B
  20. _,′_ = _,_