Claim :
Proof by induct on :
-
:
the goal become
,In this case by inversion precedence in goal with respect to rule
Prefix
we can know,can only be 0 and at this time claim holds
-
:
by rewriting the second definition of sort, then the goal become:
.
by rule
Prefix
we can know,can only be
and we can always find exists
. And
union something is always larger than itself so claim holds
-
Similar operation to before, the goal become:
.
by rule
Choice1
andChoice2
we can see, we can always find ato let precedence hold, and
can become either
or
. union of set is monotonic, of course larger. Clearly claim holds.
-
The goal become:
similar inversion, this time we have 3 interesting case
- by rule
Par1
: we can have, which means by 4th rule of sort we can have
. By inductive hypothesis we can know if
is the derivation of
then we will have
so clearly final goal is true
-
Par2
andPar3
are similar. the only difference inPar3
is bothand
cause a shrink the size of set.
- by rule
-
The goal become:
By rule
Restrict
we can knowcan become
, according to the last rule of sort we can rewrite
in the goal as
. And according to inductive hypothesis, we can know
. So clearly claim hold.
All inductive cases is proved.
Q.E.D