-
Notifications
You must be signed in to change notification settings - Fork 60
Description
This would depend on divisibility world, and my vision of the goal is a proof that 2 is prime.
Following mathlib we could define p to be IsPreprime if a | p -> a = 1 \or a = p. Note that the difference between IsPreprime and IsPrime is that 1 is Preprime; the definition of prime would be 2 <= p \and IsPreprime p.
One design decision needed here: whether to let the user have access to mathlib's interval_cases tactic. FThis will turn a goal of P(k) plus a hypothesis k <= 2 to the three goals P(0), P(1) and P(2). For now I say no.
My vision is: make the user prove manually that k<=2 implies k=0 or k=1 or k=2 (which we've done in <= world; probably this lemma should be moved to this world; note however that we use k<=1 implies k=0 or k=1 in advanced multiplication world so we can't move that) and then that 2 is prime using the fact that a | 2 => a <= 2 (which we need to do in divisibility world; we will prove there that a | b and b != 0 => a <= b).
Perhaps we should also have a definition of preprime like in mathlib: IsPreprime n means a | n => a = 1 or a = n (so 1 is preprime and not prime). Note to self: have we taught the user how to deal with \and hypotheses and goals? No! So need to explain this with cases.