src/HOL/Induct/LList.ML
changeset 10186 499637e8f2c6
parent 9870 2374ba026fc6
child 10212 33fe2d701ddd
equal deleted inserted replaced
10185:c452fea3ce74 10186:499637e8f2c6
   307 Goal "mono(CONS(M))";
   307 Goal "mono(CONS(M))";
   308 by (REPEAT (ares_tac [monoI, subset_refl, CONS_mono] 1));
   308 by (REPEAT (ares_tac [monoI, subset_refl, CONS_mono] 1));
   309 qed "Lconst_fun_mono";
   309 qed "Lconst_fun_mono";
   310 
   310 
   311 (* Lconst(M) = CONS M (Lconst M) *)
   311 (* Lconst(M) = CONS M (Lconst M) *)
   312 bind_thm ("Lconst", (Lconst_fun_mono RS (Lconst_def RS def_lfp_Tarski)));
   312 bind_thm ("Lconst", (Lconst_fun_mono RS (Lconst_def RS def_lfp_unfold)));
   313 
   313 
   314 (*A typical use of co-induction to show membership in the gfp.
   314 (*A typical use of co-induction to show membership in the gfp.
   315   The containing set is simply the singleton {Lconst(M)}. *)
   315   The containing set is simply the singleton {Lconst(M)}. *)
   316 Goal "M:A ==> Lconst(M): llist(A)";
   316 Goal "M:A ==> Lconst(M): llist(A)";
   317 by (rtac (singletonI RS llist_coinduct) 1);
   317 by (rtac (singletonI RS llist_coinduct) 1);
   328 
   328 
   329 (*Thus we could have used gfp in the definition of Lconst*)
   329 (*Thus we could have used gfp in the definition of Lconst*)
   330 Goal "gfp(%N. CONS M N) = LList_corec M (%x. Some(x,x))";
   330 Goal "gfp(%N. CONS M N) = LList_corec M (%x. Some(x,x))";
   331 by (rtac (equals_LList_corec RS fun_cong) 1);
   331 by (rtac (equals_LList_corec RS fun_cong) 1);
   332 by (Simp_tac 1);
   332 by (Simp_tac 1);
   333 by (rtac (Lconst_fun_mono RS gfp_Tarski) 1);
   333 by (rtac (Lconst_fun_mono RS gfp_unfold) 1);
   334 qed "gfp_Lconst_eq_LList_corec";
   334 qed "gfp_Lconst_eq_LList_corec";
   335 
   335 
   336 
   336 
   337 (*** Isomorphisms ***)
   337 (*** Isomorphisms ***)
   338 
   338