annotate Paper/src/agda-term2.agda.replaced @ 0:c59202657321

init
author soto <soto@cr.ie.u-ryukyu.ac.jp>
date Tue, 02 Nov 2021 06:55:58 +0900
parents
children 339fb67b4375
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 +-comm : (x y : @$\mathbb{N}$@) @$\rightarrow$@ x + y @$\equiv$@ y + x
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 +-comm zero y rewrite (+zero {y}) = refl
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 +-comm (suc x) y = let open @$\equiv$@-Reasoning in
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 begin
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 (suc x) + y @$\equiv$@@$\langle$@@$\rangle$@
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 suc (x + y) @$\equiv$@@$\langle$@ cong suc (+-comm x y) @$\rangle$@
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 suc (y + x) @$\equiv$@@$\langle$@ ?0 @$\rangle$@
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 ?1 @$\blacksquare$@
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 -- ?0 : suc (y + x) @$\equiv$@ y + suc x
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 -- ?1 : y + suc x