src/ZF/ex/LList_Eq.ML
changeset 173 85071e6ad295
parent 120 09287f26bfb8
child 279 7738aed3f84d
equal deleted inserted replaced
172:3224c46737ef 173:85071e6ad295
    26   val type_intrs = codatatype_intrs
    26   val type_intrs = codatatype_intrs
    27   val type_elims = [quniv_QPair_E]
    27   val type_elims = [quniv_QPair_E]
    28 **)
    28 **)
    29 
    29 
    30 val lleq_cs = subset_cs
    30 val lleq_cs = subset_cs
    31 	addSIs [succI1, Int_Vset_0_subset,
    31 	addSIs [QPair_Int_Vset_subset_UN RS subset_trans, QPair_mono]
    32 		QPair_Int_Vset_succ_subset_trans,
    32         addSEs [Ord_in_Ord, Pair_inject];
    33 		QPair_Int_Vset_subset_trans];
       
    34 
    33 
    35 (** Some key feature of this proof needs to be made a general theorem! **)
    34 (*Lemma for proving finality.  Unfold the lazy list; use induction hypothesis*)
    36 
       
    37 (*Keep unfolding the lazy list until the induction hypothesis applies*)
       
    38 goal LList_Eq.thy
    35 goal LList_Eq.thy
    39    "!!i. Ord(i) ==> ALL l l'. <l,l'> : lleq(A) --> l Int Vset(i) <= l'";
    36    "!!i. Ord(i) ==> ALL l l'. <l,l'> : lleq(A) --> l Int Vset(i) <= l'";
    40 by (etac trans_induct 1);
    37 by (etac trans_induct 1);
    41 by (safe_tac subset_cs);
    38 by (REPEAT (resolve_tac [allI, impI] 1));
    42 by (etac LList_Eq.elim 1);
    39 by (etac LList_Eq.elim 1);
    43 by (safe_tac (subset_cs addSEs [Pair_inject]));
    40 by (rewrite_goals_tac (QInr_def::LList.con_defs));
    44 by (rewrite_goals_tac LList.con_defs);
    41 by (safe_tac lleq_cs);
    45 by (etac Ord_cases 1 THEN REPEAT_FIRST hyp_subst_tac);
    42 by (fast_tac (subset_cs addSEs [Ord_trans, make_elim bspec]) 1);
    46 (*0 case*)
       
    47 by (fast_tac lleq_cs 1);
       
    48 (*succ(j) case*)
       
    49 by (rewtac QInr_def);
       
    50 by (fast_tac lleq_cs 1);
       
    51 (*Limit(i) case*)
       
    52 by (etac (Limit_Vfrom_eq RS ssubst) 1);
       
    53 by (rtac (Int_UN_distrib RS ssubst) 1);
       
    54 by (fast_tac lleq_cs 1);
       
    55 val lleq_Int_Vset_subset_lemma = result();
    43 val lleq_Int_Vset_subset_lemma = result();
    56 
    44 
    57 val lleq_Int_Vset_subset = standard
    45 val lleq_Int_Vset_subset = standard
    58 	(lleq_Int_Vset_subset_lemma RS spec RS spec RS mp);
    46 	(lleq_Int_Vset_subset_lemma RS spec RS spec RS mp);
    59 
    47