coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Bernard Hurley <bernard AT marcade.biz>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Functions that differ at exactly one point
- Date: Sun, 29 Apr 2012 18:03:54 +0100
Hi all,
If I have a function [f: nat -> nat], It is easy to define a function
that differs at just one point in its domain as in:
++++++++++++++++++++++++++++++++
Variable f : nat -> nat.
Fixpoint g (n : nat) : nat :=
match n with
| 55 => 2
| _ => f n
end.
++++++++++++++++++++++++++++++++
But is it possible to define a function that differs at an arbitrary
integer as the following incorrect code is trying to do:
+++++++++++++++++++++++++++++++++
Variable f : nat -> nat.
Variable m : nat.
Fixpoint g (n : nat) : nat :=
match n with
| m => 2
| _ => f n
end.
++++++++++++++++++++++++++++++++++
Intuitively, since equality is decidable in [nat], there should be some
way of doing this.
Thanks,
Bernard.
- [Coq-Club] Functions that differ at exactly one point, Bernard Hurley
- Re: [Coq-Club] Functions that differ at exactly one point, Jonas Oberhauser
- Re: [Coq-Club] Functions that differ at exactly one point,
Mathieu Boespflug
- Re: [Coq-Club] Functions that differ at exactly one point,
Bernard Hurley
- Re: [Coq-Club] Functions that differ at exactly one point,
Daniel Schepler
- Re: [Coq-Club] Functions that differ at exactly one point, Bernard Hurley
- Re: [Coq-Club] Functions that differ at exactly one point,
Daniel Schepler
- Re: [Coq-Club] Functions that differ at exactly one point,
Bernard Hurley
- Message not available
- Message not available
- Re: [Coq-Club] Functions that differ at exactly one point, Jonas Oberhauser
- Message not available
Archive powered by MhonArc 2.6.16.