How to define division operator in Agda?

后端 未结 2 1680
臣服心动
臣服心动 2020-12-20 00:04

I want to divide two natural number. I have made function like this

_/_ : N -> N -> frac
m / one = m / one
(suc m) / n = ??        I dont know what to          


        
2条回答
  •  一个人的身影
    2020-12-20 00:56

    Division is usually defined as iterated substraction which requires a slightly unusual induction principle. See e.g. the definition in the standard library.

提交回复
热议问题