src/HOL/Induct/LList.ML
changeset 8703 816d8f6513be
parent 8442 96023903c2df
child 9747 043098ba5098
equal deleted inserted replaced
8702:78b7010db847 8703:816d8f6513be
   614 (**** Proofs about type 'a llist functions ****)
   614 (**** Proofs about type 'a llist functions ****)
   615 
   615 
   616 (*** Deriving llist_equalityI -- llist equality is a bisimulation ***)
   616 (*** Deriving llist_equalityI -- llist equality is a bisimulation ***)
   617 
   617 
   618 Goalw [LListD_Fun_def]
   618 Goalw [LListD_Fun_def]
   619     "r <= (llist A) Times (llist A) ==> \
   619     "r <= (llist A) <*> (llist A) ==> \
   620 \           LListD_Fun (diag A) r <= (llist A) Times (llist A)";
   620 \           LListD_Fun (diag A) r <= (llist A) <*> (llist A)";
   621 by (stac llist_unfold 1);
   621 by (stac llist_unfold 1);
   622 by (simp_tac (simpset() addsimps [NIL_def, CONS_def]) 1);
   622 by (simp_tac (simpset() addsimps [NIL_def, CONS_def]) 1);
   623 by (Fast_tac 1);
   623 by (Fast_tac 1);
   624 qed "LListD_Fun_subset_Times_llist";
   624 qed "LListD_Fun_subset_Times_llist";
   625 
   625 
   626 Goal "prod_fun Rep_LList Rep_LList `` r <= \
   626 Goal "prod_fun Rep_LList Rep_LList `` r <= \
   627 \    (llist(range Leaf)) Times (llist(range Leaf))";
   627 \    (llist(range Leaf)) <*> (llist(range Leaf))";
   628 by (fast_tac (claset() delrules [image_subsetI]
   628 by (fast_tac (claset() delrules [image_subsetI]
   629 		       addIs [Rep_LList RS LListD]) 1);
   629 		       addIs [Rep_LList RS LListD]) 1);
   630 qed "subset_Times_llist";
   630 qed "subset_Times_llist";
   631 
   631 
   632 Goal "r <= (llist(range Leaf)) Times (llist(range Leaf)) ==> \
   632 Goal "r <= (llist(range Leaf)) <*> (llist(range Leaf)) ==> \
   633 \    prod_fun (Rep_LList o Abs_LList) (Rep_LList o Abs_LList) `` r <= r";
   633 \    prod_fun (Rep_LList o Abs_LList) (Rep_LList o Abs_LList) `` r <= r";
   634 by Safe_tac;
   634 by Safe_tac;
   635 by (etac (subsetD RS SigmaE2) 1);
   635 by (etac (subsetD RS SigmaE2) 1);
   636 by (assume_tac 1);
   636 by (assume_tac 1);
   637 by (asm_simp_tac (simpset() addsimps [LListI RS Abs_LList_inverse]) 1);
   637 by (asm_simp_tac (simpset() addsimps [LListI RS Abs_LList_inverse]) 1);