59 lines
1.2 KiB
Agda
59 lines
1.2 KiB
Agda
{-# OPTIONS --cubical #-}
|
||
|
||
open import Cubical.Foundations.Prelude
|
||
using (_≡_; refl; _∙_; _∎; cong; sym; fst; snd; _,_; ~_)
|
||
open import Cubical.Data.Empty as ⊥
|
||
open import Cubical.Foundations.Equiv using (isEquiv; equivProof; equiv-proof)
|
||
open import Relation.Nullary using (¬_)
|
||
open import Relation.Binary.Core using (Rel)
|
||
open import Data.Nat
|
||
|
||
open import Data.Bool
|
||
|
||
sanity : 1 + 1 ≡ 2
|
||
sanity = refl
|
||
|
||
+-comm : (a b : ℕ) → a + b ≡ b + a
|
||
+-comm zero zero = refl
|
||
+-comm (suc a) zero = cong suc (+-comm a zero)
|
||
|
||
-- +-comm (suc a) zero = suc a + zero
|
||
-- ≡⟨ refl ⟩
|
||
-- -- suc n + m = suc (n + m)
|
||
-- suc (a + zero)
|
||
-- ≡⟨ cong suc (+-comm a zero) ⟩
|
||
-- suc (zero + a)
|
||
-- ≡⟨ refl ⟩
|
||
-- -- zero + m = m
|
||
-- suc a
|
||
-- ≡⟨ refl ⟩
|
||
-- zero + suc a
|
||
-- ∎
|
||
--
|
||
-- inner-eq : a ≡ b
|
||
-- cong app inner-eq : app a ≡ app b
|
||
|
||
|
||
-- a + b
|
||
-- _+_ : (a b : ℕ) → ℕ
|
||
-- _+_+_+_ : (a b c d : ℕ) → ℕ
|
||
-- _[_;_]′
|
||
-- a [ 34 ; b ]
|
||
--
|
||
|
||
|
||
x : Bool
|
||
x = true
|
||
|
||
-- _&&_ : Bool → Bool → Bool
|
||
|
||
-- (x && true) : Bool
|
||
|
||
|
||
p : 2 + 3 ≡ 3 + 2
|
||
p = refl
|
||
|
||
-- _+_ : Nat → Nat → Nat
|
||
-- zero + m = m
|
||
-- suc n + m = suc (n + m)
|
||
p2 : (x y : ℕ) → x + y ≡ y + x
|