First of all I'm new to proof theory and coq, so I'd appreciate answers to be easy to understand.
I'm trying to build up definitions to eventually define prime numbers; I'm currently trying to define divisibility, and in my definition I've written the true cases.
- Every nat is divisible with 1.
- Every nat is divisible with itself.
And my inductive case (applyable when '(i > j)' ):
- Every nat 'i' is divisible by 'j' if '(i - j)' is divisible by 'j'.
Now in some of my subsequent lemmas I need that everything not fulfilling this is false.
How would I go about encoding this in my definition? I'm thinking something alike, when none of the above is applicable --> false. - In a sense an else statement for definitions.
i >= j
. (3) I'd change the 3d rule to "Everyi + j
is divisible byj
ifi
is divisible byj
". It makes proofs easier. (4) It seems to me that you'd need a rule for handling the case "Zero is divisible by every nat". (5) The 1st rule is redundant, it can be obtained from the 2nd and the 3d rules. Intuitively, start with 1 divides 1, then proceed to 1 divides (1 + 1), etc., up to arbitraryn
. – Anton TrunovDefinition divides' x y := exists z, y = z*x
. – Anton Trunov