doc-src/Tutorial/ToyList/ToyList.ML
author wenzelm
Sat, 01 Jul 2000 19:49:20 +0200
changeset 9226 cbe6144f0f15
parent 5377 efb799c5ed3c
permissions -rw-r--r--
tuned;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5377
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     1
Goal "xs @ [] = xs";
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     2
by(induct_tac "xs" 1);
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     3
by(Auto_tac);
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     4
qed "app_Nil2";
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     5
Addsimps [app_Nil2];
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     6
Goal "(xs @ ys) @ zs = xs @ (ys @ zs)";
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     7
by(induct_tac "xs" 1);
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     8
by(Auto_tac);
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
     9
qed "app_assoc";
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    10
Addsimps [app_assoc];
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    11
Goal "rev(xs @ ys) = (rev ys) @ (rev xs)";
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    12
by(induct_tac "xs" 1);
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    13
by(Auto_tac);
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    14
qed "rev_app";
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    15
Addsimps [rev_app];
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    16
Goal "rev(rev xs) = xs";
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    17
by(induct_tac "xs" 1);
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    18
by(Auto_tac);
efb799c5ed3c *** empty log message ***
nipkow
parents:
diff changeset
    19
qed "rev_rev";