You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove (almost!) all external use of _≤″_ beyond Data.Nat.* (#2262)
* additional proofs and patterns in `Data.Nat.Properties`
* added two projections; refactored `pad*` operations
* `CHANGELOG`
* removed one more use
* removed final uses of `<″-offset` outside `Data.Nat.Base|Properties`
* rename `≤-proof` to `m≤n⇒∃[o]m+o≡n`
* removed new pattern synonyms
* interim commit: deprecate everything!
* add guarded monus; make arguments more irrelevant
* fixed up `CHANGELOG`
* propagate use of irrelevance
* tidy up deprecations; reinstate `s<″s⁻¹` for `Data.Fin.Properties`
* tightened up the deprecation story
* paragraph on use of `pattern` synonyms
* removed `import`
* Update CHANGELOG.md
Fix refs to Algebra.Definitions.RawMagma
* Update Base.agda
Fix refs. to Algebra.Definitions.RawMagma
* inlined guarded monus definition in property
* remove comment about guarded monus
Copy file name to clipboardExpand all lines: src/Data/Nat/Base.agda
+24-13
Original file line number
Diff line number
Diff line change
@@ -363,8 +363,6 @@ infix 4 _≤″_ _<″_ _≥″_ _>″_
363
363
_≤″_ : (m n : ℕ) →Set
364
364
_≤″_ = _∣ˡ_ +-rawMagma
365
365
366
-
pattern less-than-or-equal {k} proof = k , proof
367
-
368
366
_<″_ : Rel ℕ 0ℓ
369
367
m <″ n = suc m ≤″ n
370
368
@@ -374,18 +372,10 @@ m ≥″ n = n ≤″ m
374
372
_>″_ : Rel ℕ 0ℓ
375
373
m >″ n = n <″ m
376
374
377
-
-- Smart constructors of _≤″_ and _<″_
378
-
379
-
pattern ≤″-offset k = less-than-or-equal {k = k} refl
380
-
pattern <″-offset k = ≤″-offset k
381
-
382
-
-- Smart destructors of _<″_
383
-
384
-
s≤″s⁻¹ :∀ {m n} → suc m ≤″ suc n → m ≤″ n
385
-
s≤″s⁻¹ (≤″-offset k) = ≤″-offset k
375
+
-- Smart destructor of _<″_
386
376
387
377
s<″s⁻¹ :∀ {m n} → suc m <″ suc n → m <″ n
388
-
s<″s⁻¹ (<″-offset k) =<″-offset k
378
+
s<″s⁻¹ (k , refl) =k , refl
389
379
390
380
-- _≤‴_: this definition is useful for induction with an upper bound.
391
381
@@ -429,5 +419,26 @@ compare (suc m) (suc n) with compare m n
429
419
-- Please use the new names as continuing support for the old names is
430
420
-- not guaranteed.
431
421
432
-
-- Version 2.0
422
+
-- Version 2.1
423
+
424
+
-- Smart constructors of _≤″_ and _<″_
425
+
pattern less-than-or-equal {k} eq = k , eq
426
+
{-# WARNING_ON_USAGE less-than-or-equal
427
+
"Warning: less-than-or-equal was deprecated in v2.1. Please match directly on proofs of ≤″ using constructor Algebra.Definitions.RawMagma._∣ˡ_._,_ instead. "
428
+
#-}
429
+
pattern ≤″-offset k = k , refl
430
+
{-# WARNING_ON_USAGE ≤″-offset
431
+
"Warning: ≤″-offset was deprecated in v2.1. Please match directly on proofs of ≤″ using pattern (_, refl) from Algebra.Definitions.RawMagma._∣ˡ_ instead. "
432
+
#-}
433
+
pattern <″-offset k = k , refl
434
+
{-# WARNING_ON_USAGE <″-offset
435
+
"Warning: <″-offset was deprecated in v2.1. Please match directly on proofs of ≤″ using pattern (_, refl) from Algebra.Definitions.RawMagma._∣ˡ_ instead. "
436
+
#-}
437
+
438
+
-- Smart destructors of _<″_
433
439
440
+
s≤″s⁻¹ :∀ {m n} → suc m ≤″ suc n → m ≤″ n
441
+
s≤″s⁻¹ (k , refl) = k , refl
442
+
{-# WARNING_ON_USAGE s≤″s⁻¹
443
+
"Warning: s≤″s⁻¹ was deprecated in v2.1. Please match directly on proofs of ≤″ using pattern (_, refl) from Algebra.Definitions.RawMagma._∣ˡ_ instead. "
0 commit comments