Quot/QuotList.thy
changeset 666 adcceaf31f92
parent 645 fe2a37cfecd3
child 668 ef5b941f00e2
equal deleted inserted replaced
664:546ba31fbb83 666:adcceaf31f92
   172 apply (rule_tac xs="xb" and ys="yb" in list_induct2)
   172 apply (rule_tac xs="xb" and ys="yb" in list_induct2)
   173 apply (rule list_rel_len)
   173 apply (rule list_rel_len)
   174 apply (simp_all)
   174 apply (simp_all)
   175 done
   175 done
   176 
   176 
   177 (* TODO: foldr_rsp should be similar *)
   177 lemma foldr_rsp[quot_respect]:
   178 
   178   assumes q1: "Quotient R1 Abs1 Rep1"
   179 
   179   and     q2: "Quotient R2 Abs2 Rep2"
   180 
   180   shows "((R1 ===> R2 ===> R2) ===> list_rel R1 ===> R2 ===> R2) foldr foldr"
   181 
   181 apply auto
   182 (* TODO: Rest are unused *)
   182 apply(subgoal_tac "R2 xb yb \<longrightarrow> list_rel R1 xa ya \<longrightarrow> R2 (foldr x xa xb) (foldr y ya yb)")
       
   183 apply simp
       
   184 apply (rule_tac xs="xa" and ys="ya" in list_induct2)
       
   185 apply (rule list_rel_len)
       
   186 apply (simp_all)
       
   187 done
       
   188 
       
   189 (* Rest are unused *)
   183 
   190 
   184 lemma list_rel_eq:
   191 lemma list_rel_eq:
   185   shows "list_rel (op =) \<equiv> (op =)"
   192   shows "list_rel (op =) \<equiv> (op =)"
   186 apply(rule eq_reflection)
   193 apply(rule eq_reflection)
   187 unfolding expand_fun_eq
   194 unfolding expand_fun_eq