src/HOL/String.thy
changeset 72164 b7c54ff7f2dd
parent 72024 9b4135e8bade
child 72170 7fa9605b226c
equal deleted inserted replaced
72159:40b5ee5889d2 72164:b7c54ff7f2dd
   521 
   521 
   522 context
   522 context
   523 begin
   523 begin
   524 
   524 
   525 qualified lift_definition less_eq_literal :: "String.literal \<Rightarrow> String.literal \<Rightarrow> bool"
   525 qualified lift_definition less_eq_literal :: "String.literal \<Rightarrow> String.literal \<Rightarrow> bool"
   526   is "ord.lexordp_eq (\<lambda>c d. of_char c < (of_char d :: nat))"
   526   is "order.lexordp_eq (\<lambda>c d. of_char c < (of_char d :: nat))"
   527   .
   527   .
   528 
   528 
   529 qualified lift_definition less_literal :: "String.literal \<Rightarrow> String.literal \<Rightarrow> bool"
   529 qualified lift_definition less_literal :: "String.literal \<Rightarrow> String.literal \<Rightarrow> bool"
   530   is "ord.lexordp (\<lambda>c d. of_char c < (of_char d :: nat))"
   530   is "order.lexordp (\<lambda>c d. of_char c < (of_char d :: nat))"
   531   .
   531   .
   532 
   532 
   533 instance proof -
   533 instance proof -
   534   from linorder_char interpret linorder "ord.lexordp_eq (\<lambda>c d. of_char c < (of_char d :: nat))"
   534   from linorder_char interpret linorder "order.lexordp_eq (\<lambda>c d. of_char c < (of_char d :: nat))"
   535     "ord.lexordp (\<lambda>c d. of_char c < (of_char d :: nat)) :: string \<Rightarrow> string \<Rightarrow> bool"
   535     "order.lexordp (\<lambda>c d. of_char c < (of_char d :: nat)) :: string \<Rightarrow> string \<Rightarrow> bool"
   536     by (rule linorder.lexordp_linorder)
   536     by (rule linorder.lexordp_linorder)
   537   show "PROP ?thesis"
   537   show "PROP ?thesis"
   538     by (standard; transfer) (simp_all add: less_le_not_le linear)
   538     by (standard; transfer) (simp_all add: less_le_not_le linear)
   539 qed
   539 qed
   540 
   540