quox/examples/eta.quox

26 lines
820 B
Text
Raw Normal View History

load "misc.quox"
2023-09-17 13:10:46 -04:00
namespace eta {
def0 Π : (A : ★) → (A → ★) → ★ = λ A B ⇒ (x : A) → B x
2023-09-18 18:41:17 -04:00
def0 Σ : (A : ★) → (A → ★) → ★ = λ A B ⇒ (x : A) × B x
2023-09-17 13:10:46 -04:00
def0 function : (A : ★) → (B : A → Type) → (P : Π A B → ★) → (f : Π A B) →
P (λ x ⇒ f x) → P f =
λ A B P f p ⇒ p
def0 box : (A : ★) → (P : [ω.A] → ★) → (e : [ω.A]) →
P [case1 e return A of {[x] ⇒ x}] → P e =
λ A P e p ⇒ p
2023-09-18 18:41:17 -04:00
def0 pair : (A : ★) → (B : A → ★) → (P : Σ A B → ★) → (e : Σ A B) →
P (fst e, snd e) → P e =
λ A B P e p ⇒ p
-- not exactly η, but kinda related
def0 from-false : (A : ★) → (P : (0.False → A) → ★) → (f : 0.False → A) →
P (void A) → P f =
λ A P f p ⇒ p
2023-09-17 13:10:46 -04:00
}