File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -2040,6 +2040,10 @@ Other minor changes
2040
2040
+-*-rawSemiring : RawSemiring 0ℓ 0ℓ
2041
2041
```
2042
2042
2043
+ * Added a new proof to ` Data.Nat.Binary.Properties ` :
2044
+ ``` agda
2045
+ suc-injective : Injective _≡_ _≡_ suc
2046
+ ```
2043
2047
2044
2048
* Added new definitions and proofs to ` Data.Nat.Primality ` :
2045
2049
``` agda
Original file line number Diff line number Diff line change @@ -1309,6 +1309,18 @@ double-suc x = begin
1309
1309
-- Properties of suc
1310
1310
------------------------------------------------------------------------
1311
1311
1312
+ suc≢0 : suc x ≢ zero
1313
+ suc≢0 {zero} ()
1314
+ suc≢0 {2[1+ _ ]} ()
1315
+ suc≢0 {1+[2 _ ]} ()
1316
+
1317
+ suc-injective : Injective _≡_ _≡_ suc
1318
+ suc-injective {zero} {zero} p = refl
1319
+ suc-injective {zero} {2[1+ y ]} p = contradiction 1+[2 p ]-injective (suc≢0 ∘ sym)
1320
+ suc-injective {2[1+ x ]} {zero} p = contradiction 1+[2 p ]-injective suc≢0
1321
+ suc-injective {2[1+ x ]} {2[1+ y ]} p = cong 2[1+_] (suc-injective 1+[2 p ]-injective)
1322
+ suc-injective {1+[2 x ]} {1+[2 y ]} refl = refl
1323
+
1312
1324
2[1+_]-double-suc : 2[1+_] ≗ double ∘ suc
1313
1325
2[1+_]-double-suc zero = refl
1314
1326
2[1+_]-double-suc 2[1+ x ] = cong 2[1+_] (2[1+_]-double-suc x)
@@ -1325,11 +1337,6 @@ double-suc x = begin
1325
1337
suc (double 1+[2 x ]) ∎
1326
1338
where open ≡-Reasoning ; 2x = double x
1327
1339
1328
- suc≢0 : suc x ≢ zero
1329
- suc≢0 {zero} ()
1330
- suc≢0 {2[1+ _ ]} ()
1331
- suc≢0 {1+[2 _ ]} ()
1332
-
1333
1340
x+suc[y]≡suc[x]+y : ∀ x y → x + suc y ≡ suc x + y
1334
1341
x+suc[y]≡suc[x]+y x y = begin
1335
1342
x + suc y ≡⟨ +-comm x _ ⟩
You can’t perform that action at this time.
0 commit comments