-- 8th Summer School on Formal Techniques -- Menlo College, Atherton, California, US -- -- 21-25 May 2018 -- -- Exercise session 2: More definitions and proofs in Agda open import Library -- Negation ¬_ : (P : Set) → Set -- \ neg ¬ P = P → ⊥ -- Decidability ctd. data Dec (P : Set) : Set where yes : (p : P) → Dec P no : (¬p : ¬ P) → Dec P -- Decidable sets are closed under ⊥, ⊤, ⊎, ×, → dec⊥ : Dec ⊥ -- \ bot dec⊥ = {!!} dec⊤ : Dec ⊤ -- \ top dec⊤ = {!!} dec⊎ : ∀{P Q : Set} (p : Dec P) (q : Dec Q) → Dec (P ⊎ Q) -- \ uplus dec⊎ p q = {!!} dec× : ∀{P Q : Set} (p : Dec P) (q : Dec Q) → Dec (P × Q) -- \ times dec× p q = {!!} dec→ : ∀{P Q : Set} (p : Dec P) (q : Dec Q) → Dec (P → Q) -- \ to dec→ p q = {!!} -- Less-or-equal order on natural numbers defined inductively open import Agda.Builtin.Nat data _≤_ : (n m : Nat) → Set where -- \ le -- add constructors here 1≤3 : 1 ≤ 3 1≤3 = {!!} ≤0 : ∀{n} (n≤0 : n ≤ 0) → n ≡ 0 ≤0 = {!!} ≤refl : ∀ n → n ≤ n ≤refl = {!!} ≤trans : ∀{n m l} (n≤m : n ≤ m) (m≤l : m ≤ l) → n ≤ l ≤trans = {!!} ≤antisym : ∀{n m} (n≤m : n ≤ m) (m≤n : m ≤ n) → n ≡ m ≤antisym = {!!} -- Advanced exercise: -- Define substitution for IPL (see file Substitution.agda) -- Very advanced exercise: -- Prove normalization for IPL (see file Normal.agda) -- -}