coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Konstantin Weitz <weitzkon AT cs.washington.edu>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Real division by 0
- Date: Tue, 20 Dec 2016 08:45:13 -0800
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=weitzkon AT cs.washington.edu; spf=None smtp.mailfrom=weitzkon AT cs.washington.edu; spf=None smtp.helo=postmaster AT mail-lf0-f47.google.com
- Ironport-phdr: 9a23:Dk5gJhJmguoCXS3BRtmcpTZWNBhigK39O0sv0rFitYgRKfTxwZ3uMQTl6Ol3ixeRBMOAuqkC1Lud4/2ocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbQhFgDSwbalwIRiyognctckbipZ+J6gszRfEvmFGcPlMy2NyIlKTkRf85sOu85Nm7i9dpfEv+dNeXKvjZ6g3QqBWAzogM2Au+c3krgLDQheV5nsdSWoZjBxFCBXY4R7gX5fxtiz6tvdh2CSfIMb7Q6w4VSik4qx2ThLjlSUJOCMj8GzPisJ+gqFVrg+/qRNj2IPbep2ZOeBkc6/BYd8XR2xMVdtRWSxbBYO8apMCAe8GPeZetIn9u0EBrR2iBQmtAuPk1z9HiWH33a0m0uUqDAbL3QI+ENIPrHTVrdb1NKAUUe2u0KbI1i/Pbv1M1jfm6IjIcxYhof6QXbJ3d8rd01cgGB7YjliJr4HuIjCb1vwVvmSF8+ZtUfijhm0npg1rvDSj28chhpPGi48XzF3P6D93z5wvJdKiTU52ed6kH4VUtyGdL4Z2R9ktQ2BsuCojzr0Gt4K3cDEEyJkoxRPTcfOHc4+P4hLsUOaePy10i25ieLK6nxqy8E6gxfPgVsSszlpGsi5InsPPu30NzRDf9NWLR/tn8kqu2zuDzwXT5ftFIUAwm6rbMZkhwrsom5sdr0vDHzP2mUT1jK+RcEUp4fSn6//9brTovJCcLI90igD4MqQhhsy/BuI4PhIQUGeG5OSwzKfj8lHhQLVWkv02lbHUv4zdJcQCv6K2HwtV0ps45BukFDen0NEYnWEdI15feRKHiZLpO1DUL/ziA/e/mQfkrDA+zPffe7blH5/lL37Zkb6nc6wuxVRbzV8QytZE+5tSFrAHaM3+W1Pj/IjHAx4lIQ+zxc7sE5Ni35geWGSAHqifdq7erAnbtaoUP+CQadpN637GIP8/6qu2gA==
I looked at Coq's standard real number library, and was surprised that the multiplicative inverse is defined even for 0 (I always thought that the inverse is only defined for non-zero arguments).
Parameter Rinv : R -> R.
It seems that the standard library compensates for this, by only specifying the behavior of the inverse for non-zero arguments.
Axiom Rinv_l : forall r:R, r <> 0 -> / r * r = 1.
Nethertheless, this means there is a real number assigned to 0/0:
Check 0/0.
And we can even prove simple theorems about division by 0.
Goal 5 / 0 = (1/0) * 5.
unfold Rdiv.
rewrite Rmult_comm.
rewrite Rmult_1_l.
reflexivity.
Qed.
Is this definition of the real numbers safe to use or are there any edge cases that may allow me to prove False?
Are these still the real numbers? It seems that when we play the same trick for negative square roots, we extend the real numbers to the complex numbers.
Can we use the same trick to add other real valued functions that are not necessarily defined for all inputs, such as infinite sums, limits, etc?
- [Coq-Club] Real division by 0, Konstantin Weitz, 12/20/2016
- Re: [Coq-Club] Real division by 0, Guillaume Melquiond, 12/20/2016
- Re: [Coq-Club] Real division by 0, Konstantin Weitz, 12/20/2016
- Re: [Coq-Club] Real division by 0, Guillaume Melquiond, 12/20/2016
Archive powered by MHonArc 2.6.18.