Skip to content

Commit 76ef2ad

Browse files
committed
Use equational reasoning in quotient|n proof
1 parent 1bd7dae commit 76ef2ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Data/Nat/Divisibility.agda

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,8 @@ m≤n⇒m!∣n! m≤n = help (≤⇒≤′ m≤n)
305305
-- Properties of quotient
306306

307307
quotient∣n : {m n} (m∣n : m ∣ n) quotient m∣n ∣ n
308-
quotient∣n {m = m} m∣n = divides m (trans (_∣_.equality m∣n) (*-comm (quotient m∣n) m))
308+
quotient∣n {m = m} {n = n} m∣n = divides m $ begin-equality
309+
n ≡⟨ _∣_.equality m∣n ⟩
310+
quotient m∣n * m ≡⟨ *-comm (quotient m∣n) m ⟩
311+
m * quotient m∣n ∎
312+
where open ≤-Reasoning

0 commit comments

Comments
 (0)