2020-05-19 20:25:18 +03:00
|
|
|
1/1: Building Rewrite (Rewrite.idr)
|
2020-08-16 14:20:12 +03:00
|
|
|
Error: While processing right hand side of wrongCommutes. Rewriting by m + k = k + m did not change type S k + m = m + S k.
|
2020-07-28 15:11:42 +03:00
|
|
|
|
2021-06-05 14:53:22 +03:00
|
|
|
Rewrite:15:25--15:57
|
2021-02-11 20:24:26 +03:00
|
|
|
11 | plusCommutes (S k) m = rewrite plusCommutes k m in sym (plusnSm m k)
|
|
|
|
12 |
|
|
|
|
13 | wrongCommutes : (n, m : Nat) -> n + m = m + n
|
|
|
|
14 | wrongCommutes Z m = sym (plusnZ m)
|
2020-07-22 22:16:43 +03:00
|
|
|
15 | wrongCommutes (S k) m = rewrite plusCommutes m k in ?bar
|
2021-02-11 20:24:26 +03:00
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-07-28 15:11:42 +03:00
|
|
|
|
|
|
|
Error: While processing right hand side of wrongCommutes2. Nat is not a rewrite rule type.
|
|
|
|
|
2021-06-05 14:53:22 +03:00
|
|
|
Rewrite:19:26--19:43
|
2021-02-11 20:24:26 +03:00
|
|
|
15 | wrongCommutes (S k) m = rewrite plusCommutes m k in ?bar
|
|
|
|
16 |
|
|
|
|
17 | wrongCommutes2 : (n, m : Nat) -> n + m = m + n
|
|
|
|
18 | wrongCommutes2 Z m = sym (plusnZ m)
|
2020-07-22 22:16:43 +03:00
|
|
|
19 | wrongCommutes2 (S k) m = rewrite m in ?bar
|
2021-02-11 20:24:26 +03:00
|
|
|
^^^^^^^^^^^^^^^^^
|
2020-07-28 15:11:42 +03:00
|
|
|
|