on master help sign in
Change to infix form
7800e3cJean-Remi Desjardins
libs/prelude/Prelude/Fin.idr+3−3
@@ -95,9 +95,9 @@ instance MaxBound (Fin (S n)) where
95
95
96||| Substract two Fins, keeping the bound of the minuend
96||| Substract two Fins, keeping the bound of the minuend
97(-) : Fin n -> Fin m -> Fin n
97(-) : Fin n -> Fin m -> Fin n
98−(-) fZ _ = fZ
98+fZ - _ = fZ
99−(-) f fZ = f
99+f - fZ = f
100−(-) (fS f) (fS f') = weaken $ f - f'
100+(fS f) - (fS f') = weaken $ f - f'
101
101
102||| Multiply two Fins, extending the bound
102||| Multiply two Fins, extending the bound
103(*) : Fin n -> Fin m -> Fin (n * m)
103(*) : Fin n -> Fin m -> Fin (n * m)