import MyNat.Definition
namespace MyNat
open MyNat
Function world.
Level 8: (P → Q) → ((Q → empty) → (P → empty))
Level 8 is the same as level 7, except we have replaced the
set F
with the empty set ∅
. The same proof will work (after all, our
previous proof worked for all sets, and the empty set is a set).
But note that if you start with intro f; intro h; intro p,
(which can incidentally be shortened to intros f h p
,
see intros tactic),
then the local context looks like this:
P Q : Type,
f : P → Q,
h : Q → empty,
p : P
⊢ empty
and your job is to construct an element of the empty set!
This on the face of it seems hard, but what is going on is that
our hypotheses (we have an element of P
, and functions P → Q
and Q → ∅
) are themselves contradictory, so
I guess we are doing some kind of proof by contradiction at this point? However,
if your next line is apply h
then all of a sudden the goal
seems like it might be possible again. If this is confusing, note
that the proof of the previous world worked for all sets F
, so in particular
it worked for the empty set, you just probably weren't really thinking about
this case explicitly beforehand. [Technical note to constructivists: I know
that we are not doing a proof by contradiction. But how else do you explain
to a classical mathematician that their goal is to prove something false
and this is OK because their hypotheses don't add up?]
Definition
Whatever the sets P
and Q
are, we
make an element of \(\operatorname{Hom}(\operatorname{Hom}(P,Q),
\operatorname{Hom}(\operatorname{Hom}(Q,\emptyset),\operatorname{Hom}(P,\emptyset)))\).
example (example: {empty : Sort u_1} → (P Q : Type) → (P → Q) → (Q → empty) → P → emptyPP: TypeQ :Q: TypeType) : (Type: Type 1P →P: TypeQ) → ((Q: TypeQ →Q: Typeempty) → (empty: Sort u_1P →P: Typeempty)) :=empty: Sort u_1empty: Sort ?u.27
P, Q: Type(P → Q) → (Q → empty) → P → emptyempty: Sort ?u.27
P, Q: Type
f: P → Q
h: Q → empty
p: Pemptyempty: Sort ?u.27
P, Q: Type
f: P → Q
h: Q → empty
p: PQempty: Sort ?u.27
P, Q: Type
f: P → Q
h: Q → empty
p: PPGoals accomplished! 🐙
Next up Level 9