annotate prepaper/src/agda-term3.agda.replaced @ 14:a63df15c9afc default tip

DONE
author soto <soto@cr.ie.u-ryukyu.ac.jp>
date Mon, 15 Feb 2021 23:36:39 +0900
parents 3dba680da508
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3dba680da508 init-test
soto
parents:
diff changeset
1 +-comm : (x y : @$\mathbb{N}$@) @$\rightarrow$@ x + y @$\equiv$@ y + x
3dba680da508 init-test
soto
parents:
diff changeset
2 +-comm zero y rewrite (+zero {y}) = refl
3dba680da508 init-test
soto
parents:
diff changeset
3 +-comm (suc x) y = let open @$\equiv$@-Reasoning in
3dba680da508 init-test
soto
parents:
diff changeset
4 begin
3dba680da508 init-test
soto
parents:
diff changeset
5 suc (x + y) @$\equiv$@@$\langle$@@$\rangle$@
3dba680da508 init-test
soto
parents:
diff changeset
6 suc (x + y) @$\equiv$@@$\langle$@ cong suc (+-comm x y) @$\rangle$@
3dba680da508 init-test
soto
parents:
diff changeset
7 suc (y + x) @$\equiv$@@$\langle$@ sym (+-suc {y} {x}) @$\rangle$@
3dba680da508 init-test
soto
parents:
diff changeset
8 y + suc x @$\blacksquare$@
3dba680da508 init-test
soto
parents:
diff changeset
9
3dba680da508 init-test
soto
parents:
diff changeset
10 -- +-suc : {x y : @$\mathbb{N}$@} @$\rightarrow$@ x + suc y @$\equiv$@ suc (x + y)
3dba680da508 init-test
soto
parents:
diff changeset
11 -- +-suc {zero} {y} = refl
3dba680da508 init-test
soto
parents:
diff changeset
12 -- +-suc {suc x} {y} = cong suc (+-suc {x} {y})